Helo! I trying to change custom entities hitbox, but I always gets error or StackOverflow and I dont know what is the problem. Code (Java): @Override public AxisAlignedBB getBoundingBox() { return this.getBoundingBox() == null ? new AxisAlignedBB(0.0, 0.0, 0.0, 0.0, 0.0, 0.0) : this.getBoundingBox().expand(1.1, 0, 1.1); //return this.getBoundingBox().expand(1.1, 0, 1.1); } I also tried store the boundingBox after the Entity is spawned, nothing changed.
Not working, no error, simply the spawned entity disappear Code (Java): private AxisAlignedBB box; public Goblin(org.bukkit.World world) { [...] box = new AxisAlignedBB(0.1, 0.1, 0.1, -0.1, -0.1, -0.1); } @Override public AxisAlignedBB getBoundingBox() { return box.expand(1.1, 0, 1.1); } public Entity spawnEntity(Location loc) { box = new AxisAlignedBB(loc.getX() + 1, loc.getY() + 1, loc.getZ() + 1, loc.getX() - 1, loc.getY() - 1, loc.getBlockZ() - 1); }