diff --git a/.gitignore b/.gitignore index 9563893..d6cf9c1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ # gradle .gradle/ -build/ out/ classes/ diff --git a/build.gradle b/build.gradle index 9d8a652..c8a7337 100644 --- a/build.gradle +++ b/build.gradle @@ -30,6 +30,9 @@ dependencies { modCompile("vazkii.patchouli:Patchouli:${project.patchouli_version}") // PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs. // You may need to force-disable transitiveness on them. + + modImplementation "eu.midnightdust:midnight-hats:${midnighthats_version}" + include "eu.midnightdust:midnight-hats:${midnighthats_version}" } processResources { diff --git a/build/loom-cache/midnight-hats-1.0.2.jar b/build/loom-cache/midnight-hats-1.0.2.jar new file mode 100644 index 0000000..1668bd6 Binary files /dev/null and b/build/loom-cache/midnight-hats-1.0.2.jar differ diff --git a/gradle.properties b/gradle.properties index 0d096c5..304d987 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G loader_version=0.9.1+build.205 # Mod Properties - mod_version = 2.0.1 + mod_version = 3.0.0 maven_group = eu.midnightdust.motschen archives_base_name = decorative @@ -16,3 +16,4 @@ org.gradle.jvmargs=-Xmx1G # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api fabric_version=0.17.2+build.396-1.16 patchouli_version=1.16-40-FABRIC + midnighthats_version=1.0.2 diff --git a/src/main/java/eu/midnightdust/motschen/decorative/DecorativeClient.java b/src/main/java/eu/midnightdust/motschen/decorative/DecorativeClient.java index 659c7af..9f9d6cf 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/DecorativeClient.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/DecorativeClient.java @@ -1,11 +1,14 @@ package eu.midnightdust.motschen.decorative; +import eu.midnightdust.motschen.decorative.block.render.*; import eu.midnightdust.motschen.decorative.entity.client.renderer.*; import eu.midnightdust.motschen.decorative.init.BathTires; +import eu.midnightdust.motschen.decorative.init.BlockEntities; import eu.midnightdust.motschen.decorative.init.Pool; import eu.midnightdust.motschen.decorative.init.Signs; import net.fabricmc.api.ClientModInitializer; import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; +import net.fabricmc.fabric.api.client.rendereregistry.v1.BlockEntityRendererRegistry; import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry; import net.fabricmc.fabric.api.client.rendering.v1.ColorProviderRegistry; import net.minecraft.block.Block; @@ -17,6 +20,7 @@ public class DecorativeClient implements ClientModInitializer { @Override public void onInitializeClient() { + EntityRendererRegistry.INSTANCE.register(Pool.BEACH_BALL, (dispatcher, context) -> new BeachBallRenderer(dispatcher)); EntityRendererRegistry.INSTANCE.register(BathTires.WHITE_BATH_TIRE, (dispatcher, context) -> new WhiteBathTireRenderer(dispatcher)); @@ -62,6 +66,15 @@ public class DecorativeClient implements ClientModInitializer { BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(),DecorativeMain.SlidingDoor); BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getTranslucent(),DecorativeMain.BirdBath); + BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.CeilingFanBlockEntity, CeilingFanRenderer::new); + + BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.OakChoppingLogBlockEntity, OakChoppingLogBlockEntityRenderer::new); + BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.SpruceChoppingLogBlockEntity, SpruceChoppingLogBlockEntityRenderer::new); + BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.BirchChoppingLogBlockEntity, BirchChoppingLogBlockEntityRenderer::new); + BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.AcaciaChoppingLogBlockEntity, AcaciaChoppingLogBlockEntityRenderer::new); + BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.JungleChoppingLogBlockEntity, JungleChoppingLogBlockEntityRenderer::new); + BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.DarkOakChoppingLogBlockEntity, DarkOakChoppingLogBlockEntityRenderer::new); + } public void registerBlockColor(Block block, Block templateBlock) { ColorProviderRegistry.BLOCK.register((type, pos, world, layer) -> { diff --git a/src/main/java/eu/midnightdust/motschen/decorative/DecorativeMain.java b/src/main/java/eu/midnightdust/motschen/decorative/DecorativeMain.java index 188b164..5e9b168 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/DecorativeMain.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/DecorativeMain.java @@ -1,7 +1,13 @@ package eu.midnightdust.motschen.decorative; import eu.midnightdust.motschen.decorative.block.*; +import eu.midnightdust.motschen.decorative.blockstates.CeilingFanStage; +import eu.midnightdust.motschen.decorative.blockstates.Part; +import eu.midnightdust.motschen.decorative.blockstates.PoolShape; +import eu.midnightdust.motschen.decorative.blockstates.Program; import eu.midnightdust.motschen.decorative.init.*; +import eu.midnightdust.motschen.decorative.world.OreFeatureInjector; +import eu.midnightdust.motschen.decorative.world.OreFeatures; import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; @@ -12,18 +18,17 @@ import net.minecraft.state.property.EnumProperty; import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; -import java.util.Locale; - public class DecorativeMain implements ModInitializer { public static final String MOD_ID = "decorative"; public static final ItemGroup IndoorGroup = FabricItemGroupBuilder.build(new Identifier(MOD_ID, "indoor"), () -> new ItemStack(DecorativeMain.Television)); public static final ItemGroup TrafficGroup = FabricItemGroupBuilder.build(new Identifier(MOD_ID, "traffic"), () -> new ItemStack(DecorativeMain.TrafficCone)); - public static final ItemGroup GardenGroup = FabricItemGroupBuilder.build(new Identifier(MOD_ID, "garden"), () -> new ItemStack(LogsWithAxes.OakLogWithAxe)); + public static final ItemGroup GardenGroup = FabricItemGroupBuilder.build(new Identifier(MOD_ID, "garden"), () -> new ItemStack(LogsWithAxes.OakChoppingLog)); public static final ItemGroup PoolGroup = FabricItemGroupBuilder.build(new Identifier(MOD_ID, "pool"), () -> new ItemStack(Pool.BEACH_BALL_ITEM)); public static final EnumProperty PROGRAM = EnumProperty.of("program", Program.class); public static final EnumProperty POOL_SHAPE = EnumProperty.of("shape", PoolShape.class); public static final EnumProperty PART = EnumProperty.of("part", Part.class); + public static final EnumProperty STAGE = EnumProperty.of("stage", CeilingFanStage.class); public static Block RockyAsphalt = new Block(FabricBlockSettings.copyOf(Blocks.COAL_ORE)); public static Block Road = new Block(FabricBlockSettings.copyOf(Blocks.STONE)); public static Block RoadWhiteShort = new RotatableBlock(); @@ -47,52 +52,53 @@ public class DecorativeMain implements ModInitializer { public void onInitialize() { BlockEntities.init(); // Traffic // - Registry.register(Registry.BLOCK, new Identifier("decorative","rocky_asphalt"), RockyAsphalt); - Registry.register(Registry.ITEM, new Identifier("decorative","rocky_asphalt"), new BlockItem(RockyAsphalt, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","road"), Road); - Registry.register(Registry.ITEM, new Identifier("decorative","road"), new BlockItem(Road, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","road_white_short"), RoadWhiteShort); - Registry.register(Registry.ITEM, new Identifier("decorative","road_white_short"), new BlockItem(RoadWhiteShort, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","road_white_long"), RoadWhiteLong); - Registry.register(Registry.ITEM, new Identifier("decorative","road_white_long"), new BlockItem(RoadWhiteLong, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","traffic_cone"), TrafficCone); - Registry.register(Registry.ITEM, new Identifier("decorative","traffic_cone"), new BlockItem(TrafficCone, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","fire_hydrant"), FireHydrant); - Registry.register(Registry.ITEM, new Identifier("decorative","fire_hydrant"), new BlockItem(FireHydrant, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","guardrail"), Guardrail); - Registry.register(Registry.ITEM, new Identifier("decorative","guardrail"), new BlockItem(Guardrail, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","sign_post"), SignPost); - Registry.register(Registry.ITEM, new Identifier("decorative","sign_post"), new BlockItem(SignPost, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"rocky_asphalt"), RockyAsphalt); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"rocky_asphalt"), new BlockItem(RockyAsphalt, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"road"), Road); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"road"), new BlockItem(Road, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"road_white_short"), RoadWhiteShort); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"road_white_short"), new BlockItem(RoadWhiteShort, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"road_white_long"), RoadWhiteLong); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"road_white_long"), new BlockItem(RoadWhiteLong, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"traffic_cone"), TrafficCone); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"traffic_cone"), new BlockItem(TrafficCone, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"fire_hydrant"), FireHydrant); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"fire_hydrant"), new BlockItem(FireHydrant, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"guardrail"), Guardrail); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"guardrail"), new BlockItem(Guardrail, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"sign_post"), SignPost); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"sign_post"), new BlockItem(SignPost, new Item.Settings().group(DecorativeMain.TrafficGroup))); Signs.init(); //Garden// - Registry.register(Registry.BLOCK, new Identifier("decorative","bird_bath"), BirdBath); - Registry.register(Registry.ITEM, new Identifier("decorative","bird_bath"), new BlockItem(BirdBath, new Item.Settings().group(DecorativeMain.GardenGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","water_pump"), WaterPump); - Registry.register(Registry.ITEM, new Identifier("decorative","water_pump"), new BlockItem(WaterPump, new Item.Settings().group(DecorativeMain.GardenGroup))); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"bird_bath"), BirdBath); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"bird_bath"), new BlockItem(BirdBath, new Item.Settings().group(DecorativeMain.GardenGroup))); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"water_pump"), WaterPump); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"water_pump"), new BlockItem(WaterPump, new Item.Settings().group(DecorativeMain.GardenGroup))); LogsWithAxes.init(); Pool.init(); - + //Furniture// - Registry.register(Registry.BLOCK, new Identifier("decorative","kitchen_tiles"), KitchenTiles); - Registry.register(Registry.ITEM, new Identifier("decorative","kitchen_tiles"), new BlockItem(KitchenTiles, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","television"), Television); - Registry.register(Registry.ITEM, new Identifier("decorative","television"), new BlockItem(Television, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","old_television"), OldTelevision); - Registry.register(Registry.ITEM, new Identifier("decorative","old_television"), new BlockItem(OldTelevision, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","ceilingfan"), CeilingFan); - Registry.register(Registry.ITEM, new Identifier("decorative","ceilingfan"), new BlockItem(CeilingFan, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","shower_head"), ShowerHead); - Registry.register(Registry.ITEM, new Identifier("decorative","shower_head"), new BlockItem(ShowerHead, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","sliding_door"), SlidingDoor); - Registry.register(Registry.ITEM, new Identifier("decorative","sliding_door"), new BlockItem(SlidingDoor, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","christmas_tree"), ChristmasTree); - Registry.register(Registry.ITEM, new Identifier("decorative","christmas_tree"), new BlockItem(ChristmasTree, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","christmas_lights"), ChristmasLights); - Registry.register(Registry.ITEM, new Identifier("decorative","christmas_lights"), new BlockItem(ChristmasLights, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"kitchen_tiles"), KitchenTiles); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"kitchen_tiles"), new BlockItem(KitchenTiles, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"television"), Television); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"television"), new BlockItem(Television, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"old_television"), OldTelevision); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"old_television"), new BlockItem(OldTelevision, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"ceilingfan"), CeilingFan); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"ceilingfan"), new BlockItem(CeilingFan, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"shower_head"), ShowerHead); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"shower_head"), new BlockItem(ShowerHead, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"sliding_door"), SlidingDoor); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"sliding_door"), new BlockItem(SlidingDoor, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"christmas_tree"), ChristmasTree); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"christmas_tree"), new BlockItem(ChristmasTree, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"christmas_lights"), ChristmasLights); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"christmas_lights"), new BlockItem(ChristmasLights, new Item.Settings().group(DecorativeMain.IndoorGroup))); Lamps.init(); DoubleLamps.init(); OreFeatures.init(); + OreFeatureInjector.init(); } } diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/AcaciaChoppingLog.java b/src/main/java/eu/midnightdust/motschen/decorative/block/AcaciaChoppingLog.java new file mode 100644 index 0000000..5d18ff9 --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/AcaciaChoppingLog.java @@ -0,0 +1,42 @@ +package eu.midnightdust.motschen.decorative.block; + +import eu.midnightdust.motschen.decorative.block.blockentity.AcaciaChoppingLogBlockEntity; +import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; +import net.minecraft.block.*; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.item.ItemPlacementContext; +import net.minecraft.sound.BlockSoundGroup; +import net.minecraft.state.StateManager; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.world.BlockView; +import net.minecraft.world.WorldView; + +public class AcaciaChoppingLog extends HorizontalFacingBlock implements BlockEntityProvider { + + public AcaciaChoppingLog() { + super(FabricBlockSettings.copy(Blocks.OAK_PLANKS).nonOpaque().sounds(BlockSoundGroup.WOOD)); + this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH)); + } + + @Override + public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) { + return super.getPlacementState(itemPlacementContext) + .with(FACING, itemPlacementContext.getPlayerFacing().getOpposite()); + } + + @Override + protected void appendProperties(StateManager.Builder builder) { + builder.add(FACING); + } + + public boolean canPlaceAt(BlockState state, WorldView worldView, BlockPos pos) { + return !worldView.isAir(pos.down()); + } + + @Override + public BlockEntity createBlockEntity(BlockView view) { + return new AcaciaChoppingLogBlockEntity(); + } + +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/BirchChoppingLog.java b/src/main/java/eu/midnightdust/motschen/decorative/block/BirchChoppingLog.java new file mode 100644 index 0000000..23479bf --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/BirchChoppingLog.java @@ -0,0 +1,42 @@ +package eu.midnightdust.motschen.decorative.block; + +import eu.midnightdust.motschen.decorative.block.blockentity.BirchChoppingLogBlockEntity; +import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; +import net.minecraft.block.*; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.item.ItemPlacementContext; +import net.minecraft.sound.BlockSoundGroup; +import net.minecraft.state.StateManager; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.world.BlockView; +import net.minecraft.world.WorldView; + +public class BirchChoppingLog extends HorizontalFacingBlock implements BlockEntityProvider { + + public BirchChoppingLog() { + super(FabricBlockSettings.copy(Blocks.OAK_PLANKS).nonOpaque().sounds(BlockSoundGroup.WOOD)); + this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH)); + } + + @Override + public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) { + return super.getPlacementState(itemPlacementContext) + .with(FACING, itemPlacementContext.getPlayerFacing().getOpposite()); + } + + @Override + protected void appendProperties(StateManager.Builder builder) { + builder.add(FACING); + } + + public boolean canPlaceAt(BlockState state, WorldView worldView, BlockPos pos) { + return !worldView.isAir(pos.down()); + } + + @Override + public BlockEntity createBlockEntity(BlockView view) { + return new BirchChoppingLogBlockEntity(); + } + +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/BirdBath.java b/src/main/java/eu/midnightdust/motschen/decorative/block/BirdBath.java index c107b44..8f0b293 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/BirdBath.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/BirdBath.java @@ -15,7 +15,6 @@ public class BirdBath extends CauldronBlock { public BirdBath() { super(FabricBlockSettings.copy(Blocks.CAULDRON).nonOpaque().sounds(BlockSoundGroup.STONE)); - this.setDefaultState(this.stateManager.getDefaultState().with(LEVEL, 0)); } @Override @@ -24,11 +23,6 @@ public class BirdBath extends CauldronBlock { .with(LEVEL, 0); } - @Override - protected void appendProperties(StateManager.Builder builder) { - builder.add(LEVEL); - } - @Override public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext context) { return SHAPE; diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/CeilingFan.java b/src/main/java/eu/midnightdust/motschen/decorative/block/CeilingFan.java index 80df747..164f1b8 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/CeilingFan.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/CeilingFan.java @@ -1,13 +1,18 @@ package eu.midnightdust.motschen.decorative.block; +import eu.midnightdust.motschen.decorative.blockstates.CeilingFanStage; +import eu.midnightdust.motschen.decorative.DecorativeMain; +import eu.midnightdust.motschen.decorative.block.blockentity.CeilingFanBlockEntity; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.minecraft.block.*; +import net.minecraft.block.entity.BlockEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemPlacementContext; import net.minecraft.sound.BlockSoundGroup; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvents; import net.minecraft.state.StateManager; +import net.minecraft.state.property.EnumProperty; import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; import net.minecraft.util.hit.BlockHitResult; @@ -17,28 +22,38 @@ import net.minecraft.world.BlockView; import net.minecraft.world.World; import net.minecraft.world.WorldView; -public class CeilingFan extends RedstoneLampBlock { +public class CeilingFan extends Block implements BlockEntityProvider { private static final VoxelShape SHAPE; + private static final EnumProperty STAGE = DecorativeMain.STAGE; public CeilingFan() { super(FabricBlockSettings.copy(Blocks.BLACK_CONCRETE).nonOpaque().sounds(BlockSoundGroup.STONE)); - this.setDefaultState(this.stateManager.getDefaultState().with(LIT, true)); + this.setDefaultState(this.stateManager.getDefaultState().with(STAGE, CeilingFanStage.OFF)); + } + + @Override + public BlockEntity createBlockEntity(BlockView view) { + return new CeilingFanBlockEntity(); } @Override public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) { return super.getPlacementState(itemPlacementContext) - .with(LIT, false); + .with(STAGE, CeilingFanStage.OFF); } public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { - world.setBlockState(pos, state.with(LIT, Boolean.valueOf(!state.get(LIT)))); - world.playSound(player, pos, SoundEvents.BLOCK_STONE_BUTTON_CLICK_ON, SoundCategory.BLOCKS, 0.2f, 0.5f); - return ActionResult.SUCCESS; + if (state.get(STAGE) == CeilingFanStage.OFF) {world.setBlockState(pos, state.with(STAGE, CeilingFanStage.LEVEL_1));} + if (state.get(STAGE) == CeilingFanStage.LEVEL_1) {world.setBlockState(pos, state.with(STAGE, CeilingFanStage.LEVEL_2));} + if (state.get(STAGE) == CeilingFanStage.LEVEL_2) {world.setBlockState(pos, state.with(STAGE, CeilingFanStage.LEVEL_3));} + if (state.get(STAGE) == CeilingFanStage.LEVEL_3) {world.setBlockState(pos, state.with(STAGE, CeilingFanStage.OFF));} + + world.playSound(player, pos, SoundEvents.BLOCK_STONE_BUTTON_CLICK_ON, SoundCategory.BLOCKS, 0.2f, 0.5f); + return ActionResult.SUCCESS; } @Override protected void appendProperties(StateManager.Builder builder) { - builder.add(LIT); + builder.add(STAGE); } @Override public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext context) { diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/ChristmasLights.java b/src/main/java/eu/midnightdust/motschen/decorative/block/ChristmasLights.java index 23f1118..f8d1f6b 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/ChristmasLights.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/ChristmasLights.java @@ -26,7 +26,7 @@ public class ChristmasLights extends HorizontalFacingBlock { private static final VoxelShape EAST_SHAPE; private static final VoxelShape SOUTH_SHAPE; private static final VoxelShape WEST_SHAPE; - public static final BooleanProperty LIT = RedstoneTorchBlock.LIT; + public static final BooleanProperty LIT = RedstoneLampBlock.LIT; public ChristmasLights() { super(FabricBlockSettings.copy(Blocks.REDSTONE_LAMP).nonOpaque().sounds(BlockSoundGroup.STONE)); diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/DarkOakChoppingLog.java b/src/main/java/eu/midnightdust/motschen/decorative/block/DarkOakChoppingLog.java new file mode 100644 index 0000000..5f045d4 --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/DarkOakChoppingLog.java @@ -0,0 +1,42 @@ +package eu.midnightdust.motschen.decorative.block; + +import eu.midnightdust.motschen.decorative.block.blockentity.DarkOakChoppingLogBlockEntity; +import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; +import net.minecraft.block.*; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.item.ItemPlacementContext; +import net.minecraft.sound.BlockSoundGroup; +import net.minecraft.state.StateManager; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.world.BlockView; +import net.minecraft.world.WorldView; + +public class DarkOakChoppingLog extends HorizontalFacingBlock implements BlockEntityProvider { + + public DarkOakChoppingLog() { + super(FabricBlockSettings.copy(Blocks.OAK_PLANKS).nonOpaque().sounds(BlockSoundGroup.WOOD)); + this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH)); + } + + @Override + public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) { + return super.getPlacementState(itemPlacementContext) + .with(FACING, itemPlacementContext.getPlayerFacing().getOpposite()); + } + + @Override + protected void appendProperties(StateManager.Builder builder) { + builder.add(FACING); + } + + public boolean canPlaceAt(BlockState state, WorldView worldView, BlockPos pos) { + return !worldView.isAir(pos.down()); + } + + @Override + public BlockEntity createBlockEntity(BlockView view) { + return new DarkOakChoppingLogBlockEntity(); + } + +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/DoubleLamp.java b/src/main/java/eu/midnightdust/motschen/decorative/block/DoubleLamp.java index 5cc2a91..6f700f7 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/DoubleLamp.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/DoubleLamp.java @@ -1,6 +1,5 @@ package eu.midnightdust.motschen.decorative.block; -import blue.endless.jankson.annotation.Nullable; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.minecraft.block.*; import net.minecraft.block.enums.DoubleBlockHalf; @@ -8,6 +7,7 @@ import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemPlacementContext; import net.minecraft.item.ItemStack; +import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.BlockSoundGroup; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvents; @@ -26,11 +26,13 @@ import net.minecraft.world.World; import net.minecraft.world.WorldAccess; import net.minecraft.world.WorldView; -public class DoubleLamp extends RedstoneLampBlock { +import java.util.Random; + +public class DoubleLamp extends Block { private static final VoxelShape SHAPE_TOP; private static final VoxelShape SHAPE_BOTTOM; - public static final BooleanProperty LIT = RedstoneTorchBlock.LIT; + public static final BooleanProperty LIT = RedstoneLampBlock.LIT; public static final EnumProperty HALF = Properties.DOUBLE_BLOCK_HALF; public DoubleLamp() { @@ -45,7 +47,6 @@ public class DoubleLamp extends RedstoneLampBlock { } @Override - @Nullable public BlockState getPlacementState(ItemPlacementContext arg) { return this.getDefaultState().with(LIT, arg.getWorld().isReceivingRedstonePower(arg.getBlockPos())); } diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/JungleChoppingLog.java b/src/main/java/eu/midnightdust/motschen/decorative/block/JungleChoppingLog.java new file mode 100644 index 0000000..7bdd30e --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/JungleChoppingLog.java @@ -0,0 +1,42 @@ +package eu.midnightdust.motschen.decorative.block; + +import eu.midnightdust.motschen.decorative.block.blockentity.JungleChoppingLogBlockEntity; +import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; +import net.minecraft.block.*; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.item.ItemPlacementContext; +import net.minecraft.sound.BlockSoundGroup; +import net.minecraft.state.StateManager; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.world.BlockView; +import net.minecraft.world.WorldView; + +public class JungleChoppingLog extends HorizontalFacingBlock implements BlockEntityProvider { + + public JungleChoppingLog() { + super(FabricBlockSettings.copy(Blocks.OAK_PLANKS).nonOpaque().sounds(BlockSoundGroup.WOOD)); + this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH)); + } + + @Override + public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) { + return super.getPlacementState(itemPlacementContext) + .with(FACING, itemPlacementContext.getPlayerFacing().getOpposite()); + } + + @Override + protected void appendProperties(StateManager.Builder builder) { + builder.add(FACING); + } + + public boolean canPlaceAt(BlockState state, WorldView worldView, BlockPos pos) { + return !worldView.isAir(pos.down()); + } + + @Override + public BlockEntity createBlockEntity(BlockView view) { + return new JungleChoppingLogBlockEntity(); + } + +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/Lamp.java b/src/main/java/eu/midnightdust/motschen/decorative/block/Lamp.java index 6770590..d313f0f 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/Lamp.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/Lamp.java @@ -2,10 +2,14 @@ package eu.midnightdust.motschen.decorative.block; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.minecraft.block.*; +import net.minecraft.block.enums.DoubleBlockHalf; import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemPlacementContext; import net.minecraft.sound.BlockSoundGroup; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvents; +import net.minecraft.state.StateManager; +import net.minecraft.state.property.BooleanProperty; import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; import net.minecraft.util.hit.BlockHitResult; @@ -14,11 +18,21 @@ import net.minecraft.util.shape.VoxelShape; import net.minecraft.world.BlockView; import net.minecraft.world.World; -public class Lamp extends RedstoneLampBlock { +public class Lamp extends Block { private static final VoxelShape SHAPE; + public static final BooleanProperty LIT = RedstoneLampBlock.LIT; public Lamp() { super(FabricBlockSettings.copy(Blocks.REDSTONE_LAMP).nonOpaque().sounds(BlockSoundGroup.STONE)); + this.setDefaultState(this.stateManager.getDefaultState().with(LIT, false)); + } + @Override + protected void appendProperties(StateManager.Builder arg) { + arg.add(LIT); + } + @Override + public BlockState getPlacementState(ItemPlacementContext arg) { + return this.getDefaultState().with(LIT, arg.getWorld().isReceivingRedstonePower(arg.getBlockPos())); } public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/LogWithAxe.java b/src/main/java/eu/midnightdust/motschen/decorative/block/OakChoppingLog.java similarity index 70% rename from src/main/java/eu/midnightdust/motschen/decorative/block/LogWithAxe.java rename to src/main/java/eu/midnightdust/motschen/decorative/block/OakChoppingLog.java index 0b61a5e..41874e1 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/LogWithAxe.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/OakChoppingLog.java @@ -1,18 +1,21 @@ package eu.midnightdust.motschen.decorative.block; +import eu.midnightdust.motschen.decorative.block.blockentity.OakChoppingLogBlockEntity; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.minecraft.block.*; +import net.minecraft.block.entity.BlockEntity; import net.minecraft.item.ItemPlacementContext; import net.minecraft.sound.BlockSoundGroup; import net.minecraft.state.StateManager; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; +import net.minecraft.world.BlockView; import net.minecraft.world.WorldView; -public class LogWithAxe extends HorizontalFacingBlock { +public class OakChoppingLog extends HorizontalFacingBlock implements BlockEntityProvider { - public LogWithAxe() { - super(FabricBlockSettings.copy(Blocks.OAK_PLANKS).nonOpaque().sounds(BlockSoundGroup.STONE)); + public OakChoppingLog() { + super(FabricBlockSettings.copy(Blocks.OAK_PLANKS).nonOpaque().sounds(BlockSoundGroup.WOOD)); this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH)); } @@ -31,4 +34,9 @@ public class LogWithAxe extends HorizontalFacingBlock { return !worldView.isAir(pos.down()); } + @Override + public BlockEntity createBlockEntity(BlockView view) { + return new OakChoppingLogBlockEntity(); + } + } diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/OldTelevision.java b/src/main/java/eu/midnightdust/motschen/decorative/block/OldTelevision.java index 8d0f405..734e7db 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/OldTelevision.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/OldTelevision.java @@ -1,7 +1,7 @@ package eu.midnightdust.motschen.decorative.block; import eu.midnightdust.motschen.decorative.DecorativeMain; -import eu.midnightdust.motschen.decorative.Program; +import eu.midnightdust.motschen.decorative.blockstates.Program; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.minecraft.block.*; import net.minecraft.entity.player.PlayerEntity; @@ -22,6 +22,8 @@ import net.minecraft.world.BlockView; import net.minecraft.world.World; import net.minecraft.world.WorldView; +import java.util.function.ToIntFunction; + public class OldTelevision extends HorizontalFacingBlock { private static final VoxelShape NORTH_SHAPE; @@ -31,7 +33,7 @@ public class OldTelevision extends HorizontalFacingBlock { private static final EnumProperty PROGRAM = DecorativeMain.PROGRAM; public OldTelevision() { - super(FabricBlockSettings.copy(Blocks.BLACK_CONCRETE).nonOpaque().sounds(BlockSoundGroup.STONE)); + super(FabricBlockSettings.copy(Blocks.BLACK_CONCRETE).nonOpaque().sounds(BlockSoundGroup.STONE).lightLevel(createLightLevelFromBlockState(15))); this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH).with(PROGRAM, Program.OFF)); } @@ -102,4 +104,15 @@ public class OldTelevision extends HorizontalFacingBlock { return !worldView.isAir(pos.down()); } + private static ToIntFunction createLightLevelFromBlockState(int litLevel) { + return (blockState) -> { + if (blockState.get(PROGRAM) == Program.OFF) { + return 0; + } + else { + return 11; + } + }; + } + } diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/PoolWall.java b/src/main/java/eu/midnightdust/motschen/decorative/block/PoolWall.java index f6d1f2e..bc19f8f 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/PoolWall.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/PoolWall.java @@ -1,7 +1,7 @@ package eu.midnightdust.motschen.decorative.block; import eu.midnightdust.motschen.decorative.DecorativeMain; -import eu.midnightdust.motschen.decorative.PoolShape; +import eu.midnightdust.motschen.decorative.blockstates.PoolShape; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.minecraft.block.*; import net.minecraft.fluid.FluidState; diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/Springboard.java b/src/main/java/eu/midnightdust/motschen/decorative/block/Springboard.java index da1b425..fa4784d 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/Springboard.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/Springboard.java @@ -1,7 +1,7 @@ package eu.midnightdust.motschen.decorative.block; import eu.midnightdust.motschen.decorative.DecorativeMain; -import eu.midnightdust.motschen.decorative.Part; +import eu.midnightdust.motschen.decorative.blockstates.Part; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.minecraft.block.*; import net.minecraft.entity.LivingEntity; diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/SpruceChoppingLog.java b/src/main/java/eu/midnightdust/motschen/decorative/block/SpruceChoppingLog.java new file mode 100644 index 0000000..7e5d20c --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/SpruceChoppingLog.java @@ -0,0 +1,42 @@ +package eu.midnightdust.motschen.decorative.block; + +import eu.midnightdust.motschen.decorative.block.blockentity.SpruceChoppingLogBlockEntity; +import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; +import net.minecraft.block.*; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.item.ItemPlacementContext; +import net.minecraft.sound.BlockSoundGroup; +import net.minecraft.state.StateManager; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.world.BlockView; +import net.minecraft.world.WorldView; + +public class SpruceChoppingLog extends HorizontalFacingBlock implements BlockEntityProvider { + + public SpruceChoppingLog() { + super(FabricBlockSettings.copy(Blocks.OAK_PLANKS).nonOpaque().sounds(BlockSoundGroup.WOOD)); + this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH)); + } + + @Override + public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) { + return super.getPlacementState(itemPlacementContext) + .with(FACING, itemPlacementContext.getPlayerFacing().getOpposite()); + } + + @Override + protected void appendProperties(StateManager.Builder builder) { + builder.add(FACING); + } + + public boolean canPlaceAt(BlockState state, WorldView worldView, BlockPos pos) { + return !worldView.isAir(pos.down()); + } + + @Override + public BlockEntity createBlockEntity(BlockView view) { + return new SpruceChoppingLogBlockEntity(); + } + +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/Television.java b/src/main/java/eu/midnightdust/motschen/decorative/block/Television.java index bc5edd9..28047e9 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/Television.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/Television.java @@ -1,7 +1,7 @@ package eu.midnightdust.motschen.decorative.block; import eu.midnightdust.motschen.decorative.DecorativeMain; -import eu.midnightdust.motschen.decorative.Program; +import eu.midnightdust.motschen.decorative.blockstates.Program; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.minecraft.block.*; import net.minecraft.entity.player.PlayerEntity; @@ -11,6 +11,7 @@ import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvents; import net.minecraft.state.StateManager; import net.minecraft.state.property.EnumProperty; +import net.minecraft.state.property.Properties; import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; import net.minecraft.util.hit.BlockHitResult; @@ -22,6 +23,8 @@ import net.minecraft.world.BlockView; import net.minecraft.world.World; import net.minecraft.world.WorldView; +import java.util.function.ToIntFunction; + public class Television extends HorizontalFacingBlock { private static final VoxelShape NORTH_SHAPE; @@ -31,7 +34,7 @@ public class Television extends HorizontalFacingBlock { private static final EnumProperty PROGRAM = DecorativeMain.PROGRAM; public Television() { - super(FabricBlockSettings.copy(Blocks.BLACK_CONCRETE).nonOpaque().sounds(BlockSoundGroup.STONE)); + super(FabricBlockSettings.copy(Blocks.BLACK_CONCRETE).nonOpaque().sounds(BlockSoundGroup.STONE).lightLevel(createLightLevelFromBlockState(15))); this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH).with(PROGRAM, Program.OFF)); } @@ -102,4 +105,16 @@ public class Television extends HorizontalFacingBlock { return !worldView.isAir(pos.down()); } + private static ToIntFunction createLightLevelFromBlockState(int litLevel) { + return (blockState) -> { + if (blockState.get(PROGRAM) == Program.OFF) { + return 0; + } + else { + return 11; + } + }; + } + + } diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/AcaciaChoppingLogBlockEntity.java b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/AcaciaChoppingLogBlockEntity.java new file mode 100644 index 0000000..8458c97 --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/AcaciaChoppingLogBlockEntity.java @@ -0,0 +1,61 @@ +package eu.midnightdust.motschen.decorative.block.blockentity; + +import eu.midnightdust.motschen.decorative.init.BlockEntities; +import net.minecraft.block.BlockState; +import net.minecraft.block.HorizontalFacingBlock; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.util.Tickable; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; + +public class AcaciaChoppingLogBlockEntity extends BlockEntity implements Tickable { + private int facing; + private double axe_x; + private double axe_z; + + public AcaciaChoppingLogBlockEntity() { + super(BlockEntities.AcaciaChoppingLogBlockEntity); + } + + @Override + public void tick() { + + BlockPos pos = this.pos; + BlockState state = this.world.getBlockState(pos); + + if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.EAST) { + facing = 180; + axe_x = 0.2D; + axe_z = 0.5D; + return; + } + if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.SOUTH) { + facing = 90; + axe_x = 0.5D; + axe_z = 0.2D; + return; + } + if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.WEST) { + facing = 0; + axe_x = 0.8D; + axe_z = 0.5D; + return; + } + else { + facing = 270; + axe_x = 0.5D; + axe_z = 0.8D; + return; + } + } + + public int getFacing() { + return facing; + } + public double getAxeX() { + return axe_x; + } + public double getAxeZ() { + return axe_z; + } +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/BirchChoppingLogBlockEntity.java b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/BirchChoppingLogBlockEntity.java new file mode 100644 index 0000000..5e7f09c --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/BirchChoppingLogBlockEntity.java @@ -0,0 +1,61 @@ +package eu.midnightdust.motschen.decorative.block.blockentity; + +import eu.midnightdust.motschen.decorative.init.BlockEntities; +import net.minecraft.block.BlockState; +import net.minecraft.block.HorizontalFacingBlock; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.util.Tickable; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; + +public class BirchChoppingLogBlockEntity extends BlockEntity implements Tickable { + private int facing; + private double axe_x; + private double axe_z; + + public BirchChoppingLogBlockEntity() { + super(BlockEntities.BirchChoppingLogBlockEntity); + } + + @Override + public void tick() { + + BlockPos pos = this.pos; + BlockState state = this.world.getBlockState(pos); + + if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.EAST) { + facing = 180; + axe_x = 0.2D; + axe_z = 0.5D; + return; + } + if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.SOUTH) { + facing = 90; + axe_x = 0.5D; + axe_z = 0.2D; + return; + } + if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.WEST) { + facing = 0; + axe_x = 0.8D; + axe_z = 0.5D; + return; + } + else { + facing = 270; + axe_x = 0.5D; + axe_z = 0.8D; + return; + } + } + + public int getFacing() { + return facing; + } + public double getAxeX() { + return axe_x; + } + public double getAxeZ() { + return axe_z; + } +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/CeilingFanBlockEntity.java b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/CeilingFanBlockEntity.java new file mode 100644 index 0000000..a966e8f --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/CeilingFanBlockEntity.java @@ -0,0 +1,50 @@ +package eu.midnightdust.motschen.decorative.block.blockentity; + +import eu.midnightdust.motschen.decorative.blockstates.CeilingFanStage; +import eu.midnightdust.motschen.decorative.DecorativeMain; +import eu.midnightdust.motschen.decorative.init.BlockEntities; +import eu.midnightdust.motschen.decorative.sound.DecorativeSoundEvents; +import net.minecraft.block.BlockState; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.sound.SoundCategory; +import net.minecraft.util.Tickable; +import net.minecraft.util.math.BlockPos; + +public class CeilingFanBlockEntity extends BlockEntity implements Tickable { + private int rot; + + public CeilingFanBlockEntity() { + super(BlockEntities.CeilingFanBlockEntity); + } + + + + @Override + public void tick() { + + BlockPos pos = this.pos; + BlockState state = this.world.getBlockState(pos); + if (world != null && state.get(DecorativeMain.STAGE) == CeilingFanStage.LEVEL_1) { + world.playSound(null,pos, DecorativeSoundEvents.CEILINGFAN_AMBIENT, SoundCategory.BLOCKS, 0.1f, 1.0f); + rot = rot + 6; + return; + } + if (world != null && state.get(DecorativeMain.STAGE) == CeilingFanStage.LEVEL_2) { + world.playSound(null,pos, DecorativeSoundEvents.CEILINGFAN_AMBIENT, SoundCategory.BLOCKS, 0.2f, 1.0f); + rot = rot + 10; + return; + } + if (world != null && state.get(DecorativeMain.STAGE) == CeilingFanStage.LEVEL_3) { + world.playSound(null,pos, DecorativeSoundEvents.CEILINGFAN_AMBIENT, SoundCategory.BLOCKS, 0.3f, 1.0f); + rot = rot + 14; + return; + } + else { + rot = rot; + return; + } + } + public int getRot() { + return rot; + } +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/DarkOakChoppingLogBlockEntity.java b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/DarkOakChoppingLogBlockEntity.java new file mode 100644 index 0000000..e157fd3 --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/DarkOakChoppingLogBlockEntity.java @@ -0,0 +1,61 @@ +package eu.midnightdust.motschen.decorative.block.blockentity; + +import eu.midnightdust.motschen.decorative.init.BlockEntities; +import net.minecraft.block.BlockState; +import net.minecraft.block.HorizontalFacingBlock; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.util.Tickable; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; + +public class DarkOakChoppingLogBlockEntity extends BlockEntity implements Tickable { + private int facing; + private double axe_x; + private double axe_z; + + public DarkOakChoppingLogBlockEntity() { + super(BlockEntities.DarkOakChoppingLogBlockEntity); + } + + @Override + public void tick() { + + BlockPos pos = this.pos; + BlockState state = this.world.getBlockState(pos); + + if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.EAST) { + facing = 180; + axe_x = 0.2D; + axe_z = 0.5D; + return; + } + if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.SOUTH) { + facing = 90; + axe_x = 0.5D; + axe_z = 0.2D; + return; + } + if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.WEST) { + facing = 0; + axe_x = 0.8D; + axe_z = 0.5D; + return; + } + else { + facing = 270; + axe_x = 0.5D; + axe_z = 0.8D; + return; + } + } + + public int getFacing() { + return facing; + } + public double getAxeX() { + return axe_x; + } + public double getAxeZ() { + return axe_z; + } +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/JungleChoppingLogBlockEntity.java b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/JungleChoppingLogBlockEntity.java new file mode 100644 index 0000000..603c612 --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/JungleChoppingLogBlockEntity.java @@ -0,0 +1,61 @@ +package eu.midnightdust.motschen.decorative.block.blockentity; + +import eu.midnightdust.motschen.decorative.init.BlockEntities; +import net.minecraft.block.BlockState; +import net.minecraft.block.HorizontalFacingBlock; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.util.Tickable; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; + +public class JungleChoppingLogBlockEntity extends BlockEntity implements Tickable { + private int facing; + private double axe_x; + private double axe_z; + + public JungleChoppingLogBlockEntity() { + super(BlockEntities.JungleChoppingLogBlockEntity); + } + + @Override + public void tick() { + + BlockPos pos = this.pos; + BlockState state = this.world.getBlockState(pos); + + if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.EAST) { + facing = 180; + axe_x = 0.2D; + axe_z = 0.5D; + return; + } + if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.SOUTH) { + facing = 90; + axe_x = 0.5D; + axe_z = 0.2D; + return; + } + if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.WEST) { + facing = 0; + axe_x = 0.8D; + axe_z = 0.5D; + return; + } + else { + facing = 270; + axe_x = 0.5D; + axe_z = 0.8D; + return; + } + } + + public int getFacing() { + return facing; + } + public double getAxeX() { + return axe_x; + } + public double getAxeZ() { + return axe_z; + } +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/OakChoppingLogBlockEntity.java b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/OakChoppingLogBlockEntity.java new file mode 100644 index 0000000..ff37c58 --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/OakChoppingLogBlockEntity.java @@ -0,0 +1,61 @@ +package eu.midnightdust.motschen.decorative.block.blockentity; + +import eu.midnightdust.motschen.decorative.init.BlockEntities; +import net.minecraft.block.BlockState; +import net.minecraft.block.HorizontalFacingBlock; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.util.Tickable; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; + +public class OakChoppingLogBlockEntity extends BlockEntity implements Tickable { + private int facing; + private double axe_x; + private double axe_z; + + public OakChoppingLogBlockEntity() { + super(BlockEntities.OakChoppingLogBlockEntity); + } + + @Override + public void tick() { + + BlockPos pos = this.pos; + BlockState state = this.world.getBlockState(pos); + + if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.EAST) { + facing = 180; + axe_x = 0.2D; + axe_z = 0.5D; + return; + } + if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.SOUTH) { + facing = 90; + axe_x = 0.5D; + axe_z = 0.2D; + return; + } + if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.WEST) { + facing = 0; + axe_x = 0.8D; + axe_z = 0.5D; + return; + } + else { + facing = 270; + axe_x = 0.5D; + axe_z = 0.8D; + return; + } + } + + public int getFacing() { + return facing; + } + public double getAxeX() { + return axe_x; + } + public double getAxeZ() { + return axe_z; + } +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/SpruceChoppingLogBlockEntity.java b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/SpruceChoppingLogBlockEntity.java new file mode 100644 index 0000000..886bbb6 --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/SpruceChoppingLogBlockEntity.java @@ -0,0 +1,61 @@ +package eu.midnightdust.motschen.decorative.block.blockentity; + +import eu.midnightdust.motschen.decorative.init.BlockEntities; +import net.minecraft.block.BlockState; +import net.minecraft.block.HorizontalFacingBlock; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.util.Tickable; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; + +public class SpruceChoppingLogBlockEntity extends BlockEntity implements Tickable { + private int facing; + private double axe_x; + private double axe_z; + + public SpruceChoppingLogBlockEntity() { + super(BlockEntities.SpruceChoppingLogBlockEntity); + } + + @Override + public void tick() { + + BlockPos pos = this.pos; + BlockState state = this.world.getBlockState(pos); + + if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.EAST) { + facing = 180; + axe_x = 0.2D; + axe_z = 0.5D; + return; + } + if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.SOUTH) { + facing = 90; + axe_x = 0.5D; + axe_z = 0.2D; + return; + } + if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.WEST) { + facing = 0; + axe_x = 0.8D; + axe_z = 0.5D; + return; + } + else { + facing = 270; + axe_x = 0.5D; + axe_z = 0.8D; + return; + } + } + + public int getFacing() { + return facing; + } + public double getAxeX() { + return axe_x; + } + public double getAxeZ() { + return axe_z; + } +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/render/AcaciaChoppingLogBlockEntityRenderer.java b/src/main/java/eu/midnightdust/motschen/decorative/block/render/AcaciaChoppingLogBlockEntityRenderer.java new file mode 100644 index 0000000..d4fc94c --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/render/AcaciaChoppingLogBlockEntityRenderer.java @@ -0,0 +1,52 @@ +package eu.midnightdust.motschen.decorative.block.render; + +import eu.midnightdust.motschen.decorative.block.blockentity.AcaciaChoppingLogBlockEntity; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.block.BlockState; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.render.VertexConsumerProvider; +import net.minecraft.client.render.WorldRenderer; +import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher; +import net.minecraft.client.render.block.entity.BlockEntityRenderer; +import net.minecraft.client.render.model.json.ModelTransformation; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.client.util.math.Vector3f; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.util.math.BlockPos; + +@Environment(EnvType.CLIENT) +public class AcaciaChoppingLogBlockEntityRenderer extends BlockEntityRenderer { + + public AcaciaChoppingLogBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) { + super(blockEntityRenderDispatcher); + } + + @Override + public boolean rendersOutsideBoundingBox(AcaciaChoppingLogBlockEntity blockEntity) { + return true; + } + + + @Override + public void render(AcaciaChoppingLogBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) { + BlockPos pos = blockEntity.getPos(); + BlockState state = blockEntity.getWorld().getBlockState(pos); + + matrices.push(); + int lightAbove = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos().up()); + + matrices.translate(blockEntity.getAxeX(), 1.5D, blockEntity.getAxeZ()); + matrices.scale(2.5f,2.5f,2.5f); + + matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing())); + + matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(160)); + MinecraftClient.getInstance().getItemRenderer().renderItem(new ItemStack(Items.IRON_AXE), + ModelTransformation.Mode.GROUND, lightAbove, overlay, matrices, vertexConsumers); + + + matrices.pop(); + } +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/render/BirchChoppingLogBlockEntityRenderer.java b/src/main/java/eu/midnightdust/motschen/decorative/block/render/BirchChoppingLogBlockEntityRenderer.java new file mode 100644 index 0000000..f996252 --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/render/BirchChoppingLogBlockEntityRenderer.java @@ -0,0 +1,52 @@ +package eu.midnightdust.motschen.decorative.block.render; + +import eu.midnightdust.motschen.decorative.block.blockentity.BirchChoppingLogBlockEntity; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.block.BlockState; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.render.VertexConsumerProvider; +import net.minecraft.client.render.WorldRenderer; +import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher; +import net.minecraft.client.render.block.entity.BlockEntityRenderer; +import net.minecraft.client.render.model.json.ModelTransformation; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.client.util.math.Vector3f; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.util.math.BlockPos; + +@Environment(EnvType.CLIENT) +public class BirchChoppingLogBlockEntityRenderer extends BlockEntityRenderer { + + public BirchChoppingLogBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) { + super(blockEntityRenderDispatcher); + } + + @Override + public boolean rendersOutsideBoundingBox(BirchChoppingLogBlockEntity blockEntity) { + return true; + } + + + @Override + public void render(BirchChoppingLogBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) { + BlockPos pos = blockEntity.getPos(); + BlockState state = blockEntity.getWorld().getBlockState(pos); + + matrices.push(); + int lightAbove = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos().up()); + + matrices.translate(blockEntity.getAxeX(), 1.5D, blockEntity.getAxeZ()); + matrices.scale(2.5f,2.5f,2.5f); + + matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing())); + + matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(160)); + MinecraftClient.getInstance().getItemRenderer().renderItem(new ItemStack(Items.IRON_AXE), + ModelTransformation.Mode.GROUND, lightAbove, overlay, matrices, vertexConsumers); + + + matrices.pop(); + } +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/render/CeilingFanRenderer.java b/src/main/java/eu/midnightdust/motschen/decorative/block/render/CeilingFanRenderer.java new file mode 100644 index 0000000..96c49cb --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/render/CeilingFanRenderer.java @@ -0,0 +1,58 @@ +package eu.midnightdust.motschen.decorative.block.render; + +import eu.midnightdust.motschen.decorative.block.blockentity.CeilingFanBlockEntity; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.block.DoorBlock; +import net.minecraft.client.model.ModelPart; +import net.minecraft.client.render.OverlayTexture; +import net.minecraft.client.render.RenderLayer; +import net.minecraft.client.render.VertexConsumer; +import net.minecraft.client.render.VertexConsumerProvider; +import net.minecraft.client.render.WorldRenderer; +import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher; +import net.minecraft.client.render.block.entity.BlockEntityRenderer; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.client.util.math.Vector3f; +import net.minecraft.util.Identifier; + +@Environment(EnvType.CLIENT) +public class CeilingFanRenderer extends BlockEntityRenderer { + private static int rot; + private final ModelPart blades; + private final ModelPart point; + + public CeilingFanRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) { + super(blockEntityRenderDispatcher); + blades = new ModelPart(64, 64, 0, 0); + blades.setPivot(0.0F, 0.0F, 0.0F); + blades.addCuboid(-1.0F, 0.0F, 1.0F, 2.0F, 1.0F, 10.0F, 0.0F); + blades.addCuboid(-1.0F, 0.0F, -11.0F, 2.0F, 1.0F, 10.0F, 0.0F); + blades.addCuboid(1.0F, 0.0F, -1.0F, 10.0F, 1.0F, 2.0F, 0.0F); + blades.addCuboid(-11.0F, 0.0F, -1.0F, 10.0F, 1.0F, 2.0F, 0.0F); + point = new ModelPart(32, 32, 16, 0); + point.addCuboid(-1.0F, -1.0F, -1.0F, 2.0F, 2.0F, 2.0F, 0.0F); + blades.addChild(point); + } + + @Override + public boolean rendersOutsideBoundingBox(CeilingFanBlockEntity blockEntity) { + return true; + } + + + @Override + public void render(CeilingFanBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) { + + matrices.push(); + int lightAtBlock = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos()); + VertexConsumer vertexConsumer = vertexConsumers.getBuffer(RenderLayer.getEntityCutoutNoCull(new Identifier("decorative:textures/block/ceilingfan.png"))); + matrices.translate(0.5,0.31,0.5); + + matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getRot())); + + + blades.render(matrices, vertexConsumer, lightAtBlock, OverlayTexture.DEFAULT_UV, 1.0F, 1.0F, 1.0F, 1.0F); + matrices.pop(); + } +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/render/DarkOakChoppingLogBlockEntityRenderer.java b/src/main/java/eu/midnightdust/motschen/decorative/block/render/DarkOakChoppingLogBlockEntityRenderer.java new file mode 100644 index 0000000..fac8214 --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/render/DarkOakChoppingLogBlockEntityRenderer.java @@ -0,0 +1,52 @@ +package eu.midnightdust.motschen.decorative.block.render; + +import eu.midnightdust.motschen.decorative.block.blockentity.DarkOakChoppingLogBlockEntity; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.block.BlockState; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.render.VertexConsumerProvider; +import net.minecraft.client.render.WorldRenderer; +import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher; +import net.minecraft.client.render.block.entity.BlockEntityRenderer; +import net.minecraft.client.render.model.json.ModelTransformation; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.client.util.math.Vector3f; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.util.math.BlockPos; + +@Environment(EnvType.CLIENT) +public class DarkOakChoppingLogBlockEntityRenderer extends BlockEntityRenderer { + + public DarkOakChoppingLogBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) { + super(blockEntityRenderDispatcher); + } + + @Override + public boolean rendersOutsideBoundingBox(DarkOakChoppingLogBlockEntity blockEntity) { + return true; + } + + + @Override + public void render(DarkOakChoppingLogBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) { + BlockPos pos = blockEntity.getPos(); + BlockState state = blockEntity.getWorld().getBlockState(pos); + + matrices.push(); + int lightAbove = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos().up()); + + matrices.translate(blockEntity.getAxeX(), 1.5D, blockEntity.getAxeZ()); + matrices.scale(2.5f,2.5f,2.5f); + + matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing())); + + matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(160)); + MinecraftClient.getInstance().getItemRenderer().renderItem(new ItemStack(Items.IRON_AXE), + ModelTransformation.Mode.GROUND, lightAbove, overlay, matrices, vertexConsumers); + + + matrices.pop(); + } +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/render/JungleChoppingLogBlockEntityRenderer.java b/src/main/java/eu/midnightdust/motschen/decorative/block/render/JungleChoppingLogBlockEntityRenderer.java new file mode 100644 index 0000000..d23360b --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/render/JungleChoppingLogBlockEntityRenderer.java @@ -0,0 +1,52 @@ +package eu.midnightdust.motschen.decorative.block.render; + +import eu.midnightdust.motschen.decorative.block.blockentity.JungleChoppingLogBlockEntity; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.block.BlockState; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.render.VertexConsumerProvider; +import net.minecraft.client.render.WorldRenderer; +import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher; +import net.minecraft.client.render.block.entity.BlockEntityRenderer; +import net.minecraft.client.render.model.json.ModelTransformation; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.client.util.math.Vector3f; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.util.math.BlockPos; + +@Environment(EnvType.CLIENT) +public class JungleChoppingLogBlockEntityRenderer extends BlockEntityRenderer { + + public JungleChoppingLogBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) { + super(blockEntityRenderDispatcher); + } + + @Override + public boolean rendersOutsideBoundingBox(JungleChoppingLogBlockEntity blockEntity) { + return true; + } + + + @Override + public void render(JungleChoppingLogBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) { + BlockPos pos = blockEntity.getPos(); + BlockState state = blockEntity.getWorld().getBlockState(pos); + + matrices.push(); + int lightAbove = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos().up()); + + matrices.translate(blockEntity.getAxeX(), 1.5D, blockEntity.getAxeZ()); + matrices.scale(2.5f,2.5f,2.5f); + + matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing())); + + matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(160)); + MinecraftClient.getInstance().getItemRenderer().renderItem(new ItemStack(Items.IRON_AXE), + ModelTransformation.Mode.GROUND, lightAbove, overlay, matrices, vertexConsumers); + + + matrices.pop(); + } +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/render/OakChoppingLogBlockEntityRenderer.java b/src/main/java/eu/midnightdust/motschen/decorative/block/render/OakChoppingLogBlockEntityRenderer.java new file mode 100644 index 0000000..ffdbb99 --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/render/OakChoppingLogBlockEntityRenderer.java @@ -0,0 +1,51 @@ +package eu.midnightdust.motschen.decorative.block.render; + +import eu.midnightdust.motschen.decorative.block.blockentity.OakChoppingLogBlockEntity; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.block.BlockState; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.render.*; +import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher; +import net.minecraft.client.render.block.entity.BlockEntityRenderer; +import net.minecraft.client.render.model.json.ModelTransformation; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.client.util.math.Vector3f; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.util.math.BlockPos; + +@Environment(EnvType.CLIENT) +public class OakChoppingLogBlockEntityRenderer extends BlockEntityRenderer { + + public OakChoppingLogBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) { + super(blockEntityRenderDispatcher); + } + + @Override + public boolean rendersOutsideBoundingBox(OakChoppingLogBlockEntity blockEntity) { + return true; + } + + + @Override + public void render(OakChoppingLogBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) { + BlockPos pos = blockEntity.getPos(); + BlockState state = blockEntity.getWorld().getBlockState(pos); + + matrices.push(); + int lightAbove = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos().up()); + + matrices.translate(blockEntity.getAxeX(), 1.5D, blockEntity.getAxeZ()); + matrices.scale(2.5f,2.5f,2.5f); + + matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing())); + + matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(160)); + MinecraftClient.getInstance().getItemRenderer().renderItem(new ItemStack(Items.IRON_AXE), + ModelTransformation.Mode.GROUND, lightAbove, overlay, matrices, vertexConsumers); + + + matrices.pop(); + } +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/render/SpruceChoppingLogBlockEntityRenderer.java b/src/main/java/eu/midnightdust/motschen/decorative/block/render/SpruceChoppingLogBlockEntityRenderer.java new file mode 100644 index 0000000..86e439b --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/render/SpruceChoppingLogBlockEntityRenderer.java @@ -0,0 +1,52 @@ +package eu.midnightdust.motschen.decorative.block.render; + +import eu.midnightdust.motschen.decorative.block.blockentity.SpruceChoppingLogBlockEntity; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.block.BlockState; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.render.VertexConsumerProvider; +import net.minecraft.client.render.WorldRenderer; +import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher; +import net.minecraft.client.render.block.entity.BlockEntityRenderer; +import net.minecraft.client.render.model.json.ModelTransformation; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.client.util.math.Vector3f; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.util.math.BlockPos; + +@Environment(EnvType.CLIENT) +public class SpruceChoppingLogBlockEntityRenderer extends BlockEntityRenderer { + + public SpruceChoppingLogBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) { + super(blockEntityRenderDispatcher); + } + + @Override + public boolean rendersOutsideBoundingBox(SpruceChoppingLogBlockEntity blockEntity) { + return true; + } + + + @Override + public void render(SpruceChoppingLogBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) { + BlockPos pos = blockEntity.getPos(); + BlockState state = blockEntity.getWorld().getBlockState(pos); + + matrices.push(); + int lightAbove = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos().up()); + + matrices.translate(blockEntity.getAxeX(), 1.5D, blockEntity.getAxeZ()); + matrices.scale(2.5f,2.5f,2.5f); + + matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing())); + + matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(160)); + MinecraftClient.getInstance().getItemRenderer().renderItem(new ItemStack(Items.IRON_AXE), + ModelTransformation.Mode.GROUND, lightAbove, overlay, matrices, vertexConsumers); + + + matrices.pop(); + } +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/blockstates/CeilingFanStage.java b/src/main/java/eu/midnightdust/motschen/decorative/blockstates/CeilingFanStage.java new file mode 100644 index 0000000..86aafe3 --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/blockstates/CeilingFanStage.java @@ -0,0 +1,24 @@ +package eu.midnightdust.motschen.decorative.blockstates; + +import net.minecraft.util.StringIdentifiable; + +public enum CeilingFanStage implements StringIdentifiable { + OFF("off"), + LEVEL_1("level1"), + LEVEL_2("level2"), + LEVEL_3("level3"); + + private final String name; + + CeilingFanStage(String name) { + this.name = name; + } + + public String toString() { + return this.name; + } + + public String asString() { + return this.name; + } +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/Part.java b/src/main/java/eu/midnightdust/motschen/decorative/blockstates/Part.java similarity index 86% rename from src/main/java/eu/midnightdust/motschen/decorative/Part.java rename to src/main/java/eu/midnightdust/motschen/decorative/blockstates/Part.java index bbb73ca..4387875 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/Part.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/blockstates/Part.java @@ -1,4 +1,4 @@ -package eu.midnightdust.motschen.decorative; +package eu.midnightdust.motschen.decorative.blockstates; import net.minecraft.util.StringIdentifiable; diff --git a/src/main/java/eu/midnightdust/motschen/decorative/PoolShape.java b/src/main/java/eu/midnightdust/motschen/decorative/blockstates/PoolShape.java similarity index 87% rename from src/main/java/eu/midnightdust/motschen/decorative/PoolShape.java rename to src/main/java/eu/midnightdust/motschen/decorative/blockstates/PoolShape.java index ff0be62..436647b 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/PoolShape.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/blockstates/PoolShape.java @@ -1,4 +1,4 @@ -package eu.midnightdust.motschen.decorative; +package eu.midnightdust.motschen.decorative.blockstates; import net.minecraft.util.StringIdentifiable; diff --git a/src/main/java/eu/midnightdust/motschen/decorative/Program.java b/src/main/java/eu/midnightdust/motschen/decorative/blockstates/Program.java similarity index 88% rename from src/main/java/eu/midnightdust/motschen/decorative/Program.java rename to src/main/java/eu/midnightdust/motschen/decorative/blockstates/Program.java index e67ae82..e4eed8d 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/Program.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/blockstates/Program.java @@ -1,4 +1,4 @@ -package eu.midnightdust.motschen.decorative; +package eu.midnightdust.motschen.decorative.blockstates; import net.minecraft.util.StringIdentifiable; diff --git a/src/main/java/eu/midnightdust/motschen/decorative/init/BathTires.java b/src/main/java/eu/midnightdust/motschen/decorative/init/BathTires.java index 24cbb6f..3ff04ae 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/init/BathTires.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/init/BathTires.java @@ -16,76 +16,76 @@ import net.minecraft.util.registry.Registry; public class BathTires { public static final EntityType WHITE_BATH_TIRE = - Registry.register(Registry.ENTITY_TYPE,new Identifier("decorative","white_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); + Registry.register(Registry.ENTITY_TYPE,new Identifier(DecorativeMain.MOD_ID,"white_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); public static final EntityType ORANGE_BATH_TIRE = - Registry.register(Registry.ENTITY_TYPE,new Identifier("decorative","orange_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); + Registry.register(Registry.ENTITY_TYPE,new Identifier(DecorativeMain.MOD_ID,"orange_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); public static final EntityType MAGENTA_BATH_TIRE= - Registry.register(Registry.ENTITY_TYPE,new Identifier("decorative","magenta_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); + Registry.register(Registry.ENTITY_TYPE,new Identifier(DecorativeMain.MOD_ID,"magenta_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); public static final EntityType LIGHT_BLUE_BATH_TIRE = - Registry.register(Registry.ENTITY_TYPE,new Identifier("decorative","light_blue_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); + Registry.register(Registry.ENTITY_TYPE,new Identifier(DecorativeMain.MOD_ID,"light_blue_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); public static final EntityType YELLOW_BATH_TIRE = - Registry.register(Registry.ENTITY_TYPE,new Identifier("decorative","yellow_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); + Registry.register(Registry.ENTITY_TYPE,new Identifier(DecorativeMain.MOD_ID,"yellow_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); public static final EntityType LIME_BATH_TIRE = - Registry.register(Registry.ENTITY_TYPE,new Identifier("decorative","lime_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); + Registry.register(Registry.ENTITY_TYPE,new Identifier(DecorativeMain.MOD_ID,"lime_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); public static final EntityType PINK_BATH_TIRE = - Registry.register(Registry.ENTITY_TYPE,new Identifier("decorative","pink_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); + Registry.register(Registry.ENTITY_TYPE,new Identifier(DecorativeMain.MOD_ID,"pink_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); public static final EntityType GRAY_BATH_TIRE = - Registry.register(Registry.ENTITY_TYPE,new Identifier("decorative","gray_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); + Registry.register(Registry.ENTITY_TYPE,new Identifier(DecorativeMain.MOD_ID,"gray_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); public static final EntityType LIGHT_GRAY_BATH_TIRE = - Registry.register(Registry.ENTITY_TYPE,new Identifier("decorative","light_gray_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); + Registry.register(Registry.ENTITY_TYPE,new Identifier(DecorativeMain.MOD_ID,"light_gray_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); public static final EntityType CYAN_BATH_TIRE = - Registry.register(Registry.ENTITY_TYPE,new Identifier("decorative","cyan_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); + Registry.register(Registry.ENTITY_TYPE,new Identifier(DecorativeMain.MOD_ID,"cyan_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); public static final EntityType PURPLE_BATH_TIRE = - Registry.register(Registry.ENTITY_TYPE,new Identifier("decorative","purple_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); + Registry.register(Registry.ENTITY_TYPE,new Identifier(DecorativeMain.MOD_ID,"purple_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); public static final EntityType BLUE_BATH_TIRE = - Registry.register(Registry.ENTITY_TYPE,new Identifier("decorative","blue_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); + Registry.register(Registry.ENTITY_TYPE,new Identifier(DecorativeMain.MOD_ID,"blue_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); public static final EntityType BROWN_BATH_TIRE = - Registry.register(Registry.ENTITY_TYPE,new Identifier("decorative","brown_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); + Registry.register(Registry.ENTITY_TYPE,new Identifier(DecorativeMain.MOD_ID,"brown_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); public static final EntityType GREEN_BATH_TIRE = - Registry.register(Registry.ENTITY_TYPE,new Identifier("decorative","green_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); + Registry.register(Registry.ENTITY_TYPE,new Identifier(DecorativeMain.MOD_ID,"green_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); public static final EntityType RED_BATH_TIRE = - Registry.register(Registry.ENTITY_TYPE,new Identifier("decorative","red_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); + Registry.register(Registry.ENTITY_TYPE,new Identifier(DecorativeMain.MOD_ID,"red_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); public static final EntityType BLACK_BATH_TIRE = - Registry.register(Registry.ENTITY_TYPE,new Identifier("decorative","black_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); + Registry.register(Registry.ENTITY_TYPE,new Identifier(DecorativeMain.MOD_ID,"black_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); public static final EntityType DUCK_BATH_TIRE = - Registry.register(Registry.ENTITY_TYPE,new Identifier("decorative","duck_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); + Registry.register(Registry.ENTITY_TYPE,new Identifier(DecorativeMain.MOD_ID,"duck_bath_tire"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT,BathTireEntity::new).dimensions(EntityDimensions.fixed(1.5f,1)).trackable(100,4).build()); public static void init() { - Registry.register(Registry.ITEM, new Identifier("decorative","white_bath_tire"), new BathTireItem(WHITE_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"white_bath_tire"), new BathTireItem(WHITE_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); FabricDefaultAttributeRegistry.register(WHITE_BATH_TIRE, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 2.0D)); - Registry.register(Registry.ITEM, new Identifier("decorative","orange_bath_tire"), new BathTireItem(ORANGE_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"orange_bath_tire"), new BathTireItem(ORANGE_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); FabricDefaultAttributeRegistry.register(ORANGE_BATH_TIRE, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 2.0D)); - Registry.register(Registry.ITEM, new Identifier("decorative","magenta_bath_tire"), new BathTireItem(MAGENTA_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"magenta_bath_tire"), new BathTireItem(MAGENTA_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); FabricDefaultAttributeRegistry.register(MAGENTA_BATH_TIRE, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 2.0D)); - Registry.register(Registry.ITEM, new Identifier("decorative","light_blue_bath_tire"), new BathTireItem(LIGHT_BLUE_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"light_blue_bath_tire"), new BathTireItem(LIGHT_BLUE_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); FabricDefaultAttributeRegistry.register(LIGHT_BLUE_BATH_TIRE, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 2.0D)); - Registry.register(Registry.ITEM, new Identifier("decorative","yellow_bath_tire"), new BathTireItem(YELLOW_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"yellow_bath_tire"), new BathTireItem(YELLOW_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); FabricDefaultAttributeRegistry.register(YELLOW_BATH_TIRE, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 2.0D)); - Registry.register(Registry.ITEM, new Identifier("decorative","lime_bath_tire"), new BathTireItem(LIME_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"lime_bath_tire"), new BathTireItem(LIME_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); FabricDefaultAttributeRegistry.register(LIME_BATH_TIRE, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 2.0D)); - Registry.register(Registry.ITEM, new Identifier("decorative","pink_bath_tire"), new BathTireItem(PINK_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"pink_bath_tire"), new BathTireItem(PINK_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); FabricDefaultAttributeRegistry.register(PINK_BATH_TIRE, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 2.0D)); - Registry.register(Registry.ITEM, new Identifier("decorative","gray_bath_tire"), new BathTireItem(GRAY_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"gray_bath_tire"), new BathTireItem(GRAY_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); FabricDefaultAttributeRegistry.register(GRAY_BATH_TIRE, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 2.0D)); - Registry.register(Registry.ITEM, new Identifier("decorative","light_gray_bath_tire"), new BathTireItem(LIGHT_GRAY_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"light_gray_bath_tire"), new BathTireItem(LIGHT_GRAY_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); FabricDefaultAttributeRegistry.register(LIGHT_GRAY_BATH_TIRE, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 2.0D)); - Registry.register(Registry.ITEM, new Identifier("decorative","cyan_bath_tire"), new BathTireItem(CYAN_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"cyan_bath_tire"), new BathTireItem(CYAN_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); FabricDefaultAttributeRegistry.register(CYAN_BATH_TIRE, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 2.0D)); - Registry.register(Registry.ITEM, new Identifier("decorative","purple_bath_tire"), new BathTireItem(PURPLE_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"purple_bath_tire"), new BathTireItem(PURPLE_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); FabricDefaultAttributeRegistry.register(PURPLE_BATH_TIRE, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 2.0D)); - Registry.register(Registry.ITEM, new Identifier("decorative","blue_bath_tire"), new BathTireItem(BLUE_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"blue_bath_tire"), new BathTireItem(BLUE_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); FabricDefaultAttributeRegistry.register(BLUE_BATH_TIRE, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 2.0D)); - Registry.register(Registry.ITEM, new Identifier("decorative","brown_bath_tire"), new BathTireItem(BROWN_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"brown_bath_tire"), new BathTireItem(BROWN_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); FabricDefaultAttributeRegistry.register(BROWN_BATH_TIRE, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 2.0D)); - Registry.register(Registry.ITEM, new Identifier("decorative","green_bath_tire"), new BathTireItem(GREEN_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"green_bath_tire"), new BathTireItem(GREEN_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); FabricDefaultAttributeRegistry.register(GREEN_BATH_TIRE, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 2.0D)); - Registry.register(Registry.ITEM, new Identifier("decorative","red_bath_tire"), new BathTireItem(RED_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"red_bath_tire"), new BathTireItem(RED_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); FabricDefaultAttributeRegistry.register(RED_BATH_TIRE, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 2.0D)); - Registry.register(Registry.ITEM, new Identifier("decorative","black_bath_tire"), new BathTireItem(BLACK_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"black_bath_tire"), new BathTireItem(BLACK_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); FabricDefaultAttributeRegistry.register(BLACK_BATH_TIRE, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 2.0D)); - Registry.register(Registry.ITEM, new Identifier("decorative","duck_bath_tire"), new BathTireItem(DUCK_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"duck_bath_tire"), new BathTireItem(DUCK_BATH_TIRE, new Item.Settings().group(DecorativeMain.PoolGroup))); FabricDefaultAttributeRegistry.register(DUCK_BATH_TIRE, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 2.0D)); } } diff --git a/src/main/java/eu/midnightdust/motschen/decorative/init/BlockEntities.java b/src/main/java/eu/midnightdust/motschen/decorative/init/BlockEntities.java index ac59c19..33c61fc 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/init/BlockEntities.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/init/BlockEntities.java @@ -1,8 +1,7 @@ package eu.midnightdust.motschen.decorative.init; import eu.midnightdust.motschen.decorative.DecorativeMain; -import eu.midnightdust.motschen.decorative.block.blockentity.PoolSprinklerBlockEntity; -import eu.midnightdust.motschen.decorative.block.blockentity.ShowerHeadBlockEntity; +import eu.midnightdust.motschen.decorative.block.blockentity.*; import net.minecraft.block.entity.BlockEntityType; import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; @@ -11,10 +10,23 @@ public class BlockEntities { public static BlockEntityType PoolSprinklerBlockEntity; public static BlockEntityType ShowerHeadBlockEntity; + public static BlockEntityType CeilingFanBlockEntity; + public static BlockEntityType OakChoppingLogBlockEntity; + public static BlockEntityType SpruceChoppingLogBlockEntity; + public static BlockEntityType BirchChoppingLogBlockEntity; + public static BlockEntityType AcaciaChoppingLogBlockEntity; + public static BlockEntityType JungleChoppingLogBlockEntity; + public static BlockEntityType DarkOakChoppingLogBlockEntity; public static void init() { - PoolSprinklerBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier("decorative","pool_sprinkler_blockentity"), BlockEntityType.Builder.create(PoolSprinklerBlockEntity::new, Pool.PoolSprinkler).build(null)); - ShowerHeadBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier("decorative","shower_head_blockentity"), BlockEntityType.Builder.create(ShowerHeadBlockEntity::new, DecorativeMain.ShowerHead).build(null)); - + PoolSprinklerBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"pool_sprinkler_blockentity"), BlockEntityType.Builder.create(PoolSprinklerBlockEntity::new, Pool.PoolSprinkler).build(null)); + ShowerHeadBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"shower_head_blockentity"), BlockEntityType.Builder.create(ShowerHeadBlockEntity::new, DecorativeMain.ShowerHead).build(null)); + CeilingFanBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"ceiling_fan_blockentity"), BlockEntityType.Builder.create(CeilingFanBlockEntity::new, DecorativeMain.CeilingFan).build(null)); + OakChoppingLogBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"oak_chopping_log_blockentity"), BlockEntityType.Builder.create(OakChoppingLogBlockEntity::new, LogsWithAxes.OakChoppingLog).build(null)); + SpruceChoppingLogBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"spruce_chopping_log_blockentity"), BlockEntityType.Builder.create(SpruceChoppingLogBlockEntity::new, LogsWithAxes.SpruceChoppingLog).build(null)); + BirchChoppingLogBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"birch_chopping_log_blockentity"), BlockEntityType.Builder.create(BirchChoppingLogBlockEntity::new, LogsWithAxes.BirchChoppingLog).build(null)); + AcaciaChoppingLogBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"acacia_chopping_log_blockentity"), BlockEntityType.Builder.create(AcaciaChoppingLogBlockEntity::new, LogsWithAxes.AcaciaChoppingLog).build(null)); + JungleChoppingLogBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"jungle_chopping_log_blockentity"), BlockEntityType.Builder.create(JungleChoppingLogBlockEntity::new, LogsWithAxes.JungleChoppingLog).build(null)); + DarkOakChoppingLogBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"dark_oak_chopping_log_blockentity"), BlockEntityType.Builder.create(DarkOakChoppingLogBlockEntity::new, LogsWithAxes.DarkOakChoppingLog).build(null)); } } diff --git a/src/main/java/eu/midnightdust/motschen/decorative/init/DoubleLamps.java b/src/main/java/eu/midnightdust/motschen/decorative/init/DoubleLamps.java index c0fbdfe..592b303 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/init/DoubleLamps.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/init/DoubleLamps.java @@ -27,37 +27,37 @@ public class DoubleLamps { public static Block BlackDoubleLamp = new DoubleLamp(); public static void init() { - Registry.register(Registry.BLOCK, new Identifier("decorative","white_double_lamp"), WhiteDoubleLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","white_double_lamp"), new BlockItem(WhiteDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","orange_double_lamp"), OrangeDoubleLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","orange_double_lamp"), new BlockItem(OrangeDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","magenta_double_lamp"), MagentaDoubleLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","magenta_double_lamp"), new BlockItem(MagentaDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","light_blue_double_lamp"), LightBlueDoubleLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","light_blue_double_lamp"), new BlockItem(LightBlueDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","yellow_double_lamp"), YellowDoubleLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","yellow_double_lamp"), new BlockItem(YellowDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","lime_double_lamp"), LimeDoubleLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","lime_double_lamp"), new BlockItem(LimeDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","pink_double_lamp"), PinkDoubleLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","pink_double_lamp"), new BlockItem(PinkDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","gray_double_lamp"), GrayDoubleLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","gray_double_lamp"), new BlockItem(GrayDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","light_gray_double_lamp"), LightGrayDoubleLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","light_gray_double_lamp"), new BlockItem(LightGrayDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","cyan_double_lamp"), CyanDoubleLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","cyan_double_lamp"), new BlockItem(CyanDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","purple_double_lamp"), PurpleDoubleLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","purple_double_lamp"), new BlockItem(PurpleDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","blue_double_lamp"), BlueDoubleLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","blue_double_lamp"), new BlockItem(BlueDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","brown_double_lamp"), BrownDoubleLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","brown_double_lamp"), new BlockItem(BrownDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","green_double_lamp"), GreenDoubleLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","green_double_lamp"), new BlockItem(GreenDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","red_double_lamp"), RedDoubleLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","red_double_lamp"), new BlockItem(RedDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","black_double_lamp"), BlackDoubleLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","black_double_lamp"), new BlockItem(BlackDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"white_double_lamp"), WhiteDoubleLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"white_double_lamp"), new BlockItem(WhiteDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"orange_double_lamp"), OrangeDoubleLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"orange_double_lamp"), new BlockItem(OrangeDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"magenta_double_lamp"), MagentaDoubleLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"magenta_double_lamp"), new BlockItem(MagentaDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"light_blue_double_lamp"), LightBlueDoubleLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"light_blue_double_lamp"), new BlockItem(LightBlueDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"yellow_double_lamp"), YellowDoubleLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"yellow_double_lamp"), new BlockItem(YellowDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"lime_double_lamp"), LimeDoubleLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"lime_double_lamp"), new BlockItem(LimeDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"pink_double_lamp"), PinkDoubleLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"pink_double_lamp"), new BlockItem(PinkDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"gray_double_lamp"), GrayDoubleLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"gray_double_lamp"), new BlockItem(GrayDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"light_gray_double_lamp"), LightGrayDoubleLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"light_gray_double_lamp"), new BlockItem(LightGrayDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"cyan_double_lamp"), CyanDoubleLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"cyan_double_lamp"), new BlockItem(CyanDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"purple_double_lamp"), PurpleDoubleLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"purple_double_lamp"), new BlockItem(PurpleDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"blue_double_lamp"), BlueDoubleLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"blue_double_lamp"), new BlockItem(BlueDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"brown_double_lamp"), BrownDoubleLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"brown_double_lamp"), new BlockItem(BrownDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"green_double_lamp"), GreenDoubleLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"green_double_lamp"), new BlockItem(GreenDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"red_double_lamp"), RedDoubleLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"red_double_lamp"), new BlockItem(RedDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"black_double_lamp"), BlackDoubleLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"black_double_lamp"), new BlockItem(BlackDoubleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); } } diff --git a/src/main/java/eu/midnightdust/motschen/decorative/init/Lamps.java b/src/main/java/eu/midnightdust/motschen/decorative/init/Lamps.java index 0c18a76..79192d9 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/init/Lamps.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/init/Lamps.java @@ -27,37 +27,37 @@ public class Lamps { public static Block BlackLamp = new Lamp(); public static void init() { - Registry.register(Registry.BLOCK, new Identifier("decorative","white_lamp"), WhiteLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","white_lamp"), new BlockItem(WhiteLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","orange_lamp"), OrangeLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","orange_lamp"), new BlockItem(OrangeLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","magenta_lamp"), MagentaLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","magenta_lamp"), new BlockItem(MagentaLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","light_blue_lamp"), LightBlueLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","light_blue_lamp"), new BlockItem(LightBlueLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","yellow_lamp"), YellowLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","yellow_lamp"), new BlockItem(YellowLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","lime_lamp"), LimeLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","lime_lamp"), new BlockItem(LimeLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","pink_lamp"), PinkLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","pink_lamp"), new BlockItem(PinkLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","gray_lamp"), GrayLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","gray_lamp"), new BlockItem(GrayLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","light_gray_lamp"), LightGrayLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","light_gray_lamp"), new BlockItem(LightGrayLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","cyan_lamp"), CyanLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","cyan_lamp"), new BlockItem(CyanLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","purple_lamp"), PurpleLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","purple_lamp"), new BlockItem(PurpleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","blue_lamp"), BlueLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","blue_lamp"), new BlockItem(BlueLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","brown_lamp"), BrownLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","brown_lamp"), new BlockItem(BrownLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","green_lamp"), GreenLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","green_lamp"), new BlockItem(GreenLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","red_lamp"), RedLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","red_lamp"), new BlockItem(RedLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","black_lamp"), BlackLamp); - Registry.register(Registry.ITEM, new Identifier("decorative","black_lamp"), new BlockItem(BlackLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"white_lamp"), WhiteLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"white_lamp"), new BlockItem(WhiteLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"orange_lamp"), OrangeLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"orange_lamp"), new BlockItem(OrangeLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"magenta_lamp"), MagentaLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"magenta_lamp"), new BlockItem(MagentaLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"light_blue_lamp"), LightBlueLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"light_blue_lamp"), new BlockItem(LightBlueLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"yellow_lamp"), YellowLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"yellow_lamp"), new BlockItem(YellowLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"lime_lamp"), LimeLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"lime_lamp"), new BlockItem(LimeLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"pink_lamp"), PinkLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"pink_lamp"), new BlockItem(PinkLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"gray_lamp"), GrayLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"gray_lamp"), new BlockItem(GrayLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"light_gray_lamp"), LightGrayLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"light_gray_lamp"), new BlockItem(LightGrayLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"cyan_lamp"), CyanLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"cyan_lamp"), new BlockItem(CyanLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"purple_lamp"), PurpleLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"purple_lamp"), new BlockItem(PurpleLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"blue_lamp"), BlueLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"blue_lamp"), new BlockItem(BlueLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"brown_lamp"), BrownLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"brown_lamp"), new BlockItem(BrownLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"green_lamp"), GreenLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"green_lamp"), new BlockItem(GreenLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"red_lamp"), RedLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"red_lamp"), new BlockItem(RedLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"black_lamp"), BlackLamp); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"black_lamp"), new BlockItem(BlackLamp, new Item.Settings().group(DecorativeMain.IndoorGroup))); } } diff --git a/src/main/java/eu/midnightdust/motschen/decorative/init/LogsWithAxes.java b/src/main/java/eu/midnightdust/motschen/decorative/init/LogsWithAxes.java index 6a16248..dea8fa7 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/init/LogsWithAxes.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/init/LogsWithAxes.java @@ -1,7 +1,7 @@ package eu.midnightdust.motschen.decorative.init; import eu.midnightdust.motschen.decorative.DecorativeMain; -import eu.midnightdust.motschen.decorative.block.LogWithAxe; +import eu.midnightdust.motschen.decorative.block.*; import net.minecraft.block.Block; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; @@ -9,25 +9,25 @@ import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; public class LogsWithAxes { - public static Block OakLogWithAxe = new LogWithAxe(); - public static Block SpruceLogWithAxe = new LogWithAxe(); - public static Block BirchLogWithAxe = new LogWithAxe(); - public static Block AcaciaLogWithAxe = new LogWithAxe(); - public static Block JungleLogWithAxe = new LogWithAxe(); - public static Block DarkOakLogWithAxe = new LogWithAxe(); + public static Block OakChoppingLog = new OakChoppingLog(); + public static Block SpruceChoppingLog = new SpruceChoppingLog(); + public static Block BirchChoppingLog = new BirchChoppingLog(); + public static Block AcaciaChoppingLog = new AcaciaChoppingLog(); + public static Block JungleChoppingLog = new JungleChoppingLog(); + public static Block DarkOakChoppingLog = new DarkOakChoppingLog(); public static void init() { - Registry.register(Registry.BLOCK, new Identifier("decorative","oak_log_with_axe"), OakLogWithAxe); - Registry.register(Registry.ITEM, new Identifier("decorative","oak_log_with_axe"), new BlockItem(OakLogWithAxe, new Item.Settings().group(DecorativeMain.GardenGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","spruce_log_with_axe"), SpruceLogWithAxe); - Registry.register(Registry.ITEM, new Identifier("decorative","spruce_log_with_axe"), new BlockItem(SpruceLogWithAxe, new Item.Settings().group(DecorativeMain.GardenGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","birch_log_with_axe"), BirchLogWithAxe); - Registry.register(Registry.ITEM, new Identifier("decorative","birch_log_with_axe"), new BlockItem(BirchLogWithAxe, new Item.Settings().group(DecorativeMain.GardenGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","acacia_log_with_axe"), AcaciaLogWithAxe); - Registry.register(Registry.ITEM, new Identifier("decorative","acacia_log_with_axe"), new BlockItem(AcaciaLogWithAxe, new Item.Settings().group(DecorativeMain.GardenGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","jungle_log_with_axe"), JungleLogWithAxe); - Registry.register(Registry.ITEM, new Identifier("decorative","jungle_log_with_axe"), new BlockItem(JungleLogWithAxe, new Item.Settings().group(DecorativeMain.GardenGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","dark_oak_log_with_axe"), DarkOakLogWithAxe); - Registry.register(Registry.ITEM, new Identifier("decorative","dark_oak_log_with_axe"), new BlockItem(DarkOakLogWithAxe, new Item.Settings().group(DecorativeMain.GardenGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"oak_log_with_axe"), OakChoppingLog); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"oak_log_with_axe"), new BlockItem(OakChoppingLog, new Item.Settings().group(DecorativeMain.GardenGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"spruce_log_with_axe"), SpruceChoppingLog); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"spruce_log_with_axe"), new BlockItem(SpruceChoppingLog, new Item.Settings().group(DecorativeMain.GardenGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"birch_log_with_axe"), BirchChoppingLog); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"birch_log_with_axe"), new BlockItem(BirchChoppingLog, new Item.Settings().group(DecorativeMain.GardenGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"acacia_log_with_axe"), AcaciaChoppingLog); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"acacia_log_with_axe"), new BlockItem(AcaciaChoppingLog, new Item.Settings().group(DecorativeMain.GardenGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"jungle_log_with_axe"), JungleChoppingLog); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"jungle_log_with_axe"), new BlockItem(JungleChoppingLog, new Item.Settings().group(DecorativeMain.GardenGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"dark_oak_log_with_axe"), DarkOakChoppingLog); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"dark_oak_log_with_axe"), new BlockItem(DarkOakChoppingLog, new Item.Settings().group(DecorativeMain.GardenGroup))); } } diff --git a/src/main/java/eu/midnightdust/motschen/decorative/init/Pool.java b/src/main/java/eu/midnightdust/motschen/decorative/init/Pool.java index bf8eb28..be0d2c0 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/init/Pool.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/init/Pool.java @@ -22,20 +22,20 @@ import net.minecraft.util.registry.Registry; public class Pool { public static final EntityType BEACH_BALL = - Registry.register(Registry.ENTITY_TYPE,new Identifier("decorative","beach_ball"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT, BeachBallEntity::new).dimensions(EntityDimensions.fixed(0.9f,0.9f)).trackable(100,4).build()); + Registry.register(Registry.ENTITY_TYPE,new Identifier(DecorativeMain.MOD_ID,"beach_ball"), FabricEntityTypeBuilder.create(SpawnGroup.AMBIENT, BeachBallEntity::new).dimensions(EntityDimensions.fixed(0.9f,0.9f)).trackable(100,4).build()); public static Item BEACH_BALL_ITEM = new BathTireItem(BEACH_BALL, new Item.Settings().group(DecorativeMain.PoolGroup)); public static Block PoolWall = new PoolWall(); public static Block Springboard = new Springboard(); public static Block PoolSprinkler = new PoolSprinkler(); public static void init() { - Registry.register(Registry.BLOCK, new Identifier("decorative","pool_wall"), PoolWall); - Registry.register(Registry.ITEM, new Identifier("decorative","pool_wall"), new BlockItem(PoolWall, new Item.Settings().group(DecorativeMain.PoolGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","springboard"), Springboard); - Registry.register(Registry.ITEM, new Identifier("decorative","springboard"), new BlockItem(Springboard, new Item.Settings().group(DecorativeMain.PoolGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","pool_sprinkler"), PoolSprinkler); - Registry.register(Registry.ITEM, new Identifier("decorative","pool_sprinkler"), new BlockItem(PoolSprinkler, new Item.Settings().group(DecorativeMain.PoolGroup))); - Registry.register(Registry.ITEM, new Identifier("decorative","beach_ball"), BEACH_BALL_ITEM); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"pool_wall"), PoolWall); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"pool_wall"), new BlockItem(PoolWall, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"springboard"), Springboard); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"springboard"), new BlockItem(Springboard, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"pool_sprinkler"), PoolSprinkler); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"pool_sprinkler"), new BlockItem(PoolSprinkler, new Item.Settings().group(DecorativeMain.PoolGroup))); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"beach_ball"), BEACH_BALL_ITEM); FabricDefaultAttributeRegistry.register(BEACH_BALL, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 100000.0D).add(EntityAttributes.GENERIC_KNOCKBACK_RESISTANCE, -10D)); BathTires.init(); } diff --git a/src/main/java/eu/midnightdust/motschen/decorative/init/Signs.java b/src/main/java/eu/midnightdust/motschen/decorative/init/Signs.java index b194018..cf7a987 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/init/Signs.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/init/Signs.java @@ -25,34 +25,34 @@ public class Signs { public static Block OnehundredtenSign = new Sign(); public static void init() { - Registry.register(Registry.BLOCK, new Identifier("decorative","empty_sign"), EmptySign); - Registry.register(Registry.ITEM, new Identifier("decorative","empty_sign"), new BlockItem(EmptySign, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"empty_sign"), EmptySign); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"empty_sign"), new BlockItem(EmptySign, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","stop_sign"), StopSign); - Registry.register(Registry.ITEM, new Identifier("decorative","stop_sign"), new BlockItem(StopSign, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","five_sign"), FiveSign); - Registry.register(Registry.ITEM, new Identifier("decorative","five_sign"), new BlockItem(FiveSign, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","ten_sign"), TenSign); - Registry.register(Registry.ITEM, new Identifier("decorative","ten_sign"), new BlockItem(TenSign, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","twenty_sign"), TwentySign); - Registry.register(Registry.ITEM, new Identifier("decorative","twenty_sign"), new BlockItem(TwentySign, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","thirty_sign"), ThirtySign); - Registry.register(Registry.ITEM, new Identifier("decorative","thirty_sign"), new BlockItem(ThirtySign, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","forty_sign"), FortySign); - Registry.register(Registry.ITEM, new Identifier("decorative","forty_sign"), new BlockItem(FortySign, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","fifty_sign"), FiftySign); - Registry.register(Registry.ITEM, new Identifier("decorative","fifty_sign"), new BlockItem(FiftySign, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","sixty_sign"), SixtySign); - Registry.register(Registry.ITEM, new Identifier("decorative","sixty_sign"), new BlockItem(SixtySign, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","seventy_sign"), SeventySign); - Registry.register(Registry.ITEM, new Identifier("decorative","seventy_sign"), new BlockItem(SeventySign, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","eighty_sign"), EightySign); - Registry.register(Registry.ITEM, new Identifier("decorative","eighty_sign"), new BlockItem(EightySign, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","ninety_sign"), NinetySign); - Registry.register(Registry.ITEM, new Identifier("decorative","ninety_sign"), new BlockItem(NinetySign, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","onehundred_sign"), OnehundredSign); - Registry.register(Registry.ITEM, new Identifier("decorative","onehundred_sign"), new BlockItem(OnehundredSign, new Item.Settings().group(DecorativeMain.TrafficGroup))); - Registry.register(Registry.BLOCK, new Identifier("decorative","onehundredten_sign"), OnehundredtenSign); - Registry.register(Registry.ITEM, new Identifier("decorative","onehundredten_sign"), new BlockItem(OnehundredtenSign, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"stop_sign"), StopSign); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"stop_sign"), new BlockItem(StopSign, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"five_sign"), FiveSign); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"five_sign"), new BlockItem(FiveSign, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"ten_sign"), TenSign); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"ten_sign"), new BlockItem(TenSign, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"twenty_sign"), TwentySign); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"twenty_sign"), new BlockItem(TwentySign, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"thirty_sign"), ThirtySign); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"thirty_sign"), new BlockItem(ThirtySign, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"forty_sign"), FortySign); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"forty_sign"), new BlockItem(FortySign, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"fifty_sign"), FiftySign); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"fifty_sign"), new BlockItem(FiftySign, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"sixty_sign"), SixtySign); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"sixty_sign"), new BlockItem(SixtySign, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"seventy_sign"), SeventySign); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"seventy_sign"), new BlockItem(SeventySign, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"eighty_sign"), EightySign); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"eighty_sign"), new BlockItem(EightySign, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"ninety_sign"), NinetySign); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"ninety_sign"), new BlockItem(NinetySign, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"onehundred_sign"), OnehundredSign); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"onehundred_sign"), new BlockItem(OnehundredSign, new Item.Settings().group(DecorativeMain.TrafficGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"onehundredten_sign"), OnehundredtenSign); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"onehundredten_sign"), new BlockItem(OnehundredtenSign, new Item.Settings().group(DecorativeMain.TrafficGroup))); } } diff --git a/src/main/java/eu/midnightdust/motschen/decorative/mixin/DefaultBiomeFeaturesMixin.java b/src/main/java/eu/midnightdust/motschen/decorative/mixin/DefaultBiomeFeaturesMixin.java deleted file mode 100644 index 6c20262..0000000 --- a/src/main/java/eu/midnightdust/motschen/decorative/mixin/DefaultBiomeFeaturesMixin.java +++ /dev/null @@ -1,18 +0,0 @@ -package eu.midnightdust.motschen.decorative.mixin; - -import eu.midnightdust.motschen.decorative.OreFeatures; -import net.minecraft.world.biome.GenerationSettings.Builder; -import net.minecraft.world.gen.GenerationStep; -import net.minecraft.world.gen.feature.DefaultBiomeFeatures; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(DefaultBiomeFeatures.class) -public class DefaultBiomeFeaturesMixin { - @Inject(at = @At("RETURN"), method = "addDefaultOres") - private static void addDefaultOres(Builder builder, CallbackInfo info) { - builder.feature(GenerationStep.Feature.UNDERGROUND_ORES, OreFeatures.ROCKY_ASPHALT_FEATURE); - } -} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/mixin/GenerationSettingsAccessorMixin.java b/src/main/java/eu/midnightdust/motschen/decorative/mixin/GenerationSettingsAccessorMixin.java new file mode 100644 index 0000000..4b9d27a --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/mixin/GenerationSettingsAccessorMixin.java @@ -0,0 +1,19 @@ +package eu.midnightdust.motschen.decorative.mixin; + +import net.minecraft.world.biome.GenerationSettings; +import net.minecraft.world.gen.feature.ConfiguredFeature; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Accessor; + +import java.util.List; +import java.util.function.Supplier; + +@Mixin(GenerationSettings.class) +public interface GenerationSettingsAccessorMixin { + + @Accessor + List>>> getFeatures(); + + @Accessor + void setFeatures(List>>> features); +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/sound/DecorativeSoundEvents.java b/src/main/java/eu/midnightdust/motschen/decorative/sound/DecorativeSoundEvents.java new file mode 100644 index 0000000..dbdbbd8 --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/sound/DecorativeSoundEvents.java @@ -0,0 +1,13 @@ +package eu.midnightdust.motschen.decorative.sound; + +import net.minecraft.sound.SoundEvent; +import net.minecraft.util.Identifier; +import net.minecraft.util.registry.Registry; + +public class DecorativeSoundEvents { + public static final SoundEvent CEILINGFAN_AMBIENT = register("decorative:ceiling_fan.ambient"); + + private static SoundEvent register(String id) { + return Registry.register(Registry.SOUND_EVENT, id, new SoundEvent(new Identifier(id))); + } +} \ No newline at end of file diff --git a/src/main/java/eu/midnightdust/motschen/decorative/world/OreFeatureInjector.java b/src/main/java/eu/midnightdust/motschen/decorative/world/OreFeatureInjector.java new file mode 100644 index 0000000..f33b0ce --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/world/OreFeatureInjector.java @@ -0,0 +1,44 @@ +package eu.midnightdust.motschen.decorative.world; + +import com.google.common.collect.Lists; +import eu.midnightdust.motschen.decorative.mixin.GenerationSettingsAccessorMixin; +import net.fabricmc.fabric.api.event.registry.RegistryEntryAddedCallback; +import net.minecraft.util.registry.BuiltinRegistries; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.gen.GenerationStep; +import net.minecraft.world.gen.feature.ConfiguredFeature; + +import java.util.ArrayList; +import java.util.List; +import java.util.function.Supplier; + +public class OreFeatureInjector { + + public static void init() { + BuiltinRegistries.BIOME.forEach(OreFeatureInjector::addToBiome); + RegistryEntryAddedCallback.event(BuiltinRegistries.BIOME).register((i, identifier, biome) -> addToBiome(biome)); + } + + private static void addToBiome(Biome biome) { + addSaltOre(biome); + } + + private static void addSaltOre(Biome biome) { + if (biome.getCategory() != Biome.Category.NETHER && biome.getCategory() != Biome.Category.THEEND) { + addFeature(biome, GenerationStep.Feature.UNDERGROUND_DECORATION, OreFeatures.ROCKY_ASPHALT_FEATURE); + } + } + + public static void addFeature(Biome biome, GenerationStep.Feature step, ConfiguredFeature feature) { + GenerationSettingsAccessorMixin generationSettingsAccessor = (GenerationSettingsAccessorMixin) biome.getGenerationSettings(); + int stepIndex = step.ordinal(); + List>>> featuresByStep = new ArrayList<>( generationSettingsAccessor.getFeatures()); + while (featuresByStep.size() <= stepIndex) { + featuresByStep.add(Lists.newArrayList()); + } + List>> features = new ArrayList<>(featuresByStep.get(stepIndex)); + features.add(() -> feature); + featuresByStep.set(stepIndex, features); + generationSettingsAccessor.setFeatures(featuresByStep); + } +} \ No newline at end of file diff --git a/src/main/java/eu/midnightdust/motschen/decorative/OreFeatures.java b/src/main/java/eu/midnightdust/motschen/decorative/world/OreFeatures.java similarity index 87% rename from src/main/java/eu/midnightdust/motschen/decorative/OreFeatures.java rename to src/main/java/eu/midnightdust/motschen/decorative/world/OreFeatures.java index 304e049..a1fac42 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/OreFeatures.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/world/OreFeatures.java @@ -1,5 +1,6 @@ -package eu.midnightdust.motschen.decorative; +package eu.midnightdust.motschen.decorative.world; +import eu.midnightdust.motschen.decorative.DecorativeMain; import net.minecraft.util.Identifier; import net.minecraft.util.registry.BuiltinRegistries; import net.minecraft.util.registry.Registry; @@ -12,6 +13,5 @@ public class OreFeatures { public static void init() { Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, new Identifier(DecorativeMain.MOD_ID, "rocky_asphalt"), ROCKY_ASPHALT_FEATURE); - } } diff --git a/src/main/resources/assets/decorative/blockstates/acacia_log_with_axe.json b/src/main/resources/assets/decorative/blockstates/acacia_log_with_axe.json index bf410b7..5c3b27c 100644 --- a/src/main/resources/assets/decorative/blockstates/acacia_log_with_axe.json +++ b/src/main/resources/assets/decorative/blockstates/acacia_log_with_axe.json @@ -1,8 +1,5 @@ { "variants": { - "facing=south": { "model": "decorative:block/acacia_log_with_axe" }, - "facing=west": { "model": "decorative:block/acacia_log_with_axe", "y": 90 }, - "facing=north": { "model": "decorative:block/acacia_log_with_axe", "y": 180 }, - "facing=east": { "model": "decorative:block/acacia_log_with_axe", "y": 270 } + "": { "model": "block/acacia_log" } } } diff --git a/src/main/resources/assets/decorative/blockstates/birch_log_with_axe.json b/src/main/resources/assets/decorative/blockstates/birch_log_with_axe.json index f1eb74c..ea63c3b 100644 --- a/src/main/resources/assets/decorative/blockstates/birch_log_with_axe.json +++ b/src/main/resources/assets/decorative/blockstates/birch_log_with_axe.json @@ -1,8 +1,5 @@ { "variants": { - "facing=south": { "model": "decorative:block/birch_log_with_axe" }, - "facing=west": { "model": "decorative:block/birch_log_with_axe", "y": 90 }, - "facing=north": { "model": "decorative:block/birch_log_with_axe", "y": 180 }, - "facing=east": { "model": "decorative:block/birch_log_with_axe", "y": 270 } + "": { "model": "block/birch_log" } } } diff --git a/src/main/resources/assets/decorative/blockstates/ceilingfan.json b/src/main/resources/assets/decorative/blockstates/ceilingfan.json index 8aea452..ff21578 100644 --- a/src/main/resources/assets/decorative/blockstates/ceilingfan.json +++ b/src/main/resources/assets/decorative/blockstates/ceilingfan.json @@ -1,6 +1,5 @@ { "variants": { - "lit=true": { "model": "decorative:block/ceilingfan_activated" }, - "lit=false": { "model": "decorative:block/ceilingfan" } + "": { "model": "decorative:block/ceilingfan" } } } diff --git a/src/main/resources/assets/decorative/blockstates/dark_oak_log_with_axe.json b/src/main/resources/assets/decorative/blockstates/dark_oak_log_with_axe.json index ac72544..7ae8344 100644 --- a/src/main/resources/assets/decorative/blockstates/dark_oak_log_with_axe.json +++ b/src/main/resources/assets/decorative/blockstates/dark_oak_log_with_axe.json @@ -1,8 +1,5 @@ { "variants": { - "facing=south": { "model": "decorative:block/dark_oak_log_with_axe" }, - "facing=west": { "model": "decorative:block/dark_oak_log_with_axe", "y": 90 }, - "facing=north": { "model": "decorative:block/dark_oak_log_with_axe", "y": 180 }, - "facing=east": { "model": "decorative:block/dark_oak_log_with_axe", "y": 270 } + "": { "model": "block/dark_oak_log" } } } diff --git a/src/main/resources/assets/decorative/blockstates/jungle_log_with_axe.json b/src/main/resources/assets/decorative/blockstates/jungle_log_with_axe.json index 3253708..6a99f00 100644 --- a/src/main/resources/assets/decorative/blockstates/jungle_log_with_axe.json +++ b/src/main/resources/assets/decorative/blockstates/jungle_log_with_axe.json @@ -1,8 +1,5 @@ { "variants": { - "facing=south": { "model": "decorative:block/jungle_log_with_axe" }, - "facing=west": { "model": "decorative:block/jungle_log_with_axe", "y": 90 }, - "facing=north": { "model": "decorative:block/jungle_log_with_axe", "y": 180 }, - "facing=east": { "model": "decorative:block/jungle_log_with_axe", "y": 270 } + "": { "model": "block/jungle_log" } } } diff --git a/src/main/resources/assets/decorative/blockstates/oak_log_with_axe.json b/src/main/resources/assets/decorative/blockstates/oak_log_with_axe.json index e70e141..509b9e4 100644 --- a/src/main/resources/assets/decorative/blockstates/oak_log_with_axe.json +++ b/src/main/resources/assets/decorative/blockstates/oak_log_with_axe.json @@ -1,8 +1,5 @@ { "variants": { - "facing=south": { "model": "decorative:block/oak_log_with_axe" }, - "facing=west": { "model": "decorative:block/oak_log_with_axe", "y": 90 }, - "facing=north": { "model": "decorative:block/oak_log_with_axe", "y": 180 }, - "facing=east": { "model": "decorative:block/oak_log_with_axe", "y": 270 } + "": { "model": "block/oak_log" } } } diff --git a/src/main/resources/assets/decorative/blockstates/pennant_chain.json b/src/main/resources/assets/decorative/blockstates/pennant_chain.json new file mode 100644 index 0000000..8963ca6 --- /dev/null +++ b/src/main/resources/assets/decorative/blockstates/pennant_chain.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "decorative:block/pennant_chain", "uvlock": true }, + "facing=west": { "model": "decorative:block/pennant_chain", "uvlock": true, "y": 90 }, + "facing=north": { "model": "decorative:block/pennant_chain", "uvlock": true, "y": 180 }, + "facing=east": { "model": "decorative:block/pennant_chain", "uvlock": true, "y": 270 } + } +} diff --git a/src/main/resources/assets/decorative/blockstates/spruce_log_with_axe.json b/src/main/resources/assets/decorative/blockstates/spruce_log_with_axe.json index 36a9cb8..5fb3b76 100644 --- a/src/main/resources/assets/decorative/blockstates/spruce_log_with_axe.json +++ b/src/main/resources/assets/decorative/blockstates/spruce_log_with_axe.json @@ -1,8 +1,5 @@ { "variants": { - "facing=south": { "model": "decorative:block/spruce_log_with_axe" }, - "facing=west": { "model": "decorative:block/spruce_log_with_axe", "y": 90 }, - "facing=north": { "model": "decorative:block/spruce_log_with_axe", "y": 180 }, - "facing=east": { "model": "decorative:block/spruce_log_with_axe", "y": 270 } + "": { "model": "block/spruce_log" } } } diff --git a/src/main/resources/assets/decorative/models/block/ceilingfan.json b/src/main/resources/assets/decorative/models/block/ceilingfan.json index 8fce297..394c6ad 100644 --- a/src/main/resources/assets/decorative/models/block/ceilingfan.json +++ b/src/main/resources/assets/decorative/models/block/ceilingfan.json @@ -2,10 +2,8 @@ "credit": "made by Motschen", "parent": "block/block", "textures": { - "2": "block/gray_concrete", - "3": "decorative:block/ceilingfannormal", - "5": "block/black_wool", - "particle": "decorative:block/ceilingfannormal" + "1": "block/gray_concrete", + "particle": "block/gray_concrete" }, "elements": [ { @@ -13,77 +11,12 @@ "from": [7, 6, 7], "to": [9, 16, 9], "faces": { - "north": {"uv": [0, 0, 2, 6], "texture": "#2"}, - "east": {"uv": [0, 0, 2, 6], "texture": "#2"}, - "south": {"uv": [0, 0, 2, 6], "texture": "#2"}, - "west": {"uv": [0, 0, 2, 6], "texture": "#2"}, - "up": {"uv": [0, 0, 2, 2], "texture": "#2"} + "north": {"uv": [0, 0, 2, 6], "texture": "#1"}, + "east": {"uv": [0, 0, 2, 6], "texture": "#1"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#1"}, + "west": {"uv": [0, 0, 2, 6], "texture": "#1"}, + "up": {"uv": [0, 0, 2, 2], "texture": "#1"} } - }, - { - "from": [7, 4, 7], - "to": [9, 6, 9], - "faces": { - "north": {"uv": [0, 0, 2, 2], "texture": "#5"}, - "east": {"uv": [0, 0, 2, 2], "texture": "#5"}, - "south": {"uv": [0, 0, 2, 2], "texture": "#5"}, - "west": {"uv": [0, 0, 2, 2], "texture": "#5"}, - "down": {"uv": [0, 0, 2, 2], "texture": "#5"} - } - }, - { - "from": [-3, 5, 7], - "to": [7, 6, 9], - "faces": { - "north": {"uv": [0, 0, 4, 4], "texture": "#3"}, - "east": {"uv": [0, 0, 4, 4], "texture": "#3"}, - "south": {"uv": [0, 0, 4, 4], "texture": "#3"}, - "west": {"uv": [0, 0, 4, 4], "texture": "#3"}, - "up": {"uv": [0, 0, 4, 4], "texture": "#3"}, - "down": {"uv": [0, 0, 4, 4], "texture": "#3"} - } - }, - { - "from": [9, 5, 7], - "to": [19, 6, 9], - "faces": { - "north": {"uv": [0, 0, 4, 4], "texture": "#3"}, - "east": {"uv": [0, 0, 4, 4], "texture": "#3"}, - "south": {"uv": [0, 0, 4, 4], "texture": "#3"}, - "west": {"uv": [0, 0, 4, 4], "texture": "#3"}, - "up": {"uv": [0, 0, 4, 4], "texture": "#3"}, - "down": {"uv": [0, 0, 4, 4], "texture": "#3"} - } - }, - { - "from": [7, 5, -3], - "to": [9, 6, 7], - "faces": { - "north": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, - "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, - "south": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, - "west": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, - "up": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, - "down": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"} - } - }, - { - "from": [7, 5, 9], - "to": [9, 6, 19], - "faces": { - "north": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, - "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, - "south": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, - "west": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, - "up": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, - "down": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"} - } - } - ], - "groups": [0, 1, - { - "name": "normal", - "children": [2, 3, 4, 5] } ] } \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/ceilingfan_activated.json b/src/main/resources/assets/decorative/models/block/ceilingfan_activated.json deleted file mode 100644 index e1c194f..0000000 --- a/src/main/resources/assets/decorative/models/block/ceilingfan_activated.json +++ /dev/null @@ -1,257 +0,0 @@ -{ - "credit": "made by Motschen", - "parent": "block/block", - "textures": { - "1": "decorative:block/ceilingfan", - "2": "block/gray_concrete", - "5": "block/black_wool", - "particle": "decorative:block/ceilingfannormal" - }, - "elements": [ - { - "name": "Cube", - "from": [7, 6, 7], - "to": [9, 16, 9], - "faces": { - "north": {"uv": [0, 0, 2, 6], "texture": "#2"}, - "east": {"uv": [0, 0, 2, 6], "texture": "#2"}, - "south": {"uv": [0, 0, 2, 6], "texture": "#2"}, - "west": {"uv": [0, 0, 2, 6], "texture": "#2"}, - "up": {"uv": [0, 0, 2, 2], "texture": "#2"} - } - }, - { - "from": [7, 4, 7], - "to": [9, 6, 9], - "faces": { - "north": {"uv": [0, 0, 2, 2], "texture": "#5"}, - "east": {"uv": [0, 0, 2, 2], "texture": "#5"}, - "south": {"uv": [0, 0, 2, 2], "texture": "#5"}, - "west": {"uv": [0, 0, 2, 2], "texture": "#5"}, - "down": {"uv": [0, 0, 2, 2], "texture": "#5"} - } - }, - { - "from": [-3, 5, 7], - "to": [7, 6, 9], - "faces": { - "north": {"uv": [0, 0, 4, 4], "texture": "#1"}, - "east": {"uv": [0, 0, 4, 4], "texture": "#1"}, - "south": {"uv": [0, 0, 4, 4], "texture": "#1"}, - "west": {"uv": [0, 0, 4, 4], "texture": "#1"}, - "up": {"uv": [0, 0, 4, 4], "texture": "#1"}, - "down": {"uv": [0, 0, 4, 4], "texture": "#1"} - } - }, - { - "from": [9, 5, 7], - "to": [19, 6, 9], - "faces": { - "north": {"uv": [0, 0, 4, 4], "texture": "#1"}, - "east": {"uv": [0, 0, 4, 4], "texture": "#1"}, - "south": {"uv": [0, 0, 4, 4], "texture": "#1"}, - "west": {"uv": [0, 0, 4, 4], "texture": "#1"}, - "up": {"uv": [0, 0, 4, 4], "texture": "#1"}, - "down": {"uv": [0, 0, 4, 4], "texture": "#1"} - } - }, - { - "from": [7, 5, -3], - "to": [9, 6, 7], - "faces": { - "north": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#1"}, - "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#1"}, - "south": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#1"}, - "west": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#1"}, - "up": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#1"}, - "down": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#1"} - } - }, - { - "from": [7, 5, 9], - "to": [9, 6, 19], - "faces": { - "north": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#1"}, - "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#1"}, - "south": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#1"}, - "west": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#1"}, - "up": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#1"}, - "down": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#1"} - } - }, - { - "from": [6, 5, 1.5], - "to": [8, 6, 11.5], - "rotation": {"angle": 22.5, "axis": "y", "origin": [-3.5, 5.5, 7.5]}, - "faces": { - "north": {"uv": [12, 0, 16, 4], "texture": "#1"}, - "east": {"uv": [12, 0, 16, 4], "texture": "#1"}, - "south": {"uv": [12, 0, 16, 4], "texture": "#1"}, - "west": {"uv": [12, 0, 16, 4], "texture": "#1"}, - "up": {"uv": [12, 0, 16, 4], "texture": "#1"}, - "down": {"uv": [12, 0, 16, 4], "texture": "#1"} - } - }, - { - "from": [6, 5, 11.5], - "to": [8, 6, 23.5], - "rotation": {"angle": 22.5, "axis": "y", "origin": [-3.5, 5.5, 7.5]}, - "faces": { - "north": {"uv": [8, 0, 16, 4], "texture": "#1"}, - "east": {"uv": [8, 0, 16, 4], "texture": "#1"}, - "south": {"uv": [8, 0, 16, 4], "texture": "#1"}, - "west": {"uv": [8, 0, 16, 4], "texture": "#1"}, - "up": {"uv": [8, 0, 16, 4], "texture": "#1"}, - "down": {"uv": [8, 0, 16, 4], "texture": "#1"} - } - }, - { - "from": [-4, 5, 11.5], - "to": [6, 6, 13.5], - "rotation": {"angle": 22.5, "axis": "y", "origin": [-3.5, 5.5, 7.5]}, - "faces": { - "north": {"uv": [8, 0, 16, 4], "texture": "#1"}, - "east": {"uv": [8, 0, 16, 4], "texture": "#1"}, - "south": {"uv": [8, 0, 16, 4], "texture": "#1"}, - "west": {"uv": [8, 0, 16, 4], "texture": "#1"}, - "up": {"uv": [8, 0, 16, 4], "texture": "#1"}, - "down": {"uv": [8, 0, 16, 4], "texture": "#1"} - } - }, - { - "from": [8, 5, 11.5], - "to": [18, 6, 13.5], - "rotation": {"angle": 22.5, "axis": "y", "origin": [-3.5, 5.5, 7.5]}, - "faces": { - "north": {"uv": [8, 0, 16, 4], "texture": "#1"}, - "east": {"uv": [8, 0, 16, 4], "texture": "#1"}, - "south": {"uv": [8, 0, 16, 4], "texture": "#1"}, - "west": {"uv": [8, 0, 16, 4], "texture": "#1"}, - "up": {"uv": [8, 0, 16, 4], "texture": "#1"}, - "down": {"uv": [8, 0, 16, 4], "texture": "#1"} - } - }, - { - "from": [3, 5, 5], - "to": [5, 6, 15], - "rotation": {"angle": 45, "axis": "y", "origin": [-3.5, 5.5, 7.5]}, - "faces": { - "north": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "east": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "south": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "west": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "up": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "down": {"uv": [12, 12, 16, 16], "texture": "#1"} - } - }, - { - "from": [3, 5, 15], - "to": [5, 6, 27], - "rotation": {"angle": 45, "axis": "y", "origin": [-3.5, 5.5, 7.5]}, - "faces": { - "north": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "east": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "south": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "west": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "up": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "down": {"uv": [12, 12, 16, 16], "texture": "#1"} - } - }, - { - "from": [-7, 5, 15], - "to": [3, 6, 17], - "rotation": {"angle": 45, "axis": "y", "origin": [-3.5, 5.5, 7.5]}, - "faces": { - "north": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "east": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "south": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "west": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "up": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "down": {"uv": [12, 12, 16, 16], "texture": "#1"} - } - }, - { - "from": [5, 5, 15], - "to": [15, 6, 17], - "rotation": {"angle": 45, "axis": "y", "origin": [-3.5, 5.5, 7.5]}, - "faces": { - "north": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "east": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "south": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "west": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "up": {"uv": [12, 12, 16, 16], "texture": "#1"}, - "down": {"uv": [12, 12, 16, 16], "texture": "#1"} - } - }, - { - "from": [6.5, 5, -7.5], - "to": [8.5, 6, 2.5], - "rotation": {"angle": -22.5, "axis": "y", "origin": [-3.5, 5.5, 7.5]}, - "faces": { - "north": {"uv": [0, 12, 4, 16], "texture": "#1"}, - "east": {"uv": [0, 12, 4, 16], "texture": "#1"}, - "south": {"uv": [0, 12, 4, 16], "texture": "#1"}, - "west": {"uv": [0, 12, 4, 16], "texture": "#1"}, - "up": {"uv": [0, 12, 4, 16], "texture": "#1"}, - "down": {"uv": [0, 12, 4, 16], "texture": "#1"} - } - }, - { - "from": [6.5, 5, 2.5], - "to": [8.5, 6, 14.5], - "rotation": {"angle": -22.5, "axis": "y", "origin": [-3.5, 5.5, 7.5]}, - "faces": { - "north": {"uv": [0, 8, 4, 16], "texture": "#1"}, - "east": {"uv": [0, 8, 4, 16], "texture": "#1"}, - "south": {"uv": [0, 8, 4, 16], "texture": "#1"}, - "west": {"uv": [0, 8, 4, 16], "texture": "#1"}, - "up": {"uv": [0, 8, 4, 16], "texture": "#1"}, - "down": {"uv": [0, 8, 4, 16], "texture": "#1"} - } - }, - { - "from": [-3.5, 5, 2.5], - "to": [6.5, 6, 4.5], - "rotation": {"angle": -22.5, "axis": "y", "origin": [-3.5, 5.5, 7.5]}, - "faces": { - "north": {"uv": [0, 8, 4, 16], "texture": "#1"}, - "east": {"uv": [0, 8, 4, 16], "texture": "#1"}, - "south": {"uv": [0, 8, 4, 16], "texture": "#1"}, - "west": {"uv": [0, 8, 4, 16], "texture": "#1"}, - "up": {"uv": [0, 8, 4, 16], "texture": "#1"}, - "down": {"uv": [0, 8, 4, 16], "texture": "#1"} - } - }, - { - "from": [8.5, 5, 2.5], - "to": [18.5, 6, 4.5], - "rotation": {"angle": -22.5, "axis": "y", "origin": [-3.5, 5.5, 7.5]}, - "faces": { - "north": {"uv": [0, 8, 4, 16], "texture": "#1"}, - "east": {"uv": [0, 8, 4, 16], "texture": "#1"}, - "south": {"uv": [0, 8, 4, 16], "texture": "#1"}, - "west": {"uv": [0, 8, 4, 16], "texture": "#1"}, - "up": {"uv": [0, 8, 4, 16], "texture": "#1"}, - "down": {"uv": [0, 8, 4, 16], "texture": "#1"} - } - } - ], - "groups": [0, 1, - { - "name": "normal", - "children": [2, 3, 4, 5] - }, - { - "name": "rot1", - "children": [6, 7, 8, 9] - }, - { - "name": "rot2", - "children": [10, 11, 12, 13] - }, - { - "name": "rot3", - "children": [14, 15, 16, 17] - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/pennant_chain.json b/src/main/resources/assets/decorative/models/block/pennant_chain.json new file mode 100644 index 0000000..9e00b55 --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/pennant_chain.json @@ -0,0 +1,246 @@ +{ + "credit": "made by Motschen", + "textures": { + "1": "block/black_concrete", + "2": "decorative:block/red_lamp_off", + "4": "decorative:block/green_lamp_off", + "particle": "block/black_concrete" + }, + "elements": [ + { + "from": [-8, 4.6, 8], + "to": [3, 5.6, 9], + "rotation": {"angle": -22.5, "axis": "z", "origin": [8, 12, 8]}, + "faces": { + "north": {"uv": [0, 0, 11, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 11, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 11, 1], "texture": "#1"}, + "down": {"uv": [0, 0, 11, 1], "texture": "#1"} + } + }, + { + "from": [13.1, 4.6, 8], + "to": [24.1, 5.6, 9], + "rotation": {"angle": 22.5, "axis": "z", "origin": [8, 12, 8]}, + "faces": { + "north": {"uv": [0, 0, 11, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 11, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 11, 1], "rotation": 180, "texture": "#1"}, + "down": {"uv": [0, 0, 11, 1], "rotation": 180, "texture": "#1"} + } + }, + { + "from": [0.5, 7.1, 8], + "to": [15.53, 8.1, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 8]}, + "faces": { + "north": {"uv": [0, 0, 15.03, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 15.03, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 15.03, 1], "rotation": 180, "texture": "#1"}, + "down": {"uv": [0, 0, 15.03, 1], "rotation": 180, "texture": "#1"} + } + }, + { + "from": [20, 24, 8], + "to": [21, 32, 9], + "rotation": {"angle": -45, "axis": "z", "origin": [8, 12, 8]}, + "faces": { + "north": {"uv": [0, 0, 8, 1], "rotation": 90, "texture": "#1"}, + "east": {"uv": [0, 0, 8, 1], "rotation": 90, "texture": "#1"}, + "south": {"uv": [0, 0, 8, 1], "rotation": 270, "texture": "#1"}, + "west": {"uv": [0, 0, 8, 1], "rotation": 90, "texture": "#1"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#1"}, + "down": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#1"} + } + }, + { + "from": [-5, 24, 8], + "to": [-4, 32, 9], + "rotation": {"angle": 45, "axis": "z", "origin": [8, 12, 8]}, + "faces": { + "north": {"uv": [0, 0, 8, 1], "rotation": 270, "texture": "#1"}, + "east": {"uv": [0, 0, 8, 1], "rotation": 90, "texture": "#1"}, + "south": {"uv": [0, 0, 8, 1], "rotation": 90, "texture": "#1"}, + "west": {"uv": [0, 0, 8, 1], "rotation": 90, "texture": "#1"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#1"}, + "down": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#1"} + } + }, + { + "from": [1, 4, 7], + "to": [4, 7, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 12, 8]}, + "faces": { + "north": {"uv": [9, 9, 12, 12], "texture": "#2"}, + "east": {"uv": [11, 10, 14, 13], "texture": "#2"}, + "south": {"uv": [4, 2, 7, 5], "texture": "#2"}, + "west": {"uv": [2, 3, 5, 6], "texture": "#2"}, + "up": {"uv": [11, 11, 14, 14], "texture": "#2"}, + "down": {"uv": [7, 4, 10, 7], "texture": "#2"} + } + }, + { + "from": [6.5, 4, 7], + "to": [9.5, 7, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [15, 12, 8]}, + "faces": { + "north": {"uv": [9, 9, 12, 12], "texture": "#4"}, + "east": {"uv": [11, 10, 14, 13], "texture": "#4"}, + "south": {"uv": [4, 2, 7, 5], "texture": "#4"}, + "west": {"uv": [2, 3, 5, 6], "texture": "#4"}, + "up": {"uv": [11, 11, 14, 14], "texture": "#4"}, + "down": {"uv": [7, 4, 10, 7], "texture": "#4"} + } + }, + { + "from": [12, 4, 7], + "to": [15, 7, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [20, 12, 8]}, + "faces": { + "north": {"uv": [9, 9, 12, 12], "texture": "#2"}, + "east": {"uv": [11, 10, 14, 13], "texture": "#2"}, + "south": {"uv": [4, 2, 7, 5], "texture": "#2"}, + "west": {"uv": [2, 3, 5, 6], "texture": "#2"}, + "up": {"uv": [11, 11, 14, 14], "texture": "#2"}, + "down": {"uv": [7, 4, 10, 7], "texture": "#2"} + } + }, + { + "from": [15.5, 9, 7], + "to": [18.5, 12, 10], + "rotation": {"angle": 22.5, "axis": "z", "origin": [27, 14, 8]}, + "faces": { + "north": {"uv": [9, 9, 12, 12], "texture": "#4"}, + "east": {"uv": [11, 10, 14, 13], "texture": "#4"}, + "south": {"uv": [4, 2, 7, 5], "texture": "#4"}, + "west": {"uv": [2, 3, 5, 6], "texture": "#4"}, + "up": {"uv": [11, 11, 14, 14], "texture": "#4"}, + "down": {"uv": [7, 4, 10, 7], "texture": "#4"} + } + }, + { + "from": [-2.5, 3, 7], + "to": [0.5, 6, 10], + "rotation": {"angle": -22.5, "axis": "z", "origin": [5, 12, 8]}, + "faces": { + "north": {"uv": [9, 9, 12, 12], "texture": "#4"}, + "east": {"uv": [11, 10, 14, 13], "texture": "#4"}, + "south": {"uv": [4, 2, 7, 5], "texture": "#4"}, + "west": {"uv": [2, 3, 5, 6], "texture": "#4"}, + "up": {"uv": [11, 11, 14, 14], "texture": "#4"}, + "down": {"uv": [7, 4, 10, 7], "texture": "#4"} + } + }, + { + "from": [22, 10, 7], + "to": [25, 13, 10], + "rotation": {"angle": 22.5, "axis": "z", "origin": [30, 12, 8]}, + "faces": { + "north": {"uv": [9, 9, 12, 12], "texture": "#2"}, + "east": {"uv": [11, 10, 14, 13], "texture": "#2"}, + "south": {"uv": [4, 2, 7, 5], "texture": "#2"}, + "west": {"uv": [2, 3, 5, 6], "texture": "#2"}, + "up": {"uv": [11, 11, 14, 14], "texture": "#2"}, + "down": {"uv": [7, 4, 10, 7], "texture": "#2"} + } + }, + { + "from": [-8, 7.5, 7], + "to": [-5, 10.5, 10], + "rotation": {"angle": -22.5, "axis": "z", "origin": [-7, 12, 8]}, + "faces": { + "north": {"uv": [9, 9, 12, 12], "texture": "#2"}, + "east": {"uv": [11, 10, 14, 13], "texture": "#2"}, + "south": {"uv": [4, 2, 7, 5], "texture": "#2"}, + "west": {"uv": [2, 3, 5, 6], "texture": "#2"}, + "up": {"uv": [11, 11, 14, 14], "texture": "#2"}, + "down": {"uv": [7, 4, 10, 7], "texture": "#2"} + } + } + ], + "display": { + "thirdperson_righthand": { + "translation": [0, 1, 0], + "scale": [0.25, 0.25, 0.25] + }, + "thirdperson_lefthand": { + "translation": [0, 1, 0], + "scale": [0.25, 0.25, 0.25] + }, + "firstperson_righthand": { + "rotation": [0, -23, 0], + "translation": [-0.25, 1.75, 0], + "scale": [0.25, 0.25, 0.25] + }, + "firstperson_lefthand": { + "rotation": [0, -23, 0], + "translation": [0, 2.25, 0], + "scale": [0.25, 0.25, 0.25] + }, + "ground": { + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [25, -25, 0], + "translation": [0, -1.25, 0], + "scale": [0.32, 0.32, 0.32] + }, + "head": { + "translation": [0, 7.5, 0], + "scale": [0.25, 0.25, 0.25] + }, + "fixed": { + "translation": [0, 0, -0.5], + "scale": [0.5, 0.5, 0.5] + } + }, + "groups": [ + { + "name": "hanginglights", + "origin": [8, 8, 8], + "children": [0, 1, 2, 3, 4, + { + "name": "light1", + "origin": [8, 8, 8], + "children": [5] + }, + { + "name": "light2", + "origin": [8, 8, 8], + "children": [6] + }, + { + "name": "light1", + "origin": [8, 8, 8], + "children": [7] + }, + { + "name": "light2", + "origin": [8, 8, 8], + "children": [8] + }, + { + "name": "light2", + "origin": [8, 8, 8], + "children": [9] + }, + { + "name": "light1", + "origin": [8, 8, 8], + "children": [10] + }, + { + "name": "light1", + "origin": [8, 8, 8], + "children": [11] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/item/ceilingfan.json b/src/main/resources/assets/decorative/models/item/ceilingfan.json index f1d131f..17bfa87 100644 --- a/src/main/resources/assets/decorative/models/item/ceilingfan.json +++ b/src/main/resources/assets/decorative/models/item/ceilingfan.json @@ -1,3 +1,89 @@ { - "parent": "decorative:block/ceilingfan" + "credit": "made by Motschen", + "parent": "block/block", + "textures": { + "2": "block/gray_concrete", + "3": "decorative:block/ceilingfan", + "5": "block/black_wool", + "particle": "decorative:block/ceilingfan" + }, + "elements": [ + { + "name": "Cube", + "from": [7, 6, 7], + "to": [9, 16, 9], + "faces": { + "north": {"uv": [0, 0, 2, 6], "texture": "#2"}, + "east": {"uv": [0, 0, 2, 6], "texture": "#2"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#2"}, + "west": {"uv": [0, 0, 2, 6], "texture": "#2"}, + "up": {"uv": [0, 0, 2, 2], "texture": "#2"} + } + }, + { + "from": [7, 4, 7], + "to": [9, 6, 9], + "faces": { + "north": {"uv": [0, 0, 2, 2], "texture": "#5"}, + "east": {"uv": [0, 0, 2, 2], "texture": "#5"}, + "south": {"uv": [0, 0, 2, 2], "texture": "#5"}, + "west": {"uv": [0, 0, 2, 2], "texture": "#5"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#5"} + } + }, + { + "from": [-3, 5, 7], + "to": [7, 6, 9], + "faces": { + "north": {"uv": [0, 0, 4, 4], "texture": "#3"}, + "east": {"uv": [0, 0, 4, 4], "texture": "#3"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#3"}, + "west": {"uv": [0, 0, 4, 4], "texture": "#3"}, + "up": {"uv": [0, 0, 4, 4], "texture": "#3"}, + "down": {"uv": [0, 0, 4, 4], "texture": "#3"} + } + }, + { + "from": [9, 5, 7], + "to": [19, 6, 9], + "faces": { + "north": {"uv": [0, 0, 4, 4], "texture": "#3"}, + "east": {"uv": [0, 0, 4, 4], "texture": "#3"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#3"}, + "west": {"uv": [0, 0, 4, 4], "texture": "#3"}, + "up": {"uv": [0, 0, 4, 4], "texture": "#3"}, + "down": {"uv": [0, 0, 4, 4], "texture": "#3"} + } + }, + { + "from": [7, 5, -3], + "to": [9, 6, 7], + "faces": { + "north": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, + "south": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, + "up": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, + "down": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"} + } + }, + { + "from": [7, 5, 9], + "to": [9, 6, 19], + "faces": { + "north": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, + "east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, + "south": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, + "west": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, + "up": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"}, + "down": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#3"} + } + } + ], + "groups": [0, 1, + { + "name": "normal", + "children": [2, 3, 4, 5] + } + ] } \ No newline at end of file diff --git a/src/main/resources/assets/decorative/sounds.json b/src/main/resources/assets/decorative/sounds.json new file mode 100644 index 0000000..888e4f7 --- /dev/null +++ b/src/main/resources/assets/decorative/sounds.json @@ -0,0 +1,10 @@ +{ +"ceiling_fan.ambient": { + "sounds": [ + { + "name": "decorative:block/ceiling_fan_ambient", + "stream": false + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/sounds/block/ceiling_fan_ambient.ogg b/src/main/resources/assets/decorative/sounds/block/ceiling_fan_ambient.ogg new file mode 100644 index 0000000..1c4c1ff Binary files /dev/null and b/src/main/resources/assets/decorative/sounds/block/ceiling_fan_ambient.ogg differ diff --git a/src/main/resources/assets/decorative/textures/block/ceilingfan.png b/src/main/resources/assets/decorative/textures/block/ceilingfan.png index ae0cfb5..ec8c4c8 100644 Binary files a/src/main/resources/assets/decorative/textures/block/ceilingfan.png and b/src/main/resources/assets/decorative/textures/block/ceilingfan.png differ diff --git a/src/main/resources/assets/decorative/textures/block/ceilingfan.png.mcmeta b/src/main/resources/assets/decorative/textures/block/ceilingfan.png.mcmeta deleted file mode 100644 index 6cc687f..0000000 --- a/src/main/resources/assets/decorative/textures/block/ceilingfan.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 5 - } -} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/textures/block/ceilingfannormal.png b/src/main/resources/assets/decorative/textures/block/ceilingfannormal.png deleted file mode 100644 index c9046cb..0000000 Binary files a/src/main/resources/assets/decorative/textures/block/ceilingfannormal.png and /dev/null differ diff --git a/src/main/resources/decorative.mixins.json b/src/main/resources/decorative.mixins.json index 420c293..baa1df2 100644 --- a/src/main/resources/decorative.mixins.json +++ b/src/main/resources/decorative.mixins.json @@ -3,7 +3,7 @@ "package": "eu.midnightdust.motschen.decorative.mixin", "compatibilityLevel": "JAVA_8", "mixins": [ - "DefaultBiomeFeaturesMixin" + "GenerationSettingsAccessorMixin" ], "injectors": { "defaultRequire": 1