Jump to content

aferrercrafter

Members
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

aferrercrafter's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. That did the trick, although I needed to put it on folder: data/minecraft/tags/blocks/walls.json Thanks both! PD: First time on forum, my bad. I thought as it was a slight different question so I created a different thread, noted for next time!
  2. Forge: 1.18.2-40.1.0 Parchment: 2022.06.19-1.18.2 I'm searching for a Wall blockstate.json example as I'm not finding any on the minecraft (external libreries) folder. I'm doing a custom wall for a new material, nothing fancy as I just want the normal behavior. This are the details of my implementation. Registering the Block and WallBlock public static final RegistryObject<Block> EXPERIMENTAL_STONE = registerBlock("experimental_stone", () -> new Block(BlockBehaviour.Properties.of(Material.STONE).strength(9f).requiresCorrectToolForDrops()), ExperimentalCreativeModeTab.EXPERIMENTAL_TAB); public static final RegistryObject<WallBlock> EXPERIMENTAL_STONE_WALL = registerBlock("experimental_stone_wall", () -> new WallBlock(BlockBehaviour.Properties.copy(EXPERIMENTAL_STONE.get())), ExperimentalCreativeModeTab.EXPERIMENTAL_TAB); private static <T extends Block> RegistryObject<T> registerBlock(String name, Supplier<T> block, CreativeModeTab tab){ RegistryObject<T> toReturn = BLOCKS.register(name, block); registerBlockItem(name, toReturn, tab); return toReturn; } private static <T extends Block> RegistryObject<Item> registerBlockItem(String name, RegistryObject<T> block, CreativeModeTab tab){ return ExperimentalItems.ITEMS.register(name, () -> new BlockItem(block.get(), new Item.Properties().tab(tab))); } Current blockstate implementation: assets/experimental/blockstates/experimental_stone.json { "variants": { "": { "model": "experimental:block/experimental_stone" } } } assets/experimental/blockstates/experimental_stone_wall.json { "multipart": [ { "when": { "up": "true" }, "apply": { "model": "experimental:block/experimental_stone_wall_post", "uvlock": true } }, { "when": { "north": "low" }, "apply": { "model": "experimental:block/experimental_stone_wall_side", "uvlock": true } }, { "when": { "east": "low" }, "apply": { "model": "experimental:block/experimental_stone_wall_side", "y": 90, "uvlock": true } }, { "when": { "south": "low" }, "apply": { "model": "experimental:block/experimental_stone_wall_side", "y": 180, "uvlock": true } }, { "when": { "west": "low" }, "apply": { "model": "experimental:block/experimental_stone_wall_side", "y": 270, "uvlock": true } }, { "when": { "north": "tall" }, "apply": { "model": "experimental:block/experimental_stone_wall_post", "uvlock": true } }, { "when": { "east": "tall" }, "apply": { "model": "experimental:block/experimental_stone_wall_post", "y": 90, "uvlock": true } }, { "when": { "south": "tall" }, "apply": { "model": "experimental:block/experimental_stone_wall_post", "y": 180, "uvlock": true } }, { "when": { "west": "tall" }, "apply": { "model": "experimental:block/experimental_stone_wall_post", "y": 270, "uvlock": true } } ] } With this, I don't se any error on logs, or any missing texture, and the wall block is attaching with anything that is not itself, but it would seem I'm missing a property for being able to attach to itself. I do find a declaration on the vanilla BlockStateData class with this: register(2224, "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'false',up:'false',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'false',up:'false',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'false',up:'true',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'false',up:'true',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'true',up:'false',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'true',up:'false',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'true',up:'true',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'true',up:'true',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'false',up:'false',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'false',up:'false',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'false',up:'true',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'false',up:'true',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'true',up:'false',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'true',up:'false',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'true',up:'true',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'true',up:'true',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'false',up:'false',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'false',up:'false',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'false',up:'true',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'false',up:'true',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'true',up:'false',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'true',up:'false',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'true',up:'true',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'true',up:'true',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'false',up:'false',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'false',up:'false',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'false',up:'true',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'false',up:'true',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'true',up:'false',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'true',up:'false',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'true',up:'true',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'true',up:'true',variant:'cobblestone',west:'true'}}"); But when I try something similar to "north": true, it does generate an error and textures for the wall are not generated.: ←[mjava.lang.RuntimeException: Unknown value 'true' for property 'north' on 'Block{experimental:experimental_stone_wall}' in 'true' ........ (removed the whole stacktrace as it ends here with the detail) at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) ←[33m[18:26:53] [Render thread/WARN] [minecraft/ModelBakery]: Unable to bake model: 'experimental:experimental_stone_wall#east=low,north=tall,south=none,up=true,waterlogged=false,west=none': java.lang.RuntimeException: Unknown value 'true' for property 'north' on 'Block{experimental:experimental_stone_wall}' in 'true' Thanks in advance for the help!
  3. Minecraft: 1.18.2 Forge: 1.18.2-40.1.0 Parchment: 2022.06.19-1.18.2 I'm in a similar situation and as you mentioned I was tracking how vanilla does this, I found the creation of of the Cobblestone Wall on the Vanilla Block class public static final Block COBBLESTONE_WALL = register("cobblestone_wall", new WallBlock(BlockBehaviour.Properties.copy(COBBLESTONE))); And tracked down the generation of a Wall Block (multipart): return MultiPartGenerator .multiPart(pWallBlock) .with( Condition.condition().term(BlockStateProperties.UP, true), Variant.variant().with(VariantProperties.MODEL, pPostModelLocation)) .with( Condition.condition().term(BlockStateProperties.NORTH_WALL, WallSide.LOW), Variant.variant().with(VariantProperties.MODEL, pLowSideModelLocation).with(VariantProperties.UV_LOCK, true)) .with( Condition.condition().term(BlockStateProperties.EAST_WALL, WallSide.LOW), Variant.variant().with(VariantProperties.MODEL, pLowSideModelLocation) .with(VariantProperties.Y_ROT, VariantProperties.Rotation.R90).with(VariantProperties.UV_LOCK, true)) .with( Condition.condition().term(BlockStateProperties.SOUTH_WALL, WallSide.LOW), Variant.variant().with(VariantProperties.MODEL, pLowSideModelLocation) .with(VariantProperties.Y_ROT, VariantProperties.Rotation.R180).with(VariantProperties.UV_LOCK, true)) .with( Condition.condition().term(BlockStateProperties.WEST_WALL, WallSide.LOW), Variant.variant().with(VariantProperties.MODEL, pLowSideModelLocation) .with(VariantProperties.Y_ROT, VariantProperties.Rotation.R270).with(VariantProperties.UV_LOCK, true)) .with( Condition.condition().term(BlockStateProperties.NORTH_WALL, WallSide.TALL), Variant.variant().with(VariantProperties.MODEL, pTallSideModelLocation).with(VariantProperties.UV_LOCK, true)) .with( Condition.condition().term(BlockStateProperties.EAST_WALL, WallSide.TALL), Variant.variant().with(VariantProperties.MODEL, pTallSideModelLocation) .with(VariantProperties.Y_ROT, VariantProperties.Rotation.R90).with(VariantProperties.UV_LOCK, true) ).with( Condition.condition().term(BlockStateProperties.SOUTH_WALL, WallSide.TALL), Variant.variant().with(VariantProperties.MODEL, pTallSideModelLocation) .with(VariantProperties.Y_ROT, VariantProperties.Rotation.R180).with(VariantProperties.UV_LOCK, true)) .with( Condition.condition().term(BlockStateProperties.WEST_WALL, WallSide.TALL), Variant.variant().with(VariantProperties.MODEL, pTallSideModelLocation) .with(VariantProperties.Y_ROT, VariantProperties.Rotation.R270).with(VariantProperties.UV_LOCK, true)); But the one thing I cannot track is the blockstate json. I tried to create one based on examples from open source mods, but seemes something changed because they where not working at first. After seeing the implementation of the generator, I changed the properties that I saw there to something like this: { "multipart": [ { "when": { "up": "true" }, "apply": { "model": "examplemod:block/examplemod_stone_wall_post", "uvlock": true } }, { "when": { "north": "low" }, "apply": { "model": "examplemod:block/examplemod_stone_wall_side", "uvlock": true } }, { "when": { "east": "low" }, "apply": { "model": "examplemod:block/examplemod_stone_wall_side", "y": 90, "uvlock": true } }, { "when": { "south": "low" }, "apply": { "model": "examplemod:block/examplemod_stone_wall_side", "y": 180, "uvlock": true } }, { "when": { "west": "low" }, "apply": { "model": "examplemod:block/examplemod_stone_wall_side", "y": 270, "uvlock": true } } ] } With this, and the models json created, the custom walls are generated and texture are there, but still, they do not connect with eachothers I'm guess I'm missing something on the json, but I cannot find any json on the generated Vanilla Minecraft (the one on external libs)
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.