Skip to content

Commit a0c59cd

Browse files
committed
Merge remote-tracking branch 'origin/1.21.1' into 1.21.1
2 parents 2f4c189 + f991c35 commit a0c59cd

6 files changed

Lines changed: 16 additions & 11 deletions

File tree

gradlew

100644100755
File mode changed.
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
2-
"loader": "dynamictrees:branch",
2+
"loader": "dtru:bamboo",
3+
"render_type": "minecraft:cutout_mipped",
34
"textures": {
45
"bark": "regions_unexplored:block/bamboo_log",
5-
"rings": "regions_unexplored:block/bamboo_log"
6+
"rings": "regions_unexplored:block/bamboo_log",
7+
"leaves": "regions_unexplored:block/bamboo_log_leaves"
68
}
79
}
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
2-
"loader": "dynamictrees:branch",
2+
"loader": "dtru:bamboo",
3+
"render_type": "minecraft:cutout_mipped",
34
"textures": {
45
"bark": "regions_unexplored:block/stripped_bamboo_log",
5-
"rings": "regions_unexplored:block/stripped_bamboo_log"
6+
"rings": "regions_unexplored:block/stripped_bamboo_log",
7+
"leaves": "dynamictrees:block/air"
68
}
79
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2-
"parent": "dynamictrees:item/branch",
2+
"parent": "dtru:item/branch_bamboo",
33
"textures": {
44
"bark": "regions_unexplored:block/bamboo_log",
5-
"rings": "regions_unexplored:block/bamboo_log"
5+
"rings": "regions_unexplored:block/bamboo_log",
6+
"leaves": "regions_unexplored:block/bamboo_log_leaves"
67
}
78
}

src/main/java/dtteam/dtru/model/BambooBranchBlockBakedModel.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class BambooBranchBlockBakedModel implements IDynamicBakedModel {
5454

5555
protected final BlockModel blockModel;
5656

57-
protected final ResourceLocation modelLocation;
57+
// protected final ResourceLocation modelLocation;
5858

5959
protected final TextureAtlasSprite barkTexture;
6060
protected final TextureAtlasSprite ringsTexture;
@@ -66,12 +66,12 @@ public class BambooBranchBlockBakedModel implements IDynamicBakedModel {
6666
protected final BakedModel[] rings = new BakedModel[8]; // 8 Cores with the ring textures on all 6 sides.
6767
protected BakedModel leaves;
6868

69-
public BambooBranchBlockBakedModel(ResourceLocation modelLocation, ResourceLocation barkTextureLocation, ResourceLocation ringsTextureLocation, ResourceLocation leavesTextureLocation,
69+
public BambooBranchBlockBakedModel(IGeometryBakingContext context, ResourceLocation barkTextureLocation, ResourceLocation ringsTextureLocation, ResourceLocation leavesTextureLocation,
7070
Function<Material, TextureAtlasSprite> spriteGetter) {
7171
this.blockModel = new BlockModel(null, new ArrayList<>(), new HashMap<>(), false, BlockModel.GuiLight.FRONT,
7272
ItemTransforms.NO_TRANSFORMS, new ArrayList<>());
73-
// this.blockModel.customData.setRenderTypeHint(customData.getRenderTypeHint());
74-
this.modelLocation = modelLocation;
73+
this.blockModel.customData.setRenderTypeHint(context.getRenderTypeHint());
74+
// this.modelLocation = modelLocation;
7575
this.barkTexture = spriteGetter.apply(new Material(InventoryMenu.BLOCK_ATLAS, barkTextureLocation));
7676
this.ringsTexture = spriteGetter.apply(new Material(InventoryMenu.BLOCK_ATLAS, ringsTextureLocation));
7777
this.leavesTexture = spriteGetter.apply(new Material(InventoryMenu.BLOCK_ATLAS, leavesTextureLocation));

src/main/java/dtteam/dtru/model/BambooBranchBlockModelGeometry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ public BambooBranchBlockModelGeometry(ResourceLocation barkTextureLocation, Reso
3737

3838
@Override
3939
public BakedModel bake(IGeometryBakingContext context, ModelBaker modelBaker, Function<Material, TextureAtlasSprite> spriteGetter, ModelState modelState, ItemOverrides itemOverrides) {
40-
return new BambooBranchBlockBakedModel(ResourceLocation.tryParse(context.getModelName()), this.barkTextureLocation, this.ringsTextureLocation, this.leavesTextureLocation, spriteGetter);
40+
return new BambooBranchBlockBakedModel(context, this.barkTextureLocation, this.ringsTextureLocation, this.leavesTextureLocation, spriteGetter);
4141
}
4242
}

0 commit comments

Comments
 (0)