Jump to content

Feanorith

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Feanorith

  1. I think your problem is that the tileEntity on the server will read your 'Dire' from the NBT system, but you need to send a package to make sure your client tileEntity knows the direction as well. Easy way to test whether this is the case is to add the following code to your tileEntity's entityUpdate() method: Side side = FMLCommonHandler.instance().getEffectiveSide(); System.out.println("The direction is " + this.getDir() + " in " + side); Make sure you only have a single copy of your tileEntity up in the world, because it'll be spamming a lot of System.out messages once there's a BFurnace. One will say "The direction is ? in SERVER" the other will say "The direction is ? in CLIENT". If ? is not the same in both cases, you'll have found your problem.
  2. That wouldn't make multiple hitboxes at all. Edit: Btw, don't Eloraam's microblocks have hitboxes like you're looking for? Either ask 'em how or take a look at the code?
  3. You're looking for the Java Reflection API I reckon. http://tutorials.jenkov.com/java-reflection/private-fields-and-methods.html
  4. Haven't used this code in a a few MC versions, but you want to overwrite you're block's getCollisionBoundingBoxFromPool method like so: /** * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been * cleared to be reused) */ @Override public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) { return AxisAlignedBB.getAABBPool().addOrModifyAABBInPool(minX, minY, minZ, maxX, maxY, maxZ)); } With minX, minY, minZ, maxX, maxY, maxZ defining the area you want the collision hitbox to be. (A standard block would have 0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F I think, and a BlockCactus's collision BB would be slightly bigger than a standard block.) Then override the onEntityCollided method, and put a log statement in there to test if your bounding box is right, like so: /** * Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity */ public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) { System.out.println("Collision detected!"); }
×
×
  • Create New...

Important Information

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