Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chunky/src/java/se/llbit/chunky/block/BlockSpec.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public Block toBlock() {
return maybeWaterlogged(block);
}
}
return new UnknownBlock(name);
return new UnknownBlock(name, tag);
}

private Block maybeWaterlogged(Block block) {
Expand Down
2 changes: 1 addition & 1 deletion chunky/src/java/se/llbit/chunky/block/MinecraftBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public Block applyWaterlogging() {
};

public MinecraftBlock(String name, Texture texture) {
super("minecraft:" + name, texture);
super(name.contains(":") ? name : "minecraft:" + name, texture);
opaque = true;
solid = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1234,9 +1234,38 @@ private static void addBlock(String name, Texture texture) {
"copper_golem_statue", "waxed_copper_golem_statue", "exposed_copper_golem_statue", "waxed_exposed_copper_golem_statue",
"weathered_copper_golem_statue", "waxed_weathered_copper_golem_statue", "oxidized_copper_golem_statue", "waxed_oxidized_copper_golem_statue");

// 26.1 (2026 Spring Drop)
// 26.1 (Tiny Takeover)
addBlock("golden_dandelion", (name, tag) -> new SpriteBlock(name, Texture.goldenDandelion));
addBlock("potted_golden_dandelion", (name, tag) -> new FlowerPot(name, FlowerPotModel.Kind.GOLDEN_DANDELION));

// 26.2 (Chaos Cubed)
addBlock("chiseled_cinnabar", (name, tag) -> new MinecraftBlock(name, Texture.chiseledCinnabar));
addBlock("cinnabar", (name, tag) -> new MinecraftBlock(name, Texture.cinnabar));
addBlock("cinnabar_slab", (name, tag) -> slab(tag, Texture.cinnabar));
addBlock("cinnabar_stairs", (name, tag) -> stairs(tag, Texture.cinnabar));
addBlock("cinnabar_wall", (name, tag) -> wall(tag, Texture.cinnabar));
addBlock("cinnabar_bricks", (name, tag) -> new MinecraftBlock(name, Texture.cinnabarBricks));
addBlock("cinnabar_brick_slab", (name, tag) -> slab(tag, Texture.cinnabarBricks));
addBlock("cinnabar_brick_stairs", (name, tag) -> stairs(tag, Texture.cinnabarBricks));
addBlock("cinnabar_brick_wall", (name, tag) -> wall(tag, Texture.cinnabarBricks));
addBlock("polished_cinnabar", (name, tag) -> new MinecraftBlock(name, Texture.polishedCinnabar));
addBlock("polished_cinnabar_slab", (name, tag) -> slab(tag, Texture.polishedCinnabar));
addBlock("polished_cinnabar_stairs", (name, tag) -> stairs(tag, Texture.polishedCinnabar));
addBlock("polished_cinnabar_wall", (name, tag) -> wall(tag, Texture.polishedCinnabar));
addBlock("chiseled_sulfur", (name, tag) -> new MinecraftBlock(name, Texture.chiseledSulfur));
addBlock("sulfur", (name, tag) -> new MinecraftBlock(name, Texture.sulfur));
addBlock("sulfur_slab", (name, tag) -> slab(tag, Texture.sulfur));
addBlock("sulfur_stairs", (name, tag) -> stairs(tag, Texture.sulfur));
addBlock("sulfur_wall", (name, tag) -> wall(tag, Texture.sulfur));
addBlock("sulfur_bricks", (name, tag) -> new MinecraftBlock(name, Texture.sulfurBricks));
addBlock("sulfur_brick_slab", (name, tag) -> slab(tag, Texture.sulfurBricks));
addBlock("sulfur_brick_stairs", (name, tag) -> stairs(tag, Texture.sulfurBricks));
addBlock("sulfur_brick_wall", (name, tag) -> wall(tag, Texture.sulfurBricks));
addBlock("potent_sulfur", (name, tag) -> new MinecraftBlock(name, Texture.potentSulfur));
addBlock("polished_sulfur", (name, tag) -> new MinecraftBlock(name, Texture.polishedSulfur));
addBlock("polished_sulfur_slab", (name, tag) -> slab(tag, Texture.polishedSulfur));
addBlock("polished_sulfur_stairs", (name, tag) -> stairs(tag, Texture.polishedSulfur));
addBlock("polished_sulfur_wall", (name, tag) -> wall(tag, Texture.polishedSulfur));
}

@Override
Expand Down
23 changes: 23 additions & 0 deletions chunky/src/java/se/llbit/chunky/block/minecraft/UnknownBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,30 @@
import se.llbit.chunky.renderer.scene.Scene;
import se.llbit.chunky.resources.Texture;
import se.llbit.math.Ray;
import se.llbit.nbt.NamedTag;
import se.llbit.nbt.Tag;

public class UnknownBlock extends SpriteBlock {
public static final UnknownBlock UNKNOWN = new UnknownBlock("?");
private final String description;

public UnknownBlock(String name) {
super(name, Texture.unknown);
description = "";
}

public UnknownBlock(String name, Tag tag) {
super(name, Texture.unknown);
StringBuilder descriptionBuilder = new StringBuilder();
for (NamedTag property : tag.get("Properties").asCompound()) {
if (!descriptionBuilder.isEmpty()) {
descriptionBuilder.append(", ");
}
descriptionBuilder.append(property.name);
descriptionBuilder.append("=");
descriptionBuilder.append(property.tag.stringValue("?"));
}
this.description = descriptionBuilder.toString();
}

@Override
Expand All @@ -36,4 +54,9 @@ public boolean intersect(Ray ray, Scene scene) {
}
return super.intersect(ray, scene);
}

@Override
public String description() {
return description;
}
}
25 changes: 24 additions & 1 deletion chunky/src/java/se/llbit/chunky/resources/Texture.java
Original file line number Diff line number Diff line change
Expand Up @@ -1730,10 +1730,33 @@ public class Texture {
@TexturePath("assets/minecraft/textures/entity/copper_golem/oxidized_copper_golem")
public static final Texture copperGolemOxidized = new Texture();

// [26.1 (2026 Spring Drop)]
// [26.1 (Tiny Takeover)]
@TexturePath("assets/minecraft/textures/block/golden_dandelion")
public static final Texture goldenDandelion = new Texture();

// [26.2 (Chaos Cubed)]
@TexturePath("assets/minecraft/textures/block/chiseled_cinnabar")
public static final Texture chiseledCinnabar = new Texture();
@TexturePath("assets/minecraft/textures/block/cinnabar")
public static final Texture cinnabar = new Texture();
@TexturePath("assets/minecraft/textures/block/cinnabar_bricks")
public static final Texture cinnabarBricks = new Texture();
@TexturePath("assets/minecraft/textures/block/polished_cinnabar")
public static final Texture polishedCinnabar = new Texture();
@TexturePath("assets/minecraft/textures/block/chiseled_sulfur")
public static final Texture chiseledSulfur = new Texture();
@TexturePath("assets/minecraft/textures/block/sulfur")
public static final Texture sulfur = new Texture();
@TexturePath("assets/minecraft/textures/block/sulfur_bricks")
public static final Texture sulfurBricks = new Texture();
@TexturePath("assets/minecraft/textures/block/potent_sulfur")
public static final Texture potentSulfur = new Texture();
@TexturePath("assets/minecraft/textures/block/polished_sulfur")
public static final Texture polishedSulfur = new Texture();

@TexturePath("assets/minecraft/textures/entity/equipment/wings/elytra")
public static final Texture elytra = new Texture();

/** Banner base texture. */
public static final Texture bannerBase = new Texture();

Expand Down
1 change: 1 addition & 0 deletions chunky/src/java/se/llbit/chunky/world/biome/Biomes.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ public class Biomes {
private static final Biome mangroveSwamp = register(Biome.create("minecraft:mangrove_swamp", "Mangrove Swamp", 0.8, 0.9).defaultColors(0x6A7039, 0x8DB127, 0xA36946).waterColor(0x3A7A6A).mapColor(0x07F9B2).swamp());
private static final Biome cherryGrove = register(Biome.create("minecraft:cherry_grove", "Cherry Grove", 0.5, 0.8).mapColor(0xFCCBE7).defaultColors(0xB6DB61, 0xB6DB61, 0xA17148).grassColor(0xB6DB61).foliageColor(0xB6DB61));
private static final Biome paleGarden = register(Biome.create("minecraft:pale_garden", "Pale Garden", 0.7, 0.8).mapColor(0xB9B9B9).grassColor(0x778272).foliageColor(0x878D76).dryFoliageColor(0xA0A69C).waterColor(0x76889D));
private static final Biome sulfurCaves = register(Biome.create("minecraft:sulfur_caves", "Sulfur Caves", 0.8, 0.4).mapColor(0xE5E533).defaultColors(0x91BD59, 0x77AB2F, 0xA37546).waterColor(0x34BF89));

/**
* Pre-1.18 biomes, i.e. before the biomes palette was introduced.
Expand Down
Loading