Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Adubbz committed Dec 21, 2024
1 parent ad5d586 commit 7f910f4
Show file tree
Hide file tree
Showing 11 changed files with 165 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.21.4 2024-12-20T21:01:16.7462528 Model Definitions
// 1.21.4 2024-12-21T13:22:51.948459 Model Definitions
a9fe8be3aab87a38a4648b43f43f48684f83f1c1 assets/biomesoplenty/blockstates/black_sand.json
3670b788e3f8e8154db2b0cb2a4eec8d1d92ce02 assets/biomesoplenty/blockstates/black_sandstone.json
b7e71e9e2c45918de279dba69073d21fc4da8c34 assets/biomesoplenty/blockstates/black_sandstone_slab.json
Expand Down Expand Up @@ -193,7 +193,7 @@ e5279f5144c904fe0e5626171a83cf7168cb19e3 assets/biomesoplenty/blockstates/pine_f
59ea8bf733d606e4f2a50dfcc6c49294dba565b0 assets/biomesoplenty/blockstates/pine_fence_gate.json
ef93472fca93792b43c860a38613c001d203a57d assets/biomesoplenty/blockstates/pine_hanging_sign.json
7ce9145b015a8c10885505b0136f44193617d227 assets/biomesoplenty/blockstates/pine_leaves.json
84440681f5aa0d110c70261da4d34de7061a4461 assets/biomesoplenty/blockstates/pine_log.json
f45bcb18e0596ba6933976014629bc5428bf207d assets/biomesoplenty/blockstates/pine_log.json
a7e6488a3e527b26b5a69eab6cf9ec040aaaa06c assets/biomesoplenty/blockstates/pine_planks.json
aee5a6f60b2b441813d3ee0cb62c288ddec16256 assets/biomesoplenty/blockstates/pine_pressure_plate.json
461baf1469447c3c5fc4d41d5ba3ee780d2d2161 assets/biomesoplenty/blockstates/pine_sapling.json
Expand Down Expand Up @@ -289,7 +289,7 @@ ebcbe6c139a9823bf5d04f77411c5997d84d4222 assets/biomesoplenty/blockstates/umbran
dfc38222d77f2ae61d7c13b10727114ed77a451c assets/biomesoplenty/blockstates/umbran_fence_gate.json
2e8b19bb98b8fe44080efc3ece1a91f0e849cf47 assets/biomesoplenty/blockstates/umbran_hanging_sign.json
8cec305f9c723c0cfaaffd7ebfcb57bef0213ab0 assets/biomesoplenty/blockstates/umbran_leaves.json
d88753018fe228002fdd126ddb420c979dd23cb2 assets/biomesoplenty/blockstates/umbran_log.json
965dd42e4f68974d7a776f61941d52b754f4d627 assets/biomesoplenty/blockstates/umbran_log.json
a16971234a8399da845ce1705362a7c835ee110f assets/biomesoplenty/blockstates/umbran_planks.json
eea25b623bac7a96d7a3e0f831d6e9f4f263807a assets/biomesoplenty/blockstates/umbran_pressure_plate.json
660f9706f78e66d947284cb324bfd640170f7775 assets/biomesoplenty/blockstates/umbran_sapling.json
Expand Down Expand Up @@ -1163,6 +1163,8 @@ d8c706d163f2313579bb4dc03a9adc5cdad638c2 assets/biomesoplenty/models/block/pine_
d6eb6b8118554583ad8627e948de9c03c3c6ee32 assets/biomesoplenty/models/block/pine_leaves.json
a8cd2b46fca74932fc63afbbbc1d92dce9bea080 assets/biomesoplenty/models/block/pine_log.json
4ab775c391bb070d5a60a3b7512762655f6d37c0 assets/biomesoplenty/models/block/pine_log_horizontal.json
0d1d251ffc0a344dd8b3c0f9f048037e9d4e1b7f assets/biomesoplenty/models/block/pine_log_knot.json
ebba14ead1c48a1eb956c1dc44e90981578284e8 assets/biomesoplenty/models/block/pine_log_knot_horizontal.json
572f321b1950b1813e96e24a36c16df59e2b9060 assets/biomesoplenty/models/block/pine_planks.json
4e6f35e01bdcedaccaff2e2d3cf2a00d77873a18 assets/biomesoplenty/models/block/pine_pressure_plate.json
278e8c5159bded40db06981ce7ee4ed1b815a5d1 assets/biomesoplenty/models/block/pine_pressure_plate_down.json
Expand Down Expand Up @@ -1321,6 +1323,8 @@ c51db2195e3505ee61364b93697ad3786c1e7ba8 assets/biomesoplenty/models/block/umbra
32286ad04ef941724db22b1720e85cec48292acb assets/biomesoplenty/models/block/umbran_leaves.json
06d498197f69a97fd023b5510c2ac08b5c37def4 assets/biomesoplenty/models/block/umbran_log.json
629f9b9501b5c0d7668fc2d13a37d0ca7aa3c11e assets/biomesoplenty/models/block/umbran_log_horizontal.json
3d15e765f23367e5d622befbe090bec38d4fd890 assets/biomesoplenty/models/block/umbran_log_knot.json
7e8b27749d6357d76182bb99e2148a99460bd38d assets/biomesoplenty/models/block/umbran_log_knot_horizontal.json
2521e465cb46d81c9a8c35f5711a49924dc4d858 assets/biomesoplenty/models/block/umbran_planks.json
2c62756512bea1e62524bf591a90cc5a867868ea assets/biomesoplenty/models/block/umbran_pressure_plate.json
2972d0a313bb4c81b3c90605eb22b3a333cc7144 assets/biomesoplenty/models/block/umbran_pressure_plate_down.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,34 @@
{
"variants": {
"axis=x": {
"model": "biomesoplenty:block/pine_log_horizontal",
"x": 90,
"y": 90
},
"axis=y": {
"model": "biomesoplenty:block/pine_log"
},
"axis=z": {
"model": "biomesoplenty:block/pine_log_horizontal",
"x": 90
}
"axis=x": [
{
"model": "biomesoplenty:block/pine_log_horizontal",
"x": 90,
"y": 90
},
{
"model": "biomesoplenty:block/pine_log_knot_horizontal",
"x": 90,
"y": 90
}
],
"axis=y": [
{
"model": "biomesoplenty:block/pine_log"
},
{
"model": "biomesoplenty:block/pine_log_knot"
}
],
"axis=z": [
{
"model": "biomesoplenty:block/pine_log_horizontal",
"x": 90
},
{
"model": "biomesoplenty:block/pine_log_knot_horizontal",
"x": 90
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,34 @@
{
"variants": {
"axis=x": {
"model": "biomesoplenty:block/umbran_log_horizontal",
"x": 90,
"y": 90
},
"axis=y": {
"model": "biomesoplenty:block/umbran_log"
},
"axis=z": {
"model": "biomesoplenty:block/umbran_log_horizontal",
"x": 90
}
"axis=x": [
{
"model": "biomesoplenty:block/umbran_log_horizontal",
"x": 90,
"y": 90
},
{
"model": "biomesoplenty:block/umbran_log_knot_horizontal",
"x": 90,
"y": 90
}
],
"axis=y": [
{
"model": "biomesoplenty:block/umbran_log"
},
{
"model": "biomesoplenty:block/umbran_log_knot"
}
],
"axis=z": [
{
"model": "biomesoplenty:block/umbran_log_horizontal",
"x": 90
},
{
"model": "biomesoplenty:block/umbran_log_knot_horizontal",
"x": 90
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column",
"textures": {
"end": "biomesoplenty:block/pine_log_top",
"side": "biomesoplenty:block/pine_log_knot"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column_horizontal",
"textures": {
"end": "biomesoplenty:block/pine_log_top",
"side": "biomesoplenty:block/pine_log_knot"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column",
"textures": {
"end": "biomesoplenty:block/umbran_log_top",
"side": "biomesoplenty:block/umbran_log_knot"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column_horizontal",
"textures": {
"end": "biomesoplenty:block/umbran_log_top",
"side": "biomesoplenty:block/umbran_log_knot"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"ambientocclusion": false,
"textures": {
"particle": "biomesoplenty:block/willow_vine",
"vine": "biomesoplenty:block/willow_vine"
},
"elements": [
{ "from": [ 0, 0, 0.8 ],
"to": [ 16, 16, 0.8 ],
"shade": false,
"faces": {
"north": { "uv": [ 16, 0, 0, 16 ], "texture": "#vine", "tintindex": 0 },
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#vine", "tintindex": 0 }
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@
import net.minecraft.client.data.models.ItemModelOutput;
import net.minecraft.client.data.models.blockstates.*;
import net.minecraft.client.data.models.model.*;
import net.minecraft.core.Direction;
import net.minecraft.data.BlockFamily;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.FoliageColor;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;

import java.util.List;
import java.util.Map;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
Expand Down Expand Up @@ -85,7 +87,8 @@ public void run()
this.createPlantWithDefaultItem(BOPBlocks.FIR_SAPLING, BOPBlocks.POTTED_FIR_SAPLING, BlockModelGenerators.PlantType.NOT_TINTED);

// Pine
this.woodProvider(BOPBlocks.PINE_LOG).logWithHorizontal(BOPBlocks.PINE_LOG).wood(BOPBlocks.PINE_WOOD);
this.woodProvider(BOPBlocks.PINE_LOG).wood(BOPBlocks.PINE_WOOD);
this.logWithKnot(BOPBlocks.PINE_LOG);
this.woodProvider(BOPBlocks.STRIPPED_PINE_LOG).logWithHorizontal(BOPBlocks.STRIPPED_PINE_LOG).wood(BOPBlocks.STRIPPED_PINE_WOOD);
this.createHangingSign(BOPBlocks.STRIPPED_PINE_LOG, BOPBlocks.PINE_HANGING_SIGN, BOPBlocks.PINE_WALL_HANGING_SIGN);
this.createLeavesOverlay(BOPBlocks.PINE_LEAVES, FoliageColor.FOLIAGE_DEFAULT);
Expand Down Expand Up @@ -152,7 +155,8 @@ public void run()
this.createPlantWithDefaultItem(BOPBlocks.MAGIC_SAPLING, BOPBlocks.POTTED_MAGIC_SAPLING, BlockModelGenerators.PlantType.NOT_TINTED);

// Umbran
this.woodProvider(BOPBlocks.UMBRAN_LOG).logWithHorizontal(BOPBlocks.UMBRAN_LOG).wood(BOPBlocks.UMBRAN_WOOD);
this.woodProvider(BOPBlocks.UMBRAN_LOG).wood(BOPBlocks.UMBRAN_WOOD);
this.logWithKnot(BOPBlocks.UMBRAN_LOG);
this.woodProvider(BOPBlocks.STRIPPED_UMBRAN_LOG).logWithHorizontal(BOPBlocks.STRIPPED_UMBRAN_LOG).wood(BOPBlocks.STRIPPED_UMBRAN_WOOD);
this.createHangingSign(BOPBlocks.STRIPPED_UMBRAN_LOG, BOPBlocks.UMBRAN_HANGING_SIGN, BOPBlocks.UMBRAN_WALL_HANGING_SIGN);
this.createTrivialBlock(BOPBlocks.UMBRAN_LEAVES, TexturedModel.LEAVES);
Expand Down Expand Up @@ -328,6 +332,45 @@ public void createTintedItemModel(Block block, ItemTintSource tint)
this.registerSimpleTintedItemModel(block, resourcelocation, tint);
}

public void logWithKnot(Block block)
{
var logMapping = TextureMapping.logColumn(block);
var logKnotMapping = BOPTextureMapping.logColumnKnot(block);
ResourceLocation columnModel = ModelTemplates.CUBE_COLUMN.create(block, logMapping, this.modelOutput);
ResourceLocation horizontalModel = ModelTemplates.CUBE_COLUMN_HORIZONTAL.create(block, logMapping, this.modelOutput);
ResourceLocation columnKnotModel = ModelTemplates.CUBE_COLUMN.createWithSuffix(block, "_knot", logKnotMapping, this.modelOutput);
ResourceLocation horizontalKnotModel = ModelTemplates.CUBE_COLUMN_HORIZONTAL.createWithSuffix(block, "_knot", logKnotMapping, this.modelOutput);
this.blockStateOutput.accept(
MultiVariantGenerator.multiVariant(block)
.with(
PropertyDispatch.property(BlockStateProperties.AXIS)
.select(Direction.Axis.Y, List.of(
Variant.variant().with(VariantProperties.MODEL, columnModel),
Variant.variant().with(VariantProperties.MODEL, columnKnotModel)
))
.select(
Direction.Axis.Z,
List.of(
Variant.variant().with(VariantProperties.MODEL, horizontalModel).with(VariantProperties.X_ROT, VariantProperties.Rotation.R90),
Variant.variant().with(VariantProperties.MODEL, horizontalKnotModel).with(VariantProperties.X_ROT, VariantProperties.Rotation.R90)
)
)
.select(
Direction.Axis.X,
List.of(Variant.variant()
.with(VariantProperties.MODEL, horizontalModel)
.with(VariantProperties.X_ROT, VariantProperties.Rotation.R90)
.with(VariantProperties.Y_ROT, VariantProperties.Rotation.R90),
Variant.variant()
.with(VariantProperties.MODEL, horizontalKnotModel)
.with(VariantProperties.X_ROT, VariantProperties.Rotation.R90)
.with(VariantProperties.Y_ROT, VariantProperties.Rotation.R90)
)
)
)
);
}

public void createGlowshroomBlock(Block p_388752_)
{
ResourceLocation resourcelocation = ModelTemplates.SINGLE_FACE.create(p_388752_, TextureMapping.defaultTexture(p_388752_), this.modelOutput);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@ public static TextureMapping leavesOverlay(Block block)
.put(TextureSlot.LAYER1, getBlockTexture(block, "_overlay"))
.put(TextureSlot.LAYER0, getBlockTexture(block));
}

public static TextureMapping logColumnKnot(Block block)
{
return new TextureMapping()
.put(TextureSlot.SIDE, getBlockTexture(block, "_knot"))
.put(TextureSlot.END, getBlockTexture(block, "_top"))
.put(TextureSlot.PARTICLE, getBlockTexture(block));
}
}

0 comments on commit 7f910f4

Please sign in to comment.