Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. public void renderBlockWire(TileEntityWire tl, World world, int i, int j, int k, Block block) { model = new ModelEnergyWire(); That's why. You're not bothering to save the model between frames. You're making a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a new one, a ne--error: post too long.
  2. That's because you need a player reference. The method is not static.
  3. Ok, here's a container I have https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/block/BlockPedestal.java https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/entity/TileEntityDisplayPedestal.java https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/client/GuiContPedestal.java https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/inventory/ContainerPedestal.java I think that's everything except the custom slot (it is just set to allow only certain item types)
  4. Changing the texture isn't guaranteed to make the block update visually. You will need to cause a block update (world.scheduleBlockUpdate) or vanilla won't know that something changed.
  5. and if I want to render the item as a sword rendered in hand. full3d. This is great, but if you could help me with that, that would be amazing Above code does render in 3D. Because I'm rendering an item entity which (in vanilla) is a 3D object. See? http://s2.postimg.org/9u6haor3t/2013_09_28_14_38_32.png[/img]
  6. Minecraft is weird. In the inventory the furnace has a metadata of 0 (obviously: it's not placed) but that renders it 180 degrees away from where it needs to in order for the front to be the rendered face (you're actually seeing the back and right side). Even vanilla has to do a kind of a hack to get the furnace to render the right way around.
  7. Specifically the TESR's model is static. He's creating a new TESR every time, as expected, and each time it's created it creates a new model, as expected, but the variable holding that reference is static.
  8. Actually, it doesn't. 1) The code you were instructed to include doesn't register a new icon. 2) The texture manager is smart enough to recognize icons that have already been registered and not add them to the sprite sheet a second time.
  9. You need to multiply chunkX and chunkZ by 16, as they are chunk coordinates, not world coordinates. int x = chunkX*16 + random.nextInt(16);
  10. Just to clarify this portion. He's talking about these lines: int x = chunkX + random.nextInt(32); int z = chunkZ + random.nextInt(32); You shouldn't generate a value higher than 15 with your random, or you're not generating inside that chunk, you're generating in a neighboring chunk. And while you can, you shouldn't.
  11. If the API doesn't exist, then you can't create new machines for it. Not with out a LOT of work, extracting and decompiling TE and converting all the vanilla functions and fields back to their deobfuscated forms manually.
  12. Artifacts to the rescue (again)! https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/client/ModelPedestal.java That's my model for my custom block. I render an item from there as well. If you want the item bigger, why gl11.glScale() will do wonders.
  13. Use your IDE's code hinting abilities. event.blockMetadata
  14. 1) You MUST extend ItemArmor or your armor will not provide any protection when worn, even if you do get the isValidArmor working. 2) Custom renders can be done just fine by extending ItemArmor.
  15. The only enchantment stuff I did was using the inbuilt system. Specifically I'd check what kind of item I had, or close approximation, modified a tiny bit randomly, then: ItemStack stack = new ItemStack(item); //the vanilla item that is similar to my item stack = EnchantmentHelper.addRandomEnchantment(rand, stack, level); //add enchantments per existing rules if(stack.stackTagCompound != null) { artifact.stackTagCompound.setTag("ench", stack.stackTagCompound.getTag("ench").copy()); //copy enchantments to my item //other stuff }
  16. Yeah. I messed with it once. I never did find a solution.
  17. Gradle subforum, for all your issues using Gradle.
  18. Copy everything but the imports. Import classes as needed (hit ctrl-O I think it is, to organize imports. It'll automagically import any class it recognizes and will promt when there's more than one possible match).
×
×
  • Create New...

Important Information

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