diff --git a/src/main/java/com/simibubi/create/AllBlockPartials.java b/src/main/java/com/simibubi/create/AllBlockPartials.java index ec06c44cb..3c4f41844 100644 --- a/src/main/java/com/simibubi/create/AllBlockPartials.java +++ b/src/main/java/com/simibubi/create/AllBlockPartials.java @@ -58,7 +58,13 @@ public enum AllBlockPartials { FLYWHEEL_UPPER_SLIDING("flywheel/upper_sliding_connector"), FLYWHEEL_LOWER_SLIDING("flywheel/lower_sliding_connector"), FURNACE_GENERATOR_FRAME("furnace_engine/frame"), - + CUCKOO_MINUTE_HAND("cuckoo_clock/minute_hand"), + CUCKOO_HOUR_HAND("cuckoo_clock/hour_hand"), + CUCKOO_LEFT_DOOR("cuckoo_clock/left_door"), + CUCKOO_RIGHT_DOOR("cuckoo_clock/right_door"), + CUCKOO_PIG("cuckoo_clock/pig"), + CUCKOO_CREEPER("cuckoo_clock/creeper"), + ; private ResourceLocation modelLocation; diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index 79397760a..e3b843adb 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -10,6 +10,7 @@ import com.simibubi.create.modules.IModule; import com.simibubi.create.modules.contraptions.CasingBlock; import com.simibubi.create.modules.contraptions.components.actors.DrillBlock; import com.simibubi.create.modules.contraptions.components.actors.HarvesterBlock; +import com.simibubi.create.modules.contraptions.components.clock.CuckooClockBlock; import com.simibubi.create.modules.contraptions.components.contraptions.bearing.MechanicalBearingBlock; import com.simibubi.create.modules.contraptions.components.contraptions.chassis.LinearChassisBlock; import com.simibubi.create.modules.contraptions.components.contraptions.chassis.RadialChassisBlock; @@ -120,6 +121,8 @@ public enum AllBlocks { NOZZLE(new NozzleBlock()), TURNTABLE(new TurntableBlock()), HAND_CRANK(new HandCrankBlock()), + CUCKOO_CLOCK(new CuckooClockBlock(false)), + MYSTERIOUS_CUCKOO_CLOCK(new CuckooClockBlock(true)), CRUSHING_WHEEL(new CrushingWheelBlock()), CRUSHING_WHEEL_CONTROLLER(new CrushingWheelControllerBlock()), diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index 5924f8106..f0bb39a1a 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -9,6 +9,8 @@ import com.simibubi.create.modules.contraptions.components.actors.DrillTileEntit import com.simibubi.create.modules.contraptions.components.actors.DrillTileEntityRenderer; import com.simibubi.create.modules.contraptions.components.actors.HarvesterTileEntity; import com.simibubi.create.modules.contraptions.components.actors.HarvesterTileEntityRenderer; +import com.simibubi.create.modules.contraptions.components.clock.CuckooClockRenderer; +import com.simibubi.create.modules.contraptions.components.clock.CuckooClockTileEntity; import com.simibubi.create.modules.contraptions.components.contraptions.bearing.MechanicalBearingTileEntity; import com.simibubi.create.modules.contraptions.components.contraptions.bearing.MechanicalBearingTileEntityRenderer; import com.simibubi.create.modules.contraptions.components.contraptions.chassis.ChassisTileEntity; @@ -106,6 +108,8 @@ public enum AllTileEntities { CLUTCH(ClutchTileEntity::new, AllBlocks.CLUTCH), GEARSHIFT(GearshiftTileEntity::new, AllBlocks.GEARSHIFT), HAND_CRANK(HandCrankTileEntity::new, AllBlocks.HAND_CRANK), + CUCKOO_CLOCK(CuckooClockTileEntity::new, AllBlocks.CUCKOO_CLOCK, AllBlocks.MYSTERIOUS_CUCKOO_CLOCK), + BELT(BeltTileEntity::new, AllBlocks.BELT), BELT_TUNNEL(BeltTunnelTileEntity::new, AllBlocks.BELT_TUNNEL), MECHANICAL_PISTON(MechanicalPistonTileEntity::new, AllBlocks.MECHANICAL_PISTON, AllBlocks.STICKY_MECHANICAL_PISTON), @@ -192,6 +196,7 @@ public enum AllTileEntities { bind(BeltTileEntity.class, new BeltTileEntityRenderer()); bind(WaterWheelTileEntity.class, new KineticTileEntityRenderer()); bind(HandCrankTileEntity.class, new HandCrankTileEntityRenderer()); + bind(CuckooClockTileEntity.class, new CuckooClockRenderer()); bind(AnalogLeverTileEntity.class, new AnalogLeverTileEntityRenderer()); bind(MechanicalPistonTileEntity.class, new MechanicalPistonTileEntityRenderer()); diff --git a/src/main/java/com/simibubi/create/StressConfigDefaults.java b/src/main/java/com/simibubi/create/StressConfigDefaults.java index d4e79272c..26199d33e 100644 --- a/src/main/java/com/simibubi/create/StressConfigDefaults.java +++ b/src/main/java/com/simibubi/create/StressConfigDefaults.java @@ -45,6 +45,9 @@ public class StressConfigDefaults { case BELT: return 2; + case CUCKOO_CLOCK: + return 1; + default: return 0; } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/clock/CuckooClockBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/clock/CuckooClockBlock.java new file mode 100644 index 000000000..49e8f7d0f --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/clock/CuckooClockBlock.java @@ -0,0 +1,73 @@ +package com.simibubi.create.modules.contraptions.components.clock; + +import com.simibubi.create.modules.contraptions.base.HorizontalKineticBlock; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.item.ItemGroup; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockRenderLayer; +import net.minecraft.util.Direction; +import net.minecraft.util.NonNullList; +import net.minecraft.util.Direction.Axis; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorldReader; + +public class CuckooClockBlock extends HorizontalKineticBlock { + + private boolean mysterious; + + public CuckooClockBlock(boolean mysterious) { + super(Properties.from(Blocks.SPRUCE_LOG)); + this.mysterious = mysterious; + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return new CuckooClockTileEntity(); + } + + @Override + public BlockRenderLayer getRenderLayer() { + return BlockRenderLayer.CUTOUT; + } + + @Override + public void fillItemGroup(ItemGroup group, NonNullList items) { + if (!mysterious) + super.fillItemGroup(group, items); + } + + @Override + public BlockState getStateForPlacement(BlockItemUseContext context) { + Direction preferred = getPreferredHorizontalFacing(context); + if (preferred != null) + return getDefaultState().with(HORIZONTAL_FACING, preferred.getOpposite()); + return this.getDefaultState().with(HORIZONTAL_FACING, context.getPlacementHorizontalFacing().getOpposite()); + } + + @Override + protected boolean hasStaticPart() { + return true; + } + + @Override + public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) { + return face == state.get(HORIZONTAL_FACING).getOpposite(); + } + + public static boolean containsSurprise(BlockState state) { + Block block = state.getBlock(); + return block instanceof CuckooClockBlock && ((CuckooClockBlock) block).mysterious; + } + + @Override + public Axis getRotationAxis(BlockState state) { + return state.get(HORIZONTAL_FACING).getAxis(); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/clock/CuckooClockRenderer.java b/src/main/java/com/simibubi/create/modules/contraptions/components/clock/CuckooClockRenderer.java new file mode 100644 index 000000000..2f2948253 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/clock/CuckooClockRenderer.java @@ -0,0 +1,108 @@ +package com.simibubi.create.modules.contraptions.components.clock; + +import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.foundation.utility.AngleHelper; +import com.simibubi.create.foundation.utility.SuperByteBuffer; +import com.simibubi.create.modules.contraptions.base.KineticTileEntity; +import com.simibubi.create.modules.contraptions.base.KineticTileEntityRenderer; +import com.simibubi.create.modules.contraptions.components.clock.CuckooClockTileEntity.Animation; + +import net.minecraft.block.BlockState; +import net.minecraft.client.renderer.BufferBuilder; +import net.minecraft.util.Direction; +import net.minecraft.util.Direction.Axis; +import net.minecraft.util.math.MathHelper; + +public class CuckooClockRenderer extends KineticTileEntityRenderer { + + @Override + public void renderFast(KineticTileEntity te, double x, double y, double z, float partialTicks, int destroyStage, + BufferBuilder buffer) { + super.renderFast(te, x, y, z, partialTicks, destroyStage, buffer); + if (!(te instanceof CuckooClockTileEntity)) + return; + + CuckooClockTileEntity clock = (CuckooClockTileEntity) te; + BlockState blockState = te.getBlockState(); + int light = blockState.getPackedLightmapCoords(getWorld(), te.getPos()); + Direction direction = blockState.get(CuckooClockBlock.HORIZONTAL_FACING); + + // Render Hands + SuperByteBuffer hourHand = AllBlockPartials.CUCKOO_HOUR_HAND.renderOn(blockState); + SuperByteBuffer minuteHand = AllBlockPartials.CUCKOO_MINUTE_HAND.renderOn(blockState); + float hourAngle = clock.hourHand.get(partialTicks); + float minuteAngle = clock.minuteHand.get(partialTicks); + rotateHand(hourHand, hourAngle, direction).translate(x, y, z).light(light).renderInto(buffer); + rotateHand(minuteHand, minuteAngle, direction).translate(x, y, z).light(light).renderInto(buffer); + + // Doors + SuperByteBuffer leftDoor = AllBlockPartials.CUCKOO_LEFT_DOOR.renderOn(blockState); + SuperByteBuffer rightDoor = AllBlockPartials.CUCKOO_RIGHT_DOOR.renderOn(blockState); + float angle = 0; + float offset = 0; + + if (clock.animationType != null) { + float value = clock.animationProgress.get(partialTicks); + int step = clock.animationType == Animation.SURPRISE ? 3 : 15; + for (int phase = 30; phase <= 60; phase += step) { + float local = value - phase; + if (local < -step / 3) + continue; + else if (local < 0) + angle = MathHelper.lerp(((value - (phase - 5)) / 5), 0, 135); + else if (local < step / 3) + angle = 135; + else if (local < 2 * step / 3) + angle = MathHelper.lerp(((value - (phase + 5)) / 5), 135, 0); + + } + } + + rotateDoor(leftDoor, angle, true, direction).translate(x, y, z).light(light).renderInto(buffer); + rotateDoor(rightDoor, angle, false, direction).translate(x, y, z).light(light).renderInto(buffer); + + // Figure + if (clock.animationType != null) { + offset = -(angle / 135) * 1 / 2f + 10 / 16f; + SuperByteBuffer figure = (clock.animationType == Animation.PIG ? AllBlockPartials.CUCKOO_PIG + : AllBlockPartials.CUCKOO_CREEPER).renderOn(blockState); + figure.translate(offset, 0, 0); + figure.rotateCentered(Axis.Y, AngleHelper.rad(AngleHelper.horizontalAngle(direction.rotateYCCW()))); + figure.translate(x, y, z).light(light).renderInto(buffer); + } + + } + + @Override + protected SuperByteBuffer getRotatedModel(KineticTileEntity te) { + return transform(AllBlockPartials.SHAFT_HALF, te); + } + + private SuperByteBuffer transform(AllBlockPartials partial, KineticTileEntity te) { + return partial.renderOnDirectional(te.getBlockState(), + te.getBlockState().get(CuckooClockBlock.HORIZONTAL_FACING).getOpposite()); + } + + private SuperByteBuffer rotateHand(SuperByteBuffer buffer, float angle, Direction facing) { + float pivotX = 2 / 16f; + float pivotY = 6 / 16f; + float pivotZ = 8 / 16f; + buffer.translate(-pivotX, -pivotY, -pivotZ); + buffer.rotate(Axis.X, angle); + buffer.translate(pivotX, pivotY, pivotZ); + buffer.rotateCentered(Axis.Y, AngleHelper.rad(AngleHelper.horizontalAngle(facing.rotateYCCW()))); + return buffer; + } + + private SuperByteBuffer rotateDoor(SuperByteBuffer buffer, float angle, boolean left, Direction facing) { + float pivotX = 2 / 16f; + float pivotY = 0; + float pivotZ = (left ? 6 : 10) / 16f; + buffer.translate(-pivotX, -pivotY, -pivotZ); + buffer.rotate(Axis.Y, AngleHelper.rad(angle) * (left ? -1 : 1)); + buffer.translate(pivotX, pivotY, pivotZ); + buffer.rotateCentered(Axis.Y, AngleHelper.rad(AngleHelper.horizontalAngle(facing.rotateYCCW()))); + return buffer; + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/clock/CuckooClockTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/clock/CuckooClockTileEntity.java new file mode 100644 index 000000000..1039fe575 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/clock/CuckooClockTileEntity.java @@ -0,0 +1,178 @@ +package com.simibubi.create.modules.contraptions.components.clock; + +import com.simibubi.create.AllTileEntities; +import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingValue; +import com.simibubi.create.foundation.gui.widgets.InterpolatedValue; +import com.simibubi.create.foundation.utility.AnimationTickHolder; +import com.simibubi.create.foundation.utility.NBTHelper; +import com.simibubi.create.foundation.utility.VecHelper; +import com.simibubi.create.modules.contraptions.base.KineticTileEntity; + +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.util.DamageSource; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvent; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.Explosion; + +public class CuckooClockTileEntity extends KineticTileEntity { + + public static DamageSource CUCKOO_SURPRISE = new DamageSource("create.cuckoo_clock_explosion").setExplosion(); + + public InterpolatedChasingValue hourHand = new InterpolatedChasingValue().withSpeed(.2f); + public InterpolatedChasingValue minuteHand = new InterpolatedChasingValue().withSpeed(.2f); + public InterpolatedValue animationProgress = new InterpolatedValue(); + public Animation animationType; + private boolean sendAnimationUpdate; + + enum Animation { + PIG, CREEPER, SURPRISE; + } + + public CuckooClockTileEntity() { + super(AllTileEntities.CUCKOO_CLOCK.type); + } + + @Override + public CompoundNBT writeToClient(CompoundNBT compound) { + if (sendAnimationUpdate) + compound.putString("Animation", animationType == null ? "none" : NBTHelper.writeEnum(animationType)); + sendAnimationUpdate = false; + return super.writeToClient(compound); + } + + @Override + public void readClientUpdate(CompoundNBT tag) { + if (tag.contains("Animation")) { + String string = tag.getString("Animation"); + if ("none".equals(string)) + animationType = null; + else + animationType = NBTHelper.readEnum(string, Animation.class); + animationProgress.lastValue = 0; + animationProgress.value = 0; + } + super.readClientUpdate(tag); + } + + @Override + public void tick() { + super.tick(); + if (getSpeed() == 0) + return; + + int dayTime = (int) (world.getDayTime() % 24000); + int hours = (dayTime / 1000 + 6) % 24; + int minutes = (dayTime % 1000) * 60 / 1000; + + if (!world.isRemote) { + if (animationType == null) { + if (hours == 12 && minutes < 5) + startAnimation(Animation.PIG); + if (hours == 18 && minutes < 36 && minutes > 31) + startAnimation(Animation.CREEPER); + } else { + float value = animationProgress.value; + animationProgress.set(value + 1); + if (value > 100) + animationType = null; + + if (animationType == Animation.SURPRISE && animationProgress.value == 50) { + Vec3d center = VecHelper.getCenterOf(pos); + world.destroyBlock(pos, false); + world.createExplosion(null, CUCKOO_SURPRISE, center.x, center.y, center.z, 3, false, Explosion.Mode.BREAK); + } + + } + } + + if (world.isRemote) { + moveHands(hours, minutes); + + if (animationType == null) { + if (AnimationTickHolder.ticks % 32 == 0) + playSound(SoundEvents.BLOCK_NOTE_BLOCK_HAT, 1 / 16f, 2f); + else if (AnimationTickHolder.ticks % 16 == 0) + playSound(SoundEvents.BLOCK_NOTE_BLOCK_HAT, 1 / 16f, 1.5f); + } else { + + boolean isSurprise = animationType == Animation.SURPRISE; + float value = animationProgress.value; + animationProgress.set(value + 1); + if (value > 100) + animationType = null; + + // sounds + + if (value == 1) + playSound(SoundEvents.BLOCK_NOTE_BLOCK_CHIME, 2, .5f); + if (value == 21) + playSound(SoundEvents.BLOCK_NOTE_BLOCK_CHIME, 2, 0.793701f); + + if (value > 30 && isSurprise) { + Vec3d pos = VecHelper.offsetRandomly(VecHelper.getCenterOf(this.pos), world.rand, .5f); + world.addParticle(ParticleTypes.LARGE_SMOKE, pos.x, pos.y, pos.z, 0, 0, 0); + } + if (value == 40 && isSurprise) + playSound(SoundEvents.ENTITY_TNT_PRIMED, 1f, 1f); + + int step = isSurprise ? 3 : 15; + for (int phase = 30; phase <= 60; phase += step) { + if (value == phase - step / 3) + playSound(SoundEvents.BLOCK_CHEST_OPEN, 1 / 16f, 2f); + if (value == phase) { + if (animationType == Animation.PIG) + playSound(SoundEvents.ENTITY_PIG_AMBIENT, 1 / 4f, 1f); + else + playSound(SoundEvents.ENTITY_CREEPER_HURT, 1 / 4f, 3f); + } + if (value == phase + step / 3) + playSound(SoundEvents.BLOCK_CHEST_CLOSE, 1 / 16f, 2f); + + } + + } + + return; + } + } + + public void startAnimation(Animation animation) { + animationType = animation; + if (animation != null && CuckooClockBlock.containsSurprise(getBlockState())) + animationType = Animation.SURPRISE; + animationProgress.lastValue = 0; + animationProgress.value = 0; + sendAnimationUpdate = true; + sendData(); + } + + public void moveHands(int hours, int minutes) { + float hourTarget = (float) (2 * Math.PI / 12 * (hours % 12)); + float minuteTarget = (float) (2 * Math.PI / 60 * minutes); + + hourHand.target(hourTarget); + minuteHand.target(minuteTarget); + + if (minuteTarget - minuteHand.value < 0) { + minuteHand.value = (float) (minuteHand.value - Math.PI * 2); + minuteHand.lastValue = minuteHand.value; + } + + if (hourTarget - hourHand.value < 0) { + hourHand.value = (float) (hourHand.value - Math.PI * 2); + hourHand.lastValue = hourHand.value; + } + + hourHand.tick(); + minuteHand.tick(); + } + + private void playSound(SoundEvent sound, float volume, float pitch) { + Vec3d vec = VecHelper.getCenterOf(pos); + world.playSound(vec.x, vec.y, vec.z, sound, SoundCategory.BLOCKS, volume, pitch, false); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/crank/HandCrankTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/crank/HandCrankTileEntity.java index 28ccf8673..2ab8f98f4 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/crank/HandCrankTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/crank/HandCrankTileEntity.java @@ -3,6 +3,8 @@ package com.simibubi.create.modules.contraptions.components.crank; import com.simibubi.create.AllTileEntities; import com.simibubi.create.modules.contraptions.base.GeneratingKineticTileEntity; +import net.minecraft.nbt.CompoundNBT; + public class HandCrankTileEntity extends GeneratingKineticTileEntity { public int inUse; @@ -30,6 +32,18 @@ public class HandCrankTileEntity extends GeneratingKineticTileEntity { public float getGeneratedSpeed() { return inUse == 0 ? 0 : backwards ? -32 : 32; } + + @Override + public CompoundNBT write(CompoundNBT compound) { + compound.putInt("InUse", inUse); + return super.write(compound); + } + + @Override + public void read(CompoundNBT compound) { + inUse = compound.getInt("InUse"); + super.read(compound); + } @Override public void tick() { diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/flywheel/engine/EngineTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/flywheel/engine/EngineTileEntity.java index 7bff98dd6..6a69bae21 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/flywheel/engine/EngineTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/flywheel/engine/EngineTileEntity.java @@ -52,7 +52,6 @@ public class EngineTileEntity extends SmartTileEntity { return; if (poweredWheel != null && poweredWheel.isRemoved()) poweredWheel = null; - if (poweredWheel == null) attachWheel(); } @@ -70,6 +69,8 @@ public class EngineTileEntity extends SmartTileEntity { && FlywheelBlock.getConnection(wheelState) != engineFacing.getOpposite()) return; TileEntity te = world.getTileEntity(wheelPos); + if (te.isRemoved()) + return; if (te instanceof FlywheelTileEntity) { if (!FlywheelBlock.isConnected(wheelState)) FlywheelBlock.setConnection(world, te.getPos(), te.getBlockState(), engineFacing.getOpposite()); @@ -79,6 +80,8 @@ public class EngineTileEntity extends SmartTileEntity { } public void detachWheel() { + if (poweredWheel.isRemoved()) + return; poweredWheel.setRotation(0, 0); FlywheelBlock.setConnection(world, poweredWheel.getPos(), poweredWheel.getBlockState(), null); } diff --git a/src/main/resources/assets/create/blockstates/cuckoo_clock.json b/src/main/resources/assets/create/blockstates/cuckoo_clock.json new file mode 100644 index 000000000..6131f66cd --- /dev/null +++ b/src/main/resources/assets/create/blockstates/cuckoo_clock.json @@ -0,0 +1,14 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "create:block/cuckoo_clock/casing" + }, + "variants": { + "facing": { + "north": { "y": 90 }, + "south": { "y": 270 }, + "east": { "y": 180 }, + "west": { "y": 0 } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/blockstates/mysterious_cuckoo_clock.json b/src/main/resources/assets/create/blockstates/mysterious_cuckoo_clock.json new file mode 100644 index 000000000..6131f66cd --- /dev/null +++ b/src/main/resources/assets/create/blockstates/mysterious_cuckoo_clock.json @@ -0,0 +1,14 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "create:block/cuckoo_clock/casing" + }, + "variants": { + "facing": { + "north": { "y": 90 }, + "south": { "y": 270 }, + "east": { "y": 180 }, + "west": { "y": 0 } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/lang/en_us.json b/src/main/resources/assets/create/lang/en_us.json index e708d3fcb..dad349ccb 100644 --- a/src/main/resources/assets/create/lang/en_us.json +++ b/src/main/resources/assets/create/lang/en_us.json @@ -91,6 +91,8 @@ "block.create.adjustable_pulley": "Analog Belt Pulley", "block.create.nozzle": "Nozzle", "block.create.hand_crank": "Hand Crank", + "block.create.cuckoo_clock": "Cuckoo Clock", + "block.create.mysterious_cuckoo_clock": "Cuckoo Clock", "block.create.motor": "Motor", "block.create.belt": "Mechanical Belt", "block.create.crushing_wheel": "Crushing Wheel", @@ -243,6 +245,7 @@ "death.attack.create.drill": "%1$s was impaled by Mechanical Drill", "create.block.deployer.damage_source_name": "a rogue Deployer", "death.attack.create.curse_polish": "%1$s tried to polish a cursed item", + "death.attack.create.cuckoo_clock_explosion": "%1$s was blown up by tampered cuckoo clock", "create.recipe.crushing": "Crushing", "create.recipe.splashing": "Bulk Washing", diff --git a/src/main/resources/assets/create/models/block/cuckoo_clock/casing.json b/src/main/resources/assets/create/models/block/cuckoo_clock/casing.json new file mode 100644 index 000000000..0e054ed81 --- /dev/null +++ b/src/main/resources/assets/create/models/block/cuckoo_clock/casing.json @@ -0,0 +1,159 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "1": "block/stripped_oak_log", + "2": "block/spruce_log", + "3": "create:block/cuckoo_clock", + "4": "block/spruce_log_top", + "particle": "block/stripped_spruce_log" + }, + "elements": [ + { + "name": "Base", + "from": [1, 0, 1], + "to": [15, 2, 15], + "faces": { + "north": {"uv": [0, 0, 14, 2], "texture": "#2"}, + "east": {"uv": [0, 0, 14, 2], "texture": "#2"}, + "south": {"uv": [0, 0, 14, 2], "texture": "#2"}, + "west": {"uv": [0, 0, 14, 2], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#4"}, + "down": {"uv": [0, 0, 14, 14], "texture": "#2"} + } + }, + { + "name": "LowerBody", + "from": [2, 2, 3], + "to": [14, 6, 13], + "faces": { + "north": {"uv": [0, 3, 6, 5], "texture": "#3"}, + "east": {"uv": [11, 3, 16, 5], "texture": "#3"}, + "south": {"uv": [0, 3, 6, 5], "texture": "#3"}, + "west": {"uv": [11, 5, 16, 7], "texture": "#3"} + } + }, + { + "name": "MidBody", + "from": [2, 6, 2], + "to": [14, 12, 14], + "faces": { + "north": {"uv": [0, 5, 6, 8], "texture": "#3"}, + "east": {"uv": [0, 0, 6, 3], "texture": "#3"}, + "south": {"uv": [0, 5, 6, 8], "texture": "#3"}, + "west": {"uv": [10, 0, 16, 3], "texture": "#3"}, + "down": {"uv": [0, 10, 6, 16], "texture": "#3"} + } + }, + { + "name": "UpperMidBody", + "from": [2, 12, 3], + "to": [14, 14, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]}, + "faces": { + "east": {"uv": [0, 9, 5, 10], "texture": "#3"}, + "west": {"uv": [6, 4, 11, 5], "texture": "#3"} + } + }, + { + "name": "TopBody", + "from": [2, 14, 5], + "to": [14, 16, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]}, + "faces": { + "east": {"uv": [1, 8, 4, 9], "texture": "#3"}, + "west": {"uv": [7, 3, 10, 4], "texture": "#3"} + } + }, + { + "name": "RoofLeft", + "from": [1, 10, 1], + "to": [15, 20, 3], + "rotation": {"angle": 45, "axis": "x", "origin": [8, 12, 2]}, + "faces": { + "north": {"uv": [0, 0, 14, 10], "texture": "#1"}, + "east": {"uv": [0, 0, 2, 10], "texture": "#1"}, + "south": {"uv": [0, 0, 14, 10], "texture": "#1"}, + "west": {"uv": [0, 0, 2, 10], "texture": "#1"}, + "up": {"uv": [0, 0, 14, 2], "texture": "#1"}, + "down": {"uv": [0, 0, 14, 2], "texture": "#1"} + } + }, + { + "name": "RoofRight", + "from": [1, 10, 13], + "to": [15, 20, 15], + "rotation": {"angle": -45, "axis": "x", "origin": [8, 12, 14]}, + "faces": { + "north": {"uv": [0, 0, 14, 10], "texture": "#1"}, + "east": {"uv": [0, 0, 2, 10], "texture": "#1"}, + "south": {"uv": [0, 0, 14, 10], "texture": "#1"}, + "west": {"uv": [0, 0, 2, 10], "texture": "#1"}, + "up": {"uv": [0, 0, 14, 2], "texture": "#1"}, + "down": {"uv": [0, 0, 14, 2], "texture": "#1"} + } + }, + { + "name": "RoofCenter", + "from": [0.75, 16, 7], + "to": [15.25, 19, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]}, + "faces": { + "north": {"uv": [0, 0, 14.5, 3], "texture": "#2"}, + "east": {"uv": [0, 0, 2, 3], "texture": "#2"}, + "south": {"uv": [0, 0, 14.5, 3], "texture": "#2"}, + "west": {"uv": [0, 0, 2, 3], "texture": "#2"}, + "up": {"uv": [0, 0, 14.5, 2], "texture": "#2"}, + "down": {"uv": [0, 0, 14.5, 2], "texture": "#2"} + } + }, + { + "name": "Clock", + "from": [1.75, 2.5, 4.5], + "to": [1.75, 9.5, 11.5], + "faces": { + "west": {"uv": [6, 5, 9.5, 8.5], "texture": "#3"} + } + }, + { + "name": "ClockCenter", + "from": [1.45, 5.475, 7.475], + "to": [2.3, 6.525, 8.525], + "faces": { + "north": {"uv": [9, 9.5, 9.5, 10], "texture": "#3"}, + "east": {"uv": [9, 9.5, 9.5, 10], "texture": "#3"}, + "south": {"uv": [9, 9.5, 9.5, 10], "texture": "#3"}, + "west": {"uv": [9, 9.5, 9.5, 10], "texture": "#3"}, + "up": {"uv": [9, 9.5, 9.5, 10], "texture": "#3"}, + "down": {"uv": [9, 9.5, 9.5, 10], "texture": "#3"} + } + } + ], + "groups": [ + { + "name": "shaft_half", + "origin": [8, 8, 8], + "children": [] + }, + { + "name": "Creeper", + "origin": [6, 17, 12], + "children": [] + }, + { + "name": "Door", + "origin": [8, 8, 8], + "children": [] + }, + { + "name": "MovingClock", + "origin": [2, 6, 8], + "children": [] + }, + { + "name": "CuckooClock", + "origin": [8, 8, 8], + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/cuckoo_clock/creeper.json b/src/main/resources/assets/create/models/block/cuckoo_clock/creeper.json new file mode 100644 index 000000000..89abd9544 --- /dev/null +++ b/src/main/resources/assets/create/models/block/cuckoo_clock/creeper.json @@ -0,0 +1,86 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/cube", + "textures": { + "3": "create:block/cuckoo_clock" + }, + "elements": [ + { + "name": "CreeperFront", + "from": [-3.5, 11, 7.5], + "to": [-3, 11.5, 8.5], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 18, 12]}, + "faces": { + "north": {"uv": [8.5, 9, 9, 9.5], "texture": "#3"}, + "east": {"uv": [8.5, 9, 9, 9.5], "texture": "#3"}, + "south": {"uv": [8.5, 9, 9, 9.5], "texture": "#3"}, + "west": {"uv": [8.5, 9, 9, 9.5], "texture": "#3"}, + "up": {"uv": [8.5, 9, 9, 9.5], "texture": "#3"}, + "down": {"uv": [8.5, 9, 9, 9.5], "texture": "#3"} + } + }, + { + "name": "CreeperBody", + "from": [-3, 11.5, 7.5], + "to": [-2.5, 12.5, 8.5], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 17, 12]}, + "faces": { + "north": {"uv": [8.5, 9.5, 9, 10], "texture": "#3"}, + "east": {"uv": [8.5, 9.5, 9, 10], "texture": "#3"}, + "south": {"uv": [8.5, 9.5, 9, 10], "texture": "#3"}, + "west": {"uv": [8.5, 9.5, 9, 10], "texture": "#3"}, + "up": {"uv": [8.5, 9.5, 9, 10], "texture": "#3"}, + "down": {"uv": [8.5, 9.5, 9, 10], "texture": "#3"} + } + }, + { + "name": "CreeperHead", + "from": [-3.25, 12.5, 7.5], + "to": [-2.25, 13.5, 8.5], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 17, 12]}, + "faces": { + "north": {"uv": [8.5, 9.5, 9, 10], "texture": "#3"}, + "east": {"uv": [8.5, 9.5, 9, 10], "texture": "#3"}, + "south": {"uv": [8.5, 9.5, 9, 10], "texture": "#3"}, + "west": {"uv": [8.5, 9.5, 9, 10], "texture": "#3"}, + "up": {"uv": [8.5, 9.5, 9, 10], "texture": "#3"}, + "down": {"uv": [8.5, 9.5, 9, 10], "texture": "#3"} + } + }, + { + "name": "CreeperBack", + "from": [-2.5, 11, 7.5], + "to": [-2, 11.5, 8.5], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 17, 12]}, + "faces": { + "north": {"uv": [8.5, 9, 9, 9.5], "texture": "#3"}, + "east": {"uv": [8.5, 9, 9, 9.5], "texture": "#3"}, + "south": {"uv": [8.5, 9, 9, 9.5], "texture": "#3"}, + "west": {"uv": [8.5, 9, 9, 9.5], "texture": "#3"}, + "up": {"uv": [8.5, 9, 9, 9.5], "texture": "#3"}, + "down": {"uv": [8.5, 9, 9, 9.5], "texture": "#3"} + } + }, + { + "name": "Platform", + "from": [-4, 10.175, 7], + "to": [3, 11, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [6.5, 18, 11.75]}, + "faces": { + "north": {"uv": [12.5, 7.5, 16, 8], "texture": "#3"}, + "east": {"uv": [13, 7.5, 13.5, 8.5], "rotation": 90, "texture": "#3"}, + "south": {"uv": [12.5, 7.5, 16, 8], "texture": "#3"}, + "west": {"uv": [13, 7.5, 13.5, 8.5], "rotation": 90, "texture": "#3"}, + "up": {"uv": [12.5, 7.5, 16, 8.5], "texture": "#3"}, + "down": {"uv": [12.5, 7.5, 16, 8.5], "texture": "#3"} + } + } + ], + "groups": [ + { + "name": "Creeper", + "origin": [6, 17, 12], + "children": [0, 1, 2, 3, 4] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/cuckoo_clock/hour_hand.json b/src/main/resources/assets/create/models/block/cuckoo_clock/hour_hand.json new file mode 100644 index 000000000..2b736c843 --- /dev/null +++ b/src/main/resources/assets/create/models/block/cuckoo_clock/hour_hand.json @@ -0,0 +1,22 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "3": "create:block/cuckoo_clock" + }, + "elements": [ + { + "name": "ClockHourHand", + "from": [1.6, 6, 7.5], + "to": [2.15, 7.75, 8.5], + "rotation": {"angle": 0, "axis": "x", "origin": [2, 6, 8]}, + "faces": { + "north": {"uv": [9, 9.5, 9.5, 10], "rotation": 270, "texture": "#3"}, + "east": {"uv": [9, 9.5, 9.5, 10], "rotation": 180, "texture": "#3"}, + "south": {"uv": [9, 9.5, 9.5, 10], "rotation": 90, "texture": "#3"}, + "west": {"uv": [9, 9.5, 9.5, 10], "texture": "#3"}, + "up": {"uv": [9, 9.5, 9.5, 10], "rotation": 90, "texture": "#3"}, + "down": {"uv": [9, 9.5, 9.5, 10], "rotation": 270, "texture": "#3"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/cuckoo_clock/item.json b/src/main/resources/assets/create/models/block/cuckoo_clock/item.json new file mode 100644 index 000000000..9ad34983d --- /dev/null +++ b/src/main/resources/assets/create/models/block/cuckoo_clock/item.json @@ -0,0 +1,247 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "1": "block/stripped_oak_log", + "2": "block/spruce_log", + "3": "create:block/cuckoo_clock", + "4": "block/spruce_log_top", + "particle": "block/stripped_spruce_log" + }, + "elements": [ + { + "name": "LeftDoor", + "from": [1.5, 10, 6], + "to": [2.5, 14, 8], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 11, 6]}, + "faces": { + "north": {"uv": [7.5, 10.5, 8, 12.5], "texture": "#3"}, + "east": {"uv": [3, 12, 4, 14], "texture": "#3"}, + "south": {"uv": [1.5, 12.5, 2, 14.5], "texture": "#3"}, + "west": {"uv": [7.5, 10.5, 8.5, 12.5], "texture": "#3"}, + "up": {"uv": [7.5, 10.5, 8.5, 11], "rotation": 90, "texture": "#3"}, + "down": {"uv": [7.5, 12, 8.5, 12.5], "rotation": 270, "texture": "#3"} + } + }, + { + "name": "RightDoor", + "from": [1.5, 10, 8], + "to": [2.5, 14, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 10, 10]}, + "faces": { + "north": {"uv": [1.5, 12.5, 2, 14.5], "texture": "#3"}, + "east": {"uv": [3, 12, 4, 14], "texture": "#3"}, + "south": {"uv": [9, 10.5, 9.5, 12.5], "texture": "#3"}, + "west": {"uv": [8.5, 10.5, 9.5, 12.5], "texture": "#3"}, + "up": {"uv": [8.5, 10.5, 9.5, 11], "rotation": 90, "texture": "#3"}, + "down": {"uv": [8.5, 12, 9.5, 12.5], "rotation": 270, "texture": "#3"} + } + }, + { + "name": "ClockHourHand", + "from": [1.6, 5.5, 8], + "to": [2.15, 6.5, 9.75], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 6, 8]}, + "faces": { + "north": {"uv": [9, 9.5, 9.5, 10], "rotation": 90, "texture": "#3"}, + "east": {"uv": [9, 9.5, 9.5, 10], "rotation": 90, "texture": "#3"}, + "south": {"uv": [9, 9.5, 9.5, 10], "rotation": 90, "texture": "#3"}, + "west": {"uv": [9, 9.5, 9.5, 10], "rotation": 90, "texture": "#3"}, + "up": {"uv": [9, 9.5, 9.5, 10], "rotation": 90, "texture": "#3"}, + "down": {"uv": [9, 9.5, 9.5, 10], "rotation": 90, "texture": "#3"} + } + }, + { + "name": "ClockMinuteHand", + "from": [1.6, 6, 7.5], + "to": [2.15, 8.5, 8.5], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 6, 8]}, + "faces": { + "north": {"uv": [9, 8.5, 9.5, 10], "texture": "#3"}, + "east": {"uv": [9, 8.5, 9.5, 10], "texture": "#3"}, + "south": {"uv": [9, 8.5, 9.5, 10], "texture": "#3"}, + "west": {"uv": [9, 8.5, 9.5, 10], "texture": "#3"}, + "up": {"uv": [9, 8.5, 9.5, 10], "texture": "#3"}, + "down": {"uv": [9, 8.5, 9.5, 10], "texture": "#3"} + } + }, + { + "name": "Base", + "from": [1, 0, 1], + "to": [15, 2, 15], + "faces": { + "north": {"uv": [0, 0, 14, 2], "texture": "#2"}, + "east": {"uv": [0, 0, 14, 2], "texture": "#2"}, + "south": {"uv": [0, 0, 14, 2], "texture": "#2"}, + "west": {"uv": [0, 0, 14, 2], "texture": "#2"}, + "up": {"uv": [1, 1, 15, 15], "texture": "#4"}, + "down": {"uv": [0, 0, 14, 14], "texture": "#2"} + } + }, + { + "name": "LowerBody", + "from": [2, 2, 3], + "to": [14, 6, 13], + "faces": { + "north": {"uv": [0, 3, 6, 5], "texture": "#3"}, + "east": {"uv": [11, 3, 16, 5], "texture": "#3"}, + "south": {"uv": [0, 3, 6, 5], "texture": "#3"}, + "west": {"uv": [11, 5, 16, 7], "texture": "#3"} + } + }, + { + "name": "MidBody", + "from": [2, 6, 2], + "to": [14, 12, 14], + "faces": { + "north": {"uv": [0, 5, 6, 8], "texture": "#3"}, + "east": {"uv": [0, 0, 6, 3], "texture": "#3"}, + "south": {"uv": [0, 5, 6, 8], "texture": "#3"}, + "west": {"uv": [10, 0, 16, 3], "texture": "#3"}, + "down": {"uv": [0, 10, 6, 16], "texture": "#3"} + } + }, + { + "name": "UpperMidBody", + "from": [2, 12, 3], + "to": [14, 14, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]}, + "faces": { + "east": {"uv": [0, 9, 5, 10], "texture": "#3"}, + "west": {"uv": [6, 4, 11, 5], "texture": "#3"} + } + }, + { + "name": "TopBody", + "from": [2, 14, 5], + "to": [14, 16, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]}, + "faces": { + "east": {"uv": [1, 8, 4, 9], "texture": "#3"}, + "west": {"uv": [7, 3, 10, 4], "texture": "#3"} + } + }, + { + "name": "RoofLeft", + "from": [1, 10, 1], + "to": [15, 20, 3], + "rotation": {"angle": 45, "axis": "x", "origin": [8, 12, 2]}, + "faces": { + "north": {"uv": [0, 0, 14, 10], "texture": "#1"}, + "east": {"uv": [0, 0, 2, 10], "texture": "#1"}, + "south": {"uv": [0, 0, 14, 10], "texture": "#1"}, + "west": {"uv": [0, 0, 2, 10], "texture": "#1"}, + "up": {"uv": [0, 0, 14, 2], "texture": "#1"}, + "down": {"uv": [0, 0, 14, 2], "texture": "#1"} + } + }, + { + "name": "RoofRight", + "from": [1, 10, 13], + "to": [15, 20, 15], + "rotation": {"angle": -45, "axis": "x", "origin": [8, 12, 14]}, + "faces": { + "north": {"uv": [0, 0, 14, 10], "texture": "#1"}, + "east": {"uv": [0, 0, 2, 10], "texture": "#1"}, + "south": {"uv": [0, 0, 14, 10], "texture": "#1"}, + "west": {"uv": [0, 0, 2, 10], "texture": "#1"}, + "up": {"uv": [0, 0, 14, 2], "texture": "#1"}, + "down": {"uv": [0, 0, 14, 2], "texture": "#1"} + } + }, + { + "name": "RoofCenter", + "from": [0.75, 16, 7], + "to": [15.25, 19, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 8]}, + "faces": { + "north": {"uv": [0, 0, 14.5, 3], "texture": "#2"}, + "east": {"uv": [0, 0, 2, 3], "texture": "#2"}, + "south": {"uv": [0, 0, 14.5, 3], "texture": "#2"}, + "west": {"uv": [0, 0, 2, 3], "texture": "#2"}, + "up": {"uv": [0, 0, 14.5, 2], "texture": "#2"}, + "down": {"uv": [0, 0, 14.5, 2], "texture": "#2"} + } + }, + { + "name": "Clock", + "from": [1.75, 2.5, 4.5], + "to": [1.75, 9.5, 11.5], + "faces": { + "west": {"uv": [6, 5, 9.5, 8.5], "texture": "#3"} + } + }, + { + "name": "ClockCenter", + "from": [1.45, 5.475, 7.475], + "to": [2.3, 6.525, 8.525], + "faces": { + "north": {"uv": [9, 9.5, 9.5, 10], "texture": "#3"}, + "east": {"uv": [9, 9.5, 9.5, 10], "texture": "#3"}, + "south": {"uv": [9, 9.5, 9.5, 10], "texture": "#3"}, + "west": {"uv": [9, 9.5, 9.5, 10], "texture": "#3"}, + "up": {"uv": [9, 9.5, 9.5, 10], "texture": "#3"}, + "down": {"uv": [9, 9.5, 9.5, 10], "texture": "#3"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, 45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, 225, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 0], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 135, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "rotation": [0, -90, 0], + "scale": [0.5, 0.5, 0.5] + } + }, + "groups": [ + { + "name": "shaft_half", + "origin": [8, 8, 8], + "children": [] + }, + { + "name": "Creeper", + "origin": [6, 17, 12], + "children": [] + }, + { + "name": "Door", + "origin": [8, 8, 8], + "children": [0, 1] + }, + { + "name": "MovingClock", + "origin": [2, 6, 8], + "children": [2, 3] + }, + { + "name": "CuckooClock", + "origin": [8, 8, 8], + "children": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/cuckoo_clock/left_door.json b/src/main/resources/assets/create/models/block/cuckoo_clock/left_door.json new file mode 100644 index 000000000..ca42dbff4 --- /dev/null +++ b/src/main/resources/assets/create/models/block/cuckoo_clock/left_door.json @@ -0,0 +1,22 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "3": "create:block/cuckoo_clock" + }, + "elements": [ + { + "name": "LeftDoor", + "from": [1.5, 10, 6], + "to": [2.5, 14, 8], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 11, 6]}, + "faces": { + "north": {"uv": [7.5, 10.5, 8, 12.5], "texture": "#3"}, + "east": {"uv": [3, 12, 4, 14], "texture": "#3"}, + "south": {"uv": [1.5, 12.5, 2, 14.5], "texture": "#3"}, + "west": {"uv": [7.5, 10.5, 8.5, 12.5], "texture": "#3"}, + "up": {"uv": [7.5, 10.5, 8.5, 11], "rotation": 90, "texture": "#3"}, + "down": {"uv": [7.5, 12, 8.5, 12.5], "rotation": 270, "texture": "#3"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/cuckoo_clock/minute_hand.json b/src/main/resources/assets/create/models/block/cuckoo_clock/minute_hand.json new file mode 100644 index 000000000..0494373c4 --- /dev/null +++ b/src/main/resources/assets/create/models/block/cuckoo_clock/minute_hand.json @@ -0,0 +1,22 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "3": "create:block/cuckoo_clock" + }, + "elements": [ + { + "name": "ClockMinuteHand", + "from": [1.6, 6, 7.5], + "to": [2.15, 8.5, 8.5], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 6, 8]}, + "faces": { + "north": {"uv": [9, 8.5, 9.5, 10], "texture": "#3"}, + "east": {"uv": [9, 8.5, 9.5, 10], "texture": "#3"}, + "south": {"uv": [9, 8.5, 9.5, 10], "texture": "#3"}, + "west": {"uv": [9, 8.5, 9.5, 10], "texture": "#3"}, + "up": {"uv": [9, 8.5, 9.5, 10], "texture": "#3"}, + "down": {"uv": [9, 8.5, 9.5, 10], "texture": "#3"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/cuckoo_clock/pig.json b/src/main/resources/assets/create/models/block/cuckoo_clock/pig.json new file mode 100644 index 000000000..4cb13904f --- /dev/null +++ b/src/main/resources/assets/create/models/block/cuckoo_clock/pig.json @@ -0,0 +1,114 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/cube", + "textures": { + "3": "create:block/cuckoo_clock" + }, + "elements": [ + { + "name": "PigLeftFront", + "from": [-3, 11, 7.25], + "to": [-2.5, 11.5, 7.75], + "rotation": {"angle": 0, "axis": "z", "origin": [6.5, 18, 11.75]}, + "faces": { + "north": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "east": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "south": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "west": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "up": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "down": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"} + } + }, + { + "name": "PigRightFront", + "from": [-3, 11, 8.25], + "to": [-2.5, 11.5, 8.75], + "rotation": {"angle": 0, "axis": "z", "origin": [6.5, 18, 11.75]}, + "faces": { + "north": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "east": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "south": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "west": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "up": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "down": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"} + } + }, + { + "name": "PigBody", + "from": [-3, 11.5, 7.25], + "to": [-1.25, 12.5, 8.75], + "rotation": {"angle": 0, "axis": "z", "origin": [6.5, 18, 11.75]}, + "faces": { + "north": {"uv": [8, 9.5, 8.5, 10], "texture": "#3"}, + "east": {"uv": [8, 9.5, 8.5, 10], "texture": "#3"}, + "south": {"uv": [8, 9.5, 8.5, 10], "texture": "#3"}, + "west": {"uv": [8, 9.5, 8.5, 10], "texture": "#3"}, + "up": {"uv": [8, 9.5, 8.5, 10], "texture": "#3"}, + "down": {"uv": [8, 9.5, 8.5, 10], "texture": "#3"} + } + }, + { + "name": "PigHead", + "from": [-4, 11.75, 7.5], + "to": [-3, 12.75, 8.5], + "rotation": {"angle": 0, "axis": "z", "origin": [6.5, 18, 11.75]}, + "faces": { + "north": {"uv": [8, 9.5, 8.5, 10], "texture": "#3"}, + "east": {"uv": [8, 9.5, 8.5, 10], "texture": "#3"}, + "south": {"uv": [8, 9.5, 8.5, 10], "texture": "#3"}, + "west": {"uv": [8, 9.5, 8.5, 10], "texture": "#3"}, + "up": {"uv": [8, 9.5, 8.5, 10], "texture": "#3"}, + "down": {"uv": [8, 9.5, 8.5, 10], "texture": "#3"} + } + }, + { + "name": "PigLeftBack", + "from": [-1.75, 11, 7.25], + "to": [-1.25, 11.5, 7.75], + "rotation": {"angle": 0, "axis": "z", "origin": [6.5, 18, 11.75]}, + "faces": { + "north": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "east": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "south": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "west": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "up": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "down": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"} + } + }, + { + "name": "PigRightBack", + "from": [-1.75, 11, 8.25], + "to": [-1.25, 11.5, 8.75], + "rotation": {"angle": 0, "axis": "z", "origin": [6.5, 18, 11.75]}, + "faces": { + "north": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "east": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "south": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "west": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "up": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"}, + "down": {"uv": [8, 9, 8.5, 9.5], "texture": "#3"} + } + }, + { + "name": "Platform", + "from": [-4, 10.175, 7], + "to": [3, 11, 9], + "rotation": {"angle": 0, "axis": "z", "origin": [6.5, 18, 11.75]}, + "faces": { + "north": {"uv": [12.5, 7.5, 16, 8], "texture": "#3"}, + "east": {"uv": [13, 7.5, 13.5, 8.5], "rotation": 90, "texture": "#3"}, + "south": {"uv": [12.5, 7.5, 16, 8], "texture": "#3"}, + "west": {"uv": [13, 7.5, 13.5, 8.5], "rotation": 90, "texture": "#3"}, + "up": {"uv": [12.5, 7.5, 16, 8.5], "texture": "#3"}, + "down": {"uv": [12.5, 7.5, 16, 8.5], "texture": "#3"} + } + } + ], + "groups": [ + { + "name": "Pig", + "origin": [6, 17, 12], + "children": [0, 1, 2, 3, 4, 5, 6] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/cuckoo_clock/right_door.json b/src/main/resources/assets/create/models/block/cuckoo_clock/right_door.json new file mode 100644 index 000000000..36d8a5591 --- /dev/null +++ b/src/main/resources/assets/create/models/block/cuckoo_clock/right_door.json @@ -0,0 +1,22 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "3": "create:block/cuckoo_clock" + }, + "elements": [ + { + "name": "RightDoor", + "from": [1.5, 10, 8], + "to": [2.5, 14, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 10, 10]}, + "faces": { + "north": {"uv": [1.5, 12.5, 2, 14.5], "texture": "#3"}, + "east": {"uv": [3, 12, 4, 14], "texture": "#3"}, + "south": {"uv": [9, 10.5, 9.5, 12.5], "texture": "#3"}, + "west": {"uv": [8.5, 10.5, 9.5, 12.5], "texture": "#3"}, + "up": {"uv": [8.5, 10.5, 9.5, 11], "rotation": 90, "texture": "#3"}, + "down": {"uv": [8.5, 12, 9.5, 12.5], "rotation": 270, "texture": "#3"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/cuckoo_clock.json b/src/main/resources/assets/create/models/item/cuckoo_clock.json new file mode 100644 index 000000000..11a49772e --- /dev/null +++ b/src/main/resources/assets/create/models/item/cuckoo_clock.json @@ -0,0 +1,3 @@ +{ + "parent": "create:block/cuckoo_clock/item" +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/mysterious_cuckoo_clock.json b/src/main/resources/assets/create/models/item/mysterious_cuckoo_clock.json new file mode 100644 index 000000000..11a49772e --- /dev/null +++ b/src/main/resources/assets/create/models/item/mysterious_cuckoo_clock.json @@ -0,0 +1,3 @@ +{ + "parent": "create:block/cuckoo_clock/item" +} \ No newline at end of file diff --git a/src/main/resources/assets/create/textures/block/cuckoo_clock.png b/src/main/resources/assets/create/textures/block/cuckoo_clock.png new file mode 100644 index 000000000..8c4c74dd5 Binary files /dev/null and b/src/main/resources/assets/create/textures/block/cuckoo_clock.png differ diff --git a/src/main/resources/data/create/loot_tables/blocks/cuckoo_clock.json b/src/main/resources/data/create/loot_tables/blocks/cuckoo_clock.json new file mode 100644 index 000000000..2dc60feac --- /dev/null +++ b/src/main/resources/data/create/loot_tables/blocks/cuckoo_clock.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "create:cuckoo_clock" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/loot_tables/blocks/mysterious_cuckoo_clock.json b/src/main/resources/data/create/loot_tables/blocks/mysterious_cuckoo_clock.json new file mode 100644 index 000000000..925e3d10a --- /dev/null +++ b/src/main/resources/data/create/loot_tables/blocks/mysterious_cuckoo_clock.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "create:mysterious_cuckoo_clock" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting_shaped/contraptions/cuckoo_clock.json b/src/main/resources/data/create/recipes/crafting_shaped/contraptions/cuckoo_clock.json new file mode 100644 index 000000000..6cbd4aa3c --- /dev/null +++ b/src/main/resources/data/create/recipes/crafting_shaped/contraptions/cuckoo_clock.json @@ -0,0 +1,32 @@ +{ + "type": "crafting_shaped", + "pattern": [ + " S ", + "SAS", + "BPB" + ], + "key": { + "B": { + "tag": "minecraft:logs" + }, + "S": { + "tag": "minecraft:planks" + }, + "A": { + "item": "minecraft:clock" + }, + "P": { + "item": "create:cogwheel" + } + }, + "result": { + "item": "create:cuckoo_clock", + "count": 1 + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting_shaped/contraptions/mysterious_cuckoo_clock.json b/src/main/resources/data/create/recipes/crafting_shaped/contraptions/mysterious_cuckoo_clock.json new file mode 100644 index 000000000..79397873a --- /dev/null +++ b/src/main/resources/data/create/recipes/crafting_shaped/contraptions/mysterious_cuckoo_clock.json @@ -0,0 +1,26 @@ +{ + "type": "crafting_shaped", + "pattern": [ + " S ", + "SAS", + " S " + ], + "key": { + "S": { + "tag": "forge:gunpowder" + }, + "A": { + "item": "create:cuckoo_clock" + } + }, + "result": { + "item": "create:mysterious_cuckoo_clock", + "count": 1 + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] +} \ No newline at end of file