diff --git a/.gitignore b/.gitignore index d6cf9c1..e5d8d28 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,11 @@ # gradle .gradle/ +build/classes/ +build/generated/ +build/libs/ +build/resources/ +build/tmp/ out/ classes/ diff --git a/build.gradle b/build.gradle index c8a7337..247a3cb 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '0.4-SNAPSHOT' + id 'fabric-loom' version '0.5-SNAPSHOT' id 'maven-publish' } @@ -14,6 +14,7 @@ minecraft { } repositories { + maven { url = 'https://raw.githubusercontent.com/Devan-Kerman/Devan-Repo/master/'} maven { url "https://jitpack.io" } maven { url "https://maven.blamejared.com" } } @@ -28,8 +29,10 @@ dependencies { modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" 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 ("me.sargunvohra.mcmods:autoconfig1u:${project.auto_config_version}") + modImplementation ("me.shedaniel.cloth:config-2:${project.cloth_config_version}") + modImplementation ("io.github.prospector:modmenu:${project.mod_menu_version}") modImplementation "eu.midnightdust:midnight-hats:${midnighthats_version}" include "eu.midnightdust:midnight-hats:${midnighthats_version}" diff --git a/build/loom-cache/midnight-hats-1.0.2.jar b/build/loom-cache/midnight-hats-1.0.2.jar deleted file mode 100644 index 1668bd6..0000000 Binary files a/build/loom-cache/midnight-hats-1.0.2.jar and /dev/null differ diff --git a/build/loom-cache/midnight-hats-2.0.1.jar b/build/loom-cache/midnight-hats-2.0.1.jar new file mode 100644 index 0000000..d712a55 Binary files /dev/null and b/build/loom-cache/midnight-hats-2.0.1.jar differ diff --git a/build/loom-cache/mixin-map-1.16.4-1.16.4+build.6-v2.0.tiny b/build/loom-cache/mixin-map-1.16.4-1.16.4+build.6-v2.0.tiny new file mode 100644 index 0000000..afd84f3 --- /dev/null +++ b/build/loom-cache/mixin-map-1.16.4-1.16.4+build.6-v2.0.tiny @@ -0,0 +1 @@ +v1 named intermediary diff --git a/gradle.properties b/gradle.properties index 304d987..245e5f7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,19 +1,23 @@ # Done to increase the memory available to gradle. -org.gradle.jvmargs=-Xmx1G +org.gradle.jvmargs=-Xmx2G # Fabric Properties # check these on https://fabricmc.net/use - minecraft_version=1.16.2 - yarn_mappings=1.16.2+build.6 - loader_version=0.9.1+build.205 + minecraft_version=1.16.4 + yarn_mappings=1.16.4+build.6 + loader_version=0.10.6+build.214 # Mod Properties - mod_version = 3.0.0 + mod_version = 4.0.0-dev maven_group = eu.midnightdust.motschen archives_base_name = decorative # Dependencies # 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 + fabric_version=0.25.1+build.416-1.16 patchouli_version=1.16-40-FABRIC - midnighthats_version=1.0.2 + midnighthats_version=2.0.1 + + auto_config_version = 3.2.0-unstable + cloth_config_version = 4.7.0-unstable + mod_menu_version = 1.14.6+build.31 diff --git a/src/main/java/eu/midnightdust/motschen/decorative/DecorativeClient.java b/src/main/java/eu/midnightdust/motschen/decorative/DecorativeClient.java index 9f9d6cf..3fea594 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/DecorativeClient.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/DecorativeClient.java @@ -8,6 +8,7 @@ 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.model.ModelLoadingRegistry; 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; @@ -15,6 +16,10 @@ import net.minecraft.block.Block; import net.minecraft.block.Blocks; import net.minecraft.client.color.block.BlockColorProvider; import net.minecraft.client.render.RenderLayer; +import net.minecraft.client.render.model.UnbakedModel; +import net.minecraft.command.argument.ItemEnchantmentArgumentType; + +import java.util.function.Supplier; public class DecorativeClient implements ClientModInitializer { @@ -64,17 +69,15 @@ public class DecorativeClient implements ClientModInitializer { BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(),DecorativeMain.ChristmasTree); BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(),DecorativeMain.CeilingFan); BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(),DecorativeMain.SlidingDoor); + BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(),DecorativeMain.WallClock); 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); + BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.ChoppingLogBlockEntity, ChoppingLogBlockEntityRenderer::new); + BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.WallClockBlockEntity, WallClockRenderer::new); + BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.DigitalClockBlockEntity, DigitalClockRenderer::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 5e9b168..719c947 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/DecorativeMain.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/DecorativeMain.java @@ -5,9 +5,13 @@ 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.config.DecorativeConfig; import eu.midnightdust.motschen.decorative.init.*; +import eu.midnightdust.motschen.decorative.sound.DecorativeSoundEvents; import eu.midnightdust.motschen.decorative.world.OreFeatureInjector; import eu.midnightdust.motschen.decorative.world.OreFeatures; +import me.sargunvohra.mcmods.autoconfig1u.AutoConfig; +import me.sargunvohra.mcmods.autoconfig1u.serializer.JanksonConfigSerializer; import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; @@ -20,6 +24,7 @@ import net.minecraft.util.registry.Registry; public class DecorativeMain implements ModInitializer { public static final String MOD_ID = "decorative"; + public static DecorativeConfig DECORATIVE_CONFIG; 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)); @@ -47,9 +52,14 @@ public class DecorativeMain implements ModInitializer { public static Block ChristmasTree = new ChristmasTree(); public static Block ChristmasLights = new ChristmasLights(); public static Block ShowerHead = new ShowerHead(); + public static Block WallClock = new WallClock(); + public static Block SmokeDetector = new SmokeDetector(); @Override public void onInitialize() { + AutoConfig.register(DecorativeConfig.class, JanksonConfigSerializer::new); + DECORATIVE_CONFIG = AutoConfig.getConfigHolder(DecorativeConfig.class).getConfig(); + BlockEntities.init(); // Traffic // Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"rocky_asphalt"), RockyAsphalt); @@ -81,6 +91,8 @@ public class DecorativeMain implements ModInitializer { //Furniture// 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,"wall_clock"), WallClock); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"wall_clock"), new BlockItem(WallClock, 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); @@ -95,10 +107,14 @@ public class DecorativeMain implements ModInitializer { 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))); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"smoke_detector"), SmokeDetector); + Registry.register(Registry.ITEM, new Identifier(MOD_ID,"smoke_detector"), new BlockItem(SmokeDetector, new Item.Settings().group(DecorativeMain.IndoorGroup))); Lamps.init(); DoubleLamps.init(); + Clocks.init(); OreFeatures.init(); OreFeatureInjector.init(); + new DecorativeSoundEvents(); } } diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/AcaciaChoppingLog.java b/src/main/java/eu/midnightdust/motschen/decorative/block/AcaciaChoppingLog.java deleted file mode 100644 index 5d18ff9..0000000 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/AcaciaChoppingLog.java +++ /dev/null @@ -1,42 +0,0 @@ -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 deleted file mode 100644 index 23479bf..0000000 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/BirchChoppingLog.java +++ /dev/null @@ -1,42 +0,0 @@ -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/OakChoppingLog.java b/src/main/java/eu/midnightdust/motschen/decorative/block/ChoppingLog.java similarity index 83% rename from src/main/java/eu/midnightdust/motschen/decorative/block/OakChoppingLog.java rename to src/main/java/eu/midnightdust/motschen/decorative/block/ChoppingLog.java index 41874e1..2e0b51d 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/OakChoppingLog.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/ChoppingLog.java @@ -1,6 +1,6 @@ package eu.midnightdust.motschen.decorative.block; -import eu.midnightdust.motschen.decorative.block.blockentity.OakChoppingLogBlockEntity; +import eu.midnightdust.motschen.decorative.block.blockentity.ChoppingLogBlockEntity; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.minecraft.block.*; import net.minecraft.block.entity.BlockEntity; @@ -12,9 +12,9 @@ import net.minecraft.util.math.Direction; import net.minecraft.world.BlockView; import net.minecraft.world.WorldView; -public class OakChoppingLog extends HorizontalFacingBlock implements BlockEntityProvider { +public class ChoppingLog extends HorizontalFacingBlock implements BlockEntityProvider { - public OakChoppingLog() { + public ChoppingLog() { super(FabricBlockSettings.copy(Blocks.OAK_PLANKS).nonOpaque().sounds(BlockSoundGroup.WOOD)); this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH)); } @@ -36,7 +36,7 @@ public class OakChoppingLog extends HorizontalFacingBlock implements BlockEntity @Override public BlockEntity createBlockEntity(BlockView view) { - return new OakChoppingLogBlockEntity(); + return new ChoppingLogBlockEntity(); } } diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/DarkOakChoppingLog.java b/src/main/java/eu/midnightdust/motschen/decorative/block/DarkOakChoppingLog.java deleted file mode 100644 index 5f045d4..0000000 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/DarkOakChoppingLog.java +++ /dev/null @@ -1,42 +0,0 @@ -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/DigitalClock.java b/src/main/java/eu/midnightdust/motschen/decorative/block/DigitalClock.java new file mode 100644 index 0000000..329237a --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/DigitalClock.java @@ -0,0 +1,74 @@ +package eu.midnightdust.motschen.decorative.block; + +import eu.midnightdust.motschen.decorative.block.blockentity.DigitalClockBlockEntity; +import eu.midnightdust.motschen.decorative.block.blockentity.WallClockBlockEntity; +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.util.shape.VoxelShape; +import net.minecraft.util.shape.VoxelShapes; +import net.minecraft.world.BlockView; + +public class DigitalClock extends HorizontalFacingBlock implements BlockEntityProvider { + private static final VoxelShape NORTH_SHAPE; + private static final VoxelShape EAST_SHAPE; + private static final VoxelShape SOUTH_SHAPE; + private static final VoxelShape WEST_SHAPE; + + public DigitalClock() { + super(FabricBlockSettings.copy(Blocks.SMOOTH_QUARTZ).nonOpaque().sounds(BlockSoundGroup.STONE)); + this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH)); + } + + @Override + public BlockEntity createBlockEntity(BlockView view) { + return new DigitalClockBlockEntity(); + } + + @Override + protected void appendProperties(StateManager.Builder builder) { + builder.add(FACING); + } + + @Override + public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) { + return super.getPlacementState(itemPlacementContext) + .with(FACING, itemPlacementContext.getPlayerFacing().getOpposite()); + } + + @Override + public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext context) { + switch (state.get(FACING)) { + case NORTH: return NORTH_SHAPE; + case EAST: return EAST_SHAPE; + case SOUTH: return SOUTH_SHAPE; + case WEST: return WEST_SHAPE; + default: return super.getOutlineShape(state, view, pos, context); + } + } + static { + VoxelShape shape = createCuboidShape(1, 0, 5, 15, 8, 13); + + NORTH_SHAPE = shape; + WEST_SHAPE = rotate(Direction.EAST, Direction.NORTH, shape); + EAST_SHAPE = rotate(Direction.EAST, Direction.SOUTH, shape); + SOUTH_SHAPE = rotate(Direction.EAST, Direction.WEST, shape); + } + private static VoxelShape rotate(Direction from, Direction to, VoxelShape shape) { + VoxelShape[] buffer = new VoxelShape[]{ shape, VoxelShapes.empty() }; + + int times = (to.getHorizontal() - from.getHorizontal() + 4) % 4; + for (int i = 0; i < times; i++) { + buffer[0].forEachBox((minX, minY, minZ, maxX, maxY, maxZ) -> buffer[1] = VoxelShapes.union(buffer[1], VoxelShapes.cuboid(1-maxZ, minY, minX, 1-minZ, maxY, maxX))); + buffer[0] = buffer[1]; + buffer[1] = VoxelShapes.empty(); + } + + return buffer[0]; + } +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/JungleChoppingLog.java b/src/main/java/eu/midnightdust/motschen/decorative/block/JungleChoppingLog.java deleted file mode 100644 index 7bdd30e..0000000 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/JungleChoppingLog.java +++ /dev/null @@ -1,42 +0,0 @@ -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/OldTelevision.java b/src/main/java/eu/midnightdust/motschen/decorative/block/OldTelevision.java index 734e7db..8179e1e 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/OldTelevision.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/OldTelevision.java @@ -33,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).lightLevel(createLightLevelFromBlockState(15))); + super(FabricBlockSettings.copy(Blocks.BLACK_CONCRETE).nonOpaque().sounds(BlockSoundGroup.STONE).luminance(createLightLevelFromBlockState())); this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH).with(PROGRAM, Program.OFF)); } @@ -104,7 +104,7 @@ public class OldTelevision extends HorizontalFacingBlock { return !worldView.isAir(pos.down()); } - private static ToIntFunction createLightLevelFromBlockState(int litLevel) { + private static ToIntFunction createLightLevelFromBlockState() { return (blockState) -> { if (blockState.get(PROGRAM) == Program.OFF) { return 0; diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/SmokeDetector.java b/src/main/java/eu/midnightdust/motschen/decorative/block/SmokeDetector.java new file mode 100644 index 0000000..8d1fa1b --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/SmokeDetector.java @@ -0,0 +1,47 @@ +package eu.midnightdust.motschen.decorative.block; + +import eu.midnightdust.motschen.decorative.block.blockentity.SmokeDetectorBlockEntity; +import eu.midnightdust.motschen.decorative.block.blockentity.WallClockBlockEntity; +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.state.property.BooleanProperty; +import net.minecraft.state.property.Property; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.util.shape.VoxelShape; +import net.minecraft.util.shape.VoxelShapes; +import net.minecraft.world.BlockView; + +public class SmokeDetector extends HorizontalFacingBlock implements BlockEntityProvider { + private static final VoxelShape SHAPE; + public static final BooleanProperty ACTIVE = BooleanProperty.of("active"); + + public SmokeDetector() { + super(FabricBlockSettings.copy(Blocks.SMOOTH_QUARTZ).nonOpaque().sounds(BlockSoundGroup.STONE)); + this.setDefaultState(this.stateManager.getDefaultState().with(ACTIVE, false)); + } + + @Override + public BlockEntity createBlockEntity(BlockView view) { + return new SmokeDetectorBlockEntity(); + } + + @Override + protected void appendProperties(StateManager.Builder builder) { + builder.add(ACTIVE); + } + + @Override + public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext context) { + return SHAPE; + } + static { + VoxelShape shape = createCuboidShape(4, 14, 4, 12, 16, 12); + + SHAPE = shape; + } +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/SpruceChoppingLog.java b/src/main/java/eu/midnightdust/motschen/decorative/block/SpruceChoppingLog.java deleted file mode 100644 index 7e5d20c..0000000 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/SpruceChoppingLog.java +++ /dev/null @@ -1,42 +0,0 @@ -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 28047e9..61b35aa 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/Television.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/Television.java @@ -34,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).lightLevel(createLightLevelFromBlockState(15))); + super(FabricBlockSettings.copy(Blocks.BLACK_CONCRETE).nonOpaque().sounds(BlockSoundGroup.STONE).luminance(createLightLevelFromBlockState())); this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH).with(PROGRAM, Program.OFF)); } @@ -105,7 +105,7 @@ public class Television extends HorizontalFacingBlock { return !worldView.isAir(pos.down()); } - private static ToIntFunction createLightLevelFromBlockState(int litLevel) { + private static ToIntFunction createLightLevelFromBlockState() { return (blockState) -> { if (blockState.get(PROGRAM) == Program.OFF) { return 0; diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/WallClock.java b/src/main/java/eu/midnightdust/motschen/decorative/block/WallClock.java new file mode 100644 index 0000000..7ba02f9 --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/WallClock.java @@ -0,0 +1,73 @@ +package eu.midnightdust.motschen.decorative.block; + +import eu.midnightdust.motschen.decorative.block.blockentity.WallClockBlockEntity; +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.util.shape.VoxelShape; +import net.minecraft.util.shape.VoxelShapes; +import net.minecraft.world.BlockView; + +public class WallClock extends HorizontalFacingBlock implements BlockEntityProvider { + private static final VoxelShape NORTH_SHAPE; + private static final VoxelShape EAST_SHAPE; + private static final VoxelShape SOUTH_SHAPE; + private static final VoxelShape WEST_SHAPE; + + public WallClock() { + super(FabricBlockSettings.copy(Blocks.SMOOTH_QUARTZ).nonOpaque().sounds(BlockSoundGroup.STONE)); + this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH)); + } + + @Override + public BlockEntity createBlockEntity(BlockView view) { + return new WallClockBlockEntity(); + } + + @Override + protected void appendProperties(StateManager.Builder builder) { + builder.add(FACING); + } + + @Override + public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) { + return super.getPlacementState(itemPlacementContext) + .with(FACING, itemPlacementContext.getPlayerFacing().getOpposite()); + } + + @Override + public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext context) { + switch (state.get(FACING)) { + case NORTH: return NORTH_SHAPE; + case EAST: return EAST_SHAPE; + case SOUTH: return SOUTH_SHAPE; + case WEST: return WEST_SHAPE; + default: return super.getOutlineShape(state, view, pos, context); + } + } + static { + VoxelShape shape = createCuboidShape(0, 0, 15, 16, 16, 16); + + NORTH_SHAPE = shape; + WEST_SHAPE = rotate(Direction.EAST, Direction.NORTH, shape); + EAST_SHAPE = rotate(Direction.EAST, Direction.SOUTH, shape); + SOUTH_SHAPE = rotate(Direction.EAST, Direction.WEST, shape); + } + private static VoxelShape rotate(Direction from, Direction to, VoxelShape shape) { + VoxelShape[] buffer = new VoxelShape[]{ shape, VoxelShapes.empty() }; + + int times = (to.getHorizontal() - from.getHorizontal() + 4) % 4; + for (int i = 0; i < times; i++) { + buffer[0].forEachBox((minX, minY, minZ, maxX, maxY, maxZ) -> buffer[1] = VoxelShapes.union(buffer[1], VoxelShapes.cuboid(1-maxZ, minY, minX, 1-minZ, maxY, maxX))); + buffer[0] = buffer[1]; + buffer[1] = VoxelShapes.empty(); + } + + return buffer[0]; + } +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/OakChoppingLogBlockEntity.java b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/ChoppingLogBlockEntity.java similarity index 89% rename from src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/OakChoppingLogBlockEntity.java rename to src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/ChoppingLogBlockEntity.java index ff37c58..09fb809 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/OakChoppingLogBlockEntity.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/ChoppingLogBlockEntity.java @@ -8,13 +8,13 @@ import net.minecraft.util.Tickable; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; -public class OakChoppingLogBlockEntity extends BlockEntity implements Tickable { +public class ChoppingLogBlockEntity extends BlockEntity implements Tickable { private int facing; private double axe_x; private double axe_z; - public OakChoppingLogBlockEntity() { - super(BlockEntities.OakChoppingLogBlockEntity); + public ChoppingLogBlockEntity() { + super(BlockEntities.ChoppingLogBlockEntity); } @Override 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 deleted file mode 100644 index e157fd3..0000000 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/DarkOakChoppingLogBlockEntity.java +++ /dev/null @@ -1,61 +0,0 @@ -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/AcaciaChoppingLogBlockEntity.java b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/DigitalClockBlockEntity.java similarity index 60% rename from src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/AcaciaChoppingLogBlockEntity.java rename to src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/DigitalClockBlockEntity.java index 8458c97..8dccd98 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/AcaciaChoppingLogBlockEntity.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/DigitalClockBlockEntity.java @@ -4,58 +4,67 @@ 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.sound.SoundCategory; +import net.minecraft.sound.SoundEvents; 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; +import java.time.LocalTime; - public AcaciaChoppingLogBlockEntity() { - super(BlockEntities.AcaciaChoppingLogBlockEntity); +public class DigitalClockBlockEntity extends BlockEntity implements Tickable { + private int facing; + private double x; + private double z; + private int second; + + public DigitalClockBlockEntity() { + super(BlockEntities.DigitalClockBlockEntity); } @Override public void tick() { + if (LocalTime.now().getSecond() != second) { + second = LocalTime.now().getSecond(); + } 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; + facing = 270; + x = 0.626; + z = 0.825; return; } if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.SOUTH) { - facing = 90; - axe_x = 0.5D; - axe_z = 0.2D; + facing = 180; + x = 0.175; + z = 0.626; return; } if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.WEST) { - facing = 0; - axe_x = 0.8D; - axe_z = 0.5D; + facing = 90; + x = 0.374; + z = 0.175; return; } else { - facing = 270; - axe_x = 0.5D; - axe_z = 0.8D; + facing = 0; + x = 0.825; + z = 0.374; return; } - } + } public int getFacing() { return facing; } - public double getAxeX() { - return axe_x; + public double getX() { + return x; } - public double getAxeZ() { - return axe_z; + public double getZ() { + return 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 deleted file mode 100644 index 603c612..0000000 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/JungleChoppingLogBlockEntity.java +++ /dev/null @@ -1,61 +0,0 @@ -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/PoolSprinklerBlockEntity.java b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/PoolSprinklerBlockEntity.java index bc7022c..66869a5 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/PoolSprinklerBlockEntity.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/PoolSprinklerBlockEntity.java @@ -18,14 +18,25 @@ public class PoolSprinklerBlockEntity extends BlockEntity implements Tickable { @Override public void tick() { BlockPos pos = this.pos; - BlockState state = this.world.getBlockState(pos); - if (world != null && state.get(PoolSprinkler.POWERED) == true) { - switch (state.get(PoolSprinkler.FACING)) { - case NORTH: world.addParticle(ParticleTypes.DRIPPING_WATER,pos.getX()+0.5,pos.getY()+0.5,pos.getZ()-0.34,1,1,1); return; - case EAST: world.addParticle(ParticleTypes.DRIPPING_WATER,pos.getX()+1.34,pos.getY()+0.5,pos.getZ()+0.5,1,1,1); return; - case SOUTH: world.addParticle(ParticleTypes.DRIPPING_WATER,pos.getX()+0.5,pos.getY()+0.5,pos.getZ()+1.34,1,1,1); return; - case WEST: world.addParticle(ParticleTypes.DRIPPING_WATER,pos.getX()-0.34,pos.getY()+0.5,pos.getZ()+0.5,1,1,1); return; - default: return; + if (world != null) { + BlockState state = this.world.getBlockState(pos); + if (state.get(PoolSprinkler.POWERED)) { + switch (state.get(PoolSprinkler.FACING)) { + case NORTH: + world.addParticle(ParticleTypes.DRIPPING_WATER, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() - 0.34, 1, 1, 1); + return; + case EAST: + world.addParticle(ParticleTypes.DRIPPING_WATER, pos.getX() + 1.34, pos.getY() + 0.5, pos.getZ() + 0.5, 1, 1, 1); + return; + case SOUTH: + world.addParticle(ParticleTypes.DRIPPING_WATER, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 1.34, 1, 1, 1); + return; + case WEST: + world.addParticle(ParticleTypes.DRIPPING_WATER, pos.getX() - 0.34, pos.getY() + 0.5, pos.getZ() + 0.5, 1, 1, 1); + return; + default: + return; + } } } } diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/ShowerHeadBlockEntity.java b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/ShowerHeadBlockEntity.java index 5a06de4..f16bd68 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/ShowerHeadBlockEntity.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/ShowerHeadBlockEntity.java @@ -18,14 +18,25 @@ public class ShowerHeadBlockEntity extends BlockEntity implements Tickable { @Override public void tick() { BlockPos pos = this.pos; - BlockState state = this.world.getBlockState(pos); - if (world != null && state.get(PoolSprinkler.POWERED) == true) { - switch (state.get(PoolSprinkler.FACING)) { - case NORTH: world.addParticle(ParticleTypes.DRIPPING_WATER,pos.getX()+0.5,pos.getY()+0.5,pos.getZ()+0.625,1,1,1); return; - case EAST: world.addParticle(ParticleTypes.DRIPPING_WATER,pos.getX()+0.375,pos.getY()+0.5,pos.getZ()+0.5,1,1,1); return; - case SOUTH: world.addParticle(ParticleTypes.DRIPPING_WATER,pos.getX()+0.5,pos.getY()+0.5,pos.getZ()+0.375,1,1,1); return; - case WEST: world.addParticle(ParticleTypes.DRIPPING_WATER,pos.getX()+0.625,pos.getY()+0.5,pos.getZ()+0.5,1,1,1); return; - default: return; + if (world != null) { + BlockState state = this.world.getBlockState(pos); + if (state.get(PoolSprinkler.POWERED) == true) { + switch (state.get(PoolSprinkler.FACING)) { + case NORTH: + world.addParticle(ParticleTypes.DRIPPING_WATER, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.625, 1, 1, 1); + return; + case EAST: + world.addParticle(ParticleTypes.DRIPPING_WATER, pos.getX() + 0.375, pos.getY() + 0.5, pos.getZ() + 0.5, 1, 1, 1); + return; + case SOUTH: + world.addParticle(ParticleTypes.DRIPPING_WATER, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.375, 1, 1, 1); + return; + case WEST: + world.addParticle(ParticleTypes.DRIPPING_WATER, pos.getX() + 0.625, pos.getY() + 0.5, pos.getZ() + 0.5, 1, 1, 1); + return; + default: + return; + } } } } diff --git a/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/SmokeDetectorBlockEntity.java b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/SmokeDetectorBlockEntity.java new file mode 100644 index 0000000..48d9860 --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/SmokeDetectorBlockEntity.java @@ -0,0 +1,47 @@ +package eu.midnightdust.motschen.decorative.block.blockentity; + +import eu.midnightdust.motschen.decorative.DecorativeMain; +import eu.midnightdust.motschen.decorative.block.SmokeDetector; +import eu.midnightdust.motschen.decorative.init.BlockEntities; +import eu.midnightdust.motschen.decorative.sound.DecorativeSoundEvents; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.sound.SoundCategory; +import net.minecraft.sound.SoundEvents; +import net.minecraft.tag.BlockTags; +import net.minecraft.util.Tickable; +import net.minecraft.util.math.BlockPos; + +import java.time.LocalTime; + +public class SmokeDetectorBlockEntity extends BlockEntity implements Tickable { + private int second; + private int sound = 0; + + public SmokeDetectorBlockEntity() { + super(BlockEntities.SmokeDetectorBlockEntity); + } + + public boolean isInFireRange() { + return this.world.getBlockState(this.pos.down()).isIn(BlockTags.FIRE); + } + + @Override + public void tick() { + if (LocalTime.now().getSecond() != second) { + second = LocalTime.now().getSecond(); + + if (this.isInFireRange()) { + world.setBlockState(pos, DecorativeMain.SmokeDetector.getDefaultState().with(SmokeDetector.ACTIVE, true)); + + sound = sound + 1; + if (sound > 3) {sound = 0;} + if (sound == 0) { + world.playSound(null, pos, DecorativeSoundEvents.SMOKE_DETECTOR_BEEP, SoundCategory.BLOCKS, 1f, 1f); + } + } + else if (this.world.getBlockState(pos).get(SmokeDetector.ACTIVE).equals(true)) { + world.setBlockState(pos, DecorativeMain.SmokeDetector.getDefaultState().with(SmokeDetector.ACTIVE, false)); + } + } + } +} 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 deleted file mode 100644 index 886bbb6..0000000 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/SpruceChoppingLogBlockEntity.java +++ /dev/null @@ -1,61 +0,0 @@ -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/blockentity/BirchChoppingLogBlockEntity.java b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/WallClockBlockEntity.java similarity index 54% rename from src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/BirchChoppingLogBlockEntity.java rename to src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/WallClockBlockEntity.java index 5e7f09c..0e59035 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/BirchChoppingLogBlockEntity.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/blockentity/WallClockBlockEntity.java @@ -1,61 +1,73 @@ package eu.midnightdust.motschen.decorative.block.blockentity; import eu.midnightdust.motschen.decorative.init.BlockEntities; +import eu.midnightdust.motschen.decorative.sound.DecorativeSoundEvents; import net.minecraft.block.BlockState; import net.minecraft.block.HorizontalFacingBlock; import net.minecraft.block.entity.BlockEntity; +import net.minecraft.sound.SoundCategory; +import net.minecraft.sound.SoundEvents; +import net.minecraft.state.property.Properties; 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; +import java.time.LocalTime; - public BirchChoppingLogBlockEntity() { - super(BlockEntities.BirchChoppingLogBlockEntity); +public class WallClockBlockEntity extends BlockEntity implements Tickable { + private int facing; + private double x; + private double z; + private int second; + + public WallClockBlockEntity() { + super(BlockEntities.WallClockBlockEntity); } @Override public void tick() { + if (LocalTime.now().getSecond() != second) { + second = LocalTime.now().getSecond(); + world.playSound(null, pos, SoundEvents.BLOCK_WOODEN_BUTTON_CLICK_ON, SoundCategory.BLOCKS, 0.004f, 1f); + } 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; + facing = 270; + x = 0.05; + z = 0.5; return; } if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.SOUTH) { - facing = 90; - axe_x = 0.5D; - axe_z = 0.2D; + facing = 180; + x = 0.5; + z = 0.05; return; } if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.WEST) { - facing = 0; - axe_x = 0.8D; - axe_z = 0.5D; + facing = 90; + x = 0.95; + z = 0.5; return; } else { - facing = 270; - axe_x = 0.5D; - axe_z = 0.8D; + facing = 0; + x = 0.5; + z = 0.95; return; } - } + } public int getFacing() { return facing; } - public double getAxeX() { - return axe_x; + public double getX() { + return x; } - public double getAxeZ() { - return axe_z; + public double getZ() { + return 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 deleted file mode 100644 index d4fc94c..0000000 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/render/AcaciaChoppingLogBlockEntityRenderer.java +++ /dev/null @@ -1,52 +0,0 @@ -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 deleted file mode 100644 index f996252..0000000 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/render/BirchChoppingLogBlockEntityRenderer.java +++ /dev/null @@ -1,52 +0,0 @@ -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/OakChoppingLogBlockEntityRenderer.java b/src/main/java/eu/midnightdust/motschen/decorative/block/render/ChoppingLogBlockEntityRenderer.java similarity index 74% rename from src/main/java/eu/midnightdust/motschen/decorative/block/render/OakChoppingLogBlockEntityRenderer.java rename to src/main/java/eu/midnightdust/motschen/decorative/block/render/ChoppingLogBlockEntityRenderer.java index ffdbb99..173c757 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/render/OakChoppingLogBlockEntityRenderer.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/render/ChoppingLogBlockEntityRenderer.java @@ -1,6 +1,6 @@ package eu.midnightdust.motschen.decorative.block.render; -import eu.midnightdust.motschen.decorative.block.blockentity.OakChoppingLogBlockEntity; +import eu.midnightdust.motschen.decorative.block.blockentity.ChoppingLogBlockEntity; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.block.BlockState; @@ -16,20 +16,20 @@ import net.minecraft.item.Items; import net.minecraft.util.math.BlockPos; @Environment(EnvType.CLIENT) -public class OakChoppingLogBlockEntityRenderer extends BlockEntityRenderer { +public class ChoppingLogBlockEntityRenderer extends BlockEntityRenderer { - public OakChoppingLogBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) { + public ChoppingLogBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) { super(blockEntityRenderDispatcher); } @Override - public boolean rendersOutsideBoundingBox(OakChoppingLogBlockEntity blockEntity) { + public boolean rendersOutsideBoundingBox(ChoppingLogBlockEntity blockEntity) { return true; } @Override - public void render(OakChoppingLogBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) { + public void render(ChoppingLogBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) { BlockPos pos = blockEntity.getPos(); BlockState state = blockEntity.getWorld().getBlockState(pos); 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 deleted file mode 100644 index fac8214..0000000 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/render/DarkOakChoppingLogBlockEntityRenderer.java +++ /dev/null @@ -1,52 +0,0 @@ -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/DigitalClockRenderer.java b/src/main/java/eu/midnightdust/motschen/decorative/block/render/DigitalClockRenderer.java new file mode 100644 index 0000000..aaef5dc --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/render/DigitalClockRenderer.java @@ -0,0 +1,86 @@ +package eu.midnightdust.motschen.decorative.block.render; + +import eu.midnightdust.motschen.decorative.DecorativeMain; +import eu.midnightdust.motschen.decorative.block.blockentity.DigitalClockBlockEntity; +import eu.midnightdust.motschen.decorative.block.blockentity.WallClockBlockEntity; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.font.TextRenderer; +import net.minecraft.client.model.ModelPart; +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.block.entity.SignBlockEntityRenderer; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.client.util.math.Vector3f; +import net.minecraft.util.Identifier; + +import java.text.SimpleDateFormat; +import java.time.LocalTime; +import java.util.SimpleTimeZone; +import java.util.TimeZone; + +@Environment(EnvType.CLIENT) +public class DigitalClockRenderer extends BlockEntityRenderer { + + public DigitalClockRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) { + super(blockEntityRenderDispatcher); + } + + private int getHour12hFormat() { + int hour; + hour = LocalTime.now().getHour(); + if (hour > 12) { + hour = hour - 12; + } + return hour; + } + private String getTime() { + String hour; + String minute; + + // Hour + if (DecorativeMain.DECORATIVE_CONFIG.use12hTime) { + if (getHour12hFormat() <= 9) { + hour = "0" + getHour12hFormat(); + } else { + hour = "" + getHour12hFormat(); + } + } + else { + if (LocalTime.now().getHour() <= 9) { + hour = "0" + LocalTime.now().getHour(); + } else { + hour = "" + LocalTime.now().getHour(); + } + } + + // Minute + if (LocalTime.now().getMinute() <= 9) { + minute = "0" + LocalTime.now().getMinute(); + } + else { + minute = "" + LocalTime.now().getMinute(); + } + + String time = hour +":"+ minute; + return time; + } + + + @Override + public void render(DigitalClockBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) { + matrices.push(); + int lightAtBlock1 = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos()); + + TextRenderer textRenderer = dispatcher.getTextRenderer(); + + matrices.translate(blockEntity.getX(),0.35,blockEntity.getZ()); + matrices.scale(0.025f, 0.025f, 0.025f); + matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing())); + matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(180)); + textRenderer.draw(getTime(), 0, 0, 16382457, false, matrices.peek().getModel(), vertexConsumers, false, 0, lightAtBlock1); + + matrices.pop(); + } +} \ No newline at end of file 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 deleted file mode 100644 index d23360b..0000000 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/render/JungleChoppingLogBlockEntityRenderer.java +++ /dev/null @@ -1,52 +0,0 @@ -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/SpruceChoppingLogBlockEntityRenderer.java b/src/main/java/eu/midnightdust/motschen/decorative/block/render/SpruceChoppingLogBlockEntityRenderer.java deleted file mode 100644 index 86e439b..0000000 --- a/src/main/java/eu/midnightdust/motschen/decorative/block/render/SpruceChoppingLogBlockEntityRenderer.java +++ /dev/null @@ -1,52 +0,0 @@ -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/block/render/WallClockRenderer.java b/src/main/java/eu/midnightdust/motschen/decorative/block/render/WallClockRenderer.java new file mode 100644 index 0000000..64d4885 --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/block/render/WallClockRenderer.java @@ -0,0 +1,83 @@ +package eu.midnightdust.motschen.decorative.block.render; + +import eu.midnightdust.motschen.decorative.block.blockentity.WallClockBlockEntity; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.ModelPart; +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.util.math.MatrixStack; +import net.minecraft.client.util.math.Vector3f; +import net.minecraft.util.Identifier; + +import java.time.LocalTime; + +@Environment(EnvType.CLIENT) +public class WallClockRenderer extends BlockEntityRenderer { + private final ModelPart blades; + private final ModelPart seconds; + private final ModelPart minutes; + private final ModelPart hours; + + public WallClockRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) { + super(blockEntityRenderDispatcher); + blades = new ModelPart(16, 16, 0, 0); + blades.setPivot(0.0F, 0.0F, 0.0F); + + seconds = new ModelPart(16, 16, 8, 0); + seconds.addCuboid(-0.175F, 0.0F, 0.0F, 0.25F, 7.0F, 0.2F, 0.0F); + blades.addChild(seconds); + + minutes = new ModelPart(16, 16, 0, 0); + minutes.addCuboid(-0.25F, 0.0F, 0.0F, 0.5F, 6.0F, 0.2F, 0.0F); + blades.addChild(minutes); + + hours = new ModelPart(16, 16, 0, 0); + hours.addCuboid(-0.25F, 0.0F, 0.0F, 0.5F, 4.0F, 0.2F, 0.0F); + blades.addChild(hours); + } + + private int getHour12hFormat() { + int hour; + hour = LocalTime.now().getHour(); + if (hour >= 12) { + hour = hour - 12; + } + return hour; + } + + + @Override + public void render(WallClockBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) { + + int lightAtBlock = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos()); + + matrices.push(); + VertexConsumer redVertex = vertexConsumers.getBuffer(RenderLayer.getEntityCutoutNoCull(new Identifier("textures/block/red_concrete.png"))); + int lightAtBlock1 = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos()); + matrices.translate(blockEntity.getX(),0.5,blockEntity.getZ()); + matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing())); + matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(LocalTime.now().getSecond() * 6)); + seconds.render(matrices, redVertex, lightAtBlock1, OverlayTexture.DEFAULT_UV, 1.0F, 1.0F, 1.0F, 1.0F); + matrices.pop(); + + matrices.push(); + VertexConsumer blackVertex = vertexConsumers.getBuffer(RenderLayer.getEntityCutoutNoCull(new Identifier("textures/block/black_concrete.png"))); + int lightAtBlock2 = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos()); + matrices.translate(blockEntity.getX(),0.5,blockEntity.getZ()); + matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing())); + matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(LocalTime.now().getMinute() * 6)); + minutes.render(matrices, blackVertex, lightAtBlock2, OverlayTexture.DEFAULT_UV, 1.0F, 1.0F, 1.0F, 1.0F); + matrices.pop(); + + matrices.push(); + VertexConsumer blackVertex2 = vertexConsumers.getBuffer(RenderLayer.getEntityCutoutNoCull(new Identifier("textures/block/black_concrete.png"))); + int lightAtBlock3 = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos()); + matrices.translate(blockEntity.getX(),0.5,blockEntity.getZ()); + matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing())); + matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(getHour12hFormat() * 30)); + hours.render(matrices, blackVertex2, lightAtBlock3, OverlayTexture.DEFAULT_UV, 1.0F, 1.0F, 1.0F, 1.0F); + matrices.pop(); + } +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/config/DecorativeConfig.java b/src/main/java/eu/midnightdust/motschen/decorative/config/DecorativeConfig.java new file mode 100644 index 0000000..6b7c24f --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/config/DecorativeConfig.java @@ -0,0 +1,11 @@ +package eu.midnightdust.motschen.decorative.config; + +import me.sargunvohra.mcmods.autoconfig1u.ConfigData; +import me.sargunvohra.mcmods.autoconfig1u.annotation.Config; +import me.sargunvohra.mcmods.autoconfig1u.shadowed.blue.endless.jankson.Comment; + +@Config(name = "decorative") +public class DecorativeConfig implements ConfigData { + @Comment(value = "Use 12h Time") + public boolean use12hTime = true; +} diff --git a/src/main/java/eu/midnightdust/motschen/decorative/config/ModMenuIntegration.java b/src/main/java/eu/midnightdust/motschen/decorative/config/ModMenuIntegration.java new file mode 100644 index 0000000..31098c5 --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/config/ModMenuIntegration.java @@ -0,0 +1,16 @@ +package eu.midnightdust.motschen.decorative.config; + +import io.github.prospector.modmenu.api.ConfigScreenFactory; +import io.github.prospector.modmenu.api.ModMenuApi; +import me.sargunvohra.mcmods.autoconfig1u.AutoConfig; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +public class ModMenuIntegration implements ModMenuApi { + + @Override + public ConfigScreenFactory getModConfigScreenFactory() { + return parent -> AutoConfig.getConfigScreen(DecorativeConfig.class, parent).get(); + } +} \ No newline at end of file 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 33c61fc..470f48c 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/init/BlockEntities.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/init/BlockEntities.java @@ -2,6 +2,7 @@ package eu.midnightdust.motschen.decorative.init; import eu.midnightdust.motschen.decorative.DecorativeMain; import eu.midnightdust.motschen.decorative.block.blockentity.*; +import net.minecraft.block.Blocks; import net.minecraft.block.entity.BlockEntityType; import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; @@ -11,22 +12,18 @@ 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 BlockEntityType ChoppingLogBlockEntity; + public static BlockEntityType WallClockBlockEntity; + public static BlockEntityType DigitalClockBlockEntity; + public static BlockEntityType SmokeDetectorBlockEntity; public static void init() { 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)); + ChoppingLogBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"chopping_log_blockentity"), BlockEntityType.Builder.create(ChoppingLogBlockEntity::new, LogsWithAxes.OakChoppingLog, LogsWithAxes.BirchChoppingLog, LogsWithAxes.AcaciaChoppingLog, LogsWithAxes.DarkOakChoppingLog, LogsWithAxes.JungleChoppingLog, LogsWithAxes.SpruceChoppingLog).build(null)); + WallClockBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"wall_clock_blockentity"), BlockEntityType.Builder.create(WallClockBlockEntity::new, DecorativeMain.WallClock).build(null)); + DigitalClockBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"digital_clock_blockentity"), BlockEntityType.Builder.create(DigitalClockBlockEntity::new, Clocks.RedDigitalClock, Clocks.BlackDigitalClock, Clocks.BlueDigitalClock, Clocks.BrownDigitalClock, Clocks.CyanDigitalClock, Clocks.GrayDigitalClock, Clocks.GreenDigitalClock, Clocks.LightBlueDigitalClock, Clocks.LightGrayDigitalClock, Clocks.LimeDigitalClock, Clocks.MagentaDigitalClock, Clocks.OrangeDigitalClock, Clocks.PinkDigitalClock, Clocks.PurpleDigitalClock, Clocks.WhiteDigitalClock, Clocks.YellowDigitalClock).build(null)); + SmokeDetectorBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"smoke_detector_blockentity"), BlockEntityType.Builder.create(SmokeDetectorBlockEntity::new, DecorativeMain.SmokeDetector).build(null)); } } diff --git a/src/main/java/eu/midnightdust/motschen/decorative/init/Clocks.java b/src/main/java/eu/midnightdust/motschen/decorative/init/Clocks.java new file mode 100644 index 0000000..67e3cf3 --- /dev/null +++ b/src/main/java/eu/midnightdust/motschen/decorative/init/Clocks.java @@ -0,0 +1,63 @@ +package eu.midnightdust.motschen.decorative.init; + +import eu.midnightdust.motschen.decorative.DecorativeMain; +import eu.midnightdust.motschen.decorative.block.DigitalClock; +import net.minecraft.block.Block; +import net.minecraft.item.BlockItem; +import net.minecraft.item.Item; +import net.minecraft.util.Identifier; +import net.minecraft.util.registry.Registry; + +public class Clocks { + public static Block WhiteDigitalClock = new DigitalClock(); + public static Block OrangeDigitalClock = new DigitalClock(); + public static Block MagentaDigitalClock = new DigitalClock(); + public static Block LightBlueDigitalClock = new DigitalClock(); + public static Block YellowDigitalClock = new DigitalClock(); + public static Block LimeDigitalClock = new DigitalClock(); + public static Block PinkDigitalClock = new DigitalClock(); + public static Block GrayDigitalClock = new DigitalClock(); + public static Block LightGrayDigitalClock = new DigitalClock(); + public static Block CyanDigitalClock = new DigitalClock(); + public static Block PurpleDigitalClock = new DigitalClock(); + public static Block BlueDigitalClock = new DigitalClock(); + public static Block BrownDigitalClock = new DigitalClock(); + public static Block GreenDigitalClock = new DigitalClock(); + public static Block RedDigitalClock = new DigitalClock(); + public static Block BlackDigitalClock = new DigitalClock(); + + public static void init() { + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"white_digital_clock"), WhiteDigitalClock); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"white_digital_clock"), new BlockItem(WhiteDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"orange_digital_clock"), OrangeDigitalClock); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"orange_digital_clock"), new BlockItem(OrangeDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"magenta_digital_clock"), MagentaDigitalClock); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"magenta_digital_clock"), new BlockItem(MagentaDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"light_blue_digital_clock"), LightBlueDigitalClock); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"light_blue_digital_clock"), new BlockItem(LightBlueDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"yellow_digital_clock"), YellowDigitalClock); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"yellow_digital_clock"), new BlockItem(YellowDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"lime_digital_clock"), LimeDigitalClock); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"lime_digital_clock"), new BlockItem(LimeDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"pink_digital_clock"), PinkDigitalClock); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"pink_digital_clock"), new BlockItem(PinkDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"gray_digital_clock"), GrayDigitalClock); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"gray_digital_clock"), new BlockItem(GrayDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"light_gray_digital_clock"), LightGrayDigitalClock); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"light_gray_digital_clock"), new BlockItem(LightGrayDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"cyan_digital_clock"), CyanDigitalClock); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"cyan_digital_clock"), new BlockItem(CyanDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"purple_digital_clock"), PurpleDigitalClock); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"purple_digital_clock"), new BlockItem(PurpleDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"blue_digital_clock"), BlueDigitalClock); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"blue_digital_clock"), new BlockItem(BlueDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"brown_digital_clock"), BrownDigitalClock); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"brown_digital_clock"), new BlockItem(BrownDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"green_digital_clock"), GreenDigitalClock); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"green_digital_clock"), new BlockItem(GreenDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"red_digital_clock"), RedDigitalClock); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"red_digital_clock"), new BlockItem(RedDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup))); + Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"black_digital_clock"), BlackDigitalClock); + Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"black_digital_clock"), new BlockItem(BlackDigitalClock, 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 dea8fa7..ac49918 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/init/LogsWithAxes.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/init/LogsWithAxes.java @@ -9,12 +9,12 @@ import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; public class LogsWithAxes { - 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 Block OakChoppingLog = new ChoppingLog(); + public static Block SpruceChoppingLog = new ChoppingLog(); + public static Block BirchChoppingLog = new ChoppingLog(); + public static Block AcaciaChoppingLog = new ChoppingLog(); + public static Block JungleChoppingLog = new ChoppingLog(); + public static Block DarkOakChoppingLog = new ChoppingLog(); public static void init() { Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"oak_log_with_axe"), OakChoppingLog); diff --git a/src/main/java/eu/midnightdust/motschen/decorative/item/BathTireItem.java b/src/main/java/eu/midnightdust/motschen/decorative/item/BathTireItem.java index 16e8498..10eac34 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/item/BathTireItem.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/item/BathTireItem.java @@ -16,7 +16,7 @@ import net.minecraft.util.TypedActionResult; import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.hit.HitResult; import net.minecraft.util.math.BlockPos; -import net.minecraft.world.RayTraceContext; +import net.minecraft.world.RaycastContext; import net.minecraft.world.World; public class BathTireItem extends Item { @@ -31,7 +31,7 @@ public class BathTireItem extends Item { public TypedActionResult use(World world, PlayerEntity user, Hand hand) { ItemStack itemStack = user.getStackInHand(hand); - HitResult hitResult = rayTrace(world, user, RayTraceContext.FluidHandling.SOURCE_ONLY); + HitResult hitResult = raycast(world, user, RaycastContext.FluidHandling.SOURCE_ONLY); if (hitResult.getType() != HitResult.Type.BLOCK) { return TypedActionResult.pass(itemStack); } else if (world.isClient) { diff --git a/src/main/java/eu/midnightdust/motschen/decorative/sound/DecorativeSoundEvents.java b/src/main/java/eu/midnightdust/motschen/decorative/sound/DecorativeSoundEvents.java index dbdbbd8..b07a7a4 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/sound/DecorativeSoundEvents.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/sound/DecorativeSoundEvents.java @@ -6,6 +6,7 @@ import net.minecraft.util.registry.Registry; public class DecorativeSoundEvents { public static final SoundEvent CEILINGFAN_AMBIENT = register("decorative:ceiling_fan.ambient"); + public static final SoundEvent SMOKE_DETECTOR_BEEP = register("decorative:smoke_detector.beep"); private static SoundEvent register(String id) { return Registry.register(Registry.SOUND_EVENT, id, new SoundEvent(new Identifier(id))); diff --git a/src/main/java/eu/midnightdust/motschen/decorative/world/OreFeatures.java b/src/main/java/eu/midnightdust/motschen/decorative/world/OreFeatures.java index a1fac42..bd528fa 100644 --- a/src/main/java/eu/midnightdust/motschen/decorative/world/OreFeatures.java +++ b/src/main/java/eu/midnightdust/motschen/decorative/world/OreFeatures.java @@ -9,7 +9,7 @@ import net.minecraft.world.gen.feature.Feature; import net.minecraft.world.gen.feature.OreFeatureConfig; public class OreFeatures { - public static final ConfiguredFeature ROCKY_ASPHALT_FEATURE = Feature.ORE.configure(new OreFeatureConfig(OreFeatureConfig.Rules.BASE_STONE_OVERWORLD, DecorativeMain.RockyAsphalt.getDefaultState(), 7)).method_30377(200).spreadHorizontally().repeat(20); + public static final ConfiguredFeature ROCKY_ASPHALT_FEATURE = Feature.ORE.configure(new OreFeatureConfig(OreFeatureConfig.Rules.BASE_STONE_OVERWORLD, DecorativeMain.RockyAsphalt.getDefaultState(), 7)).applyChance(200).spreadHorizontally().repeat(20); 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/black_digital_clock.json b/src/main/resources/assets/decorative/blockstates/black_digital_clock.json new file mode 100644 index 0000000..1c5a1c4 --- /dev/null +++ b/src/main/resources/assets/decorative/blockstates/black_digital_clock.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "decorative:block/black_digital_clock", "y": 180 }, + "facing=west": { "model": "decorative:block/black_digital_clock", "y": 270 }, + "facing=north": { "model": "decorative:block/black_digital_clock" }, + "facing=east": { "model": "decorative:block/black_digital_clock", "y": 90 } + } +} diff --git a/src/main/resources/assets/decorative/blockstates/blue_digital_clock.json b/src/main/resources/assets/decorative/blockstates/blue_digital_clock.json new file mode 100644 index 0000000..c8fabda --- /dev/null +++ b/src/main/resources/assets/decorative/blockstates/blue_digital_clock.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "decorative:block/blue_digital_clock", "y": 180 }, + "facing=west": { "model": "decorative:block/blue_digital_clock", "y": 270 }, + "facing=north": { "model": "decorative:block/blue_digital_clock" }, + "facing=east": { "model": "decorative:block/blue_digital_clock", "y": 90 } + } +} diff --git a/src/main/resources/assets/decorative/blockstates/brown_digital_clock.json b/src/main/resources/assets/decorative/blockstates/brown_digital_clock.json new file mode 100644 index 0000000..cd559df --- /dev/null +++ b/src/main/resources/assets/decorative/blockstates/brown_digital_clock.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "decorative:block/brown_digital_clock", "y": 180 }, + "facing=west": { "model": "decorative:block/brown_digital_clock", "y": 270 }, + "facing=north": { "model": "decorative:block/brown_digital_clock" }, + "facing=east": { "model": "decorative:block/brown_digital_clock", "y": 90 } + } +} diff --git a/src/main/resources/assets/decorative/blockstates/cyan_digital_clock.json b/src/main/resources/assets/decorative/blockstates/cyan_digital_clock.json new file mode 100644 index 0000000..33dd05e --- /dev/null +++ b/src/main/resources/assets/decorative/blockstates/cyan_digital_clock.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "decorative:block/cyan_digital_clock", "y": 180 }, + "facing=west": { "model": "decorative:block/cyan_digital_clock", "y": 270 }, + "facing=north": { "model": "decorative:block/cyan_digital_clock" }, + "facing=east": { "model": "decorative:block/cyan_digital_clock", "y": 90 } + } +} diff --git a/src/main/resources/assets/decorative/blockstates/gray_digital_clock.json b/src/main/resources/assets/decorative/blockstates/gray_digital_clock.json new file mode 100644 index 0000000..239daef --- /dev/null +++ b/src/main/resources/assets/decorative/blockstates/gray_digital_clock.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "decorative:block/gray_digital_clock", "y": 180 }, + "facing=west": { "model": "decorative:block/gray_digital_clock", "y": 270 }, + "facing=north": { "model": "decorative:block/gray_digital_clock" }, + "facing=east": { "model": "decorative:block/gray_digital_clock", "y": 90 } + } +} diff --git a/src/main/resources/assets/decorative/blockstates/green_digital_clock.json b/src/main/resources/assets/decorative/blockstates/green_digital_clock.json new file mode 100644 index 0000000..f7094a5 --- /dev/null +++ b/src/main/resources/assets/decorative/blockstates/green_digital_clock.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "decorative:block/green_digital_clock", "y": 180 }, + "facing=west": { "model": "decorative:block/green_digital_clock", "y": 270 }, + "facing=north": { "model": "decorative:block/green_digital_clock" }, + "facing=east": { "model": "decorative:block/green_digital_clock", "y": 90 } + } +} diff --git a/src/main/resources/assets/decorative/blockstates/light_blue_digital_clock.json b/src/main/resources/assets/decorative/blockstates/light_blue_digital_clock.json new file mode 100644 index 0000000..6e1f731 --- /dev/null +++ b/src/main/resources/assets/decorative/blockstates/light_blue_digital_clock.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "decorative:block/light_blue_digital_clock", "y": 180 }, + "facing=west": { "model": "decorative:block/light_blue_digital_clock", "y": 270 }, + "facing=north": { "model": "decorative:block/light_blue_digital_clock" }, + "facing=east": { "model": "decorative:block/light_blue_digital_clock", "y": 90 } + } +} diff --git a/src/main/resources/assets/decorative/blockstates/light_gray_digital_clock.json b/src/main/resources/assets/decorative/blockstates/light_gray_digital_clock.json new file mode 100644 index 0000000..4a3321a --- /dev/null +++ b/src/main/resources/assets/decorative/blockstates/light_gray_digital_clock.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "decorative:block/light_gray_digital_clock", "y": 180 }, + "facing=west": { "model": "decorative:block/light_gray_digital_clock", "y": 270 }, + "facing=north": { "model": "decorative:block/light_gray_digital_clock" }, + "facing=east": { "model": "decorative:block/light_gray_digital_clock", "y": 90 } + } +} diff --git a/src/main/resources/assets/decorative/blockstates/lime_digital_clock.json b/src/main/resources/assets/decorative/blockstates/lime_digital_clock.json new file mode 100644 index 0000000..62bd9a3 --- /dev/null +++ b/src/main/resources/assets/decorative/blockstates/lime_digital_clock.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "decorative:block/lime_digital_clock", "y": 180 }, + "facing=west": { "model": "decorative:block/lime_digital_clock", "y": 270 }, + "facing=north": { "model": "decorative:block/lime_digital_clock" }, + "facing=east": { "model": "decorative:block/lime_digital_clock", "y": 90 } + } +} diff --git a/src/main/resources/assets/decorative/blockstates/magenta_digital_clock.json b/src/main/resources/assets/decorative/blockstates/magenta_digital_clock.json new file mode 100644 index 0000000..7a600a5 --- /dev/null +++ b/src/main/resources/assets/decorative/blockstates/magenta_digital_clock.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "decorative:block/magenta_digital_clock", "y": 180 }, + "facing=west": { "model": "decorative:block/magenta_digital_clock", "y": 270 }, + "facing=north": { "model": "decorative:block/magenta_digital_clock" }, + "facing=east": { "model": "decorative:block/magenta_digital_clock", "y": 90 } + } +} diff --git a/src/main/resources/assets/decorative/blockstates/orange_digital_clock.json b/src/main/resources/assets/decorative/blockstates/orange_digital_clock.json new file mode 100644 index 0000000..ae6eee0 --- /dev/null +++ b/src/main/resources/assets/decorative/blockstates/orange_digital_clock.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "decorative:block/orange_digital_clock", "y": 180 }, + "facing=west": { "model": "decorative:block/orange_digital_clock", "y": 270 }, + "facing=north": { "model": "decorative:block/orange_digital_clock" }, + "facing=east": { "model": "decorative:block/orange_digital_clock", "y": 90 } + } +} diff --git a/src/main/resources/assets/decorative/blockstates/pink_digital_clock.json b/src/main/resources/assets/decorative/blockstates/pink_digital_clock.json new file mode 100644 index 0000000..9c01b7c --- /dev/null +++ b/src/main/resources/assets/decorative/blockstates/pink_digital_clock.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "decorative:block/pink_digital_clock", "y": 180 }, + "facing=west": { "model": "decorative:block/pink_digital_clock", "y": 270 }, + "facing=north": { "model": "decorative:block/pink_digital_clock" }, + "facing=east": { "model": "decorative:block/pink_digital_clock", "y": 90 } + } +} diff --git a/src/main/resources/assets/decorative/blockstates/purple_digital_clock.json b/src/main/resources/assets/decorative/blockstates/purple_digital_clock.json new file mode 100644 index 0000000..df40d38 --- /dev/null +++ b/src/main/resources/assets/decorative/blockstates/purple_digital_clock.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "decorative:block/purple_digital_clock", "y": 180 }, + "facing=west": { "model": "decorative:block/purple_digital_clock", "y": 270 }, + "facing=north": { "model": "decorative:block/purple_digital_clock" }, + "facing=east": { "model": "decorative:block/purple_digital_clock", "y": 90 } + } +} diff --git a/src/main/resources/assets/decorative/blockstates/red_digital_clock.json b/src/main/resources/assets/decorative/blockstates/red_digital_clock.json new file mode 100644 index 0000000..b6a3e55 --- /dev/null +++ b/src/main/resources/assets/decorative/blockstates/red_digital_clock.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "decorative:block/red_digital_clock", "y": 180 }, + "facing=west": { "model": "decorative:block/red_digital_clock", "y": 270 }, + "facing=north": { "model": "decorative:block/red_digital_clock" }, + "facing=east": { "model": "decorative:block/red_digital_clock", "y": 90 } + } +} diff --git a/src/main/resources/assets/decorative/blockstates/smoke_detector.json b/src/main/resources/assets/decorative/blockstates/smoke_detector.json new file mode 100644 index 0000000..f2fdd8d --- /dev/null +++ b/src/main/resources/assets/decorative/blockstates/smoke_detector.json @@ -0,0 +1,6 @@ +{ + "variants": { + "active=true": { "model": "decorative:block/smoke_detector_on" }, + "active=false": { "model": "decorative:block/smoke_detector_off" } + } +} diff --git a/src/main/resources/assets/decorative/blockstates/wall_clock.json b/src/main/resources/assets/decorative/blockstates/wall_clock.json new file mode 100644 index 0000000..8ac145c --- /dev/null +++ b/src/main/resources/assets/decorative/blockstates/wall_clock.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "decorative:block/wall_clock", "y": 180 }, + "facing=west": { "model": "decorative:block/wall_clock", "y": 270 }, + "facing=north": { "model": "decorative:block/wall_clock" }, + "facing=east": { "model": "decorative:block/wall_clock", "y": 90 } + } +} diff --git a/src/main/resources/assets/decorative/blockstates/white_digital_clock.json b/src/main/resources/assets/decorative/blockstates/white_digital_clock.json new file mode 100644 index 0000000..8d30cc1 --- /dev/null +++ b/src/main/resources/assets/decorative/blockstates/white_digital_clock.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "decorative:block/white_digital_clock", "y": 180 }, + "facing=west": { "model": "decorative:block/white_digital_clock", "y": 270 }, + "facing=north": { "model": "decorative:block/white_digital_clock" }, + "facing=east": { "model": "decorative:block/white_digital_clock", "y": 90 } + } +} diff --git a/src/main/resources/assets/decorative/blockstates/yellow_digital_clock.json b/src/main/resources/assets/decorative/blockstates/yellow_digital_clock.json new file mode 100644 index 0000000..78600c9 --- /dev/null +++ b/src/main/resources/assets/decorative/blockstates/yellow_digital_clock.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "decorative:block/yellow_digital_clock", "y": 180 }, + "facing=west": { "model": "decorative:block/yellow_digital_clock", "y": 270 }, + "facing=north": { "model": "decorative:block/yellow_digital_clock" }, + "facing=east": { "model": "decorative:block/yellow_digital_clock", "y": 90 } + } +} diff --git a/src/main/resources/assets/decorative/materialmaps/block/black_double_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/black_double_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/black_double_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/black_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/black_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/black_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/blue_double_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/blue_double_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/blue_double_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/blue_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/blue_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/blue_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/brown_double_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/brown_double_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/brown_double_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/brown_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/brown_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/brown_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/christmas_lights.json b/src/main/resources/assets/decorative/materialmaps/block/christmas_lights.json new file mode 100644 index 0000000..26d17e2 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/christmas_lights.json @@ -0,0 +1,14 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "decorative:block/red_lamp", + "material": "canvas:emissive_no_diffuse" + }, + { + "sprite": "decorative:block/green_lamp", + "material": "canvas:emissive_no_diffuse" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/cyan_double_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/cyan_double_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/cyan_double_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/cyan_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/cyan_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/cyan_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/gray_double_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/gray_double_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/gray_double_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/gray_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/gray_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/gray_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/green_double_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/green_double_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/green_double_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/green_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/green_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/green_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/light_blue_double_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/light_blue_double_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/light_blue_double_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/light_blue_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/light_blue_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/light_blue_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/light_gray_double_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/light_gray_double_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/light_gray_double_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/light_gray_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/light_gray_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/light_gray_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/lime_double_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/lime_double_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/lime_double_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/lime_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/lime_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/lime_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/magenta_double_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/magenta_double_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/magenta_double_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/magenta_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/magenta_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/magenta_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/old_television.json b/src/main/resources/assets/decorative/materialmaps/block/old_television.json new file mode 100644 index 0000000..3eebe20 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/old_television.json @@ -0,0 +1,26 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "decorative:tv/nyancat", + "material": "canvas:emissive_no_diffuse" + }, + { + "sprite": "decorative:tv/creeper", + "material": "canvas:emissive_no_diffuse" + }, + { + "sprite": "decorative:tv/woodys", + "material": "canvas:emissive_no_diffuse" + }, + { + "sprite": "decorative:tv/tater", + "material": "canvas:emissive_no_diffuse" + }, + { + "sprite": "minecraft:block/lime_terracotta", + "material": "canvas:emissive_no_diffuse" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/orange_double_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/orange_double_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/orange_double_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/orange_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/orange_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/orange_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/pink_double_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/pink_double_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/pink_double_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/pink_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/pink_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/pink_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/purple_double_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/purple_double_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/purple_double_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/purple_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/purple_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/purple_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/red_double_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/red_double_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/red_double_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/red_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/red_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/red_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/television.json b/src/main/resources/assets/decorative/materialmaps/block/television.json new file mode 100644 index 0000000..ebc2eff --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/television.json @@ -0,0 +1,22 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "decorative:tv/nyancat", + "material": "canvas:emissive_no_diffuse" + }, + { + "sprite": "decorative:tv/creeper", + "material": "canvas:emissive_no_diffuse" + }, + { + "sprite": "decorative:tv/woodys", + "material": "canvas:emissive_no_diffuse" + }, + { + "sprite": "decorative:tv/tater", + "material": "canvas:emissive_no_diffuse" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/white_double_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/white_double_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/white_double_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/white_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/white_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/white_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/yellow_double_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/yellow_double_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/yellow_double_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block/yellow_lamp.json b/src/main/resources/assets/decorative/materialmaps/block/yellow_lamp.json new file mode 100644 index 0000000..7cec135 --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block/yellow_lamp.json @@ -0,0 +1,10 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "minecraft:block/redstone_lamp_on", + "material": "canvas:warm_glow" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/materialmaps/block_entity/digital_clock_blockentity.json b/src/main/resources/assets/decorative/materialmaps/block_entity/digital_clock_blockentity.json new file mode 100644 index 0000000..81b4faf --- /dev/null +++ b/src/main/resources/assets/decorative/materialmaps/block_entity/digital_clock_blockentity.json @@ -0,0 +1,12 @@ +{ + "map": [ + { + "predicate": { + "materialPredicate": { + "renderLayerName": "text" + } + }, + "material": "canvas:emissive_transform" + } + ] +} diff --git a/src/main/resources/assets/decorative/models/block/black_digital_clock.json b/src/main/resources/assets/decorative/models/block/black_digital_clock.json new file mode 100644 index 0000000..0349d02 --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/black_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/black_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/blue_digital_clock.json b/src/main/resources/assets/decorative/models/block/blue_digital_clock.json new file mode 100644 index 0000000..6ae5555 --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/blue_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/blue_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/brown_digital_clock.json b/src/main/resources/assets/decorative/models/block/brown_digital_clock.json new file mode 100644 index 0000000..c214a7e --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/brown_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/brown_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/cyan_digital_clock.json b/src/main/resources/assets/decorative/models/block/cyan_digital_clock.json new file mode 100644 index 0000000..ae779fb --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/cyan_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/cyan_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/digital_clock.json b/src/main/resources/assets/decorative/models/block/digital_clock.json new file mode 100644 index 0000000..0e8b081 --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/digital_clock.json @@ -0,0 +1,126 @@ +{ + "credit": "made by Motschen", + "parent": "block/block", + "ambientocclusion": false, + "textures": { + "0": "block/black_concrete", + "1": "block/gray_concrete", + "2": "block/lime_concrete", + "particle": "block/black_concrete" + }, + "elements": [ + { + "from": [2, 0, 5], + "to": [14, 1, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 18]}, + "faces": { + "north": {"uv": [0, 0, 12, 1], "texture": "#2"}, + "east": {"uv": [0, 0, 7, 1], "texture": "#2"}, + "south": {"uv": [0, 0, 12, 1], "texture": "#2"}, + "west": {"uv": [0, 0, 7, 1], "texture": "#2"}, + "up": {"uv": [0, 0, 12, 7], "texture": "#2"}, + "down": {"uv": [0, 0, 12, 7], "texture": "#2"} + } + }, + { + "from": [2, 7, 5], + "to": [14, 8, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 18]}, + "faces": { + "north": {"uv": [0, 0, 12, 1], "texture": "#2"}, + "east": {"uv": [0, 0, 7, 1], "texture": "#2"}, + "south": {"uv": [0, 0, 12, 1], "texture": "#2"}, + "west": {"uv": [0, 0, 7, 1], "texture": "#2"}, + "up": {"uv": [0, 0, 12, 7], "texture": "#2"}, + "down": {"uv": [0, 0, 12, 7], "texture": "#2"} + } + }, + { + "from": [1, 1, 5], + "to": [2, 7, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 9, 19]}, + "faces": { + "north": {"uv": [0, 0, 1, 6], "texture": "#2"}, + "east": {"uv": [0, 0, 7, 6], "texture": "#2"}, + "south": {"uv": [0, 0, 1, 6], "texture": "#2"}, + "west": {"uv": [0, 0, 7, 6], "texture": "#2"}, + "up": {"uv": [0, 0, 1, 7], "texture": "#2"}, + "down": {"uv": [0, 0, 1, 7], "texture": "#2"} + } + }, + { + "from": [14, 1, 5], + "to": [15, 7, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [22, 9, 19]}, + "faces": { + "north": {"uv": [0, 0, 1, 6], "texture": "#2"}, + "east": {"uv": [0, 0, 7, 6], "texture": "#2"}, + "south": {"uv": [0, 0, 1, 6], "texture": "#2"}, + "west": {"uv": [0, 0, 7, 6], "texture": "#2"}, + "up": {"uv": [0, 0, 1, 7], "texture": "#2"}, + "down": {"uv": [0, 0, 1, 7], "texture": "#2"} + } + }, + { + "from": [-5.75, 3.2, 5.01], + "to": [-4.75, 4.6, 11.99], + "rotation": {"angle": 45, "axis": "z", "origin": [2, 11, 13]}, + "faces": { + "north": {"uv": [0, 0, 1, 1.4], "texture": "#2"}, + "east": {"uv": [0, 0, 6.98, 1.4], "texture": "#2"}, + "south": {"uv": [0, 0, 1, 1.4], "texture": "#2"}, + "west": {"uv": [0, 0, 6.98, 1.4], "texture": "#2"}, + "up": {"uv": [0, 0, 1, 6.98], "texture": "#2"}, + "down": {"uv": [0, 0, 1, 6.98], "texture": "#2"} + } + }, + { + "from": [4.2, 13.75, 5.01], + "to": [5.6, 14.75, 11.99], + "rotation": {"angle": 45, "axis": "z", "origin": [12, 7, 13]}, + "faces": { + "north": {"uv": [0, 0, 1, 1.4], "rotation": 270, "texture": "#2"}, + "east": {"uv": [0, 0, 1, 6.98], "rotation": 90, "texture": "#2"}, + "south": {"uv": [0, 0, 1, 1.4], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 0, 1, 6.98], "rotation": 90, "texture": "#2"}, + "up": {"uv": [0, 0, 6.98, 1.4], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 0, 6.98, 1.4], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [6.2, 3.75, 5.01], + "to": [7.6, 4.75, 11.99], + "rotation": {"angle": -45, "axis": "z", "origin": [14, -3, 13]}, + "faces": { + "north": {"uv": [0, 0, 1, 1.4], "rotation": 270, "texture": "#2"}, + "east": {"uv": [0, 0, 1, 6.98], "rotation": 90, "texture": "#2"}, + "south": {"uv": [0, 0, 1, 1.4], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 0, 1, 6.98], "rotation": 90, "texture": "#2"}, + "up": {"uv": [0, 0, 6.98, 1.4], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 0, 6.98, 1.4], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [10.75, 7.4, 5.01], + "to": [11.75, 8.8, 11.99], + "rotation": {"angle": -45, "axis": "z", "origin": [4, 1, 13]}, + "faces": { + "north": {"uv": [0, 0, 1, 1.4], "rotation": 180, "texture": "#2"}, + "east": {"uv": [0, 0, 6.98, 1.4], "rotation": 180, "texture": "#2"}, + "south": {"uv": [0, 0, 1, 1.4], "rotation": 180, "texture": "#2"}, + "west": {"uv": [0, 0, 6.98, 1.4], "rotation": 180, "texture": "#2"}, + "up": {"uv": [0, 0, 1, 6.98], "rotation": 180, "texture": "#2"}, + "down": {"uv": [0, 0, 1, 6.98], "rotation": 180, "texture": "#2"} + } + }, + { + "from": [2, 1, 6], + "to": [14, 7, 11.5], + "rotation": {"angle": 0, "axis": "y", "origin": [10, 9, 14]}, + "faces": { + "north": {"uv": [0, 0, 12, 6], "texture": "#0"}, + "south": {"uv": [0, 0, 12, 6], "texture": "#1"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/gray_digital_clock.json b/src/main/resources/assets/decorative/models/block/gray_digital_clock.json new file mode 100644 index 0000000..676e4f8 --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/gray_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/gray_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/green_digital_clock.json b/src/main/resources/assets/decorative/models/block/green_digital_clock.json new file mode 100644 index 0000000..c3d1b20 --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/green_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/green_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/light_blue_digital_clock.json b/src/main/resources/assets/decorative/models/block/light_blue_digital_clock.json new file mode 100644 index 0000000..4e5ca74 --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/light_blue_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/light_blue_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/light_gray_digital_clock.json b/src/main/resources/assets/decorative/models/block/light_gray_digital_clock.json new file mode 100644 index 0000000..9f1a943 --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/light_gray_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/light_gray_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/lime_digital_clock.json b/src/main/resources/assets/decorative/models/block/lime_digital_clock.json new file mode 100644 index 0000000..f4d382e --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/lime_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/lime_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/magenta_digital_clock.json b/src/main/resources/assets/decorative/models/block/magenta_digital_clock.json new file mode 100644 index 0000000..09564a9 --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/magenta_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/magenta_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/orange_digital_clock.json b/src/main/resources/assets/decorative/models/block/orange_digital_clock.json new file mode 100644 index 0000000..232f5b6 --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/orange_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/orange_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/pink_digital_clock.json b/src/main/resources/assets/decorative/models/block/pink_digital_clock.json new file mode 100644 index 0000000..d2375b5 --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/pink_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/pink_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/purple_digital_clock.json b/src/main/resources/assets/decorative/models/block/purple_digital_clock.json new file mode 100644 index 0000000..2f96183 --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/purple_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/purple_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/red_digital_clock.json b/src/main/resources/assets/decorative/models/block/red_digital_clock.json new file mode 100644 index 0000000..ee78d05 --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/red_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/red_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/smoke_detector_off.json b/src/main/resources/assets/decorative/models/block/smoke_detector_off.json new file mode 100644 index 0000000..b05c4c4 --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/smoke_detector_off.json @@ -0,0 +1,111 @@ +{ + "credit": "made by Motschen", + "parent": "block/block", + "ambientocclusion": false, + "textures": { + "0": "block/white_concrete", + "2": "block/gray_concrete", + "3": "decorative:block/alarm_light_off", + "particle": "block/white_concrete" + }, + "elements": [ + { + "from": [5, 14, 4], + "to": [11, 16, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 23, 14]}, + "faces": { + "north": {"uv": [0, 0, 6, 2], "texture": "#0"}, + "east": {"uv": [0, 0, 8, 2], "texture": "#0"}, + "south": {"uv": [0, 0, 6, 2], "texture": "#0"}, + "west": {"uv": [0, 0, 8, 2], "texture": "#0"}, + "up": {"uv": [0, 0, 6, 8], "texture": "#0"}, + "down": {"uv": [0, 0, 6, 8], "texture": "#0"} + } + }, + { + "from": [4, 14.001, 5], + "to": [12, 16.001, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 23, 14]}, + "faces": { + "north": {"uv": [0, 0, 8, 2], "texture": "#0"}, + "east": {"uv": [0, 0, 6, 2], "texture": "#0"}, + "south": {"uv": [0, 0, 8, 2], "texture": "#0"}, + "west": {"uv": [0, 0, 6, 2], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 6], "texture": "#0"}, + "down": {"uv": [0, 0, 8, 6], "texture": "#0"} + } + }, + { + "from": [5.5, 13.75, 5.5], + "to": [6.5, 14.75, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 21, 13]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#3"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#3"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#3"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#3"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#3"} + } + }, + { + "from": [7, 13.9, 9], + "to": [11, 14.9, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [16, 21, 17]}, + "faces": { + "north": {"uv": [0, 0, 4, 1], "texture": "#2"}, + "east": {"uv": [0, 0, 0.25, 1], "texture": "#2"}, + "south": {"uv": [0, 0, 4, 1], "texture": "#2"}, + "west": {"uv": [0, 0, 0.25, 1], "texture": "#2"}, + "down": {"uv": [0, 0, 4, 0.25], "texture": "#2"} + } + }, + { + "from": [7.5, 13.9, 8.2], + "to": [10.5, 14.9, 8.45], + "rotation": {"angle": 0, "axis": "y", "origin": [16, 21, 16]}, + "faces": { + "north": {"uv": [0, 0, 3, 1], "texture": "#2"}, + "east": {"uv": [0, 0, 0.25, 1], "texture": "#2"}, + "south": {"uv": [0, 0, 3, 1], "texture": "#2"}, + "west": {"uv": [0, 0, 0.25, 1], "texture": "#2"}, + "down": {"uv": [0, 0, 3, 0.25], "texture": "#2"} + } + }, + { + "from": [7.5, 13.9, 9.8], + "to": [10.5, 14.9, 10.05], + "rotation": {"angle": 0, "axis": "y", "origin": [16, 21, 17]}, + "faces": { + "north": {"uv": [0, 0, 3, 1], "texture": "#2"}, + "east": {"uv": [0, 0, 0.25, 1], "texture": "#2"}, + "south": {"uv": [0, 0, 3, 1], "texture": "#2"}, + "west": {"uv": [0, 0, 0.25, 1], "texture": "#2"}, + "down": {"uv": [0, 0, 3, 0.25], "texture": "#2"} + } + }, + { + "from": [8, 13.9, 10.6], + "to": [10, 14.9, 10.85], + "rotation": {"angle": 0, "axis": "y", "origin": [16, 21, 18]}, + "faces": { + "north": {"uv": [0, 0, 2, 1], "texture": "#2"}, + "east": {"uv": [0, 0, 0.25, 1], "texture": "#2"}, + "south": {"uv": [0, 0, 2, 1], "texture": "#2"}, + "west": {"uv": [0, 0, 0.25, 1], "texture": "#2"}, + "down": {"uv": [0, 0, 2, 0.25], "texture": "#2"} + } + }, + { + "from": [8, 13.9, 7.4], + "to": [10, 14.9, 7.65], + "rotation": {"angle": 0, "axis": "y", "origin": [16, 21, 15]}, + "faces": { + "north": {"uv": [0, 0, 2, 1], "texture": "#2"}, + "east": {"uv": [0, 0, 0.25, 1], "texture": "#2"}, + "south": {"uv": [0, 0, 2, 1], "texture": "#2"}, + "west": {"uv": [0, 0, 0.25, 1], "texture": "#2"}, + "down": {"uv": [0, 0, 2, 0.25], "texture": "#2"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/smoke_detector_on.json b/src/main/resources/assets/decorative/models/block/smoke_detector_on.json new file mode 100644 index 0000000..a221481 --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/smoke_detector_on.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/smoke_detector_off", + "textures": { + "3": "decorative:block/alarm_light_on" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/wall_clock.json b/src/main/resources/assets/decorative/models/block/wall_clock.json new file mode 100644 index 0000000..fe74301 --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/wall_clock.json @@ -0,0 +1,330 @@ +{ + "credit": "made by Motschen", + "parent": "block/block", + "textures": { + "0": "block/cyan_terracotta", + "1": "block/quartz_block_bottom", + "2": "block/coal_block", + "3": "decorative:block/clock", + "particle": "block/quartz_block_bottom" + }, + "elements": [ + { + "from": [4, 0, 15], + "to": [12, 1, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [19, 8, 23]}, + "faces": { + "north": {"uv": [0, 0, 8, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 8, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 8, 1], "texture": "#0"} + } + }, + { + "from": [4.6, -3.05, 15], + "to": [6.6, -2.05, 16], + "rotation": {"angle": -22.5, "axis": "z", "origin": [13, 5, 23]}, + "faces": { + "north": {"uv": [0, 0, 2, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 2, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 2, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 1], "texture": "#0"} + } + }, + { + "from": [4.2, -6.53, 15], + "to": [6.2, -5.53, 16], + "rotation": {"angle": -45, "axis": "z", "origin": [13, 2, 23]}, + "faces": { + "north": {"uv": [0, 0, 2, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 2, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 2, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 1], "texture": "#0"} + } + }, + { + "from": [2.75, 5.85, 15], + "to": [3.75, 7.85, 16], + "rotation": {"angle": 22.5, "axis": "z", "origin": [11, -1, 23]}, + "faces": { + "north": {"uv": [0, 0, 2, 1], "rotation": 270, "texture": "#0"}, + "east": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#0"}, + "west": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#0"} + } + }, + { + "from": [4, 15, 15], + "to": [12, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [19, 23, 23]}, + "faces": { + "north": {"uv": [0, 0, 8, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 8, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 8, 1], "texture": "#0"} + } + }, + { + "from": [0, 4, 15], + "to": [1, 12, 16], + "rotation": {"angle": 0, "axis": "z", "origin": [-7, 19, 23]}, + "faces": { + "north": {"uv": [0, 0, 8, 1], "rotation": 90, "texture": "#0"}, + "east": {"uv": [0, 0, 8, 1], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 8, 1], "rotation": 270, "texture": "#0"}, + "west": {"uv": [0, 0, 8, 1], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [5.85, 12.25, 15], + "to": [7.85, 13.25, 16], + "rotation": {"angle": 22.5, "axis": "z", "origin": [-1, 5, 23]}, + "faces": { + "north": {"uv": [0, 0, 2, 1], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "south": {"uv": [0, 0, 2, 1], "rotation": 180, "texture": "#0"}, + "west": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "up": {"uv": [0, 0, 2, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 2, 1], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [-6.53, 9.8, 15], + "to": [-5.53, 11.8, 16], + "rotation": {"angle": -45, "axis": "z", "origin": [2, 3, 23]}, + "faces": { + "north": {"uv": [0, 0, 2, 1], "rotation": 270, "texture": "#0"}, + "east": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#0"}, + "west": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#0"} + } + }, + { + "from": [-3.05, 9.4, 15], + "to": [-2.05, 11.4, 16], + "rotation": {"angle": -22.5, "axis": "z", "origin": [5, 3, 23]}, + "faces": { + "north": {"uv": [0, 0, 2, 1], "rotation": 270, "texture": "#0"}, + "east": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#0"}, + "west": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "rotation": 90, "texture": "#0"} + } + }, + { + "from": [15, 4, 15], + "to": [16, 12, 16], + "rotation": {"angle": 0, "axis": "z", "origin": [8, 19, 23]}, + "faces": { + "north": {"uv": [0, 0, 8, 1], "rotation": 90, "texture": "#0"}, + "east": {"uv": [0, 0, 8, 1], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 8, 1], "rotation": 270, "texture": "#0"}, + "west": {"uv": [0, 0, 8, 1], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [9.4, 18.05, 15], + "to": [11.4, 19.05, 16], + "rotation": {"angle": -22.5, "axis": "z", "origin": [3, 11, 23]}, + "faces": { + "north": {"uv": [0, 0, 2, 1], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "south": {"uv": [0, 0, 2, 1], "rotation": 180, "texture": "#0"}, + "west": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "up": {"uv": [0, 0, 2, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 2, 1], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [9.8, 21.53, 15], + "to": [11.8, 22.53, 16], + "rotation": {"angle": -45, "axis": "z", "origin": [3, 14, 23]}, + "faces": { + "north": {"uv": [0, 0, 2, 1], "rotation": 180, "texture": "#0"}, + "east": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "south": {"uv": [0, 0, 2, 1], "rotation": 180, "texture": "#0"}, + "west": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}, + "up": {"uv": [0, 0, 2, 1], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 2, 1], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [12.25, 8.15, 15], + "to": [13.25, 10.15, 16], + "rotation": {"angle": 22.5, "axis": "z", "origin": [5, 17, 23]}, + "faces": { + "north": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#0"}, + "east": {"uv": [0, 0, 2, 1], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 2, 1], "rotation": 270, "texture": "#0"}, + "west": {"uv": [0, 0, 2, 1], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [18.05, 4.6, 15], + "to": [19.05, 6.6, 16], + "rotation": {"angle": -22.5, "axis": "z", "origin": [11, 13, 23]}, + "faces": { + "north": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#0"}, + "east": {"uv": [0, 0, 2, 1], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 2, 1], "rotation": 270, "texture": "#0"}, + "west": {"uv": [0, 0, 2, 1], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [21.53, 4.2, 15], + "to": [22.53, 6.2, 16], + "rotation": {"angle": -45, "axis": "z", "origin": [14, 13, 23]}, + "faces": { + "north": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#0"}, + "east": {"uv": [0, 0, 2, 1], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 0, 2, 1], "rotation": 270, "texture": "#0"}, + "west": {"uv": [0, 0, 2, 1], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [8.15, 2.75, 15], + "to": [10.15, 3.75, 16], + "rotation": {"angle": 22.5, "axis": "z", "origin": [17, 11, 23]}, + "faces": { + "north": {"uv": [0, 0, 2, 1], "texture": "#0"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "south": {"uv": [0, 0, 2, 1], "texture": "#0"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 2, 1], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 1], "texture": "#0"} + } + }, + { + "from": [2.25, 1, 15.65], + "to": [13.75, 2, 15.95], + "rotation": {"angle": 0, "axis": "y", "origin": [12, 9, 23]}, + "faces": { + "north": {"uv": [0, 13, 11.5, 14], "texture": "#1"}, + "south": {"uv": [0, 13, 11.5, 14], "texture": "#1"} + } + }, + { + "from": [2.25, 14, 15.65], + "to": [13.75, 15, 15.95], + "rotation": {"angle": 0, "axis": "y", "origin": [12, 22, 23]}, + "faces": { + "north": {"uv": [0, 0, 11.5, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 11.5, 1], "texture": "#1"} + } + }, + { + "from": [1.25, 2, 15.65], + "to": [14.75, 3, 15.95], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 10, 23]}, + "faces": { + "north": {"uv": [0, 12, 13.5, 13], "texture": "#1"}, + "south": {"uv": [0, 12, 13.5, 13], "texture": "#1"} + } + }, + { + "from": [1.25, 13, 15.65], + "to": [14.75, 14, 15.95], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 21, 23]}, + "faces": { + "north": {"uv": [0, 1, 13.5, 2], "texture": "#1"}, + "south": {"uv": [0, 1, 13.5, 2], "texture": "#1"} + } + }, + { + "from": [0.5, 3, 15.65], + "to": [15, 13, 15.95], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 11, 23]}, + "faces": { + "north": {"uv": [0, 2, 14.5, 12], "texture": "#1"}, + "south": {"uv": [0, 2, 14.5, 12], "texture": "#1"} + } + }, + { + "from": [7.5, 7.5, 15.3], + "to": [8.5, 8.5, 15.8], + "rotation": {"angle": 0, "axis": "y", "origin": [15, 16, 23]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#2"}, + "east": {"uv": [0, 0, 0.5, 1], "texture": "#2"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#2"}, + "west": {"uv": [0, 0, 0.5, 1], "texture": "#2"}, + "up": {"uv": [0, 0, 1, 0.5], "texture": "#2"}, + "down": {"uv": [0, 0, 1, 0.5], "texture": "#2"} + } + }, + { + "from": [1, 1, 15.6], + "to": [15, 15, 15.7], + "rotation": {"angle": 0, "axis": "y", "origin": [22, 9, 23]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#3"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [-4, -180, 0], + "translation": [0, 1.5, 1.75], + "scale": [0.25, 0.25, 0.25] + }, + "thirdperson_lefthand": { + "rotation": [-4, -180, 0], + "translation": [0, 1.5, 1.75], + "scale": [0.25, 0.25, 0.25] + }, + "firstperson_righthand": { + "rotation": [0, 150, 0], + "translation": [2.25, 1.75, 0], + "scale": [0.5, 0.5, 0.5] + }, + "firstperson_lefthand": { + "rotation": [0, 150, 0], + "translation": [2.25, 1.75, 0], + "scale": [0.5, 0.5, 0.5] + }, + "ground": { + "translation": [0, 0, -4], + "scale": [0.5, 0.5, 0.5] + }, + "gui": { + "rotation": [20, 157, 0], + "translation": [-2, -2, 0], + "scale": [0.75, 0.75, 0.75] + }, + "head": { + "translation": [0, 0, -14.25] + }, + "fixed": { + "translation": [0, 0, -7.75] + } + }, + "groups": [ + { + "name": "frame", + "origin": [8, 8, 8], + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + }, 16, 17, 18, 19, 20, 21, 22] +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/white_digital_clock.json b/src/main/resources/assets/decorative/models/block/white_digital_clock.json new file mode 100644 index 0000000..c673b47 --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/white_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/white_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/block/yellow_digital_clock.json b/src/main/resources/assets/decorative/models/block/yellow_digital_clock.json new file mode 100644 index 0000000..fb53cf9 --- /dev/null +++ b/src/main/resources/assets/decorative/models/block/yellow_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/yellow_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/item/black_digital_clock.json b/src/main/resources/assets/decorative/models/item/black_digital_clock.json new file mode 100644 index 0000000..0349d02 --- /dev/null +++ b/src/main/resources/assets/decorative/models/item/black_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/black_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/item/blue_digital_clock.json b/src/main/resources/assets/decorative/models/item/blue_digital_clock.json new file mode 100644 index 0000000..6ae5555 --- /dev/null +++ b/src/main/resources/assets/decorative/models/item/blue_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/blue_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/item/brown_digital_clock.json b/src/main/resources/assets/decorative/models/item/brown_digital_clock.json new file mode 100644 index 0000000..c214a7e --- /dev/null +++ b/src/main/resources/assets/decorative/models/item/brown_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/brown_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/item/cyan_digital_clock.json b/src/main/resources/assets/decorative/models/item/cyan_digital_clock.json new file mode 100644 index 0000000..ae779fb --- /dev/null +++ b/src/main/resources/assets/decorative/models/item/cyan_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/cyan_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/item/gray_digital_clock.json b/src/main/resources/assets/decorative/models/item/gray_digital_clock.json new file mode 100644 index 0000000..676e4f8 --- /dev/null +++ b/src/main/resources/assets/decorative/models/item/gray_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/gray_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/item/green_digital_clock.json b/src/main/resources/assets/decorative/models/item/green_digital_clock.json new file mode 100644 index 0000000..c3d1b20 --- /dev/null +++ b/src/main/resources/assets/decorative/models/item/green_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/green_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/item/light_blue_digital_clock.json b/src/main/resources/assets/decorative/models/item/light_blue_digital_clock.json new file mode 100644 index 0000000..4e5ca74 --- /dev/null +++ b/src/main/resources/assets/decorative/models/item/light_blue_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/light_blue_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/item/light_gray_digital_clock.json b/src/main/resources/assets/decorative/models/item/light_gray_digital_clock.json new file mode 100644 index 0000000..9f1a943 --- /dev/null +++ b/src/main/resources/assets/decorative/models/item/light_gray_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/light_gray_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/item/lime_digital_clock.json b/src/main/resources/assets/decorative/models/item/lime_digital_clock.json new file mode 100644 index 0000000..f4d382e --- /dev/null +++ b/src/main/resources/assets/decorative/models/item/lime_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/lime_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/item/magenta_digital_clock.json b/src/main/resources/assets/decorative/models/item/magenta_digital_clock.json new file mode 100644 index 0000000..09564a9 --- /dev/null +++ b/src/main/resources/assets/decorative/models/item/magenta_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/magenta_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/item/orange_digital_clock.json b/src/main/resources/assets/decorative/models/item/orange_digital_clock.json new file mode 100644 index 0000000..232f5b6 --- /dev/null +++ b/src/main/resources/assets/decorative/models/item/orange_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/orange_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/item/pink_digital_clock.json b/src/main/resources/assets/decorative/models/item/pink_digital_clock.json new file mode 100644 index 0000000..d2375b5 --- /dev/null +++ b/src/main/resources/assets/decorative/models/item/pink_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/pink_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/item/purple_digital_clock.json b/src/main/resources/assets/decorative/models/item/purple_digital_clock.json new file mode 100644 index 0000000..2f96183 --- /dev/null +++ b/src/main/resources/assets/decorative/models/item/purple_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/purple_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/item/red_digital_clock.json b/src/main/resources/assets/decorative/models/item/red_digital_clock.json new file mode 100644 index 0000000..ee78d05 --- /dev/null +++ b/src/main/resources/assets/decorative/models/item/red_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/red_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/item/smoke_detector.json b/src/main/resources/assets/decorative/models/item/smoke_detector.json new file mode 100644 index 0000000..9aa8518 --- /dev/null +++ b/src/main/resources/assets/decorative/models/item/smoke_detector.json @@ -0,0 +1,3 @@ +{ + "parent": "decorative:block/smoke_detector_off" +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/item/wall_clock.json b/src/main/resources/assets/decorative/models/item/wall_clock.json new file mode 100644 index 0000000..fc987f8 --- /dev/null +++ b/src/main/resources/assets/decorative/models/item/wall_clock.json @@ -0,0 +1,3 @@ +{ + "parent": "decorative:block/wall_clock" +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/item/white_digital_clock.json b/src/main/resources/assets/decorative/models/item/white_digital_clock.json new file mode 100644 index 0000000..c673b47 --- /dev/null +++ b/src/main/resources/assets/decorative/models/item/white_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/white_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/models/item/yellow_digital_clock.json b/src/main/resources/assets/decorative/models/item/yellow_digital_clock.json new file mode 100644 index 0000000..fb53cf9 --- /dev/null +++ b/src/main/resources/assets/decorative/models/item/yellow_digital_clock.json @@ -0,0 +1,6 @@ +{ + "parent": "decorative:block/digital_clock", + "textures": { + "2": "block/yellow_concrete" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/sounds.json b/src/main/resources/assets/decorative/sounds.json index 888e4f7..9bf9a5c 100644 --- a/src/main/resources/assets/decorative/sounds.json +++ b/src/main/resources/assets/decorative/sounds.json @@ -1,10 +1,18 @@ { -"ceiling_fan.ambient": { + "ceiling_fan.ambient": { "sounds": [ { "name": "decorative:block/ceiling_fan_ambient", "stream": false } ] + }, + "smoke_detector.beep": { + "sounds": [ + { + "name": "decorative:block/smoke_detector_beep", + "stream": false + } + ] } } \ No newline at end of file diff --git a/src/main/resources/assets/decorative/sounds/block/smoke_detector_beep.ogg b/src/main/resources/assets/decorative/sounds/block/smoke_detector_beep.ogg new file mode 100644 index 0000000..ab825ed Binary files /dev/null and b/src/main/resources/assets/decorative/sounds/block/smoke_detector_beep.ogg differ diff --git a/src/main/resources/assets/decorative/textures/block/alarm_light_off.png b/src/main/resources/assets/decorative/textures/block/alarm_light_off.png new file mode 100644 index 0000000..29d02f1 Binary files /dev/null and b/src/main/resources/assets/decorative/textures/block/alarm_light_off.png differ diff --git a/src/main/resources/assets/decorative/textures/block/alarm_light_on.png b/src/main/resources/assets/decorative/textures/block/alarm_light_on.png new file mode 100644 index 0000000..193bfd5 Binary files /dev/null and b/src/main/resources/assets/decorative/textures/block/alarm_light_on.png differ diff --git a/src/main/resources/assets/decorative/textures/block/alarm_light_on.png.mcmeta b/src/main/resources/assets/decorative/textures/block/alarm_light_on.png.mcmeta new file mode 100644 index 0000000..034019f --- /dev/null +++ b/src/main/resources/assets/decorative/textures/block/alarm_light_on.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/decorative/textures/block/clock.png b/src/main/resources/assets/decorative/textures/block/clock.png new file mode 100644 index 0000000..15c0b36 Binary files /dev/null and b/src/main/resources/assets/decorative/textures/block/clock.png differ diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 19f2971..e4330ff 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -24,6 +24,9 @@ ], "client": [ "eu.midnightdust.motschen.decorative.DecorativeClient" + ], + "modmenu": [ + "eu.midnightdust.motschen.decorative.config.ModMenuIntegration" ] },