Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. Huh? But to answer the question: yes, you can. But you probably shouldn't.
  2. Yes, but that's not useful in his case. He wants a block at (0,70,0) to protect blocks in a 16 block range from being damaged by explosions. So the block at (0,70,0) needs to know when an explosion goes off over at (12,70,0) so that the blocks at (10,70,0), (10,70,1), (10,70,-1), etc. don't get destroyed.
  3. int playerPosX = (int)mc.thePlayer.posX; int playerPosY = (int)mc.thePlayer.posY; int playerPosZ = (int)mc.thePlayer.posZ; What did you think was going to happen when you truncated doubles down to ints?
  4. "Explicit" is the word you're looking for there.
  5. It means: "Bad modder. No cookie."
  6. That depends on what you want the recipe to be.
  7. I don't know. I haven't delved into the mysteries of dimensions personally, I just know a handful of tangential operations that come up when using them.
  8. Random question: Does your structure API handle sand held up by torches?
  9. Also please don't put your mod inside the minecraft package...
  10. Ditto. The error is a NoClassDefFoundError which is stemming from a ClassNotFoundException, which I pretty sure is a missing class, not a badly-reobfuscated* func_ *For some value of "badly."
  11. No they don't. Whoever said that was dumb. Anyway, TileEntities are for blocks that need to know more information than the limits of metadata. Like the furnace or a chest. TEs can also be used for things that need complex rendering, like BuildCraft's engines.* Though such things should be used sparingly as TEs have a higher overhead than regular blocks. *Which have extra data associated with them too, but the comparison is still accurate.
  12. Torches, doors, pistons all tended to fail more often than not. As for entities, there's a function something along the lines of setPositionAndUpdate. Given that I was just doing it because I could, I didn't care if it failed in some situations.
  13. Yeah. You do. nextAvailableDim just tells you what dimID is available.
  14. So create a dimension like you would at any other time. There's a function for nextAvailableDim, but you'll have to look for it. Check the DimensionManager. If you don't know how to create a dimension at all, then you need to take baby steps and start simply.
  15. I sliced across time. Rather than using a loop, I had a variable that incremented every time the entity got an update, and that was the Z value (or X or Y, depending on how you want to do it) for that time slice. Essentially, first I'd read, taking an approximated "height" of the landscape (so looking for known-natural blocks like dirt, stone, and sand). Next I'd wait for player input for the destination (actually, a direction to look, whereupon it would scan farther and farther away looking for a valid place to plop things down; ie. above water), then I'd scan the destination for landscape height (the same way), then the blending on those two matricies, then I'd place the old blocks in the new location, then I'd go back and delete the old blocks. Last, I attempted to teleport non-block entities. It wasn't perfect though. Due to the fact that I couldn't build bottom up (the place-blocks to achieve desired landscape in the blended areas only had a height value and stopped placing blocks by going down on Y until a stop condition) and that my time slices were across Z, it had trouble placing torches (and other can-stay-here blocks like rails), gravity effected blocks (top down, remember?), and pistons. If the piston head was copied/deleted before the base I wouldn't get a base.
  16. Pretty sure that ISimpleBlockRenderingHandler works the same in 1.7 as it does in 1.6, given that it's an fml class.
  17. canBlockSeeTheSky just does a loop check looking for not-air blocks* until it hits the world ceiling. If it finds one, it returns false. If it doesn't, it returns true. *Pretty sure it doesn't do fancy things like looking for entirely transparent blocks. Been a while since I looked at it.
  18. You want to render something. Without a renderer. No. That is not possible. There's also this nice thing called an ISimpleBlockRenderingHandler. It renders cubes.
  19. That function exists in 1.6 as well. It's just another way to specify 0-15.
  20. Wow. I missed this thread. Only a week after you started it, look at what I did: http://binarymage.com/forum/viewtopic.php?f=10&t=1882
  21. Slot 259 is already occupied by net.minecraftforge.common.MinecraftForge$1@760881b1 <-- not your block Use a different ID.
  22. Seriously, you can't figure this out? Use a damn integer. int myInt = 10; String myString = "This value is: " + myInt; Integers can be added to and subtracted from and will update in the GUI just fine.
  23. Hmm. That is true. In which case: Hope you don't need a lot of them.
  24. You've got the same access with a ISimpleBlockRenderingHandler as you do with a TileEntity, by the way: neither are passed a player reference at any point during rendering. (ISimpleBlockRenderingHandler renders normal blocks, normal blocks take up less CPU to keep in the world) And given that rendering stuff is client side, that would be an appropriate use for Minecraft.getMinecraft().thePlayer
×
×
  • Create New...

Important Information

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