diff --git a/chunky/src/java/se/llbit/chunky/block/CalibratedSculkSensor.java b/chunky/src/java/se/llbit/chunky/block/CalibratedSculkSensor.java new file mode 100644 index 0000000000..42e9f581c9 --- /dev/null +++ b/chunky/src/java/se/llbit/chunky/block/CalibratedSculkSensor.java @@ -0,0 +1,43 @@ +package se.llbit.chunky.block; + +import se.llbit.chunky.entity.CalibratedSculkSensorAmethyst; +import se.llbit.chunky.entity.Entity; +import se.llbit.chunky.model.CalibratedSculkSensorModel; +import se.llbit.chunky.resources.Texture; +import se.llbit.math.Vector3; + +public class CalibratedSculkSensor extends AbstractModelBlock { + private final String phase; + private final String facing; + + public CalibratedSculkSensor(String phase, String facing) { + super("calibrated_sculk_sensor", Texture.calibratedSculkSensorTop); + this.phase = phase; + this.facing = facing; + this.model = new CalibratedSculkSensorModel(isActive(), facing); + } + + public boolean isActive() { + return phase.equals("active") || phase.equals("cooldown"); + } + + @Override + public String description() { + return "sculk_sensor_phase=" + phase + ", facing=" + facing; + } + + @Override + public boolean isEntity() { + return true; + } + + @Override + public boolean isBlockWithEntity() { + return true; + } + + @Override + public Entity toEntity(Vector3 position) { + return new CalibratedSculkSensorAmethyst(position, this.facing, isActive(), this); + } +} diff --git a/chunky/src/java/se/llbit/chunky/block/MinecraftBlockProvider.java b/chunky/src/java/se/llbit/chunky/block/MinecraftBlockProvider.java index 709fb175dc..c806c87cf0 100644 --- a/chunky/src/java/se/llbit/chunky/block/MinecraftBlockProvider.java +++ b/chunky/src/java/se/llbit/chunky/block/MinecraftBlockProvider.java @@ -1037,6 +1037,17 @@ private static void addBlocks(Texture texture, String... names) { addBlock("sniffer_egg", (name, tag) -> new SnifferEgg(name, BlockProvider.stringToInt(tag.get("Properties").get("hatch"), 0))); addBlock("pink_petals", (name, tag) -> new PinkPetals(name, BlockProvider.stringToInt(tag.get("Properties").get("flower_amount"), 1), BlockProvider.facing(tag))); addBlock("pitcher_plant", (name, tag) -> new PitcherPlant(name, tag.get("Properties").get("half").stringValue("lower"))); + addBlock("pitcher_crop", (name, tag) -> { + int age = BlockProvider.stringToInt(tag.get("Properties").get("age"), 0); + String half = tag.get("Properties").get("half").stringValue("lower"); + if (half.equals("upper") && age < 2) { + return Air.INSTANCE; + } + return new PitcherCrop(age, half); + }); + addBlock("calibrated_sculk_sensor", (name, tag) -> new CalibratedSculkSensor( + tag.get("Properties").get("sculk_sensor_phase").stringValue("cooldown"), + tag.get("Properties").get("facing").stringValue("north"))); } @Override diff --git a/chunky/src/java/se/llbit/chunky/block/PitcherCrop.java b/chunky/src/java/se/llbit/chunky/block/PitcherCrop.java new file mode 100644 index 0000000000..5e72a959d2 --- /dev/null +++ b/chunky/src/java/se/llbit/chunky/block/PitcherCrop.java @@ -0,0 +1,24 @@ +package se.llbit.chunky.block; + +import se.llbit.chunky.model.PitcherCropBottomModel; +import se.llbit.chunky.model.PitcherCropTopModel; +import se.llbit.chunky.resources.Texture; + +public class PitcherCrop extends AbstractModelBlock { + private final String description; + + public PitcherCrop(int age, String half) { + super("pitcher_crop", Texture.pitcherCropTop); + localIntersect = true; + opaque = false; + this.model = half.equals("upper") + ? new PitcherCropTopModel(age) + : new PitcherCropBottomModel(age); + this.description = String.format("age=%d, half=%s", age, half); + } + + @Override + public String description() { + return description; + } +} \ No newline at end of file diff --git a/chunky/src/java/se/llbit/chunky/block/SculkSensor.java b/chunky/src/java/se/llbit/chunky/block/SculkSensor.java index 73c912ff22..72a9041075 100644 --- a/chunky/src/java/se/llbit/chunky/block/SculkSensor.java +++ b/chunky/src/java/se/llbit/chunky/block/SculkSensor.java @@ -4,7 +4,6 @@ import se.llbit.chunky.resources.Texture; public class SculkSensor extends AbstractModelBlock { - private final String phase; public SculkSensor(String phase) { diff --git a/chunky/src/java/se/llbit/chunky/chunk/BlockPalette.java b/chunky/src/java/se/llbit/chunky/chunk/BlockPalette.java index eb850ea315..f6031b65f8 100644 --- a/chunky/src/java/se/llbit/chunky/chunk/BlockPalette.java +++ b/chunky/src/java/se/llbit/chunky/chunk/BlockPalette.java @@ -547,6 +547,11 @@ public static Map> getDefaultMaterialProperties() { block.emittance = 1.0f / 15f; } }); + materialProperties.put("minecraft:calibrated_sculk_sensor", block -> { + if (block instanceof CalibratedSculkSensor && ((CalibratedSculkSensor) block).isActive()) { + block.emittance = 1.0f / 15f; + } + }); materialProperties.put("minecraft:glow_lichen", block -> { block.emittance = 1.0f / 15f * 7; }); diff --git a/chunky/src/java/se/llbit/chunky/entity/CalibratedSculkSensorAmethyst.java b/chunky/src/java/se/llbit/chunky/entity/CalibratedSculkSensorAmethyst.java new file mode 100644 index 0000000000..9b2a8ed13e --- /dev/null +++ b/chunky/src/java/se/llbit/chunky/entity/CalibratedSculkSensorAmethyst.java @@ -0,0 +1,134 @@ +package se.llbit.chunky.entity; + +import se.llbit.chunky.block.CalibratedSculkSensor; +import se.llbit.chunky.model.Model; +import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.world.Material; +import se.llbit.chunky.world.material.TextureMaterial; +import se.llbit.json.JsonObject; +import se.llbit.json.JsonValue; +import se.llbit.log.Log; +import se.llbit.math.*; +import se.llbit.math.primitive.Primitive; +import se.llbit.util.JsonUtil; + +import java.util.Collection; +import java.util.LinkedList; + +public class CalibratedSculkSensorAmethyst extends Entity { + private static final Quad[] quadsNorth = Model.join( + Model.rotateY( + new Quad[]{ + new Quad( + new Vector3(8 / 16.0, 20 / 16.0, 16 / 16.0), + new Vector3(8 / 16.0, 20 / 16.0, 0 / 16.0), + new Vector3(8 / 16.0, 8 / 16.0, 16 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 12 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(8 / 16.0, 20 / 16.0, 0 / 16.0), + new Vector3(8 / 16.0, 20 / 16.0, 16 / 16.0), + new Vector3(8 / 16.0, 8 / 16.0, 0 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 12 / 16.0, 0 / 16.0) + ) + }, + Math.toRadians(45) + ), + Model.rotateY( + new Quad[]{ + new Quad( + new Vector3(0 / 16.0, 20 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 20 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 8 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 12 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(16 / 16.0, 20 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 20 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 8 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 12 / 16.0, 0 / 16.0) + ) + }, + Math.toRadians(45) + ) + ); + private static final Quad[] quadsEast = Model.rotateY(quadsNorth); + private static final Quad[] quadsSouth = Model.rotateY(quadsEast); + private static final Quad[] quadsWest = Model.rotateNegY(quadsNorth); + + private final String facing; + private final boolean active; + private final CalibratedSculkSensor block; + + public static final Material activeMaterial = new TextureMaterial(Texture.calibratedSculkSensorAmethyst); + public static final Material inactiveMaterial = new TextureMaterial(Texture.calibratedSculkSensorAmethyst); + + public CalibratedSculkSensorAmethyst(Vector3 position, String facing, boolean active, CalibratedSculkSensor block) { + super(position); + this.facing = facing; + this.active = active; + this.block = block; + } + + public CalibratedSculkSensorAmethyst(JsonObject json) { + super(JsonUtil.vec3FromJsonObject(json.get("position"))); + this.facing = json.get("facing").stringValue("north"); + this.active = json.get("active").boolValue(true); + this.block = null; + } + + @Override + public Collection primitives(Vector3 offset) { + Collection faces = new LinkedList<>(); + Transform transform = Transform.NONE + .translate(position.x + offset.x, position.y + offset.y, position.z + offset.z); + + Quad[] quads; + if (facing.equals("east")) { + quads = quadsEast; + } else if (facing.equals("south")) { + quads = quadsSouth; + } else if (facing.equals("west")) { + quads = quadsWest; + } else { + quads = quadsNorth; + } + + Material material = active ? activeMaterial : inactiveMaterial; + for (Quad quad : quads) { + quad.addTriangles(faces, material, transform); + } + + return faces; + } + + @Override + public JsonValue toJson() { + JsonObject json = new JsonObject(); + json.add("kind", "calibratedSculkSensorAmethyst"); + json.add("position", position.toJson()); + json.add("facing", facing); + json.add("active", active); + return json; + } + + public static Entity fromJson(JsonObject json) { + return new CalibratedSculkSensorAmethyst(json); + } + + @Override + public Grid.EmitterPosition[] getEmitterPosition() { + if (block == null) { + Log.warn("Attempted to build emitter grid from unassociated campfire entity."); + return new Grid.EmitterPosition[0]; + } + + if (active) { + Grid.EmitterPosition[] pos = new Grid.EmitterPosition[1]; + pos[0] = new Grid.EmitterPosition((int) position.x, (int) position.y, (int) position.z, block); + return pos; + } else { + return new Grid.EmitterPosition[0]; + } + } +} diff --git a/chunky/src/java/se/llbit/chunky/entity/Entity.java b/chunky/src/java/se/llbit/chunky/entity/Entity.java index 541509c0ad..21615c8817 100644 --- a/chunky/src/java/se/llbit/chunky/entity/Entity.java +++ b/chunky/src/java/se/llbit/chunky/entity/Entity.java @@ -17,9 +17,6 @@ */ package se.llbit.chunky.entity; -import java.util.Collection; - -import se.llbit.chunky.PersistentSettings; import se.llbit.chunky.chunk.BlockPalette; import se.llbit.chunky.model.DecoratedPotModel; import se.llbit.json.JsonObject; @@ -30,6 +27,8 @@ import se.llbit.math.Vector3i; import se.llbit.math.primitive.Primitive; +import java.util.Collection; + /** * Represents Minecraft entities that are not stored in the octree. * @@ -45,16 +44,19 @@ protected Entity(Vector3 position) { abstract public Collection primitives(Vector3 offset); - public Grid.EmitterPosition[] getEmitterPosition() { return new Grid.EmitterPosition[0]; } + public Grid.EmitterPosition[] getEmitterPosition() { + return new Grid.EmitterPosition[0]; + } /** * Called on every entity in a scene to allow it to load it's data from other blocks in the Octree. * - * @param octree The scene's worldOctree + * @param octree The scene's worldOctree * @param palette The scene's block palate - * @param origin The Octree's origin + * @param origin The Octree's origin */ - public void loadDataFromOctree(Octree octree, BlockPalette palette, Vector3i origin) {} + public void loadDataFromOctree(Octree octree, BlockPalette palette, Vector3i origin) { + } /** * Marshalls this entity to JSON. @@ -110,6 +112,8 @@ public static Entity fromJson(JsonObject json) { return SporeBlossom.fromJson(json); case "decoratedPotSpout": return DecoratedPotModel.DecoratedPotSpoutEntity.fromJson(json); + case "calibratedSculkSensorAmethyst": + return CalibratedSculkSensorAmethyst.fromJson(json); } return null; } diff --git a/chunky/src/java/se/llbit/chunky/model/CalibratedSculkSensorModel.java b/chunky/src/java/se/llbit/chunky/model/CalibratedSculkSensorModel.java new file mode 100644 index 0000000000..279fe9e1c6 --- /dev/null +++ b/chunky/src/java/se/llbit/chunky/model/CalibratedSculkSensorModel.java @@ -0,0 +1,163 @@ +package se.llbit.chunky.model; + +import se.llbit.chunky.resources.Texture; +import se.llbit.math.Quad; +import se.llbit.math.Vector3; +import se.llbit.math.Vector4; + +import java.util.Arrays; + +public class CalibratedSculkSensorModel extends QuadModel { + private static final Texture bottom = Texture.sculkSensorBottom; + private static final Texture side = Texture.sculkSensorSide; + private static final Texture calibrated_side = Texture.calibratedSculkSensorInputSide; + private static final Texture top = Texture.calibratedSculkSensorTop; + private static final Texture[] tex = new Texture[]{ + top, bottom, side, side, side, calibrated_side, + }; + + private static final Quad[] quadsNorth = Model.join( + new Quad[]{ + new Quad( + new Vector3(0 / 16.0, 8 / 16.0, 16 / 16.0), + new Vector3(16 / 16.0, 8 / 16.0, 16 / 16.0), + new Vector3(0 / 16.0, 8 / 16.0, 0 / 16.0), + new Vector4(0 / 16.0, 16 / 16.0, 0 / 16.0, 16 / 16.0) + ), + new Quad( + new Vector3(0 / 16.0, 0 / 16.0, 0 / 16.0), + new Vector3(16 / 16.0, 0 / 16.0, 0 / 16.0), + new Vector3(0 / 16.0, 0 / 16.0, 16 / 16.0), + new Vector4(0 / 16.0, 16 / 16.0, 0 / 16.0, 16 / 16.0) + ), + new Quad( + new Vector3(0 / 16.0, 8 / 16.0, 16 / 16.0), + new Vector3(0 / 16.0, 8 / 16.0, 0 / 16.0), + new Vector3(0 / 16.0, 0 / 16.0, 16 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 8 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(16 / 16.0, 8 / 16.0, 0 / 16.0), + new Vector3(16 / 16.0, 8 / 16.0, 16 / 16.0), + new Vector3(16 / 16.0, 0 / 16.0, 0 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 8 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(0 / 16.0, 8 / 16.0, 0 / 16.0), + new Vector3(16 / 16.0, 8 / 16.0, 0 / 16.0), + new Vector3(0 / 16.0, 0 / 16.0, 0 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 8 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(16 / 16.0, 8 / 16.0, 16 / 16.0), + new Vector3(0 / 16.0, 8 / 16.0, 16 / 16.0), + new Vector3(16 / 16.0, 0 / 16.0, 16 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 8 / 16.0, 0 / 16.0) + ) + }, + Model.rotateY( + new Quad[]{ + new Quad( + new Vector3(-1 / 16.0, 16 / 16.0, 3 / 16.0), + new Vector3(7 / 16.0, 16 / 16.0, 3 / 16.0), + new Vector3(-1 / 16.0, 8 / 16.0, 3 / 16.0), + new Vector4(12 / 16.0, 4 / 16.0, 8 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(7 / 16.0, 16 / 16.0, 3 / 16.0), + new Vector3(-1 / 16.0, 16 / 16.0, 3 / 16.0), + new Vector3(7 / 16.0, 8 / 16.0, 3 / 16.0), + new Vector4(4 / 16.0, 12 / 16.0, 8 / 16.0, 0 / 16.0) + ) + }, + Math.toRadians(45), + new Vector3(3, 0, 3) + ), + Model.rotateY( + new Quad[]{ + new Quad( + new Vector3(9 / 16.0, 16 / 16.0, 3 / 16.0), + new Vector3(17 / 16.0, 16 / 16.0, 3 / 16.0), + new Vector3(9 / 16.0, 8 / 16.0, 3 / 16.0), + new Vector4(4 / 16.0, 12 / 16.0, 8 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(17 / 16.0, 16 / 16.0, 3 / 16.0), + new Vector3(9 / 16.0, 16 / 16.0, 3 / 16.0), + new Vector3(17 / 16.0, 8 / 16.0, 3 / 16.0), + new Vector4(12 / 16.0, 4 / 16.0, 8 / 16.0, 0 / 16.0) + ) + }, + Math.toRadians(-45), + new Vector3(13, 0, 3) + ), + Model.rotateY( + new Quad[]{ + new Quad( + new Vector3(9 / 16.0, 16 / 16.0, 13 / 16.0), + new Vector3(17 / 16.0, 16 / 16.0, 13 / 16.0), + new Vector3(9 / 16.0, 8 / 16.0, 13 / 16.0), + new Vector4(4 / 16.0, 12 / 16.0, 8 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(17 / 16.0, 16 / 16.0, 13 / 16.0), + new Vector3(9 / 16.0, 16 / 16.0, 13 / 16.0), + new Vector3(17 / 16.0, 8 / 16.0, 13 / 16.0), + new Vector4(12 / 16.0, 4 / 16.0, 8 / 16.0, 0 / 16.0) + ) + }, + Math.toRadians(45), + new Vector3(13, 0, 13) + ), + Model.rotateY( + new Quad[]{ + new Quad( + new Vector3(-1 / 16.0, 16 / 16.0, 13 / 16.0), + new Vector3(7 / 16.0, 16 / 16.0, 13 / 16.0), + new Vector3(-1 / 16.0, 8 / 16.0, 13 / 16.0), + new Vector4(12 / 16.0, 4 / 16.0, 8 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(7 / 16.0, 16 / 16.0, 13 / 16.0), + new Vector3(-1 / 16.0, 16 / 16.0, 13 / 16.0), + new Vector3(7 / 16.0, 8 / 16.0, 13 / 16.0), + new Vector4(4 / 16.0, 12 / 16.0, 8 / 16.0, 0 / 16.0) + ) + }, + Math.toRadians(-45), + new Vector3(3, 0, 13) + ) + ); + private static final Quad[] quadsEast = Model.rotateY(quadsNorth); + private static final Quad[] quadsSouth = Model.rotateY(quadsEast); + private static final Quad[] quadsWest = Model.rotateNegY(quadsNorth); + + private final Quad[] quads; + private final Texture[] textures; + + public CalibratedSculkSensorModel(boolean active, String facing) { + textures = new Texture[quadsNorth.length]; + if (facing.equals("east")) { + quads = quadsEast; + } else if (facing.equals("south")) { + quads = quadsSouth; + } else if (facing.equals("west")) { + quads = quadsWest; + } else { + quads = quadsNorth; + } + System.arraycopy(tex, 0, textures, 0, tex.length); + Arrays.fill(textures, 6, textures.length, + active ? Texture.sculkSensorTendrilActive : Texture.sculkSensorTendrilInactive); + } + + @Override + public Quad[] getQuads() { + return quads; + } + + @Override + public Texture[] getTextures() { + return textures; + } +} diff --git a/chunky/src/java/se/llbit/chunky/model/PitcherCropBottomModel.java b/chunky/src/java/se/llbit/chunky/model/PitcherCropBottomModel.java new file mode 100644 index 0000000000..79178b6574 --- /dev/null +++ b/chunky/src/java/se/llbit/chunky/model/PitcherCropBottomModel.java @@ -0,0 +1,361 @@ +package se.llbit.chunky.model; + +import se.llbit.chunky.resources.Texture; +import se.llbit.math.Quad; +import se.llbit.math.Vector3; +import se.llbit.math.Vector4; + +public class PitcherCropBottomModel extends QuadModel { + private static final Texture pitcher_top = Texture.pitcherCropTop; + private static final Texture pitcher_side = Texture.pitcherCropSide; + private static final Texture pitcher_bottom = Texture.pitcherCropBottom; + private static final Texture stage_1 = Texture.pitcherCropBottomStage1; + private static final Texture stage_2 = Texture.pitcherCropBottomStage2; + private static final Texture stage_3_bottom = Texture.pitcherCropBottomStage3; + private static final Texture stage_4_bottom = Texture.pitcherCropBottomStage4; + + private static final Texture[][] textures = new Texture[][]{ + new Texture[]{ + pitcher_top, pitcher_bottom, pitcher_side, pitcher_side, pitcher_side, pitcher_side + }, + new Texture[]{ + stage_1, stage_1, stage_1, stage_1, pitcher_top, pitcher_bottom, pitcher_side, pitcher_side, pitcher_side, pitcher_side + }, + new Texture[]{ + stage_2, stage_2, stage_2, stage_2, pitcher_top, pitcher_bottom, pitcher_side, pitcher_side, pitcher_side, pitcher_side + }, + new Texture[]{ + stage_3_bottom, stage_3_bottom, stage_3_bottom, stage_3_bottom, pitcher_top, pitcher_bottom, pitcher_side, pitcher_side, pitcher_side, pitcher_side + }, + new Texture[]{ + stage_4_bottom, stage_4_bottom, stage_4_bottom, stage_4_bottom, pitcher_top, pitcher_bottom, pitcher_side, pitcher_side, pitcher_side, pitcher_side + } + }; + + private static final Quad[][] quads = new Quad[][]{ + new Quad[]{ + new Quad( + new Vector3(5 / 16.0, 3 / 16.0, 11 / 16.0), + new Vector3(11 / 16.0, 3 / 16.0, 11 / 16.0), + new Vector3(5 / 16.0, 3 / 16.0, 5 / 16.0), + new Vector4(5 / 16.0, 11 / 16.0, 5 / 16.0, 11 / 16.0) + ), + new Quad( + new Vector3(5 / 16.0, -1 / 16.0, 5 / 16.0), + new Vector3(11 / 16.0, -1 / 16.0, 5 / 16.0), + new Vector3(5 / 16.0, -1 / 16.0, 11 / 16.0), + new Vector4(5 / 16.0, 11 / 16.0, 5 / 16.0, 11 / 16.0) + ), + new Quad( + new Vector3(5 / 16.0, 3 / 16.0, 11 / 16.0), + new Vector3(5 / 16.0, 3 / 16.0, 5 / 16.0), + new Vector3(5 / 16.0, -1 / 16.0, 11 / 16.0), + new Vector4(9 / 16.0, 3 / 16.0, 6 / 16.0, 2 / 16.0) + ), + new Quad( + new Vector3(11 / 16.0, 3 / 16.0, 5 / 16.0), + new Vector3(11 / 16.0, 3 / 16.0, 11 / 16.0), + new Vector3(11 / 16.0, -1 / 16.0, 5 / 16.0), + new Vector4(9 / 16.0, 3 / 16.0, 6 / 16.0, 2 / 16.0) + ), + new Quad( + new Vector3(5 / 16.0, 3 / 16.0, 5 / 16.0), + new Vector3(11 / 16.0, 3 / 16.0, 5 / 16.0), + new Vector3(5 / 16.0, -1 / 16.0, 5 / 16.0), + new Vector4(9 / 16.0, 3 / 16.0, 6 / 16.0, 2 / 16.0) + ), + new Quad( + new Vector3(11 / 16.0, 3 / 16.0, 11 / 16.0), + new Vector3(5 / 16.0, 3 / 16.0, 11 / 16.0), + new Vector3(11 / 16.0, -1 / 16.0, 11 / 16.0), + new Vector4(9 / 16.0, 3 / 16.0, 6 / 16.0, 2 / 16.0) + ) + }, + Model.join( + Model.rotateY(new Quad[]{ + new Quad( + new Vector3(0 / 16.0, 21 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 21 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 5 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(16 / 16.0, 21 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 21 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 5 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ) + }, Math.toRadians(45)), + Model.rotateY(new Quad[]{ + new Quad( + new Vector3(0 / 16.0, 21 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 21 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 5 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(16 / 16.0, 21 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 21 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 5 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ) + }, Math.toRadians(-45)), + new Quad[]{ + new Quad( + new Vector3(3 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(13 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(3 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector4(3 / 16.0, 13 / 16.0, 3 / 16.0, 13 / 16.0) + ), + new Quad( + new Vector3(3 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector3(13 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector3(3 / 16.0, -1 / 16.0, 13 / 16.0), + new Vector4(3 / 16.0, 13 / 16.0, 3 / 16.0, 13 / 16.0) + ), + new Quad( + new Vector3(3 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(3 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(3 / 16.0, -1 / 16.0, 13 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(13 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(13 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(13 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(3 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(13 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(3 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(13 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(3 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(13 / 16.0, -1 / 16.0, 13 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ) + } + ), + Model.join( + Model.rotateY(new Quad[]{ + new Quad( + new Vector3(0 / 16.0, 21 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 21 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 5 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(16 / 16.0, 21 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 21 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 5 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(8 / 16.0, 21 / 16.0, 16 / 16.0), + new Vector3(8 / 16.0, 21 / 16.0, 0 / 16.0), + new Vector3(8 / 16.0, 5 / 16.0, 16 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(8 / 16.0, 21 / 16.0, 0 / 16.0), + new Vector3(8 / 16.0, 21 / 16.0, 16 / 16.0), + new Vector3(8 / 16.0, 5 / 16.0, 0 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ) + }, Math.toRadians(45)), + new Quad[]{ + new Quad( + new Vector3(3 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(13 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(3 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector4(3 / 16.0, 13 / 16.0, 3 / 16.0, 13 / 16.0) + ), + new Quad( + new Vector3(3 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector3(13 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector3(3 / 16.0, -1 / 16.0, 13 / 16.0), + new Vector4(3 / 16.0, 13 / 16.0, 3 / 16.0, 13 / 16.0) + ), + new Quad( + new Vector3(3 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(3 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(3 / 16.0, -1 / 16.0, 13 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(13 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(13 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(13 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(3 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(13 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(3 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(13 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(3 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(13 / 16.0, -1 / 16.0, 13 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ) + } + ), + Model.join( + Model.rotateY( + new Quad[]{ + new Quad( + new Vector3(0 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 0 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(16 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 0 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ) + }, Math.toRadians(45) + ), + Model.rotateY(new Quad[]{ + new Quad( + new Vector3(0 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 0 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(16 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 0 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ) + }, Math.toRadians(-45)), + new Quad[]{ + new Quad( + new Vector3(3 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(13 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(3 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector4(3 / 16.0, 13 / 16.0, 3 / 16.0, 13 / 16.0) + ), + new Quad( + new Vector3(3 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector3(13 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector3(3 / 16.0, -1 / 16.0, 13 / 16.0), + new Vector4(3 / 16.0, 13 / 16.0, 3 / 16.0, 13 / 16.0) + ), + new Quad( + new Vector3(3 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(3 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(3 / 16.0, -1 / 16.0, 13 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(13 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(13 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(13 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(3 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(13 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(3 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(13 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(3 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(13 / 16.0, -1 / 16.0, 13 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ) + } + ), + Model.join( + Model.rotateY(new Quad[]{ + new Quad( + new Vector3(8 / 16.0, 16 / 16.0, 16 / 16.0), + new Vector3(8 / 16.0, 16 / 16.0, 0 / 16.0), + new Vector3(8 / 16.0, 0 / 16.0, 16 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(8 / 16.0, 16 / 16.0, 0 / 16.0), + new Vector3(8 / 16.0, 16 / 16.0, 16 / 16.0), + new Vector3(8 / 16.0, 0 / 16.0, 0 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(0 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 0 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(16 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 0 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ) + }, Math.toRadians(45)), + new Quad[]{ + new Quad( + new Vector3(3 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(13 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(3 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector4(3 / 16.0, 13 / 16.0, 3 / 16.0, 13 / 16.0) + ), + new Quad( + new Vector3(3 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector3(13 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector3(3 / 16.0, -1 / 16.0, 13 / 16.0), + new Vector4(3 / 16.0, 13 / 16.0, 3 / 16.0, 13 / 16.0) + ), + new Quad( + new Vector3(3 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(3 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(3 / 16.0, -1 / 16.0, 13 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(13 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(13 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(13 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(3 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(13 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(3 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(13 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(3 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(13 / 16.0, -1 / 16.0, 13 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ) + } + ) + }; + + private final int age; + + public PitcherCropBottomModel(int age) { + this.age = age; + } + + @Override + public Quad[] getQuads() { + return quads[age]; + } + + @Override + public Texture[] getTextures() { + return textures[age]; + } +} diff --git a/chunky/src/java/se/llbit/chunky/model/PitcherCropTopModel.java b/chunky/src/java/se/llbit/chunky/model/PitcherCropTopModel.java new file mode 100644 index 0000000000..ed8da40099 --- /dev/null +++ b/chunky/src/java/se/llbit/chunky/model/PitcherCropTopModel.java @@ -0,0 +1,170 @@ +package se.llbit.chunky.model; + +import se.llbit.chunky.resources.Texture; +import se.llbit.math.Quad; +import se.llbit.math.Vector3; +import se.llbit.math.Vector4; + +public class PitcherCropTopModel extends QuadModel { + private static final Texture top = Texture.pitcherCropTop; + private static final Texture side = Texture.pitcherCropSide; + private static final Texture bottom = Texture.pitcherCropBottom; + private static final Texture bottomStage2 = Texture.pitcherCropBottomStage2; + private static final Texture topStage3 = Texture.pitcherCropTopStage3; + private static final Texture topStage4 = Texture.pitcherCropTopStage4; + + private static final Texture[][] textures = new Texture[][]{ + null, null, + new Texture[]{ + bottomStage2, bottomStage2, bottomStage2, bottomStage2, top, bottom, side, side, side, side + }, + new Texture[]{ + topStage3, topStage3, topStage3, topStage3 + }, + new Texture[]{ + topStage4, topStage4, topStage4, topStage4 + } + }; + + private static final Quad[][] quads = new Quad[][]{ + null, null, + Model.translate(Model.join( + Model.rotateY(new Quad[]{ + new Quad( + new Vector3(0 / 16.0, 21 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 21 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 5 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(16 / 16.0, 21 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 21 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 5 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(8 / 16.0, 21 / 16.0, 16 / 16.0), + new Vector3(8 / 16.0, 21 / 16.0, 0 / 16.0), + new Vector3(8 / 16.0, 5 / 16.0, 16 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(8 / 16.0, 21 / 16.0, 0 / 16.0), + new Vector3(8 / 16.0, 21 / 16.0, 16 / 16.0), + new Vector3(8 / 16.0, 5 / 16.0, 0 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ) + }, Math.toRadians(45)), + new Quad[]{ + new Quad( + new Vector3(3 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(13 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(3 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector4(3 / 16.0, 13 / 16.0, 3 / 16.0, 13 / 16.0) + ), + new Quad( + new Vector3(3 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector3(13 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector3(3 / 16.0, -1 / 16.0, 13 / 16.0), + new Vector4(3 / 16.0, 13 / 16.0, 3 / 16.0, 13 / 16.0) + ), + new Quad( + new Vector3(3 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(3 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(3 / 16.0, -1 / 16.0, 13 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(13 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(13 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(13 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(3 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(13 / 16.0, 5 / 16.0, 3 / 16.0), + new Vector3(3 / 16.0, -1 / 16.0, 3 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(13 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(3 / 16.0, 5 / 16.0, 13 / 16.0), + new Vector3(13 / 16.0, -1 / 16.0, 13 / 16.0), + new Vector4(13 / 16.0, 3 / 16.0, 6 / 16.0, 0 / 16.0) + ) + } + ), 0, -1, 0), + Model.join( + Model.rotateY(new Quad[]{ + new Quad( + new Vector3(0 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 0 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(16 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 0 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ) + }, Math.toRadians(45)), + Model.rotateY(new Quad[]{ + new Quad( + new Vector3(0 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 0 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(16 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 0 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ) + }, Math.toRadians(-45)) + ), + Model.rotateY(new Quad[]{ + new Quad( + new Vector3(8 / 16.0, 16 / 16.0, 16 / 16.0), + new Vector3(8 / 16.0, 16 / 16.0, 0 / 16.0), + new Vector3(8 / 16.0, 0 / 16.0, 16 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(8 / 16.0, 16 / 16.0, 0 / 16.0), + new Vector3(8 / 16.0, 16 / 16.0, 16 / 16.0), + new Vector3(8 / 16.0, 0 / 16.0, 0 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(0 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 0 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ), + new Quad( + new Vector3(16 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(0 / 16.0, 16 / 16.0, 8 / 16.0), + new Vector3(16 / 16.0, 0 / 16.0, 8 / 16.0), + new Vector4(16 / 16.0, 0 / 16.0, 16 / 16.0, 0 / 16.0) + ) + }, Math.toRadians(45)) + }; + + private final int age; + + public PitcherCropTopModel(int age) { + this.age = age; + } + + @Override + public Quad[] getQuads() { + return quads[age]; + } + + @Override + public Texture[] getTextures() { + return textures[age]; + } +} diff --git a/chunky/src/java/se/llbit/chunky/resources/Texture.java b/chunky/src/java/se/llbit/chunky/resources/Texture.java index 025d982660..bcd0ce5f03 100644 --- a/chunky/src/java/se/llbit/chunky/resources/Texture.java +++ b/chunky/src/java/se/llbit/chunky/resources/Texture.java @@ -1305,6 +1305,18 @@ public class Texture { public static final Texture pitcherCropTopStage3 = new Texture(); @TexturePath("assets/minecraft/textures/block/pitcher_crop_top_stage_4") public static final Texture pitcherCropTopStage4 = new Texture(); + @TexturePath("assets/minecraft/textures/block/pitcher_crop_top") + public static final Texture pitcherCropTop = new Texture(); + @TexturePath("assets/minecraft/textures/block/pitcher_crop_side") + public static final Texture pitcherCropSide = new Texture(); + @TexturePath("assets/minecraft/textures/block/pitcher_crop_bottom") + public static final Texture pitcherCropBottom = new Texture(); + @TexturePath("assets/minecraft/textures/block/calibrated_sculk_sensor_amethyst") + public static final Texture calibratedSculkSensorAmethyst = new Texture(); + @TexturePath("assets/minecraft/textures/block/calibrated_sculk_sensor_top") + public static final Texture calibratedSculkSensorTop = new Texture(); + @TexturePath("assets/minecraft/textures/block/calibrated_sculk_sensor_input_side") + public static final Texture calibratedSculkSensorInputSide = new Texture(); /** Banner base texture. */ public static final Texture bannerBase = new Texture(); diff --git a/chunky/src/java/se/llbit/chunky/world/ExtraMaterials.java b/chunky/src/java/se/llbit/chunky/world/ExtraMaterials.java index a180730b6a..3db87402cc 100644 --- a/chunky/src/java/se/llbit/chunky/world/ExtraMaterials.java +++ b/chunky/src/java/se/llbit/chunky/world/ExtraMaterials.java @@ -16,13 +16,14 @@ */ package se.llbit.chunky.world; -import java.util.HashMap; -import java.util.Map; - import se.llbit.chunky.block.Candle; +import se.llbit.chunky.entity.CalibratedSculkSensorAmethyst; import se.llbit.chunky.entity.Campfire; import se.llbit.chunky.world.material.CloudMaterial; +import java.util.HashMap; +import java.util.Map; + public class ExtraMaterials { public static final Map collections = new HashMap<>(); @@ -33,6 +34,8 @@ public class ExtraMaterials { idMap.put("candle_flame", Candle.flameMaterial); idMap.put("campfire_flame", Campfire.flameMaterial); idMap.put("soul_campfire_flame", Campfire.soulFlameMaterial); + idMap.put("calibrated_sculk_sensor_amethyst_active", CalibratedSculkSensorAmethyst.activeMaterial); + idMap.put("calibrated_sculk_sensor_amethyst_inactive", CalibratedSculkSensorAmethyst.inactiveMaterial); } public static void loadDefaultMaterialProperties() { @@ -46,5 +49,10 @@ public static void loadDefaultMaterialProperties() { Campfire.soulFlameMaterial.restoreDefaults(); Campfire.soulFlameMaterial.emittance = 0.6f; + + CalibratedSculkSensorAmethyst.activeMaterial.restoreDefaults(); + CalibratedSculkSensorAmethyst.activeMaterial.emittance = 1.0f / 15; + + CalibratedSculkSensorAmethyst.inactiveMaterial.restoreDefaults(); } }