Formation Planes can now Place Heads.
This commit is contained in:
@@ -9,6 +9,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
|
import net.minecraft.item.ItemSkull;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
@@ -379,7 +380,7 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
|
|||||||
|
|
||||||
if ( w.getBlock( x, y, z ).isReplaceable( w, x, y, z ) )
|
if ( w.getBlock( x, y, z ).isReplaceable( w, x, y, z ) )
|
||||||
{
|
{
|
||||||
if ( i instanceof ItemBlock || i instanceof IPlantable )
|
if ( i instanceof ItemBlock || i instanceof IPlantable || i instanceof ItemSkull )
|
||||||
{
|
{
|
||||||
EntityPlayer player = Platform.getPlayer( (WorldServer) w );
|
EntityPlayer player = Platform.getPlayer( (WorldServer) w );
|
||||||
Platform.configurePlayer( player, side, tile );
|
Platform.configurePlayer( player, side, tile );
|
||||||
@@ -388,7 +389,7 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
|
|||||||
worked = true;
|
worked = true;
|
||||||
if ( type == Actionable.MODULATE )
|
if ( type == Actionable.MODULATE )
|
||||||
{
|
{
|
||||||
if ( i instanceof IPlantable )
|
if ( i instanceof IPlantable || i instanceof ItemSkull )
|
||||||
{
|
{
|
||||||
boolean Worked = false;
|
boolean Worked = false;
|
||||||
|
|
||||||
@@ -396,14 +397,16 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
|
|||||||
Worked = i.onItemUse( is, player, w, x + side.offsetX, y + side.offsetY, z + side.offsetZ, side.getOpposite().ordinal(),
|
Worked = i.onItemUse( is, player, w, x + side.offsetX, y + side.offsetY, z + side.offsetZ, side.getOpposite().ordinal(),
|
||||||
side.offsetX, side.offsetY, side.offsetZ );
|
side.offsetX, side.offsetY, side.offsetZ );
|
||||||
|
|
||||||
|
if ( Worked == false && side.offsetX == 0 && side.offsetZ == 0 )
|
||||||
|
Worked = i.onItemUse( is, player, w, x-side.offsetX, y-side.offsetY, z-side.offsetZ, side.ordinal(), side.offsetX, side.offsetY, side.offsetZ );
|
||||||
|
|
||||||
if ( Worked == false && side.offsetY == 0 )
|
if ( Worked == false && side.offsetY == 0 )
|
||||||
Worked = i.onItemUse( is, player, w, x, y - 1, z, ForgeDirection.UP.ordinal(), side.offsetX, side.offsetY, side.offsetZ );
|
Worked = i.onItemUse( is, player, w, x, y - 1, z, ForgeDirection.UP.ordinal(), side.offsetX, side.offsetY, side.offsetZ );
|
||||||
|
|
||||||
if ( Worked == false )
|
if ( Worked == false )
|
||||||
Worked = i.onItemUse( is, player, w, x, y, z, side.getOpposite().ordinal(), side.offsetX, side.offsetY, side.offsetZ );
|
Worked = i.onItemUse( is, player, w, x, y, z, side.getOpposite().ordinal(), side.offsetX, side.offsetY, side.offsetZ );
|
||||||
|
|
||||||
if ( Worked )
|
maxStorage = maxStorage - is.stackSize;
|
||||||
maxStorage = maxStorage - is.stackSize;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user