Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. Wait for it....
  2. Ended up using renderStandardBlockWithColorMultiplier rather than renderStandardBlockWithAmbientOcclusion. The AO was causing odd shadows that I didn't want, and while the lighting is imperfect with the other, it's better than weird shadows. func_102027_b is slightly better, but only if I boost the lighting value by ~50% (func_102027_b is "render non-standard block with AO" but MCPBot is not online for me to update that function name and description)
  3. *Pokes with* I'm confused. I mean I'm poking with the stuff there.
  4. EntityPlayer player; NBTTagCompound nbt = player.getEntityData();
  5. Make a block have a slightly shorter collision box (look at Soul Sand) and then use an onCollide effect (check Soul Sand again) and use entity.addPotionEffect(Potion.jumpboost). You'll have to tweak that a bit, but it should point you in the right direction.
  6. You mean uncommon sense. Or perhaps even super-sense. But yes. What I'm doing is teaching people how to debug their own fucking code and resolve their own stupid mistakes rather than ask for help all the time. I mean yeah, I just posted my own fairly basic question, but I've been stuck trying to figure out what I'm missing for an hour now, trying all kinds of things to get the effect I want.
  7. public class RenderFakeBlock implements ISimpleBlockRenderingHandler { public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { renderer.renderFaceXPos(block, (double)x, (double)y, (double)z, block.getBlockTexture(world, x, y, z, 4)); renderer.renderFaceXNeg(block, (double)x, (double)y, (double)z, block.getBlockTexture(world, x, y, z, 4)); renderer.renderFaceYPos(block, (double)x, (double)y, (double)z, block.getBlockTexture(world, x, y, z, 1)); renderer.renderFaceYNeg(block, (double)x, (double)y, (double)z, block.getBlockTexture(world, x, y, z, 0)); renderer.renderFaceZPos(block, (double)x, (double)y, (double)z, block.getBlockTexture(world, x, y, z, 3)); renderer.renderFaceZNeg(block, (double)x, (double)y, (double)z, block.getBlockTexture(world, x, y, z, 2)); } } This is what happens in world. Note that both setups are exactly the same. My block is set to get a texture from a neighboring block (the only valid one being the pumpkin in the center). http://s22.postimg.org/q4hd2p3cx/2013_06_20_11_22_02.png[/img] Even for the one showing up not-black, it will flicker a little when you look at them directly (get fully bright, as they should be, then when you look away, they drop about 2 lighting levels). I suspect this is due to a missing function call on my part, but I can't figure out what call that is.
  8. Now look at your base class.
  9. Wow. How obscure is that. Glad you solved it!
  10. No, it outputs.
  11. *Facepalm* First off, the return type of that function is wrong. Second you need a player reference, the username property is not static. public String getName(EntityPlayer player) { return player.username; } Basic programming stuff, this.
  12. I know it can be done in 1.5, although I haven't done it with items (hell, even the block I use that does it doesn't do it for its own item renderer!)
  13. Lets see. You have a constructor which is passed arguments. You have a function that runs in the constructor that needs arguments. There are vanilla blocks that operate in a similar manner. 2 + 2 = ?
  14. EntityPlayer.username Use your javadocs.
  15. Because the constructor of BlockFencePiston sets the unlocalized name to the same string in both cases.
  16. Oh your first answer was right. It is not correct this time.
  17. Ah, I forgot it prepended that. In either case, I just hand-code my icon registration and skip the unlocalized name stuff (other than to give the block a name).
  18. Now how about this: class myclass { int myInt = 5; function myclass() { int myInt = 16; anotherFunc(); } function void anotherFunc() { System.out.println(myInt); } } What does that output?
  19. . BlockUniMatterBlock has an unlocalized name of "blockUniMatterBlock". Stripping off the first 5 characters gives us "UniMatterBlock" Icon registration uses that string as the file name. There is no file named "UniMatterBlock.png" There is one named "blockUniMatterBlock0.png" The 0 we can ignore because of subblocks, point is, if you don't do the substring part, it might actually work.
  20. I'd like to see the whole line, as well as what you're setting the unlocalized name to.
  21. 99% of the time those things don't fire events. They just do stuff.
  22. RenderingRegistry.registerEntityRenderingHandler(Class<? extends Entity> entityClass, Render renderer)
  23. Easy, go find the function, change it from "private" to "public." The better question is: Why do you need to?
  24. And now I'd like to see your code for registering an Icon. A java decompiler only gives me obfuscated function names, so I can't be certain what it is that you're doing. But it appears that you are taking the unlocalized name, taking the first 5 characters of that, and trying to register an icon with that. But your actual image files are not 5 characters long.
×
×
  • Create New...

Important Information

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