Merge pull request #1345 from jammehcow/bugfix/1332

Fix bounding box NPE when placing worm item
This commit is contained in:
Michael Hillcox 2020-11-20 16:39:06 +00:00 committed by GitHub
commit e0c3024400
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,6 +21,7 @@ import net.minecraft.block.IGrowable;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.IPlantable;
@ -31,7 +32,7 @@ public class EntityWorm extends Entity {
public EntityWorm(World world) {
super(world);
this.setEntityBoundingBox(null);
this.setEntityBoundingBox(new AxisAlignedBB(0, 0, 0, 0, 0, 0));
}
public static boolean canWormify(World world, BlockPos pos, IBlockState state) {