Posted November 16, 20196 yr I get this error: [m[33m[15:56:03] [Server-Worker-3/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'kenmod:blockstates/oak_log_wall_type_0.json' missing model for variant: 'kenmod:oak_log_wall_type_0#facing=east' [m[33m[15:56:03] [Server-Worker-3/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'kenmod:blockstates/oak_log_wall_type_0.json' missing model for variant: 'kenmod:oak_log_wall_type_0#facing=north' [m[33m[15:56:03] [Server-Worker-3/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'kenmod:blockstates/oak_log_wall_type_0.json' missing model for variant: 'kenmod:oak_log_wall_type_0#facing=south' [m[33m[15:56:03] [Server-Worker-3/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'kenmod:blockstates/oak_log_wall_type_0.json' missing model for variant: 'kenmod:oak_log_wall_type_0#facing=west' [m[33m[15:56:03] [Server-Worker-3/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'kenmod:blockstates/oak_log_wall_type_0.json' in resourcepack: 'Mod Resources': com.google.gson.stream.MalformedJsonException: Expected name at line 7 column 7 path $.variants. And here is what the blockstate file looks like: { "variants": { "facing=north": { "model": "kenmod:block/oak_log_wall_type_0" }, "facing=south": { "model": "kenmod:block/oak_log_wall_type_0", "y": 180 }, "facing=west": { "model": "kenmod:block/oak_log_wall_type_0", "y": 270 }, "facing=east": { "model": "kenmod:block/oak_log_wall_type_0", "y": 90 } } } Here is the log wall block class: package com.kenneths_mod.objects.blocks.walls; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.HorizontalBlock; import net.minecraft.item.BlockItemUseContext; import net.minecraft.state.DirectionProperty; import net.minecraft.state.StateContainer.Builder; import net.minecraft.util.Direction; import net.minecraft.util.Rotation; public class LogWallType0 extends Block { public static final DirectionProperty FACING = HorizontalBlock.HORIZONTAL_FACING; public LogWallType0(Properties properties) { super(properties); this.setDefaultState(this.stateContainer.getBaseState().with(FACING, Direction.NORTH)); } @Override public BlockState getStateForPlacement(BlockItemUseContext context) { return this.getDefaultState().with(FACING, context.getPlacementHorizontalFacing().getOpposite()); } @Override public BlockState rotate(BlockState state, Rotation rot) { return state.with(FACING, rot.rotate(state.get(FACING))); } @Override protected void fillStateContainer(Builder<Block, BlockState> builder) { builder.add(FACING); } } And here is what it looks like when registered: BlockList.oak_log_wall_type_0 = new LogWallType0(Block.Properties.create(Material.WOOD).hardnessAndResistance(3.0F).sound(SoundType.WOOD).harvestTool(ToolType.AXE)).setRegistryName(location("oak_log_wall_type_0")) Here is the model file: { "credit": "Made with Blockbench", "textures": { "0": "block/oak_log", "1": "block/oak_log_top", "2": "block/oak_planks", "particle": "block/oak_log" }, "elements": [ { "from": [0, 12, 5], "to": [16, 13, 11], "faces": { "north": {"uv": [0, 0, 16, 1], "texture": "#2"}, "east": {"uv": [0, 0, 6, 1], "texture": "#2"}, "south": {"uv": [0, 0, 16, 1], "texture": "#2"}, "west": {"uv": [0, 0, 6, 1], "texture": "#2"}, "up": {"uv": [0, 0, 16, 6], "texture": "#2"}, "down": {"uv": [0, 0, 16, 6], "texture": "#2"} } }, { "from": [0, 4, 5], "to": [16, 5, 11], "faces": { "north": {"uv": [0, 0, 16, 1], "texture": "#2"}, "east": {"uv": [0, 0, 6, 1], "texture": "#2"}, "south": {"uv": [0, 0, 16, 1], "texture": "#2"}, "west": {"uv": [0, 0, 6, 1], "texture": "#2"}, "up": {"uv": [0, 0, 16, 6], "texture": "#2"}, "down": {"uv": [0, 0, 16, 6], "texture": "#2"} } }, { "from": [0, 5, 4], "to": [16, 12, 12], "faces": { "north": {"uv": [0, 0, 7, 16], "rotation": 90, "texture": "#0"}, "east": {"uv": [4, 5, 12, 12], "texture": "#1"}, "south": {"uv": [0, 0, 7, 16], "rotation": 90, "texture": "#0"}, "west": {"uv": [4, 5, 12, 12], "texture": "#1"}, "up": {"uv": [0, 0, 8, 16], "rotation": 90, "texture": "#0"}, "down": {"uv": [0, 0, 8, 16], "rotation": 90, "texture": "#0"} } }, { "from": [0, 13, 4], "to": [16, 17, 12], "faces": { "north": {"uv": [0, 0, 4, 16], "rotation": 90, "texture": "#0"}, "east": {"uv": [4, 8, 12, 12], "texture": "#1"}, "south": {"uv": [0, 0, 4, 16], "rotation": 90, "texture": "#0"}, "west": {"uv": [4, 8, 12, 12], "texture": "#1"}, "up": {"uv": [0, 0, 8, 16], "rotation": 90, "texture": "#0"}, "down": {"uv": [0, 0, 8, 16], "rotation": 90, "texture": "#0"} } }, { "from": [0, 0, 4], "to": [16, 4, 12], "faces": { "north": {"uv": [0, 0, 4, 16], "rotation": 90, "texture": "#0"}, "east": {"uv": [4, 4, 12, 8], "texture": "#1"}, "south": {"uv": [0, 0, 4, 16], "rotation": 90, "texture": "#0"}, "west": {"uv": [4, 4, 12, 8], "texture": "#1"}, "up": {"uv": [0, 0, 8, 16], "rotation": 90, "texture": "#0"}, "down": {"uv": [0, 0, 8, 16], "rotation": 90, "texture": "#0"} } } ] } Can anyone explain to me where I went wrong? Edited November 16, 20196 yr by Kenneth201998
November 16, 20196 yr Author NVRMIND, fixed it. It was a misplaced / missing " mark. Thanks anyway. I updated the code above.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.