Jump to content

indemnity83

Members
  • Posts

    6
  • Joined

  • Last visited

indemnity83's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Progress! I have the blocks rendering again, and now the item in my hand has all the right transformations, but without textures. I actually think the item in my hand not having textures is maybe a different problem having to do with blockstates and how item don't pay any attention to blockstates. What I changed was removing the "stacked" variant information from the resource string on load. No idea why that was hanging things up, but that part at least seems to be working again.
  2. Is it possibly because I haven't moved the rendering stuff into a client only proxy yet? I didn't actually think this was going to be a problem functionally, just performance so I wanted to get everything working, then refactor things into their best homes.
  3. The branch 1.11/feature/fix_block_rendering incorporates the changes: https://github.com/Indemnity83/irontanks/tree/1.11/feature/fix_block_rendering Thanks for your help.
  4. Log: https://gist.github.com/Indemnity83/45cea216e9538d73efe9b1a93aa9587f Scrolling through it, I don't see any indication of a problem with the block models. There are some for the upgrade items (which are working fine). Maybe I just don't know what I'm looking for.
  5. Semi-progress, I added the following chunk of code: for (IronTankType type : IronTankType.VALUES) { ModelLoader.setCustomModelResourceLocation(Content.ironTankItemBlock, type.metaValue, new ModelResourceLocation(Content.ironTankItemBlock.getRegistryName(), "stacked=false,variant=" + type.name)); } and now the item renders in my hand with the right shape and transformation; but now nothing has a texture (neither in my hand, nor placed as a block)
  6. I'm sure I'm just being dense because even though I've tried to find tutorials or other examples here in the forums I still cannot get a simple block with variants to render the item in my hand, inventory or on the ground. The full source code is here, I'll try to pluck out the bits I think are important but it may just be easier to go look at the actual source code. I have a block with variants; those variants determine the texture to be applied (among other things). And I've registered the single block and the item block inside my preInit() handler public class BlockIronTank extends Block { public static final PropertyEnum<IronTankType> VARIANT = PropertyEnum.create("variant", IronTankType.class); ... } // This happens inside the preInit() handler GameRegistry.register(ironTankBlock); GameRegistry.register(ironTankItemBlock); I also have a blockstate and block model: blockstate: { "forge_marker": 1, "variants": { "variant": { "glass": { "comment": "This is just here to suppress a warning that the glass variant has no blockstate, it's never actually used", "textures": { "particle": "buildcraftfactory:blocks/tank/side", "end": "buildcraftfactory:blocks/tank/end", "side": "buildcraftfactory:blocks/tank/side", "side_stacked": "buildcraftfactory:blocks/tank/side_joined_below" } }, "copper": { "textures": { "particle": "irontanks:blocks/coppertank/side", "end": "irontanks:blocks/coppertank/end", "side": "irontanks:blocks/coppertank/side", "side_stacked": "irontanks:blocks/coppertank/side_stacked" } }, "iron": { "textures": { "particle": "irontanks:blocks/irontank/side", "end": "irontanks:blocks/irontank/end", "side": "irontanks:blocks/irontank/side", "side_stacked": "irontanks:blocks/irontank/side_stacked" } }, "silver": { "textures": { "particle": "irontanks:blocks/silvertank/side", "end": "irontanks:blocks/silvertank/end", "side": "irontanks:blocks/silvertank/side", "side_stacked": "irontanks:blocks/silvertank/side_stacked" } }, "gold": { "textures": { "particle": "irontanks:blocks/goldtank/side", "end": "irontanks:blocks/goldtank/end", "side": "irontanks:blocks/goldtank/side", "side_stacked": "irontanks:blocks/goldtank/side_stacked" } }, "diamond": { "textures": { "particle": "irontanks:blocks/diamondtank/side", "end": "irontanks:blocks/diamondtank/end", "side": "irontanks:blocks/diamondtank/side", "side_stacked": "irontanks:blocks/diamondtank/side_stacked" } }, "obsidian": { "textures": { "particle": "irontanks:blocks/obsidiantank/side", "end": "irontanks:blocks/obsidiantank/end", "side": "irontanks:blocks/obsidiantank/side", "side_stacked": "irontanks:blocks/obsidiantank/side_stacked" } } } } } model: { "elements": [ { "from": [2, 0, 2], "to": [14, 16, 14], "faces": { "down": {"texture": "#end", "cullface": "down"}, "up": {"texture": "#end", "cullface": "up"}, "north": {"texture": "#side"}, "south": {"texture": "#side"}, "west": {"texture": "#side"}, "east": {"texture": "#side"} } } ] } So far everything works. I can place the blocks and they render as expected and it seems like all that should be required at this point it to apply some transformations so it scales right in the player's hand etc; so I have an iron_tank item model too that inherits the block model and applies the transformations: { "parent": "irontanks:block/iron_tank", "display": { "gui": { "rotation": [30, 225, 0], "translation": [0, 0, 0], "scale": [0.625, 0.625, 0.625] }, "ground": { "rotation": [0, 0, 0], "translation": [0, 3, 0], "scale": [0.25, 0.25, 0.25] }, "fixed": { "rotation": [0, 0, 0], "translation": [0, 0, 0], "scale": [0.5, 0.5, 0.5] }, "thirdperson_righthand": { "rotation": [75, 45, 0], "translation": [0, 2.5, 0], "scale": [0.375, 0.375, 0.375] }, "firstperson_righthand": { "rotation": [0, 45, 0], "translation": [0, 0, 0], "scale": [0.40, 0.40, 0.40] }, "firstperson_lefthand": { "rotation": [0, 225, 0], "translation": [0, 0, 0], "scale": [0.40, 0.40, 0.40] } } }
×
×
  • Create New...

Important Information

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