diff --git a/chunky/src/java/se/llbit/chunky/block/MinecraftBlockProvider.java b/chunky/src/java/se/llbit/chunky/block/MinecraftBlockProvider.java index 9dffa6a66..0bb51596b 100644 --- a/chunky/src/java/se/llbit/chunky/block/MinecraftBlockProvider.java +++ b/chunky/src/java/se/llbit/chunky/block/MinecraftBlockProvider.java @@ -7,8 +7,6 @@ import se.llbit.chunky.entity.BannerDesign; import se.llbit.chunky.entity.SkullEntity; import se.llbit.chunky.model.minecraft.FlowerPotModel; -import se.llbit.chunky.model.minecraft.FlowerPotModel.Kind; -import se.llbit.chunky.model.minecraft.PaleMossCarpetModel; import se.llbit.chunky.resources.ShulkerTexture; import se.llbit.chunky.resources.Texture; import se.llbit.nbt.ListTag; @@ -978,7 +976,7 @@ private static void addBlocks(Texture texture, String... names) { addBlock("mangrove_propagule", (name, tag) -> new MangrovePropagule( BlockProvider.stringToInt(tag.get("Properties").get("age"), 0), tag.get("Properties").get("hanging").stringValue("false").equals("true"))); - addBlock("potted_mangrove_propagule", (name, tag) -> new FlowerPot(name, Kind.MANGROVE_PROPAGULE)); + addBlock("potted_mangrove_propagule", (name, tag) -> new FlowerPot(name, FlowerPotModel.Kind.MANGROVE_PROPAGULE)); addBlock("sculk_catalyst", (name, tag) -> new SculkCatalyst(tag.get("Properties").get("bloom").stringValue("false").equals("true"))); addBlock("sculk", Texture.sculk); addBlock("sculk_shrieker", (name, tag) -> new SculkShrieker(tag.get("Properties").get("can_summon").stringValue("false").equals("true"))); @@ -1024,10 +1022,10 @@ private static void addBlocks(Texture texture, String... names) { addBlock("cherry_wood", (name, tag) -> log(tag, Texture.cherryLog, Texture.cherryLog)); addBlock("stripped_cherry_wood", (name, tag) -> log(tag, Texture.strippedCherryLog, Texture.strippedCherryLog)); addBlock("cherry_sapling", (name, tag) -> new SpriteBlock(name, Texture.cherrySapling)); - addBlock("potted_cherry_sapling", (name, tag) -> new FlowerPot(name, Kind.CHERRY_SAPLING)); + addBlock("potted_cherry_sapling", (name, tag) -> new FlowerPot(name, FlowerPotModel.Kind.CHERRY_SAPLING)); addBlock("torchflower", (name, tag) -> new SpriteBlock(name, Texture.torchflower)); addBlock("torchflower_crop", (name, tag) -> new TorchflowerCrop(BlockProvider.stringToInt(tag.get("Properties").get("age"), 2))); - addBlock("potted_torchflower", (name, tag) -> new FlowerPot(name, Kind.TORCHFLOWER)); + addBlock("potted_torchflower", (name, tag) -> new FlowerPot(name, FlowerPotModel.Kind.TORCHFLOWER)); addBlock("suspicious_sand", (name, tag) -> suspiciousSand(tag)); addBlock("suspicious_gravel", (name, tag) -> suspiciousGravel(tag)); addBlock("chiseled_bookshelf", (name, tag) -> new ChiseledBookshelf( @@ -1124,7 +1122,7 @@ private static void addBlocks(Texture texture, String... names) { addBlock("heavy_core", (name, tag) -> new HeavyCore()); addBlock("trial_spawner", (name, tag) -> new TrialSpawner(tag.get("Properties").get("ominous").stringValue().equals("true"), tag.get("Properties").get("trial_spawner_state").stringValue("active"))); - // Winter drop (1.22?) + //1.21.4 (Winter Drop) addBlock("pale_moss_block", Texture.paleMossBlock); addBlock("pale_oak_leaves", (name, tag) -> new UntintedLeaves(name, Texture.paleOakLeaves)); addBlock("pale_oak_log", (name, tag) -> log(tag, Texture.paleOakLog, Texture.paleOakLogTop)); @@ -1155,7 +1153,24 @@ private static void addBlocks(Texture texture, String... names) { tag.get("Properties").get("west").stringValue("none"))); addBlock("creaking_heart", (name, tag) -> new CreakingHeart(name, tag.get("Properties").get("axis").stringValue("y"), - tag.get("Properties").get("creaking").stringValue("active"))); + tag.get("Properties").get("active").stringValue("false").equals("true"))); + addBlock("chiseled_resin_bricks", Texture.chiseledResinBricks); + addBlock("closed_eyeblossom", (name, tag) -> new SpriteBlock(name, Texture.closedEyeblossom)); + addBlock("open_eyeblossom", (name, tag) -> new OpenEyeblossom()); + addBlock("potted_closed_eyeblossom", (name, tag) -> new FlowerPot(name, FlowerPotModel.Kind.CLOSED_EYEBLOSSOM)); + addBlock("potted_open_eyeblossom", (name, tag) -> new FlowerPot(name, FlowerPotModel.Kind.OPEN_EYEBLOSSOM)); + addBlock("resin_block", Texture.resinBlock); + addBlock("resin_bricks", Texture.resinBricks); + addBlock("resin_brick_stairs", (name, tag) -> stairs(tag, Texture.resinBricks)); + addBlock("resin_brick_slab", (name, tag) -> slab(tag, Texture.resinBricks)); + addBlock("resin_brick_walls", (name, tag) -> wall(tag, Texture.resinBricks)); + addBlock("resin_clump", (name, tag) -> new ResinClump( + tag.get("Properties").get("north").stringValue("false").equals("true"), + tag.get("Properties").get("south").stringValue("false").equals("true"), + tag.get("Properties").get("east").stringValue("false").equals("true"), + tag.get("Properties").get("west").stringValue("false").equals("true"), + tag.get("Properties").get("up").stringValue("false").equals("true"), + tag.get("Properties").get("down").stringValue("false").equals("true"))); } @Override @@ -3585,22 +3600,14 @@ private static Block seaPickle(Tag tag) { private static Block structureBlock(Tag tag) { Tag properties = tag.get("Properties"); - Texture texture = Texture.structureBlock; String mode = properties.get("mode").stringValue(""); - switch (mode) { - case "corner": - texture = Texture.structureBlockCorner; - break; - case "data": - texture = Texture.structureBlockData; - break; - case "load": - texture = Texture.structureBlockLoad; - break; - case "save": - texture = Texture.structureBlockSave; - break; - } + Texture texture = switch (mode) { + case "corner" -> Texture.structureBlockCorner; + case "data" -> Texture.structureBlockData; + case "load" -> Texture.structureBlockLoad; + case "save" -> Texture.structureBlockSave; + default -> Texture.structureBlock; + }; return new MinecraftBlock("structure_block", texture); } @@ -3620,31 +3627,23 @@ private static Block candleCake(Tag tag, Texture candleTexture, Texture candleTe private static Block suspiciousSand(Tag tag) { Tag properties = tag.get("Properties"); String dusted = properties.get("dusted").stringValue("0"); - switch(dusted) { - case "1": - return new MinecraftBlock("suspicious_sand", Texture.suspiciousSandStage1); - case "2": - return new MinecraftBlock("suspicious_sand", Texture.suspiciousSandStage2); - case "3": - return new MinecraftBlock("suspicious_sand", Texture.suspiciousSandStage3); - default: - return new MinecraftBlock("suspicious_sand", Texture.suspiciousSandStage0); - } + return switch (dusted) { + case "1" -> new MinecraftBlock("suspicious_sand", Texture.suspiciousSandStage1); + case "2" -> new MinecraftBlock("suspicious_sand", Texture.suspiciousSandStage2); + case "3" -> new MinecraftBlock("suspicious_sand", Texture.suspiciousSandStage3); + default -> new MinecraftBlock("suspicious_sand", Texture.suspiciousSandStage0); + }; } private static Block suspiciousGravel(Tag tag) { Tag properties = tag.get("Properties"); String dusted = properties.get("dusted").stringValue("0"); - switch(dusted) { - case "1": - return new MinecraftBlock("suspicious_gravel", Texture.suspiciousGravelStage1); - case "2": - return new MinecraftBlock("suspicious_gravel", Texture.suspiciousGravelStage2); - case "3": - return new MinecraftBlock("suspicious_gravel", Texture.suspiciousGravelStage3); - default: - return new MinecraftBlock("suspicious_gravel", Texture.suspiciousGravelStage0); - } + return switch (dusted) { + case "1" -> new MinecraftBlock("suspicious_gravel", Texture.suspiciousGravelStage1); + case "2" -> new MinecraftBlock("suspicious_gravel", Texture.suspiciousGravelStage2); + case "3" -> new MinecraftBlock("suspicious_gravel", Texture.suspiciousGravelStage3); + default -> new MinecraftBlock("suspicious_gravel", Texture.suspiciousGravelStage0); + }; } private static Block decoratedPot(Tag tag) { diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/CreakingHeart.java b/chunky/src/java/se/llbit/chunky/block/minecraft/CreakingHeart.java index 3f8320339..3fd4f3fe2 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/CreakingHeart.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/CreakingHeart.java @@ -7,14 +7,14 @@ public class CreakingHeart extends AbstractModelBlock { private final String description; - public CreakingHeart(String name, String axis, String creaking) { + public CreakingHeart(String name, String axis, boolean active) { super(name, Texture.creakingHeartTop); this.model = new LogModel( axis, - creaking.equals("disabled") ? Texture.creakingHeart : Texture.creakingHeartActive, - creaking.equals("disabled") ? Texture.creakingHeartTop : Texture.creakingHeartTopActive + active ? Texture.creakingHeartActive : Texture.creakingHeart, + active ? Texture.creakingHeartTopActive : Texture.creakingHeartTop ); - this.description = String.format("axis=%s, creaking=%s", axis, creaking); + this.description = String.format("active=%s, axis=%s", active, axis); } @Override diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/FlowerPot.java b/chunky/src/java/se/llbit/chunky/block/minecraft/FlowerPot.java index c30f09376..4289df54d 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/FlowerPot.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/FlowerPot.java @@ -25,6 +25,6 @@ public class FlowerPot extends AbstractModelBlock { public FlowerPot(String name, FlowerPotModel.Kind kind) { super(name, Texture.flowerPot); - this.model = new FlowerPotModel(kind); + this.model = FlowerPotModel.forKind(kind); } } diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/OpenEyeblossom.java b/chunky/src/java/se/llbit/chunky/block/minecraft/OpenEyeblossom.java new file mode 100644 index 000000000..95a406bb5 --- /dev/null +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/OpenEyeblossom.java @@ -0,0 +1,16 @@ +package se.llbit.chunky.block.minecraft; + +import se.llbit.chunky.block.AbstractModelBlock; +import se.llbit.chunky.model.minecraft.OpenEyeblossomModel; +import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.world.Material; +import se.llbit.chunky.world.material.TextureMaterial; + +public class OpenEyeblossom extends AbstractModelBlock { + public static final Material emissiveMaterial = new TextureMaterial(Texture.openEyeblossomEmissive); + + public OpenEyeblossom() { + super("open_eyeblossom", Texture.openEyeblossom); + model = new OpenEyeblossomModel(); + } +} diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/ResinClump.java b/chunky/src/java/se/llbit/chunky/block/minecraft/ResinClump.java new file mode 100644 index 000000000..cda153b82 --- /dev/null +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/ResinClump.java @@ -0,0 +1,22 @@ +package se.llbit.chunky.block.minecraft; + +import se.llbit.chunky.block.AbstractModelBlock; +import se.llbit.chunky.model.minecraft.ResinClumpModel; +import se.llbit.chunky.resources.Texture; + +public class ResinClump extends AbstractModelBlock { + private final String description; + + public ResinClump(boolean north, boolean south, boolean east, boolean west, boolean up, + boolean down) { + super("resin_clump", Texture.resinClump); + this.description = String.format("north=%s, south=%s, east=%s, west=%s, up=%s, down=%s", + north, south, east, west, up, down); + this.model = new ResinClumpModel(north, south, east, west, up, down); + } + + @Override + public String description() { + return description; + } +} diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/FlowerPotModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/FlowerPotModel.java index 860223c59..771d0bb91 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/FlowerPotModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/FlowerPotModel.java @@ -17,11 +17,15 @@ */ package se.llbit.chunky.model.minecraft; +import se.llbit.chunky.block.minecraft.OpenEyeblossom; +import se.llbit.chunky.model.BlockModel; import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.model.Tint; +import se.llbit.chunky.renderer.scene.Scene; import se.llbit.chunky.resources.Texture; import se.llbit.math.Quad; +import se.llbit.math.Ray; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -69,7 +73,9 @@ public enum Kind { MANGROVE_PROPAGULE, TORCHFLOWER, CHERRY_SAPLING, - PALE_OAK_SAPLING + PALE_OAK_SAPLING, + CLOSED_EYEBLOSSOM, + OPEN_EYEBLOSSOM } private static final Texture flowerpot = Texture.flowerPot; @@ -480,7 +486,7 @@ public enum Kind { private final Texture[] textures; private final Tint[] tints; - public FlowerPotModel(Kind kind) { + private FlowerPotModel(Kind kind) { switch (kind) { case NONE: quads = flowerPot; @@ -527,6 +533,14 @@ public FlowerPotModel(Kind kind) { System.arraycopy(flowerPotTex, 0, textures, 0, flowerPotTex.length); Arrays.fill(textures, flowerPotTex.length, textures.length, Texture.mangrovePropagule); break; + case OPEN_EYEBLOSSOM: + quads = Model.join(flowerPot, flowerSmall, flowerSmall); + textures = new Texture[flowerPotTex.length + 2 * flowerSmall.length]; + tints = null; + System.arraycopy(flowerPotTex, 0, textures, 0, flowerPotTex.length); + Arrays.fill(textures, flowerPotTex.length, flowerPotTex.length + flowerSmall.length, Texture.openEyeblossom); + Arrays.fill(textures, flowerPotTex.length + flowerSmall.length, textures.length, Texture.openEyeblossomEmissive); + break; default: quads = Model.join(flowerPot, flowerSmall); textures = new Texture[flowerPotTex.length + flowerSmall.length]; @@ -620,6 +634,9 @@ public FlowerPotModel(Kind kind) { case PALE_OAK_SAPLING: Arrays.fill(textures, flowerPotTex.length, textures.length, Texture.paleOakSapling); break; + case CLOSED_EYEBLOSSOM: + Arrays.fill(textures, flowerPotTex.length, textures.length, Texture.closedEyeblossom); + break; } break; } @@ -639,4 +656,53 @@ public Texture[] getTextures() { public Tint[] getTints() { return tints; } + + public static BlockModel forKind(Kind kind) { + if (kind == Kind.OPEN_EYEBLOSSOM) { + return new FlowerPotModel(Kind.OPEN_EYEBLOSSOM) { + @Override + public boolean intersect(Ray ray, Scene scene) { + boolean hit = false; + ray.t = Double.POSITIVE_INFINITY; + + Quad[] quads = getQuads(); + Texture[] textures = getTextures(); + Tint[] tintedQuads = getTints(); + + float[] color = null; + Tint tint = Tint.NONE; + for (int i = 0; i < quads.length; ++i) { + Quad quad = quads[i]; + if (quad.intersect(ray)) { + float[] c = textures[i].getColor(ray.u, ray.v); + if (c[3] > Ray.EPSILON) { + tint = tintedQuads == null ? Tint.NONE : tintedQuads[i]; + color = c; + ray.t = ray.tNext; + if (quad.doubleSided) + ray.orientNormal(quad.n); + else + ray.setNormal(quad.n); + hit = true; + if (textures[i] == Texture.openEyeblossomEmissive) { + ray.setCurrentMaterial(OpenEyeblossom.emissiveMaterial); + } + } + } + } + + if (hit) { + ray.color.set(color); + tint.tint(ray.color, ray, scene); + ray.distance += ray.t; + ray.o.scaleAdd(ray.t, ray.d); + } + return hit; + } + }; + } else { + return new FlowerPotModel(kind); + } + } + } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/OpenEyeblossomModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/OpenEyeblossomModel.java new file mode 100644 index 000000000..0b430d818 --- /dev/null +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/OpenEyeblossomModel.java @@ -0,0 +1,76 @@ +package se.llbit.chunky.model.minecraft; + +import se.llbit.chunky.block.minecraft.OpenEyeblossom; +import se.llbit.chunky.model.Model; +import se.llbit.chunky.model.QuadModel; +import se.llbit.chunky.model.Tint; +import se.llbit.chunky.renderer.scene.Scene; +import se.llbit.chunky.resources.Texture; +import se.llbit.math.Quad; +import se.llbit.math.Ray; + +import java.util.Arrays; + +public class OpenEyeblossomModel extends QuadModel { + private static final Quad[] quads; + private static final Texture[] textures; + + static { + SpriteModel base = new SpriteModel(Texture.openEyeblossom, "up"); + SpriteModel emissive = new SpriteModel(Texture.openEyeblossomEmissive, "up"); + + quads = Model.join(base.getQuads(), emissive.getQuads()); + textures = Arrays.copyOf(base.getTextures(), base.getTextures().length + emissive.getTextures().length); + System.arraycopy(emissive.getTextures(), 0, textures, base.getTextures().length, emissive.getTextures().length); + } + + @Override + public Quad[] getQuads() { + return quads; + } + + @Override + public Texture[] getTextures() { + return textures; + } + + @Override + public boolean intersect(Ray ray, Scene scene) { + boolean hit = false; + ray.t = Double.POSITIVE_INFINITY; + + Quad[] quads = getQuads(); + Texture[] textures = getTextures(); + Tint[] tintedQuads = getTints(); + + float[] color = null; + Tint tint = Tint.NONE; + for (int i = 0; i < quads.length; ++i) { + Quad quad = quads[i]; + if (quad.intersect(ray)) { + float[] c = textures[i].getColor(ray.u, ray.v); + if (c[3] > Ray.EPSILON) { + tint = tintedQuads == null ? Tint.NONE : tintedQuads[i]; + color = c; + ray.t = ray.tNext; + if (quad.doubleSided) + ray.orientNormal(quad.n); + else + ray.setNormal(quad.n); + hit = true; + if (textures[i] == Texture.openEyeblossomEmissive) { + ray.setCurrentMaterial(OpenEyeblossom.emissiveMaterial); + } + } + } + } + + if (hit) { + ray.color.set(color); + tint.tint(ray.color, ray, scene); + ray.distance += ray.t; + ray.o.scaleAdd(ray.t, ray.d); + } + return hit; + } +} diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/ResinClumpModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/ResinClumpModel.java new file mode 100644 index 000000000..376d28a90 --- /dev/null +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/ResinClumpModel.java @@ -0,0 +1,73 @@ +package se.llbit.chunky.model.minecraft; + +import se.llbit.chunky.model.QuadModel; +import se.llbit.chunky.resources.Texture; +import se.llbit.math.Quad; +import se.llbit.math.Transform; +import se.llbit.math.Vector3; +import se.llbit.math.Vector4; + +import java.util.ArrayList; +import java.util.Arrays; + +public class ResinClumpModel extends QuadModel { + private static final Quad northQuad; + private static final Quad southQuad; + private static final Quad eastQuad; + private static final Quad westQuad; + private static final Quad upQuad; + private static final Quad downQuad; + + static { + northQuad = new Quad( + new Vector3(0 / 16.0, 16 / 16.0, 0.1 / 16.0), + new Vector3(16 / 16.0, 16 / 16.0, 0.1 / 16.0), + new Vector3(0 / 16.0, 0 / 16.0, 0.1 / 16.0), + new Vector4(0 / 16.0, 16 / 16.0, 16 / 16.0, 0 / 16.0), + true); + eastQuad = new Quad(northQuad, Transform.NONE.rotateY()); + southQuad = new Quad(eastQuad, Transform.NONE.rotateY()); + westQuad = new Quad(northQuad, Transform.NONE.rotateNegY()); + upQuad = new Quad(northQuad, Transform.NONE.rotateX()); + downQuad = new Quad(northQuad, Transform.NONE.rotateNegX()); + } + + private final Quad[] quads; + private final Texture[] textures; + + public ResinClumpModel(boolean north, boolean south, boolean east, boolean west, boolean up, boolean down) { + ArrayList quads = new ArrayList<>(); + boolean allSides = !north && !south && !east && !west && !up && !down; + if (north || allSides) { + quads.add(northQuad); + } + if (south || allSides) { + quads.add(southQuad); + } + if (east || allSides) { + quads.add(eastQuad); + } + if (west || allSides) { + quads.add(westQuad); + } + if (up || allSides) { + quads.add(upQuad); + } + if (down || allSides) { + quads.add(downQuad); + } + this.quads = quads.toArray(new Quad[0]); + this.textures = new Texture[this.quads.length]; + Arrays.fill(this.textures, Texture.resinClump); + } + + @Override + public Quad[] getQuads() { + return quads; + } + + @Override + public Texture[] getTextures() { + return textures; + } +} diff --git a/chunky/src/java/se/llbit/chunky/resources/Texture.java b/chunky/src/java/se/llbit/chunky/resources/Texture.java index 3fc9da080..19923281f 100644 --- a/chunky/src/java/se/llbit/chunky/resources/Texture.java +++ b/chunky/src/java/se/llbit/chunky/resources/Texture.java @@ -1556,6 +1556,20 @@ public class Texture { public static final Texture creakingHeartActive = new Texture(); @TexturePath("assets/minecraft/textures/block/creaking_heart_top_active") public static final Texture creakingHeartTopActive = new Texture(); + @TexturePath("assets/minecraft/textures/block/chiseled_resin_bricks") + public static final Texture chiseledResinBricks = new Texture(); + @TexturePath("assets/minecraft/textures/block/closed_eyeblossom") + public static final Texture closedEyeblossom = new Texture(); + @TexturePath("assets/minecraft/textures/block/open_eyeblossom") + public static final Texture openEyeblossom = new Texture(); + @TexturePath("assets/minecraft/textures/block/open_eyeblossom_emissive") + public static final Texture openEyeblossomEmissive = new Texture(); + @TexturePath("assets/minecraft/textures/block/resin_block") + public static final Texture resinBlock = new Texture(); + @TexturePath("assets/minecraft/textures/block/resin_bricks") + public static final Texture resinBricks = new Texture(); + @TexturePath("assets/minecraft/textures/block/resin_clump") + public static final Texture resinClump = 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 560ca1137..8eda29367 100644 --- a/chunky/src/java/se/llbit/chunky/world/ExtraMaterials.java +++ b/chunky/src/java/se/llbit/chunky/world/ExtraMaterials.java @@ -17,6 +17,7 @@ package se.llbit.chunky.world; import se.llbit.chunky.block.minecraft.Candle; +import se.llbit.chunky.block.minecraft.OpenEyeblossom; import se.llbit.chunky.entity.CalibratedSculkSensorAmethyst; import se.llbit.chunky.entity.Campfire; import se.llbit.chunky.entity.SporeBlossom; @@ -39,6 +40,7 @@ public class ExtraMaterials { idMap.put("calibrated_sculk_sensor_amethyst_inactive", CalibratedSculkSensorAmethyst.inactiveMaterial); idMap.put("spore_blossom (base)", SporeBlossom.baseMaterial); idMap.put("spore_blossom (blossom)", SporeBlossom.blossomMaterial); + idMap.put("open_eyeblossom (emissive)", OpenEyeblossom.emissiveMaterial); } public static void loadDefaultMaterialProperties() { @@ -60,5 +62,8 @@ public static void loadDefaultMaterialProperties() { SporeBlossom.blossomMaterial.restoreDefaults(); SporeBlossom.baseMaterial.restoreDefaults(); + + OpenEyeblossom.emissiveMaterial.restoreDefaults(); + OpenEyeblossom.emissiveMaterial.emittance = 1.0f / 15; } }