Posted June 9, 201213 yr Is there a way you can have a metadata block with each metadata having a different block bound? I tried using setBlockBound in the onBlockAdded function. It works but then after I restart Minecraft and reload the world, the block bound goes back into default again (this is because the block bounds can not be called in the constructor as it depends on the metadata of the block). I checked out the door code but it didn't really help because they had the block bounds set in the constructor. http://calclavia.com/uploads/banner.png[/img]
June 9, 201213 yr Is there a way you can have a metadata block with each metadata having a different block bound? I tried using setBlockBound in the onBlockAdded function. It works but then after I restart Minecraft and reload the world, the block bound goes back into default again (this is because the block bounds can not be called in the constructor as it depends on the metadata of the block). I checked out the door code but it didn't really help because they had the block bounds set in the constructor. Using a meta sensitive function and saving the block Bounds might work. http://i577.photobucket.com/albums/ss215/bobstrong/ModBannerMed.png[/img]
June 12, 201213 yr Yes, just set the block bounds on all necessary metadata sensitive versions, make sure not to miss *any* case.
June 12, 201213 yr Author So I set the block bounds from the tile entity once the tile entity is fist initiated? http://calclavia.com/uploads/banner.png[/img]
June 12, 201213 yr So I set the block bounds from the tile entity once the tile entity is fist initiated? I do it in the block class actually, it pulls data from the TE if needed, but metadata based bounds has nothing to do with TE's.
June 12, 201213 yr Author How would you connect/call functions from the tile entity from the constructor? There is no world object. http://calclavia.com/uploads/banner.png[/img]
June 12, 201213 yr What are you talking about constructor? You never need to touch the constructor on such things. Just return your own AABB's from the appropriate collision callbacks.
June 12, 201213 yr Author Right I was trying to use the setblockbound function. thanks. http://calclavia.com/uploads/banner.png[/img]
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.