Skip to content

Commit

Permalink
Fixed sandstone texture issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Adubbz committed Dec 19, 2024
1 parent 79562d4 commit cd81003
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.21.4 2024-12-19T11:15:06.3661492 Model Definitions
// 1.21.4 2024-12-19T19:05:52.1408943 Model Definitions
3670b788e3f8e8154db2b0cb2a4eec8d1d92ce02 assets/biomesoplenty/blockstates/black_sandstone.json
b7e71e9e2c45918de279dba69073d21fc4da8c34 assets/biomesoplenty/blockstates/black_sandstone_slab.json
99a0b068818dd6a10909ea477064d05f752ddcfb assets/biomesoplenty/blockstates/black_sandstone_stairs.json
Expand Down Expand Up @@ -769,10 +769,10 @@ bf5269bb598c6def0aedbbe57fc41130d55005a9 assets/biomesoplenty/models/block/brims
4d32a4dc1db48419324132eae8a138bf44cc926c assets/biomesoplenty/models/block/brimstone_brick_wall_post.json
a7dbbdacf6afbe3175ba0dff45e3de74b3eede7f assets/biomesoplenty/models/block/brimstone_brick_wall_side.json
5d0385c77fd4548c9742049f53160e0e6114c5e9 assets/biomesoplenty/models/block/brimstone_brick_wall_side_tall.json
fbffea52f3c5f3623fe9e1afa6f19610e4d8d34e assets/biomesoplenty/models/block/chiseled_black_sandstone.json
e4324b0fe7e776bbdbf1f8854ea3a2af1fe20532 assets/biomesoplenty/models/block/chiseled_black_sandstone.json
b70794ef51b2a84ee41d734b1177bb7e0747c875 assets/biomesoplenty/models/block/chiseled_brimstone_bricks.json
49239c77c170cad1b874efde545fad86c9cbf6ce assets/biomesoplenty/models/block/chiseled_orange_sandstone.json
68bcc7f3ee7334da7a629bfed0802fbed02a4310 assets/biomesoplenty/models/block/chiseled_white_sandstone.json
41c45295015d4d51a1f8204a22966da5e5b47425 assets/biomesoplenty/models/block/chiseled_orange_sandstone.json
47c03f0442f4f682e0d5c87abe617b8331b6ef31 assets/biomesoplenty/models/block/chiseled_white_sandstone.json
f8e05b6ff6b690f5d81a3cac7c9277e63513bcef assets/biomesoplenty/models/block/cut_black_sandstone.json
7f3735dd248aa5e9b88bf7ce0356dc4676aea75b assets/biomesoplenty/models/block/cut_black_sandstone_slab.json
97cce6f49a097810be569fbd385434a42e99be89 assets/biomesoplenty/models/block/cut_black_sandstone_slab_top.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"parent": "minecraft:block/cube_all",
"parent": "minecraft:block/cube_column",
"textures": {
"all": "biomesoplenty:block/chiseled_black_sandstone"
"end": "biomesoplenty:block/black_sandstone_top",
"side": "biomesoplenty:block/chiseled_black_sandstone"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"parent": "minecraft:block/cube_all",
"parent": "minecraft:block/cube_column",
"textures": {
"all": "biomesoplenty:block/chiseled_orange_sandstone"
"end": "biomesoplenty:block/orange_sandstone_top",
"side": "biomesoplenty:block/chiseled_orange_sandstone"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"parent": "minecraft:block/cube_all",
"parent": "minecraft:block/cube_column",
"textures": {
"all": "biomesoplenty:block/chiseled_white_sandstone"
"end": "biomesoplenty:block/white_sandstone_top",
"side": "biomesoplenty:block/chiseled_white_sandstone"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,14 @@ public class BOPBlockModelGenerators extends BlockModelGenerators
}))
.build();

final Consumer<BlockStateGenerator> blockStateOutput;
final BiConsumer<ResourceLocation, ModelInstance> modelOutput;

public BOPBlockModelGenerators(Consumer<BlockStateGenerator> blockStateOutput, ItemModelOutput itemModelOutput, BiConsumer<ResourceLocation, ModelInstance> modelOutput)
{
super(blockStateOutput, itemModelOutput, modelOutput);
this.blockStateOutput = blockStateOutput;
this.modelOutput = modelOutput;
}

@Override
Expand Down Expand Up @@ -192,10 +197,10 @@ public void run()
}

@Override
public BlockModelGenerators.BlockFamilyProvider family(Block p_388779_)
public BlockModelGenerators.BlockFamilyProvider family(Block block)
{
TexturedModel texturedmodel = this.texturedModels.getOrDefault(p_388779_, TexturedModel.CUBE.get(p_388779_));
return new BlockModelGenerators.BlockFamilyProvider(texturedmodel.getMapping()).fullBlock(p_388779_, texturedmodel.getTemplate());
TexturedModel texturedmodel = this.texturedModels.getOrDefault(block, TexturedModel.CUBE.get(block));
return new BOPBlockFamilyProvider(texturedmodel.getMapping()).fullBlock(block, texturedmodel.getTemplate());
}

public void createWillowVine()
Expand All @@ -204,4 +209,22 @@ public void createWillowVine()
ResourceLocation resourcelocation = this.createFlatItemModelWithBlockTexture(BOPItems.WILLOW_VINE, BOPBlocks.WILLOW_VINE);
this.registerSimpleTintedItemModel(BOPBlocks.WILLOW_VINE, resourcelocation, ItemModelUtils.constantTint(FoliageColor.FOLIAGE_DEFAULT));
}

public class BOPBlockFamilyProvider extends BlockFamilyProvider
{

public BOPBlockFamilyProvider(TextureMapping p_388151_)
{
super(p_388151_);
}

@Override
public BlockModelGenerators.BlockFamilyProvider fullBlockVariant(Block block)
{
TexturedModel texturedmodel = BOPBlockModelGenerators.this.texturedModels.getOrDefault(block, TexturedModel.CUBE.get(block));
ResourceLocation resourcelocation = texturedmodel.create(block, BOPBlockModelGenerators.this.modelOutput);
BOPBlockModelGenerators.this.blockStateOutput.accept(BlockModelGenerators.createSimpleBlock(block, resourcelocation));
return this;
}
}
}

0 comments on commit cd81003

Please sign in to comment.