diff --git a/forge/src/generated/resources/.cache/3f86aa5b3fd4534fbd06f25389a63a7c7fd827ec b/forge/src/generated/resources/.cache/3f86aa5b3fd4534fbd06f25389a63a7c7fd827ec index ff24a9ef..aebfd61c 100644 --- a/forge/src/generated/resources/.cache/3f86aa5b3fd4534fbd06f25389a63a7c7fd827ec +++ b/forge/src/generated/resources/.cache/3f86aa5b3fd4534fbd06f25389a63a7c7fd827ec @@ -1,4 +1,4 @@ -// 1.20.1 2023-11-25T16:11:13.168808 Tags for minecraft:block mod id temporalsmith +// 1.20.1 2023-11-25T18:19:26.130605 Tags for minecraft:block mod id temporalsmith 82963b29c120fb55c17c40fe37b1c98c60346b84 data/forge/tags/blocks/deepslate_ores/aqumarine_ores.json edd052247952263e801a8ba38de967b85c9c1dc4 data/forge/tags/blocks/deepslate_ores/graphite_ores.json fc6b7da8497984df4efddd78ed393469f77e7495 data/forge/tags/blocks/deepslate_ores/imperium_ores.json @@ -23,4 +23,4 @@ dcbd959620590264e88e226bd2c40f6552839ec6 data/forge/tags/blocks/storage_blocks/r 118f91ee0e0e87a0393fd90770b0fa4db7c74e3e data/minecraft/tags/blocks/needs_diamond_tool.json dd9f28c0503a62d38ea0f2332885885ccedae3f1 data/minecraft/tags/blocks/needs_iron_tool.json cef73fd4903f2919af82514cf812d9da3579a438 data/minecraft/tags/blocks/needs_stone_tool.json -3af5f180777788dd4545245855261ca85d08d9d5 data/temporalsmith/tags/blocks/portal_frame_blocks.json +2a312b5b913bb99f9ecc0630737fc15267ee6baf data/temporalsmith/tags/blocks/portal_maker_blocks.json diff --git a/forge/src/generated/resources/data/temporalsmith/tags/blocks/portal_frame_blocks.json b/forge/src/generated/resources/data/temporalsmith/tags/blocks/portal_frame_blocks.json deleted file mode 100644 index c9087e03..00000000 --- a/forge/src/generated/resources/data/temporalsmith/tags/blocks/portal_frame_blocks.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "temporalsmith:enderite_portal_frame" - ] -} \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/temporalsmith/tags/blocks/portal_frame_blocks.json b/forge/src/generated/resources/data/temporalsmith/tags/blocks/portal_maker_blocks.json similarity index 100% rename from neoforge/src/generated/resources/data/temporalsmith/tags/blocks/portal_frame_blocks.json rename to forge/src/generated/resources/data/temporalsmith/tags/blocks/portal_maker_blocks.json diff --git a/forge/src/main/java/io/github/realyusufismail/temporalsmith/blocks/EnderitePortalFrame.java b/forge/src/main/java/io/github/realyusufismail/temporalsmith/blocks/EnderitePortalFrame.java index 27a44a65..22b98cc9 100644 --- a/forge/src/main/java/io/github/realyusufismail/temporalsmith/blocks/EnderitePortalFrame.java +++ b/forge/src/main/java/io/github/realyusufismail/temporalsmith/blocks/EnderitePortalFrame.java @@ -51,6 +51,7 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.event.level.BlockEvent; +import org.jetbrains.annotations.NotNull; public class EnderitePortalFrame extends Block { @@ -72,7 +73,7 @@ public EnderitePortalFrame() { } @Override - public VoxelShape getShape( + public @NotNull VoxelShape getShape( BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { return switch (state.getValue(AXIS)) { case Z -> Z_AABB; @@ -231,7 +232,7 @@ public static class EnderitePortalShape extends PortalShape { private static final int MIN_HEIGHT = 2; public static final int MAX_HEIGHT = 21; private static final BlockBehaviour.StatePredicate FRAME = - (state, getter, pos) -> state.is(TagsInit.BlockTagsInit.PORTAL_FRAME_BLOCKS); + (state, getter, pos) -> state.is(TagsInit.BlockTagsInit.PORTAL_MAKER_BLOCKS); private final LevelAccessor level; private final Direction.Axis axis; private final Direction rightDir; diff --git a/forge/src/main/kotlin/io/github/realyusufismail/temporalsmith/TemporalSmith.kt b/forge/src/main/kotlin/io/github/realyusufismail/temporalsmith/TemporalSmith.kt index 2e6ed52b..a6014951 100644 --- a/forge/src/main/kotlin/io/github/realyusufismail/temporalsmith/TemporalSmith.kt +++ b/forge/src/main/kotlin/io/github/realyusufismail/temporalsmith/TemporalSmith.kt @@ -72,11 +72,11 @@ class TemporalSmith { // entity death event FORGE_BUS.addListener(ClientEvents::onEntityDeath) + FORGE_BUS.register(this) + ModLoadingContext.get() .registerConfig(ModConfig.Type.COMMON, TemporalSmithConfig.COMMON_SPEC) - FORGE_BUS.register(this) - logger.info("Temporal Smith is loaded!") } diff --git a/forge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/TagsInit.kt b/forge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/TagsInit.kt index 6a3d7846..f1757a07 100644 --- a/forge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/TagsInit.kt +++ b/forge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/TagsInit.kt @@ -123,8 +123,8 @@ object TagsInit { // other @JvmField - val PORTAL_FRAME_BLOCKS = - ResourceLocation.tryParse("$MOD_ID:portal_frame_blocks")?.let { BlockTags.create(it) } + val PORTAL_MAKER_BLOCKS = + ResourceLocation.tryParse("$MOD_ID:portal_maker_blocks")?.let { BlockTags.create(it) } ?: throw Exception("Failed to create tag") } diff --git a/forge/src/main/kotlin/io/github/realyusufismail/temporalsmith/datagen/tags/ModBlockTagsProvider.kt b/forge/src/main/kotlin/io/github/realyusufismail/temporalsmith/datagen/tags/ModBlockTagsProvider.kt index a7b3cb6b..d3a7f06a 100644 --- a/forge/src/main/kotlin/io/github/realyusufismail/temporalsmith/datagen/tags/ModBlockTagsProvider.kt +++ b/forge/src/main/kotlin/io/github/realyusufismail/temporalsmith/datagen/tags/ModBlockTagsProvider.kt @@ -72,8 +72,7 @@ class ModBlockTagsProvider( tag(TagsInit.BlockTagsInit.STORAGE_AQUMARINE).add(BlockInit.AQUMARINE_BLOCK.get()) tag(TagsInit.BlockTagsInit.STORAGE_ENDERITE).add(BlockInit.ENDERITE_BLOCK.get()) - // portal frame - tag(TagsInit.BlockTagsInit.PORTAL_FRAME_BLOCKS).add(BlockInit.ENDERITE_PORTAL_FRAME.get()) + tag(TagsInit.BlockTagsInit.PORTAL_MAKER_BLOCKS).add(BlockInit.ENDERITE_BLOCK.get()) // use BlockTags.MINEABLE_WITH_PICKAXE BlockInit.ORE_BLOCKS.forEach { oreBlock -> diff --git a/neoforge/src/generated/resources/.cache/3f86aa5b3fd4534fbd06f25389a63a7c7fd827ec b/neoforge/src/generated/resources/.cache/3f86aa5b3fd4534fbd06f25389a63a7c7fd827ec index cd5ffedf..6226f8ec 100644 --- a/neoforge/src/generated/resources/.cache/3f86aa5b3fd4534fbd06f25389a63a7c7fd827ec +++ b/neoforge/src/generated/resources/.cache/3f86aa5b3fd4534fbd06f25389a63a7c7fd827ec @@ -1,4 +1,4 @@ -// 1.20.2 2023-11-23T20:42:55.761757 Tags for minecraft:block mod id temporalsmith +// 1.20.2 2023-11-25T18:18:52.9352 Tags for minecraft:block mod id temporalsmith 82963b29c120fb55c17c40fe37b1c98c60346b84 data/forge/tags/blocks/deepslate_ores/aqumarine_ores.json edd052247952263e801a8ba38de967b85c9c1dc4 data/forge/tags/blocks/deepslate_ores/graphite_ores.json fc6b7da8497984df4efddd78ed393469f77e7495 data/forge/tags/blocks/deepslate_ores/imperium_ores.json @@ -19,8 +19,8 @@ c13f34abf2e1ad8aa96bf050df7ef5cc00f4fe1d data/forge/tags/blocks/storage_blocks/g dcbd959620590264e88e226bd2c40f6552839ec6 data/forge/tags/blocks/storage_blocks/rainbow.json 478f3b90295d8c712528b7b1f7d9ae4daad23121 data/forge/tags/blocks/storage_blocks/ruby.json 0ed63eea01e2600c587763dd7f609c87ae6e53d2 data/forge/tags/blocks/storage_blocks/sapphire.json -0c178d1fce23325e08782b60e8ebb0c56672fd96 data/minecraft/tags/blocks/mineable/pickaxe.json +97b808e7ab9c47286d18528dc564e186166d9830 data/minecraft/tags/blocks/mineable/pickaxe.json 118f91ee0e0e87a0393fd90770b0fa4db7c74e3e data/minecraft/tags/blocks/needs_diamond_tool.json dd9f28c0503a62d38ea0f2332885885ccedae3f1 data/minecraft/tags/blocks/needs_iron_tool.json cef73fd4903f2919af82514cf812d9da3579a438 data/minecraft/tags/blocks/needs_stone_tool.json -2a312b5b913bb99f9ecc0630737fc15267ee6baf data/temporalsmith/tags/blocks/portal_frame_blocks.json +2a312b5b913bb99f9ecc0630737fc15267ee6baf data/temporalsmith/tags/blocks/portal_maker_blocks.json diff --git a/neoforge/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 b/neoforge/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 index 377d7b3a..f7ed308f 100644 --- a/neoforge/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 +++ b/neoforge/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 @@ -1,2 +1,2 @@ -// 1.20.2 2023-11-24T12:32:44.9527068 Languages: en_us -87a9d9770f4e3da681c6a033bbdf0e2bea208279 assets/temporalsmith/lang/en_us.json +// 1.20.2 2023-11-25T18:18:52.936448 Languages: en_us +85bf9089b39c43906813319aa2d32ee543fe60ae assets/temporalsmith/lang/en_us.json diff --git a/neoforge/src/generated/resources/assets/temporalsmith/lang/en_us.json b/neoforge/src/generated/resources/assets/temporalsmith/lang/en_us.json index efebc9b2..75c84387 100644 --- a/neoforge/src/generated/resources/assets/temporalsmith/lang/en_us.json +++ b/neoforge/src/generated/resources/assets/temporalsmith/lang/en_us.json @@ -73,6 +73,7 @@ "block.temporalsmith.deepslate_sapphire_ore": "Deepslate Sapphire Ore", "block.temporalsmith.enderite_block": "Enderite Block", "block.temporalsmith.enderite_ore": "Enderite Ore", + "block.temporalsmith.enderite_portal_frame": "Enderite Portal Frame", "block.temporalsmith.graphite_block": "Graphite Block", "block.temporalsmith.graphite_ore": "Graphite Ore", "block.temporalsmith.imperium_ore": "Imperium Ore", diff --git a/neoforge/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/neoforge/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index 4849cb1d..5ae47224 100644 --- a/neoforge/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/neoforge/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -22,7 +22,7 @@ "temporalsmith:custom_armour_crafting_table", "temporalsmith:custom_tool_crafting_table", "temporalsmith:ingot_fusion_toll_enhancer", - "temporalsmith:enderite_portal_block", + "temporalsmith:enderite_portal_frame", "temporalsmith:custom_armour_crafting_table" ] } \ No newline at end of file diff --git a/neoforge/src/generated/resources/data/temporalsmith/tags/blocks/portal_maker_blocks.json b/neoforge/src/generated/resources/data/temporalsmith/tags/blocks/portal_maker_blocks.json new file mode 100644 index 00000000..540d1219 --- /dev/null +++ b/neoforge/src/generated/resources/data/temporalsmith/tags/blocks/portal_maker_blocks.json @@ -0,0 +1,5 @@ +{ + "values": [ + "temporalsmith:enderite_block" + ] +} \ No newline at end of file diff --git a/neoforge/src/main/java/io/github/realyusufismail/temporalsmith/blocks/EnderitePortalBlock.java b/neoforge/src/main/java/io/github/realyusufismail/temporalsmith/blocks/EnderitePortalFrame.java similarity index 98% rename from neoforge/src/main/java/io/github/realyusufismail/temporalsmith/blocks/EnderitePortalBlock.java rename to neoforge/src/main/java/io/github/realyusufismail/temporalsmith/blocks/EnderitePortalFrame.java index 59394736..3f0f8afc 100644 --- a/neoforge/src/main/java/io/github/realyusufismail/temporalsmith/blocks/EnderitePortalBlock.java +++ b/neoforge/src/main/java/io/github/realyusufismail/temporalsmith/blocks/EnderitePortalFrame.java @@ -53,13 +53,13 @@ import net.minecraft.world.phys.shapes.VoxelShape; import net.neoforged.neoforge.event.level.BlockEvent; -public class EnderitePortalBlock extends Block { +public class EnderitePortalFrame extends Block { public static final EnumProperty AXIS = BlockStateProperties.HORIZONTAL_AXIS; protected static final VoxelShape X_AABB = Block.box(0.0D, 0.0D, 6.0D, 16.0D, 16.0D, 10.0D); protected static final VoxelShape Z_AABB = Block.box(6.0D, 0.0D, 0.0D, 10.0D, 16.0D, 16.0D); - public EnderitePortalBlock() { + public EnderitePortalFrame() { super( Properties.copy(Blocks.NETHER_PORTAL) .strength(5.0F, 6.0F) @@ -152,7 +152,7 @@ public void entityInside(BlockState state, Level level, BlockPos pos, Entity ent if (destinationWorld != null && minecraftserver.isNetherEnabled() && !entity.isPassenger()) { - entity.level().getProfiler().push("undergarden_portal"); + entity.level().getProfiler().push("chrono_realm_portal"); entity.setPortalCooldown(); entity.changeDimension(destinationWorld, new ModTeleporter(destinationWorld)); entity.level().getProfiler().pop(); @@ -233,7 +233,7 @@ public static class EnderitePortalShape extends PortalShape { private static final int MIN_HEIGHT = 2; public static final int MAX_HEIGHT = 21; private static final BlockBehaviour.StatePredicate FRAME = - (state, getter, pos) -> state.is(TagsInit.BlockTagsInit.PORTAL_FRAME_BLOCKS); + (state, getter, pos) -> state.is(TagsInit.BlockTagsInit.PORTAL_MAKER_BLOCKS); private final LevelAccessor level; private final Direction.Axis axis; private final Direction rightDir; @@ -345,7 +345,7 @@ private int getDistanceUntilTop(BlockPos.MutableBlockPos pos) { } private static boolean isEmpty(BlockState state) { - return state.isAir() || state.is(BlockInit.ENDERITE_PORTAL_BLOCK.get()); + return state.isAir() || state.is(BlockInit.ENDERITE_PORTAL_FRAME.get()); } public boolean isValid() { @@ -358,7 +358,7 @@ public boolean isValid() { public void createPortalBlocks() { BlockState blockstate = - BlockInit.ENDERITE_PORTAL_BLOCK + BlockInit.ENDERITE_PORTAL_FRAME .get() .defaultBlockState() .setValue(NetherPortalBlock.AXIS, this.axis); diff --git a/neoforge/src/main/java/io/github/realyusufismail/temporalsmith/dimension/ModTeleporter.java b/neoforge/src/main/java/io/github/realyusufismail/temporalsmith/dimension/ModTeleporter.java index b4a34cd2..00e654b0 100644 --- a/neoforge/src/main/java/io/github/realyusufismail/temporalsmith/dimension/ModTeleporter.java +++ b/neoforge/src/main/java/io/github/realyusufismail/temporalsmith/dimension/ModTeleporter.java @@ -19,7 +19,7 @@ package io.github.realyusufismail.temporalsmith.dimension; import io.github.realyusufismail.temporalsmith.TemporalSmithConfig; -import io.github.realyusufismail.temporalsmith.blocks.EnderitePortalBlock; +import io.github.realyusufismail.temporalsmith.blocks.EnderitePortalFrame; import io.github.realyusufismail.temporalsmith.core.init.BlockInit; import io.github.realyusufismail.temporalsmith.core.init.DimensionsInit; import io.github.realyusufismail.temporalsmith.core.init.POIInit; @@ -80,7 +80,7 @@ public Optional getExistingPortal(BlockPos pos) { poiManager .getInSquare( (poiType) -> - poiType.is(Objects.requireNonNull(POIInit.ENDERITE_PORTAL_BLOCK.getKey())), + poiType.is(Objects.requireNonNull(POIInit.ENDERITE_PORTAL_FRAME.getKey())), pos, 64, PoiManager.Occupancy.ANY) @@ -213,10 +213,10 @@ public Optional makePortal(BlockPos pos, Direction.Axi } BlockState blockstate = - BlockInit.ENDERITE_PORTAL_BLOCK + BlockInit.ENDERITE_PORTAL_FRAME .get() .defaultBlockState() - .setValue(EnderitePortalBlock.AXIS, axis); + .setValue(EnderitePortalFrame.AXIS, axis); for (int k2 = 0; k2 < 2; ++k2) { for (int l2 = 0; l2 < 3; ++l2) { @@ -326,7 +326,7 @@ protected Optional getOrMakePortal(Entity entity, Bloc Direction.Axis portalAxis = this.level .getBlockState(entity.portalEntrancePos) - .getOptionalValue(EnderitePortalBlock.AXIS) + .getOptionalValue(EnderitePortalFrame.AXIS) .orElse(Direction.Axis.X); return this.makePortal(pos, portalAxis); } diff --git a/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/client/ClientEvents.kt b/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/client/ClientEvents.kt index af25487d..0558f4fd 100644 --- a/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/client/ClientEvents.kt +++ b/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/client/ClientEvents.kt @@ -57,7 +57,7 @@ object ClientEvents { event.enqueueWork { ItemBlockRenderTypes.setRenderLayer( - BlockInit.ENDERITE_PORTAL_BLOCK.get(), RenderType.translucent()) + BlockInit.ENDERITE_PORTAL_FRAME.get(), RenderType.translucent()) } event.enqueueWork { diff --git a/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/BlockInit.kt b/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/BlockInit.kt index cb0364a0..c821c8b6 100644 --- a/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/BlockInit.kt +++ b/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/BlockInit.kt @@ -21,7 +21,7 @@ package io.github.realyusufismail.temporalsmith.core.init import io.github.realyusufismail.temporalsmith.TemporalSmith.TemporalSmith.MOD_ID import io.github.realyusufismail.temporalsmith.blocks.CustomArmourCraftingTable import io.github.realyusufismail.temporalsmith.blocks.CustomToolCraftingTable -import io.github.realyusufismail.temporalsmith.blocks.EnderitePortalBlock +import io.github.realyusufismail.temporalsmith.blocks.EnderitePortalFrame import io.github.realyusufismail.temporalsmith.blocks.IngotFusionTollEnhancer import io.github.realyusufismail.temporalsmith.blocks.lit.RainbowLitBlock import io.github.realyusufismail.temporalsmith.blocks.lit.RubyLitBlock @@ -33,7 +33,6 @@ import net.minecraft.world.level.block.state.BlockBehaviour import net.neoforged.neoforge.registries.DeferredBlock import net.neoforged.neoforge.registries.DeferredItem import net.neoforged.neoforge.registries.DeferredRegister -import thedarkcolour.kotlinforforge.neoforge.forge.getValue object BlockInit { val BLOCKS: DeferredRegister.Blocks = DeferredRegister.createBlocks(MOD_ID) @@ -194,7 +193,7 @@ object BlockInit { registerSpecial("ingot_fusion_toll_enhancer", ::IngotFusionTollEnhancer) @JvmField - val ENDERITE_PORTAL_BLOCK = registerSpecial("enderite_portal_block", ::EnderitePortalBlock) + val ENDERITE_PORTAL_FRAME = registerSpecial("enderite_portal_frame", ::EnderitePortalFrame) private fun registerSpecial( name: String, diff --git a/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/CreativeModeTabInit.kt b/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/CreativeModeTabInit.kt index 03e1ff0e..6c06ff82 100644 --- a/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/CreativeModeTabInit.kt +++ b/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/CreativeModeTabInit.kt @@ -42,7 +42,7 @@ object CreativeModeTabInit { .stream() .map { item: DeferredHolder -> item.get().asItem() } .forEach { pItem: Item -> - if (pItem != BlockInit.ENDERITE_PORTAL_BLOCK.get().asItem()) + if (pItem != BlockInit.ENDERITE_PORTAL_FRAME.get().asItem()) output.accept(pItem) } @@ -50,7 +50,7 @@ object CreativeModeTabInit { .stream() .map { item: DeferredHolder -> item.get().asItem() } .forEach { pItem: Item -> - if (pItem != BlockInit.ENDERITE_PORTAL_BLOCK.get().asItem()) + if (pItem != BlockInit.ENDERITE_PORTAL_FRAME.get().asItem()) output.accept(pItem) } } diff --git a/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/POIInit.kt b/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/POIInit.kt index 98d683df..69a3e86f 100644 --- a/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/POIInit.kt +++ b/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/POIInit.kt @@ -29,8 +29,8 @@ object POIInit { DeferredRegister.create(Registries.POINT_OF_INTEREST_TYPE, TemporalSmith.MOD_ID) @JvmField - val ENDERITE_PORTAL_BLOCK: DeferredHolder = - POI.register("enderite_portal_block") { -> - PoiType(setOf(BlockInit.ENDERITE_PORTAL_BLOCK.get().defaultBlockState()), 0, 1) + val ENDERITE_PORTAL_FRAME: DeferredHolder = + POI.register("enderite_portal_frame") { -> + PoiType(setOf(BlockInit.ENDERITE_PORTAL_FRAME.get().defaultBlockState()), 0, 1) } } diff --git a/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/TagsInit.kt b/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/TagsInit.kt index d0be081b..ca7cf72b 100644 --- a/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/TagsInit.kt +++ b/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/core/init/TagsInit.kt @@ -124,8 +124,8 @@ object TagsInit { // other blocks @JvmField - val PORTAL_FRAME_BLOCKS = - ResourceLocation.tryParse("$MOD_ID:portal_frame_blocks")?.let { BlockTags.create(it) } + val PORTAL_MAKER_BLOCKS = + ResourceLocation.tryParse("$MOD_ID:portal_maker_blocks")?.let { BlockTags.create(it) } ?: throw Exception("Failed to create tag") } diff --git a/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/datagen/lang/ModEnLangProvider.kt b/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/datagen/lang/ModEnLangProvider.kt index a3535c2a..def5a6b9 100644 --- a/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/datagen/lang/ModEnLangProvider.kt +++ b/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/datagen/lang/ModEnLangProvider.kt @@ -65,6 +65,9 @@ class ModEnLangProvider(gen: DataGenerator) : ModEnLangProviderSupport(gen, MOD_ addBlock(BlockInit.CUSTOM_TOOL_CRAFTING_TABLE, "Custom Tool Crafting Table") addBlock(BlockInit.INGOT_FUSION_TOLL_ENHANCER, "Ingot Fusion Toll Enhancer") + // portal frame + addBlock(BlockInit.ENDERITE_PORTAL_FRAME, "Enderite Portal Frame") + // ore ingot addItem(ItemInit.RUBY, "Ruby") addItem(ItemInit.SAPPHIRE, "Sapphire") diff --git a/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/datagen/loot/ModBlockLootTables.kt b/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/datagen/loot/ModBlockLootTables.kt index 59883865..0b1c63ff 100644 --- a/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/datagen/loot/ModBlockLootTables.kt +++ b/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/datagen/loot/ModBlockLootTables.kt @@ -93,7 +93,7 @@ class ModBlockLootTables : BlockLootSubProvider(setOf(), FeatureFlags.REGISTRY.a .filter { key: ResourceLocation -> key.namespace == MOD_ID } .isPresent } - .filter { entry: Block -> entry != BlockInit.ENDERITE_PORTAL_BLOCK.get() } + .filter { entry: Block -> entry != BlockInit.ENDERITE_PORTAL_FRAME.get() } .collect(Collectors.toSet()) } } diff --git a/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/datagen/tags/ModBlockTagsProvider.kt b/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/datagen/tags/ModBlockTagsProvider.kt index 984fb38e..1dccd7e4 100644 --- a/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/datagen/tags/ModBlockTagsProvider.kt +++ b/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/datagen/tags/ModBlockTagsProvider.kt @@ -72,7 +72,8 @@ class ModBlockTagsProvider( tag(TagsInit.BlockTagsInit.STORAGE_AQUMARINE).add(BlockInit.AQUMARINE_BLOCK.get()) tag(TagsInit.BlockTagsInit.STORAGE_ENDERITE).add(BlockInit.ENDERITE_BLOCK.get()) - tag(TagsInit.BlockTagsInit.PORTAL_FRAME_BLOCKS).add(BlockInit.ENDERITE_BLOCK.get()) + // Needed in order to make the portal frame blocks work + tag(TagsInit.BlockTagsInit.PORTAL_MAKER_BLOCKS).add(BlockInit.ENDERITE_BLOCK.get()) // use BlockTags.MINEABLE_WITH_PICKAXE BlockInit.ORE_BLOCKS.forEach { oreBlock -> diff --git a/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/items/sword/EnderiteSword.kt b/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/items/sword/EnderiteSword.kt index 85561558..99713186 100644 --- a/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/items/sword/EnderiteSword.kt +++ b/neoforge/src/main/kotlin/io/github/realyusufismail/temporalsmith/items/sword/EnderiteSword.kt @@ -18,7 +18,7 @@ */ package io.github.realyusufismail.temporalsmith.items.sword -import io.github.realyusufismail.temporalsmith.blocks.EnderitePortalBlock +import io.github.realyusufismail.temporalsmith.blocks.EnderitePortalFrame import io.github.realyusufismail.temporalsmith.core.init.BlockInit import io.github.realyusufismail.temporalsmith.core.init.DimensionsInit import io.github.realyusufismail.temporalsmith.core.material.CustomToolMaterial @@ -41,7 +41,7 @@ class EnderiteSword : context.player!!.level().dimension() === Level.OVERWORLD) { for (direction in Direction.Plane.VERTICAL) { val framePos: BlockPos = context.clickedPos.relative(direction) - return if ((BlockInit.ENDERITE_PORTAL_BLOCK.get() as EnderitePortalBlock) + return if ((BlockInit.ENDERITE_PORTAL_FRAME.get() as EnderitePortalFrame) .trySpawnPortal(context.level, framePos)) { context.level.playSound( context.player, diff --git a/neoforge/src/main/resources/assets/temporalsmith/blockstates/enderite_portal_block.json b/neoforge/src/main/resources/assets/temporalsmith/blockstates/enderite_portal_block.json deleted file mode 100644 index 588fe6db..00000000 --- a/neoforge/src/main/resources/assets/temporalsmith/blockstates/enderite_portal_block.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "axis=z": { "model": "temporalsmith:block/enderite_portal_block_ew" }, - "axis=x": { "model": "temporalsmith:block/enderite_portal_block_ns" } - } -} \ No newline at end of file diff --git a/neoforge/src/main/resources/assets/temporalsmith/blockstates/enderite_portal_frame.json b/neoforge/src/main/resources/assets/temporalsmith/blockstates/enderite_portal_frame.json new file mode 100644 index 00000000..2735149d --- /dev/null +++ b/neoforge/src/main/resources/assets/temporalsmith/blockstates/enderite_portal_frame.json @@ -0,0 +1,6 @@ +{ + "variants": { + "axis=z": { "model": "temporalsmith:block/enderite_portal_frame_ew" }, + "axis=x": { "model": "temporalsmith:block/enderite_portal_frame_ns" } + } +} \ No newline at end of file diff --git a/neoforge/src/main/resources/assets/temporalsmith/models/block/enderite_portal_block_ew.json b/neoforge/src/main/resources/assets/temporalsmith/models/block/enderite_portal_frame_ew.json similarity index 68% rename from neoforge/src/main/resources/assets/temporalsmith/models/block/enderite_portal_block_ew.json rename to neoforge/src/main/resources/assets/temporalsmith/models/block/enderite_portal_frame_ew.json index 6297d92d..8a9591f1 100644 --- a/neoforge/src/main/resources/assets/temporalsmith/models/block/enderite_portal_block_ew.json +++ b/neoforge/src/main/resources/assets/temporalsmith/models/block/enderite_portal_frame_ew.json @@ -1,7 +1,7 @@ { "textures": { - "particle": "temporalsmith:block/enderite_portal_block", - "portal": "temporalsmith:block/enderite_portal_block" + "particle": "temporalsmith:block/enderite_portal_frame", + "portal": "temporalsmith:block/enderite_portal_frame" }, "elements": [ { "from": [ 6, 0, 0 ], diff --git a/neoforge/src/main/resources/assets/temporalsmith/models/block/enderite_portal_block_ns.json b/neoforge/src/main/resources/assets/temporalsmith/models/block/enderite_portal_frame_ns.json similarity index 69% rename from neoforge/src/main/resources/assets/temporalsmith/models/block/enderite_portal_block_ns.json rename to neoforge/src/main/resources/assets/temporalsmith/models/block/enderite_portal_frame_ns.json index 35217b56..c926b0e0 100644 --- a/neoforge/src/main/resources/assets/temporalsmith/models/block/enderite_portal_block_ns.json +++ b/neoforge/src/main/resources/assets/temporalsmith/models/block/enderite_portal_frame_ns.json @@ -1,7 +1,7 @@ { "textures": { - "particle": "temporalsmith:block/enderite_portal_block", - "portal": "temporalsmith:block/enderite_portal_block" + "particle": "temporalsmith:block/enderite_portal_frame", + "portal": "temporalsmith:block/enderite_portal_frame" }, "elements": [ { "from": [ 0, 0, 6 ], diff --git a/neoforge/src/main/resources/assets/temporalsmith/textures/block/enderite_portal_block.png b/neoforge/src/main/resources/assets/temporalsmith/textures/block/enderite_portal_frame.png similarity index 100% rename from neoforge/src/main/resources/assets/temporalsmith/textures/block/enderite_portal_block.png rename to neoforge/src/main/resources/assets/temporalsmith/textures/block/enderite_portal_frame.png diff --git a/neoforge/src/main/resources/assets/temporalsmith/textures/block/enderite_portal_block.png.mcmeta b/neoforge/src/main/resources/assets/temporalsmith/textures/block/enderite_portal_frame.png.mcmeta similarity index 100% rename from neoforge/src/main/resources/assets/temporalsmith/textures/block/enderite_portal_block.png.mcmeta rename to neoforge/src/main/resources/assets/temporalsmith/textures/block/enderite_portal_frame.png.mcmeta