Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. 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)
  2. 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.
  3. Can't help you without seeing the new code.
  4. 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]
  5. 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.
  6. 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.
  7. 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.
  8. You need to multiply chunkX and chunkZ by 16, as they are chunk coordinates, not world coordinates. int x = chunkX*16 + random.nextInt(16);
  9. Mmm~ Static properties. <3
  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. Gradle subforum for Gradle questions.
  16. Unless they use structure code, i.e. like Nether Forts or Villages do.
  17. 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 }
  18. Yeah. I messed with it once. I never did find a solution.
  19. Gradle subforum, for all your issues using Gradle.
  20. 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).
  21. Forge events. There's one, I believe, for entity spawns, but you could also use EntityLivingEvent which occurs every tick. Just test to see if the entity passed is an instance of EntityBat, and if it is, kill the entity (setDead() will just remove it from the world without triggering death sounds, etc. unlike kill())
  22. Please ask in the Gradle forum or include the fact that you're using Gradle in your opening post or we will "take a guess" at what setup you're using and end up being wrong.
  23. Division is magic. You don't need to check anything. 0 / 3 is still 0.
  24. I also messed around with armor recently. https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/item/ItemArtifactArmor.java Might help you out some.
×
×
  • Create New...

Important Information

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