Jump to content

Starless

Members
  • Posts

    107
  • Joined

  • Last visited

Everything posted by Starless

  1. 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.
  2. 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?
  3. 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?
  4. I rephrased my question, so maybe those who read it and found it too complicated to answer (which it indeed was, since the method I'm talking about has a body that's way too long) can now help.
  5. 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.
  6. Does the game crash if you do that?
  7. I did not know that. You can't, for example, interact with a TileEntity from a separate thread?
  8. 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();
  9. 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) { } }
  10. Yes, but containers changed a bit, apparently.
  11. 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...
  12. Just now I found out the constructor for Slot still requests an IInventory. So implementing using ItemStackHandler is kind of pointless or am I missing something?
  13. I checked Minecraft code and apparently we can't use those... The String ids of the GUIs are hardcoded in a if-else chain. :'(
  14. So all that new stuff... we don't use any of it?
  15. What about StatBase and IInteractionObject and player.displayGui(IInteractionObject guiOwner)
  16. I can find a lot for 1.8.9 but none for 1.10. I would like to start making the GUIs, Containers and Networking, so I can properly test my objects.
  17. Ok I guess that's too much then. I will handle this on the tile entity. Thanks.
  18. My block has metadata that depends on what's around it. I thought a good way to track this was to perform the check inside Block.neighborChanged , but I don't know when this method is called and I'm not sure what the parameters mean. Can anyone offer me some insight?
  19. It's because you didn't see my design. My TileEntity doesn't update every tick. It has a tick counter. So updating the metadata only when the tick counter reaches 0 is far cheaper than the alternative.
  20. I don't know... getActualState would be more accurate and cleaner since I wouldn't need to deal with neighbors changing in my TileEntity, but do you think it's worth the overhead?
  21. 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 ?
  22. That's the question. I need to convert from metadata to IBlockState right? because the Block class implementation returns this.getDefaultState() completely ignoring the metadata parameter.
  23. I want my block to have 7 states, 1 for each direction and one meaning "no direction". What would be the best design choice? create a new Enum set the default as null (I'm afraid this would crash the game, not sure) something else (please, tell me what)
  24. Block.getMetaFromState is still good, but what should I use instead of Block.getStateFromMeta ?
  25. 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?
×
×
  • Create New...

Important Information

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