mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-23 07:26:58 +00:00
Use a simpler getRenderBoundingBox method for cables
Our cable has a rather complex getCollisionBoundingBox implementation, which (combined with computing the actual block state) ends up taking an awful lot of time. This shaves 9% off each frame. I don't miss 1.12 one bit.
This commit is contained in:
parent
550f63b1cb
commit
53a23f8d3d
@ -24,6 +24,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
@ -444,4 +445,11 @@ public class TileCable extends TileGeneric implements IPeripheralTile
|
||||
IBlockState state = getBlockState();
|
||||
return BlockCable.getPeripheralType( state );
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox()
|
||||
{
|
||||
return Block.FULL_BLOCK_AABB.offset( getPos() );
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user