Applicator can no color secure tiles.
This commit is contained in:
@@ -36,6 +36,7 @@ import appeng.api.storage.data.IAEItemStack;
|
|||||||
import appeng.api.storage.data.IItemList;
|
import appeng.api.storage.data.IItemList;
|
||||||
import appeng.api.util.AEColor;
|
import appeng.api.util.AEColor;
|
||||||
import appeng.block.misc.BlockPaint;
|
import appeng.block.misc.BlockPaint;
|
||||||
|
import appeng.block.networking.BlockCableBus;
|
||||||
import appeng.client.render.items.ToolColorApplicatorRender;
|
import appeng.client.render.items.ToolColorApplicatorRender;
|
||||||
import appeng.core.AEConfig;
|
import appeng.core.AEConfig;
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
@@ -261,7 +262,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
|||||||
if ( color != null && getAECurrentPower( is ) > powerPerUse )
|
if ( color != null && getAECurrentPower( is ) > powerPerUse )
|
||||||
{
|
{
|
||||||
if ( color != AEColor.Transparent
|
if ( color != AEColor.Transparent
|
||||||
&& recolourBlock( blk, ForgeDirection.getOrientation( side ), w, x, y, z, ForgeDirection.getOrientation( side ), color ) )
|
&& recolourBlock( blk, ForgeDirection.getOrientation( side ), w, x, y, z, ForgeDirection.getOrientation( side ), color, p ) )
|
||||||
{
|
{
|
||||||
inv.extractItems( AEItemStack.create( paintBall ), Actionable.MODULATE, new BaseActionSource() );
|
inv.extractItems( AEItemStack.create( paintBall ), Actionable.MODULATE, new BaseActionSource() );
|
||||||
extractAEPower( is, powerPerUse );
|
extractAEPower( is, powerPerUse );
|
||||||
@@ -280,7 +281,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean recolourBlock(Block blk, ForgeDirection side, World w, int x, int y, int z, ForgeDirection orientation, AEColor newColor)
|
private boolean recolourBlock(Block blk, ForgeDirection side, World w, int x, int y, int z, ForgeDirection orientation, AEColor newColor, EntityPlayer p)
|
||||||
{
|
{
|
||||||
if ( blk == Blocks.carpet )
|
if ( blk == Blocks.carpet )
|
||||||
{
|
{
|
||||||
@@ -329,6 +330,9 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
|||||||
return w.setBlock( x, y, z, Blocks.stained_hardened_clay, newColor.ordinal(), 3 );
|
return w.setBlock( x, y, z, Blocks.stained_hardened_clay, newColor.ordinal(), 3 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( blk instanceof BlockCableBus )
|
||||||
|
return ((BlockCableBus) blk).recolourBlock( w, x, y, z, side, newColor.ordinal(), p );
|
||||||
|
|
||||||
return blk.recolourBlock( w, x, y, z, side, newColor.ordinal() );
|
return blk.recolourBlock( w, x, y, z, side, newColor.ordinal() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user