Jump to content

JackSprat

Members
  • Posts

    5
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

JackSprat's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Is there any way to add a Tile Entity to a block that inherits from say, BlockStairs, without causing a NPE whenever Minecraft's code checks against a BlockContainer? I've been stuck on this code for a while and just realised Minecraft has a couple of places where it uses InstanceOf BlockContainer to handle TileEntities. And as Java doesn't have multiple inheritance, I'm kind of hoping I don't have to write an entirely new Stairs class and use up seventeen block IDs in the process. I'm almost resigned to it though. Recommendation for MC developers; move getTileEntity to Block?
  2. Where would the onBlockPlaced event be raised from, if not the world.setBlock function?
  3. For it to be effective the event would need to be fired including the Entity that caused the place event, which would mean that a modified setBlock/completely new method is required and all vanilla/mod files where a block is placed would have to use the new method and signature. Am I making sense or am I completely off the mark here?
  4. A sorted list of block locations per player might work, with simple binary search. Not the most efficient, but quick to implement and simple to use. Either way, from my knowledge, it's not possible to do this without quite a few Forge additions. And all mods having to change the way they set blocks.
  5. If you're trying to do it for every vanilla block then you're going to have to modify base classes. It's possible (and rather simple) to do this on your own blocks just by checking against TileEntity data with RemoveBlockByPlayer, setting the placer during OnBlockPlacedBy, and upping the resistance to make sure it's not damaged during explosions.
×
×
  • Create New...

Important Information

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