
Starless
Members-
Posts
107 -
Joined
-
Last visited
Everything posted by Starless
-
I have that. strangely, it is not highlighting my blockstates\block.extractor.json (it's valid though, I checked it with http://jsonlint.com/) But I just thought of something. I probably have to register blockstates\block.extractor.json to my block. How do I do that? EDIT: I figured it out. It turned out I was confused about the relative path of stuff, and also I didn't realize I couldn't rotate things around the z axis. I'm editing out the wrong jsons above and posting the correct versions of the files for documentation purposes.
-
Thank you so much! It's still not working, though. I have these files now: this is assets\mymod\blockstates\block_extractor.json (not sure if I have to declare textures here and in the model files too) { "forge_marker": 1, "defaults": { "textures": { "0": "blocks/obsidian", "1": "mymod:blocks/block_extractor-core-sides", "2": "mymod:blocks/block_extractor-core-bottom", "3": "mymod:blocks/block_extractor-core-top" }, "model": "mymod:block_extractor", "uvlock": false }, "variants": { "facing": { "down": { }, "up": { "x": 180 }, "north": { "x": 270 }, "south": { "x": 90 }, "west": { "x": 90, "y": 90 }, "east": { "x": 270, "y": 90 }, "none": { "textures": { "0": "blocks/obsidian", "1": "mymod:blocks/block_extractor-core-no-connection" }, "model": "mymod:block_extractor-no-connection", "uvlock": false } } } } this is assets\mymod\models\block\block_extractor-no-connection.json { "textures": { "0": "blocks/obsidian", "1": "mymod:blocks/block_extractor-core-no-connection" }, "elements": [ { "name": "NorthWest", "from": [ 4.0, 4.0, 4.0 ], "to": [ 5.0, 12.0, 5.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] }, "east": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 2.0, 3.0, 3.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 2.0, 3.0, 3.0 ] } } }, { "name": "NorthEast", "from": [ 11.0, 4.0, 4.0 ], "to": [ 12.0, 12.0, 5.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] }, "east": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 2.0, 3.0, 3.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 2.0, 3.0, 3.0 ] } } }, { "name": "SouthWest", "from": [ 4.0, 4.0, 11.0 ], "to": [ 5.0, 12.0, 12.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] }, "east": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 2.0, 3.0, 3.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 2.0, 3.0, 3.0 ] } } }, { "name": "SouthEast", "from": [ 11.0, 4.0, 11.0 ], "to": [ 12.0, 12.0, 12.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] }, "east": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 2.0, 3.0, 3.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 2.0, 3.0, 3.0 ] } } }, { "name": "BottomNorth", "from": [ 5.0, 4.0, 4.0 ], "to": [ 11.0, 5.0, 5.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 2.0, 16.0, 8.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] } } }, { "name": "BottomSouth", "from": [ 5.0, 4.0, 11.0 ], "to": [ 11.0, 5.0, 12.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] } } }, { "name": "BottomWest", "from": [ 4.0, 4.0, 5.0 ], "to": [ 5.0, 5.0, 11.0 ], "faces": { "east": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] } } }, { "name": "BottomEast", "from": [ 11.0, 4.0, 5.0 ], "to": [ 12.0, 5.0, 11.0 ], "faces": { "east": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] } } }, { "name": "TopNorth", "from": [ 5.0, 11.0, 4.0 ], "to": [ 11.0, 12.0, 5.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 6.0, 1.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 6.0, 1.0 ] } } }, { "name": "TopSouth", "from": [ 5.0, 11.0, 11.0 ], "to": [ 11.0, 12.0, 12.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] } } }, { "name": "TopWest", "from": [ 4.0, 11.0, 5.0 ], "to": [ 5.0, 12.0, 11.0 ], "faces": { "east": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] } } }, { "name": "TopEast", "from": [ 11.0, 11.0, 5.0 ], "to": [ 12.0, 12.0, 11.0 ], "faces": { "east": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 0.0, 15.0, 8.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] } } }, { "name": "Core", "from": [ 6.0, 6.0, 6.0 ], "to": [ 10.0, 10.0, 10.0 ], "faces": { "north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "up": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "down": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] } } } ] } and finally, the one I already posted above: assets\mymod\models\block\block_extractor.json { "textures": { "0": "blocks/obsidian", "1": "mymod:blocks/block_extractor-core-sides", "2": "mymod:blocks/block_extractor-core-bottom", "3": "mymod:blocks/block_extractor-core-top" }, "elements": [ { "name": "NorthWest", "from": [ 4.0, 2.0, 4.0 ], "to": [ 5.0, 10.0, 5.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "east": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "up": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] }, "down": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] } } }, { "name": "SouthWest", "from": [ 4.0, 2.0, 11.0 ], "to": [ 5.0, 10.0, 12.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "east": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "up": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] }, "down": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] } } }, { "name": "NorthEast", "from": [ 11.0, 2.0, 4.0 ], "to": [ 12.0, 10.0, 5.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "east": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 2.0, 6.0, 16.0 ] }, "up": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] }, "down": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] } } }, { "name": "SouthEast", "from": [ 11.0, 2.0, 11.0 ], "to": [ 12.0, 10.0, 12.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "east": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "up": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] }, "down": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] } } }, { "name": "BottomNorth", "from": [ 5.0, 2.0, 4.0 ], "to": [ 11.0, 3.0, 5.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 10.0 ] } } }, { "name": "BottomSouth", "from": [ 5.0, 2.0, 11.0 ], "to": [ 11.0, 3.0, 12.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 3.0, 13.0, 9.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] } } }, { "name": "BottomWest", "from": [ 4.0, 2.0, 5.0 ], "to": [ 5.0, 3.0, 11.0 ], "faces": { "east": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] } } }, { "name": "BottomEast", "from": [ 11.0, 2.0, 5.0 ], "to": [ 12.0, 3.0, 11.0 ], "faces": { "east": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 6.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 6.0 ] } } }, { "name": "TopNorth", "from": [ 5.0, 9.0, 4.0 ], "to": [ 11.0, 10.0, 5.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] } } }, { "name": "TopSouth", "from": [ 5.0, 9.0, 11.0 ], "to": [ 11.0, 10.0, 12.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 4.0, 12.0, 9.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 3.0, 13.0, 9.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] } } }, { "name": "TopWest", "from": [ 4.0, 9.0, 5.0 ], "to": [ 5.0, 10.0, 11.0 ], "faces": { "east": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 6.0 ] } } }, { "name": "TopEast", "from": [ 11.0, 9.0, 5.0 ], "to": [ 12.0, 10.0, 11.0 ], "faces": { "east": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] } } }, { "name": "Core", "from": [ 6.0, 1.0, 6.0 ], "to": [ 10.0, 10.0, 10.0 ], "faces": { "north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 17.0 ] }, "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "down": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 15.0 ] } } }, { "name": "Top1", "from": [ 5.0, 10.0, 5.0 ], "to": [ 11.0, 11.0, 11.0 ], "faces": { "north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "up": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "down": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] } } }, { "name": "Top2", "from": [ 6.0, 11.0, 6.0 ], "to": [ 10.0, 12.0, 10.0 ], "faces": { "north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "up": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] } } }, { "name": "Top3", "from": [ 7.0, 12.0, 7.0 ], "to": [ 9.0, 13.0, 9.0 ], "faces": { "north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "up": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] } } } ] } All my textures are in assets\mymod\textures\blocks\, except for obsidian, which is minecraft's obsidian.png I think I might be missing an array marker somewhere (square brackets) just don't know where. maybe variants is supposed to be an array?
-
I have a block with 7 possible states. 6 of those states correspond to the value of each EnumFacing (0 = down, 1 = up, and so on). The other state is for when the block is not connected to any direction. I have the model for the block, I'm not sure it's correct. I want to be able to rotate the block according to each of these states, and to be able to change the model for the "no connection" state. Here's the model (inside assets.mymod.models.block): { "textures": { "0": "minecraft:blocks/obsidian", "1": "mymod:blocks/block.extractor_core_sides", "2": "mymod:blocks/block.extractor_core_bottom", "3": "mymod:blocks/block.extractor_core_top" }, "elements": [ { "name": "NorthWest", "from": [ 4.0, 2.0, 4.0 ], "to": [ 5.0, 10.0, 5.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "east": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "up": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] }, "down": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] } } }, { "name": "SouthWest", "from": [ 4.0, 2.0, 11.0 ], "to": [ 5.0, 10.0, 12.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "east": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "up": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] }, "down": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] } } }, { "name": "NorthEast", "from": [ 11.0, 2.0, 4.0 ], "to": [ 12.0, 10.0, 5.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "east": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 2.0, 6.0, 16.0 ] }, "up": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] }, "down": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] } } }, { "name": "SouthEast", "from": [ 11.0, 2.0, 11.0 ], "to": [ 12.0, 10.0, 12.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "east": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] }, "up": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] }, "down": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] } } }, { "name": "BottomNorth", "from": [ 5.0, 2.0, 4.0 ], "to": [ 11.0, 3.0, 5.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 10.0 ] } } }, { "name": "BottomSouth", "from": [ 5.0, 2.0, 11.0 ], "to": [ 11.0, 3.0, 12.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 3.0, 13.0, 9.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] } } }, { "name": "BottomWest", "from": [ 4.0, 2.0, 5.0 ], "to": [ 5.0, 3.0, 11.0 ], "faces": { "east": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] } } }, { "name": "BottomEast", "from": [ 11.0, 2.0, 5.0 ], "to": [ 12.0, 3.0, 11.0 ], "faces": { "east": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 6.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 6.0 ] } } }, { "name": "TopNorth", "from": [ 5.0, 9.0, 4.0 ], "to": [ 11.0, 10.0, 5.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] } } }, { "name": "TopSouth", "from": [ 5.0, 9.0, 11.0 ], "to": [ 11.0, 10.0, 12.0 ], "faces": { "north": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 4.0, 12.0, 9.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 3.0, 13.0, 9.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] } } }, { "name": "TopWest", "from": [ 4.0, 9.0, 5.0 ], "to": [ 5.0, 10.0, 11.0 ], "faces": { "east": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 6.0 ] } } }, { "name": "TopEast", "from": [ 11.0, 9.0, 5.0 ], "to": [ 12.0, 10.0, 11.0 ], "faces": { "east": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "west": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }, "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] } } }, { "name": "Core", "from": [ 6.0, 1.0, 6.0 ], "to": [ 10.0, 10.0, 10.0 ], "faces": { "north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 17.0 ] }, "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "down": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 15.0 ] } } }, { "name": "Top1", "from": [ 5.0, 10.0, 5.0 ], "to": [ 11.0, 11.0, 11.0 ], "faces": { "north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "up": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "down": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] } } }, { "name": "Top2", "from": [ 6.0, 11.0, 6.0 ], "to": [ 10.0, 12.0, 10.0 ], "faces": { "north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "up": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] } } }, { "name": "Top3", "from": [ 7.0, 12.0, 7.0 ], "to": [ 9.0, 13.0, 9.0 ], "faces": { "north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "up": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] } } } ] } How do I register this model? And how do I implement the rotations? And is the way I define the textures in the begining of the file correct? How do I register the block to appear on GUIs? Do I need to register the textures separately?
-
[SOLVED] Wait (x) seconds *WITHOUT PAUSING GAME*
Starless replied to OnePoundPP's topic in Modder Support
Oh I see. I thought it had some kind of protection against other threads. I believe the race condition can be avoided in most cases. -
[SOLVED] Wait (x) seconds *WITHOUT PAUSING GAME*
Starless replied to OnePoundPP's topic in Modder Support
Does the game crash if you do that? -
[SOLVED] Wait (x) seconds *WITHOUT PAUSING GAME*
Starless replied to OnePoundPP's topic in Modder Support
I did not know that. You can't, for example, interact with a TileEntity from a separate thread? -
[SOLVED] Wait (x) seconds *WITHOUT PAUSING GAME*
Starless replied to OnePoundPP's topic in Modder Support
You could run the code in a separate thread and pause execution of that thread: new Thread() { @Override public void run() { //some code here. Thread.Sleep(1000); //more code here. } }.start(); -
EDIT: Let me rephrase that: How do I convert from this signature to the old signature where both dragType and clickTypeIn were ints ? Such as: public MyContainer extends Container { @Override public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player) { int mouseButton = /* what? */; int modifier = /* what? */; return legacySlotClick(slotId, mouseButton, modifier, player); } protected ItemStack legacySlotClick(int slotId, int mouseButton, int modifier, EntityPlayer player) { } }
-
[1.10.2][Container][Slot][IInventory]Slots still need IInventory?
Starless replied to Starless's topic in Modder Support
One more thing, if you wouldn't mind: The arguments of Slot.slotClick used to be int slotId, int mouseButton, int modifier, EntityPlayer player . Now they are int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player . I don't know how to deal with them now... -
[1.10.2][SOLVED]Do I need Block.neighborChanged? How does it work?
Starless replied to Starless's topic in Modder Support
Ok I guess that's too much then. I will handle this on the tile entity. Thanks. -
That's what I wanted to know. But why is it marked as deprecated if we still need to override it? My block has metadata that needs to be calculated based on its neighbors: it searches for an inventory around it and sets the metadata appropriately what methods exactly do I need to override to get this done? Just onBlockPlaced and onBlockAdded ?
-
I think what that link says is inverted about the pair getUpdateTag() and handleUpdateTarget it is written: The super class methods (in TileEntity) already deal with reading and writing x, y, z, id, and serialize some stuff. About the pair getUpdatePacket() and onDataPacket() it is said: It really is, but we have to construct the packet ourselves, because the super method returns null. After reading that short article, what I'm doing is this: @Override public NBTTagCompound getUpdateTag() { NBTTagCompound tag = super.getUpdateTag(); tag.setString("Target", target); return tag; } @Override public void handleUpdateTag(NBTTagCompound tag) { super.handleUpdateTag(tag); target = tag.getString("Target"); } @Override public SPacketUpdateTileEntity getUpdatePacket() { return new SPacketUpdateTileEntity(pos, getBlockMetadata(), getUpdateTag()); } @Override public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt) { if(net.getDirection() == EnumPacketDirection.CLIENTBOUND) { readFromNBT(pkt.getNbtCompound()); } } Is it correct?