diff --git a/src/main/java/net/id/paradiselost/blocks/BlockRegistration.java b/src/main/java/net/id/paradiselost/blocks/BlockRegistration.java index d1583cd8e..4d9a85b2b 100644 --- a/src/main/java/net/id/paradiselost/blocks/BlockRegistration.java +++ b/src/main/java/net/id/paradiselost/blocks/BlockRegistration.java @@ -1,11 +1,12 @@ package net.id.paradiselost.blocks; +import net.id.paradiselost.blocks.decorative.ParadiseSignBlock; +import net.id.paradiselost.blocks.decorative.ParadiseWallSignBlock; import net.id.paradiselost.blocks.natural.ParadiseLostSaplingBlock; import net.id.paradiselost.blocks.natural.tree.FruitingLeavesBlock; import net.id.paradiselost.blocks.natural.tree.ParadiseLostLeavesBlock; import net.id.paradiselost.items.ParadiseLostItems; -import net.id.paradiselost.world.feature.tree.generator.MotherAurelSaplingGenerator; -import net.id.paradiselost.world.feature.tree.generator.OrangeSaplingGenerator; +import net.id.paradiselost.world.feature.tree.generator.*; import net.minecraft.block.*; import net.minecraft.block.sapling.SaplingGenerator; import net.minecraft.registry.Registries; @@ -268,8 +269,8 @@ public static SignSet registerSignSet(WoodType woodType) { var signSettings = AbstractBlock.Settings.copy(Blocks.OAK_SIGN); - SignBlock signBlock = new SignBlock(signSettings, woodType); - WallSignBlock wallSignBlock = new WallSignBlock(signSettings.dropsLike(signBlock), woodType); + SignBlock signBlock = new ParadiseSignBlock(signSettings, woodType); + WallSignBlock wallSignBlock = new ParadiseWallSignBlock(signSettings.dropsLike(signBlock), woodType); add(woodType.name() + "_sign", signBlock); add(woodType.name() + "_wall_sign", wallSignBlock); diff --git a/src/main/java/net/id/paradiselost/blocks/blockentity/ParadiseLostBlockEntityTypes.java b/src/main/java/net/id/paradiselost/blocks/blockentity/ParadiseLostBlockEntityTypes.java index ceea4c556..467b29520 100644 --- a/src/main/java/net/id/paradiselost/blocks/blockentity/ParadiseLostBlockEntityTypes.java +++ b/src/main/java/net/id/paradiselost/blocks/blockentity/ParadiseLostBlockEntityTypes.java @@ -3,6 +3,7 @@ import net.id.paradiselost.blocks.ParadiseLostBlocks; import net.minecraft.block.entity.BlockEntityType; +import net.minecraft.client.render.block.entity.SignBlockEntityRenderer; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; @@ -14,13 +15,19 @@ public class ParadiseLostBlockEntityTypes { public static final BlockEntityType INCUBATOR = create(IncubatorBlockEntity::new, ParadiseLostBlocks.INCUBATOR).build(); public static final BlockEntityType CHERINE_CAMPFIRE = create(CherineCampfireBlockEntity::new, ParadiseLostBlocks.CHERINE_CAMPFIRE).build(); public static final BlockEntityType TREE_TAP = create(TreeTapBlockEntity::new, ParadiseLostBlocks.TREE_TAP).build(); -// public static final BlockEntityType DUNGEON_SWITCH = create(DungeonSwitchBlockEntity::new, ParadiseLostBlocks.DUNGEON_SWITCH).build(); + public static final BlockEntityType SIGN = create(ParadiseSignBlockEntity::new, + ParadiseLostBlocks.AUREL_SIGNS.sign(), ParadiseLostBlocks.AUREL_SIGNS.wallSign(), + ParadiseLostBlocks.MOTHER_AUREL_SIGNS.sign(), ParadiseLostBlocks.MOTHER_AUREL_SIGNS.wallSign(), + ParadiseLostBlocks.ORANGE_SIGNS.sign(), ParadiseLostBlocks.ORANGE_SIGNS.wallSign(), + ParadiseLostBlocks.WISTERIA_SIGNS.sign(), ParadiseLostBlocks.WISTERIA_SIGNS.wallSign() + ).build(); public static void init() { register("food_bowl", FOOD_BOWL); register("incubator", INCUBATOR); register("cherine_campfire", CHERINE_CAMPFIRE); register("tree_tap", TREE_TAP); + register("sign", SIGN); // register("dungeonswitch", DUNGEON_SWITCH); } diff --git a/src/main/java/net/id/paradiselost/blocks/blockentity/ParadiseSignBlockEntity.java b/src/main/java/net/id/paradiselost/blocks/blockentity/ParadiseSignBlockEntity.java new file mode 100644 index 000000000..c6100593b --- /dev/null +++ b/src/main/java/net/id/paradiselost/blocks/blockentity/ParadiseSignBlockEntity.java @@ -0,0 +1,16 @@ +package net.id.paradiselost.blocks.blockentity; + +import net.minecraft.block.BlockState; +import net.minecraft.block.entity.BlockEntityType; +import net.minecraft.block.entity.SignBlockEntity; +import net.minecraft.util.math.BlockPos; + +public class ParadiseSignBlockEntity extends SignBlockEntity { + public ParadiseSignBlockEntity(BlockPos pos, BlockState state) { + super(ParadiseLostBlockEntityTypes.SIGN, pos, state); + } + + public ParadiseSignBlockEntity(BlockEntityType blockEntityType, BlockPos blockPos, BlockState blockState) { + super(blockEntityType, blockPos, blockState); + } +} diff --git a/src/main/java/net/id/paradiselost/blocks/decorative/ParadiseSignBlock.java b/src/main/java/net/id/paradiselost/blocks/decorative/ParadiseSignBlock.java new file mode 100644 index 000000000..319d3d8bf --- /dev/null +++ b/src/main/java/net/id/paradiselost/blocks/decorative/ParadiseSignBlock.java @@ -0,0 +1,19 @@ +package net.id.paradiselost.blocks.decorative; + +import net.id.paradiselost.blocks.blockentity.ParadiseSignBlockEntity; +import net.minecraft.block.BlockState; +import net.minecraft.block.SignBlock; +import net.minecraft.block.WoodType; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.util.math.BlockPos; + +public class ParadiseSignBlock extends SignBlock { + + public ParadiseSignBlock(Settings settings, WoodType woodType) { + super(settings, woodType); + } + + public BlockEntity createBlockEntity(BlockPos pos, BlockState state) { + return new ParadiseSignBlockEntity(pos, state); + } +} diff --git a/src/main/java/net/id/paradiselost/blocks/decorative/ParadiseWallSignBlock.java b/src/main/java/net/id/paradiselost/blocks/decorative/ParadiseWallSignBlock.java new file mode 100644 index 000000000..6712cda19 --- /dev/null +++ b/src/main/java/net/id/paradiselost/blocks/decorative/ParadiseWallSignBlock.java @@ -0,0 +1,18 @@ +package net.id.paradiselost.blocks.decorative; + +import net.id.paradiselost.blocks.blockentity.ParadiseSignBlockEntity; +import net.minecraft.block.BlockState; +import net.minecraft.block.WallSignBlock; +import net.minecraft.block.WoodType; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.util.math.BlockPos; + +public class ParadiseWallSignBlock extends WallSignBlock { + public ParadiseWallSignBlock(Settings settings, WoodType woodType) { + super(settings, woodType); + } + + public BlockEntity createBlockEntity(BlockPos pos, BlockState state) { + return new ParadiseSignBlockEntity(pos, state); + } +} diff --git a/src/main/java/net/id/paradiselost/client/rendering/block/ParadiseLostBlockEntityRenderers.java b/src/main/java/net/id/paradiselost/client/rendering/block/ParadiseLostBlockEntityRenderers.java index 877be34e2..814a9e4a1 100644 --- a/src/main/java/net/id/paradiselost/client/rendering/block/ParadiseLostBlockEntityRenderers.java +++ b/src/main/java/net/id/paradiselost/client/rendering/block/ParadiseLostBlockEntityRenderers.java @@ -4,6 +4,7 @@ import net.fabricmc.api.Environment; import net.id.paradiselost.blocks.blockentity.ParadiseLostBlockEntityTypes; import net.minecraft.client.render.block.entity.BlockEntityRendererFactories; +import net.minecraft.client.render.block.entity.SignBlockEntityRenderer; @Environment(EnvType.CLIENT) public class ParadiseLostBlockEntityRenderers { @@ -12,7 +13,8 @@ public class ParadiseLostBlockEntityRenderers { public static void initClient() { BlockEntityRendererFactories.register(ParadiseLostBlockEntityTypes.INCUBATOR, IncubatorBlockEntityRenderer::new); BlockEntityRendererFactories.register(ParadiseLostBlockEntityTypes.CHERINE_CAMPFIRE, CherineCampfireBlockEntityRenderer::new); - BlockEntityRendererFactories.register(ParadiseLostBlockEntityTypes.TREE_TAP, TreeTapBlockEntityRenderer::new); + BlockEntityRendererFactories.register(ParadiseLostBlockEntityTypes.TREE_TAP, TreeTapBlockEntityRenderer::new); + BlockEntityRendererFactories.register(ParadiseLostBlockEntityTypes.SIGN, SignBlockEntityRenderer::new); // BlockEntityRendererFactories.register(ParadiseLostBlockEntityTypes.DUNGEON_SWITCH, DungeonSwitchBlockEntityRenderer::new); } } diff --git a/src/main/resources/assets/minecraft/textures/entity/signs/paradise_lost_aurel.png b/src/main/resources/assets/paradise_lost/textures/entity/signs/aurel.png similarity index 100% rename from src/main/resources/assets/minecraft/textures/entity/signs/paradise_lost_aurel.png rename to src/main/resources/assets/paradise_lost/textures/entity/signs/aurel.png diff --git a/src/main/resources/assets/minecraft/textures/entity/signs/paradise_lost_mother_aurel.png b/src/main/resources/assets/paradise_lost/textures/entity/signs/mother_aurel.png similarity index 100% rename from src/main/resources/assets/minecraft/textures/entity/signs/paradise_lost_mother_aurel.png rename to src/main/resources/assets/paradise_lost/textures/entity/signs/mother_aurel.png diff --git a/src/main/resources/assets/minecraft/textures/entity/signs/paradise_lost_orange.png b/src/main/resources/assets/paradise_lost/textures/entity/signs/orange.png similarity index 100% rename from src/main/resources/assets/minecraft/textures/entity/signs/paradise_lost_orange.png rename to src/main/resources/assets/paradise_lost/textures/entity/signs/orange.png diff --git a/src/main/resources/assets/minecraft/textures/entity/signs/paradise_lost_wisteria.png b/src/main/resources/assets/paradise_lost/textures/entity/signs/wisteria.png similarity index 100% rename from src/main/resources/assets/minecraft/textures/entity/signs/paradise_lost_wisteria.png rename to src/main/resources/assets/paradise_lost/textures/entity/signs/wisteria.png