Paint balls now color entities their color when they get hit for 30 or so seconds ( mostly works ).
Paint balls now color sheep. The Color Applicator can now accept snow balls. Snowballs can be used to clean paint balls, and to clean cables ( restore fluix ) Tweaks to Color API.
This commit is contained in:
@@ -4,7 +4,9 @@ import io.netty.buffer.ByteBuf;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.api.implementations.tiles.IColorableTile;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.util.AEColor;
|
||||
@@ -126,10 +128,15 @@ public class TileCraftingMonitorTile extends TileCraftingTile implements IColora
|
||||
return paintedColor;
|
||||
}
|
||||
|
||||
public void setColor(AEColor newPaintedColor)
|
||||
@Override
|
||||
public boolean recolourBlock(ForgeDirection side, AEColor newPaintedColor, EntityPlayer who)
|
||||
{
|
||||
if ( paintedColor == newPaintedColor )
|
||||
return false;
|
||||
|
||||
paintedColor = newPaintedColor;
|
||||
markDirty();
|
||||
markForUpdate();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,11 +121,15 @@ public class TilePaint extends AEBaseTile
|
||||
|
||||
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
Block blk = worldObj.getBlock( xCoord + side.offsetX, yCoord + side.offsetY, zCoord + side.offsetZ );
|
||||
if ( !blk.isSideSolid( worldObj, xCoord + side.offsetX, yCoord + side.offsetY, zCoord + side.offsetZ, side.getOpposite() ) )
|
||||
if ( !isSideValid( side ) )
|
||||
removeSide( side );
|
||||
}
|
||||
|
||||
updateData();
|
||||
}
|
||||
|
||||
private void updateData()
|
||||
{
|
||||
isLit = 0;
|
||||
for (Splot s : dots)
|
||||
{
|
||||
@@ -144,6 +148,22 @@ public class TilePaint extends AEBaseTile
|
||||
worldObj.setBlock( xCoord, yCoord, zCoord, Blocks.air );
|
||||
}
|
||||
|
||||
public void cleanSide(ForgeDirection side)
|
||||
{
|
||||
if ( dots == null )
|
||||
return;
|
||||
|
||||
removeSide( side );
|
||||
|
||||
updateData();
|
||||
}
|
||||
|
||||
public boolean isSideValid(ForgeDirection side)
|
||||
{
|
||||
Block blk = worldObj.getBlock( xCoord + side.offsetX, yCoord + side.offsetY, zCoord + side.offsetZ );
|
||||
return blk.isSideSolid( worldObj, xCoord + side.offsetX, yCoord + side.offsetY, zCoord + side.offsetZ, side.getOpposite() );
|
||||
}
|
||||
|
||||
private void removeSide(ForgeDirection side)
|
||||
{
|
||||
Iterator<Splot> i = dots.iterator();
|
||||
|
||||
@@ -7,6 +7,7 @@ import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -328,11 +329,16 @@ public class TileSecurity extends AENetworkTile implements ITerminalHost, IAEApp
|
||||
return paintedColor;
|
||||
}
|
||||
|
||||
public void setColor(AEColor newPaintedColor)
|
||||
@Override
|
||||
public boolean recolourBlock(ForgeDirection side, AEColor newPaintedColor, EntityPlayer who)
|
||||
{
|
||||
if ( paintedColor == newPaintedColor )
|
||||
return false;
|
||||
|
||||
paintedColor = newPaintedColor;
|
||||
markDirty();
|
||||
markForUpdate();
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -345,4 +345,10 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
cb.updateConnections();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean recolourBlock(ForgeDirection side, AEColor colour, EntityPlayer who)
|
||||
{
|
||||
return cb.recolourBlock( side, colour, who );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -827,10 +827,15 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
|
||||
return paintedColor;
|
||||
}
|
||||
|
||||
public void setColor(AEColor newPaintedColor)
|
||||
@Override
|
||||
public boolean recolourBlock(ForgeDirection side, AEColor newPaintedColor, EntityPlayer who)
|
||||
{
|
||||
if ( paintedColor == newPaintedColor )
|
||||
return false;
|
||||
|
||||
paintedColor = newPaintedColor;
|
||||
markDirty();
|
||||
markForUpdate();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user