Jump to content

r00t

Members
  • Posts

    8
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Recent Profile Visitors

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

r00t's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I found the mistake: I left the old rock.json in models/item which must have overwritten the settings from blockstates.
  2. Check this out https://wiki.mcjty.eu/modding/index.php/Render_Block_OBJ-1.12
  3. Hello, I tried to create a custom model block. The block renders fine in the world but does not in the inventory and if dropped on the ground. The item renders the texture in textures/items/. According to this tutorial, the default behavior should have been loading the "inventory" variant of the blockstate json. What could I have done to override this behavior or am I missing a registration? { "forge_marker": 1, "defaults": { "model": "modid:rock.obj", "custom": { "flip-v": true }, "scale": 0.5, "textures": { "#None": "modid:blocks/rock" } }, "variants": { "normal": [ {} ], "inventory": [ { "transform": { "gui": { "scale": 1.8, "translation": [0,0.6,0], "rotation": [{"x": 15},{"y": 45}] }, "ground": { "scale": 0.5, "translation": [0,0.0,0] }, "firstperson": { "scale": 0.75, "translation": [0,0.2,0] }, "thirdperson": { "scale": 0.75, "translation": [0,0.2,0] } } } ], "facing": { "north": {}, "south": { "y": 180 }, "west": { "y": 270 }, "east": { "y": 90 } } } } This is a method of the Block which gets called after all block instances have been created. @SideOnly(Side.CLIENT) public void initModel() { ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, new ModelResourceLocation(getRegistryName(), "inventory")); } Thanks.
  4. Yes, it is for me. If major mods won't provide a port to 1.8 in the foreseeable future (for reasons like these https://www.reddit.com/r/feedthebeast/comments/2ni6av/eli5_the_18_block_model_change/) I cannot simply replace them. I will update when the time comes. For now there is a larger 1.7.10 code base to learn from.
  5. I started with 1.8 but jumped back to 1.7.10 because major mods are not ported yet and might never be. I plan to use Thermal Foundation and AppleCore among others later on.
  6. Great, thank you! So, I created the BlockRenderer and the corners look fine now. I am using setBlockBoundsBasedOnState to set the bounds to the corner slab for now. 1. When looking at the block, the inventory item changes according to the orientation, though always being the corner piece of the BlockBounds. Do I have to add a completely new renderer or is it possible to use the scaled model version of a certain block direction? What is the performance solution here? 2. How can set the BlockBounds to prevent an entity to stand inside the block, while allowing it to walk it like stairs? The corner block does not seem like a good solution. The borders should be customary rendered on the block. Is it enough to use addCollisionBoxesToList? (this thread was a dead end: http://www.minecraftforge.net/forum/index.php?topic=22129.0) @Override public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z); if (meta == LibRef.DIRECTION.NORTH) { setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 0.5F); } if (meta == LibRef.DIRECTION.EAST) { setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F); } if (meta == LibRef.DIRECTION.SOUTH) { setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 0.5F, 1.0F); } if (meta == LibRef.DIRECTION.WEST) { setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 0.5F, 1.0F); } } http://s8.postimg.org/ei3ccoc4h/Screen_Shot_2015_11_14_at_18_18_49.jpg[/img]
  7. Hello, I just started modding and cannot grasp some concepts yet. I've been using these documentations as a basis in combination with the vanilla code and big mods from github. However, the vanilla code has obfuscated method/variable names and the big mods use many custom libraries, making them harder to follow. For starters, I wanted to created a sloped block like this: The slope block should be rendered as a 3D item in world and the inventory. The Block should be a tile entity later on but for now I just wanted it to render like this. 1. In many projects I saw a BlockRenderer and a TileEntitySpecialRenderer implemented. Why do I need two renderers for the same block, even if the TileEntity is an empty class for now? 2. Isn't it possible to use the block's renderer to created a scaled item version? Do I really need to implement a new ItemRenderer? 3. Are there good documented tutorials/minimal examples for 1.7.10 I am missing? Thank you! http://greyminecraftcoder.blogspot.de/2013/08/rendering-inventory-items.html http://www.minecraftforge.net/wiki/Tile_entity_special_renderer http://bedrockminer.jimdo.com/modding-tutorials/basic-modding-1-7/metadata-blocks-and-items/
×
×
  • Create New...

Important Information

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