Skip to content

Commit

Permalink
working
Browse files Browse the repository at this point in the history
  • Loading branch information
ManApart committed Jun 23, 2022
1 parent 6828176 commit 8ec88a7
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 20 deletions.
2 changes: 0 additions & 2 deletions src/main/java/org/manapart/enderports/EnderPorts.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ object EnderPorts {
ModItems.REGISTRY.register(MOD_BUS)
}

val icon = Item(Item.Properties())

}
12 changes: 0 additions & 12 deletions src/main/java/org/manapart/enderports/ItemGroupEP.kt

This file was deleted.

4 changes: 1 addition & 3 deletions src/main/java/org/manapart/enderports/ModBlocks.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ import net.minecraftforge.registries.ForgeRegistries
import thedarkcolour.kotlinforforge.forge.registerObject

object ModBlocks {
val teleporter = Teleporter()

val REGISTRY = DeferredRegister.create(ForgeRegistries.BLOCKS, MODID)

val TELEPORTER_BLOCK by REGISTRY.registerObject("teleporter") {
teleporter
Teleporter()
}
}
2 changes: 1 addition & 1 deletion src/main/java/org/manapart/enderports/ModItems.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ object ModItems {
val REGISTRY = DeferredRegister.create(ForgeRegistries.ITEMS, MODID)

val TELEPORT_ITEM by REGISTRY.registerObject("teleporteritem") {
TeleporterItem(ModBlocks.teleporter)
TeleporterItem(ModBlocks.TELEPORTER_BLOCK)
}
}
3 changes: 2 additions & 1 deletion src/main/java/org/manapart/enderports/TeleporterItem.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.manapart.enderports

import net.minecraft.world.item.BlockItem
import net.minecraft.world.item.CreativeModeTab


class TeleporterItem(block: Teleporter) : BlockItem(block, Properties().tab(ItemGroupEP.instance))
class TeleporterItem(block: Teleporter) : BlockItem(block, Properties().tab(CreativeModeTab.TAB_MISC))
2 changes: 1 addition & 1 deletion src/main/java/org/manapart/enderports/TeleporterNetwork.kt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class TeleporterNetwork(private val world: Level) : SavedData() {

private fun isTeleporter(pos: BlockPos): Boolean {
val key = world.getBlockState(pos).block.descriptionId.toString()
return key == ModBlocks.teleporter.descriptionId.toString()
return key == ModBlocks.TELEPORTER_BLOCK.descriptionId.toString()
}

internal class NetworkSupplier(private val world: Level) : Supplier<TeleporterNetwork> {
Expand Down

0 comments on commit 8ec88a7

Please sign in to comment.