Skip to content

Commit 9cc82cb

Browse files
committed
Add bee nest, beehive and honeycomb block
1 parent a4b65cc commit 9cc82cb

File tree

3 files changed

+47
-10
lines changed

3 files changed

+47
-10
lines changed

chunky/src/java/se/llbit/chunky/block/BlockSpec.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,6 +1508,12 @@ private Block blockFromTag(String name) {
15081508
}
15091509
case "honey_block":
15101510
return new Honey();
1511+
case "bee_nest":
1512+
return beeNest(tag);
1513+
case "beehive":
1514+
return beehive(tag);
1515+
case "honeycomb_block":
1516+
return new MinecraftBlock("honeycomb_block", Texture.honeycombBlock);
15111517
case "spawner":
15121518
return new MinecraftBlockTranslucent(name, Texture.monsterSpawner);
15131519
case "nether_portal": {
@@ -1758,6 +1764,20 @@ private static Block blastFurnace(Tag tag) {
17581764
return new TopBottomOrientedTexturedBlock("blast_furnace", facing, lit.equals("true") ? Texture.blastFurnaceFrontOn : Texture.blastFurnaceFront, Texture.blastFurnaceSide, Texture.blastFurnaceTop);
17591765
}
17601766

1767+
private static Block beeNest(Tag tag) {
1768+
Tag properties = tag.get("Properties");
1769+
String facing = getFacing(tag, "north");
1770+
int honeyLevel = stringToInt(properties.get("honey_level"), 0);
1771+
return new TopBottomOrientedTexturedBlock("smoker", facing, honeyLevel == 5 ? Texture.beeNestFrontHoney : Texture.beeNestFront, Texture.beeNestSide, Texture.beeNestTop, Texture.beeNestBottom);
1772+
}
1773+
1774+
private static Block beehive(Tag tag) {
1775+
Tag properties = tag.get("Properties");
1776+
String facing = getFacing(tag, "north");
1777+
int honeyLevel = stringToInt(properties.get("honey_level"), 0);
1778+
return new TopBottomOrientedTexturedBlock("smoker", facing, honeyLevel == 5 ? Texture.beehiveFrontHoney : Texture.beehiveFront, Texture.beehiveSide, Texture.beehiveEnd, Texture.beehiveEnd);
1779+
}
1780+
17611781
private static Block wheat(Tag tag) {
17621782
int age = stringToInt(tag.get("Properties").get("age"), 7);
17631783
return new Wheat(age);

chunky/src/java/se/llbit/chunky/resources/Texture.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,16 @@ public class Texture {
762762
public static final Texture honeyBlockTop = new Texture();
763763
public static final Texture honeyBlockSide = new Texture();
764764
public static final Texture honeyBlockBottom = new Texture();
765+
public static final Texture beeNestFront = new Texture();
766+
public static final Texture beeNestFrontHoney = new Texture();
767+
public static final Texture beeNestSide = new Texture();
768+
public static final Texture beeNestTop = new Texture();
769+
public static final Texture beeNestBottom = new Texture();
770+
public static final Texture beehiveFront = new Texture();
771+
public static final Texture beehiveFrontHoney = new Texture();
772+
public static final Texture beehiveSide = new Texture();
773+
public static final Texture beehiveEnd = new Texture();
774+
public static final Texture honeycombBlock = new Texture();
765775

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

chunky/src/java/se/llbit/chunky/resources/TexturePackLoader.java

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3314,16 +3314,6 @@ public class TexturePackLoader {
33143314
new SimpleTexture("assets/minecraft/textures/block/smoker_front_on",
33153315
Texture.smokerFrontOn));
33163316

3317-
allTextures.put("honey_block_top",
3318-
new SimpleTexture("assets/minecraft/textures/block/honey_block_top",
3319-
Texture.honeyBlockTop));
3320-
allTextures.put("honey_block_side",
3321-
new SimpleTexture("assets/minecraft/textures/block/honey_block_side",
3322-
Texture.honeyBlockSide));
3323-
allTextures.put("honey_block_bottom",
3324-
new SimpleTexture("assets/minecraft/textures/block/honey_block_bottom",
3325-
Texture.honeyBlockBottom));
3326-
33273317
addSimpleTexture("assets/minecraft/textures/block/sweet_berry_bush_stage0", Texture.sweetBerryBushStage0);
33283318
addSimpleTexture("assets/minecraft/textures/block/sweet_berry_bush_stage1", Texture.sweetBerryBushStage1);
33293319
addSimpleTexture("assets/minecraft/textures/block/sweet_berry_bush_stage2", Texture.sweetBerryBushStage2);
@@ -3333,6 +3323,23 @@ public class TexturePackLoader {
33333323
addSimpleTexture("assets/minecraft/textures/block/lily_of_the_valley", Texture.lilyOfTheValley);
33343324
addSimpleTexture("assets/minecraft/textures/block/wither_rose", Texture.witherRose);
33353325
addSimpleTexture("assets/minecraft/textures/block/bamboo_stage0", Texture.bambooSapling);
3326+
3327+
addSimpleTexture("assets/minecraft/textures/block/honey_block_top", Texture.honeyBlockTop);
3328+
addSimpleTexture("assets/minecraft/textures/block/honey_block_side", Texture.honeyBlockSide);
3329+
addSimpleTexture("assets/minecraft/textures/block/honey_block_bottom", Texture.honeyBlockBottom);
3330+
3331+
addSimpleTexture("assets/minecraft/textures/block/beehive_end", Texture.beehiveEnd);
3332+
addSimpleTexture("assets/minecraft/textures/block/beehive_side", Texture.beehiveSide);
3333+
addSimpleTexture("assets/minecraft/textures/block/beehive_front", Texture.beehiveFront);
3334+
addSimpleTexture("assets/minecraft/textures/block/beehive_front_honey", Texture.beehiveFrontHoney);
3335+
3336+
addSimpleTexture("assets/minecraft/textures/block/bee_nest_top", Texture.beeNestTop);
3337+
addSimpleTexture("assets/minecraft/textures/block/bee_nest_bottom", Texture.beeNestBottom);
3338+
addSimpleTexture("assets/minecraft/textures/block/bee_nest_side", Texture.beeNestSide);
3339+
addSimpleTexture("assets/minecraft/textures/block/bee_nest_front", Texture.beeNestFront);
3340+
addSimpleTexture("assets/minecraft/textures/block/bee_nest_front_honey", Texture.beeNestFrontHoney);
3341+
3342+
addSimpleTexture("assets/minecraft/textures/block/honeycomb_block", Texture.honeycombBlock);
33363343
}
33373344

33383345
private static void addSimpleTexture(String file, Texture texture) {

0 commit comments

Comments
 (0)