Fixed strange glow panel issue
This commit is contained in:
parent
d0a62c564e
commit
10107678d1
1 changed files with 12 additions and 10 deletions
|
@ -17,7 +17,6 @@ import codechicken.microblock.HollowMicroblock;
|
|||
import codechicken.multipart.JItemMultiPart;
|
||||
import codechicken.multipart.TMultiPart;
|
||||
import codechicken.multipart.TileMultipart;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -40,16 +39,19 @@ public class ItemGlowPanel extends JItemMultiPart
|
|||
EnumColor col = EnumColor.DYES[item.getItemDamage()];
|
||||
ForgeDirection orientation = getSideFromVector3(vHit.subtract(Vector3.center));
|
||||
|
||||
BlockCoord pos1 = pos.copy().inset(orientation.getOpposite().ordinal());
|
||||
|
||||
if(world.isSideSolid(pos1.x, pos1.y, pos1.z, orientation.getOpposite()))
|
||||
if(pos != null && orientation != null)
|
||||
{
|
||||
return new PartGlowPanel(col, orientation);
|
||||
}
|
||||
|
||||
if(world.getTileEntity(pos.x, pos.y, pos.z) instanceof TileMultipart && ((TileMultipart) world.getTileEntity(pos.x, pos.y, pos.z)).partMap(orientation.ordinal()) instanceof HollowMicroblock)
|
||||
{
|
||||
return new PartGlowPanel(col, orientation);
|
||||
BlockCoord pos1 = pos.copy().inset(orientation.getOpposite().ordinal());
|
||||
|
||||
if(world.isSideSolid(pos1.x, pos1.y, pos1.z, orientation.getOpposite()))
|
||||
{
|
||||
return new PartGlowPanel(col, orientation);
|
||||
}
|
||||
|
||||
if(world.getTileEntity(pos.x, pos.y, pos.z) instanceof TileMultipart && ((TileMultipart) world.getTileEntity(pos.x, pos.y, pos.z)).partMap(orientation.ordinal()) instanceof HollowMicroblock)
|
||||
{
|
||||
return new PartGlowPanel(col, orientation);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
Loading…
Add table
Reference in a new issue