Added Meteorite Spawn Distance Setting.
Added Charged Quartz Spawn Chance. All GUI's Parts/Tiles support Custom Localization. ( Fixes #0190 ) Added Crafting Recipe for copying Press Plates. Fixed Bug: #0189 - Particles don't turn off when set to minimal Fixed Bug: #0176 - Weird Colorization While Mining Parts. Fixed Bug: #0152 - TPane drops parts as items and does not insert into system. Fixed Bug: #0140 - Spatial pylon facade renders oddly (Clear)
This commit is contained in:
+24
-1
@@ -38,6 +38,8 @@ import appeng.api.util.AEColor;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.api.util.IConfigureableObject;
|
||||
import appeng.core.AELog;
|
||||
import appeng.helpers.ICustomNameObject;
|
||||
import appeng.helpers.IPriorityHost;
|
||||
import appeng.me.helpers.AENetworkProxy;
|
||||
import appeng.me.helpers.IGridProxyable;
|
||||
@@ -48,7 +50,7 @@ import appeng.util.SettingsFrom;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradeableHost
|
||||
public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradeableHost, ICustomNameObject
|
||||
{
|
||||
|
||||
protected ISimplifiedBundle renderCache = null;
|
||||
@@ -62,6 +64,7 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea
|
||||
|
||||
public AEBasePart(Class c, ItemStack is) {
|
||||
this.is = is;
|
||||
AELog.info( System.identityHashCode( is ) + " = " + is.getDisplayName() );
|
||||
proxy = new AENetworkProxy( this, "part", is, this instanceof PartCable );
|
||||
proxy.setValidSides( EnumSet.noneOf( ForgeDirection.class ) );
|
||||
}
|
||||
@@ -95,6 +98,12 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea
|
||||
@Override
|
||||
public ItemStack getItemStack(PartItemStack type)
|
||||
{
|
||||
if ( type == PartItemStack.Network )
|
||||
{
|
||||
ItemStack copy = is.copy();
|
||||
copy.setTagCompound( null );
|
||||
return copy;
|
||||
}
|
||||
return is;
|
||||
}
|
||||
|
||||
@@ -472,4 +481,18 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCustomName()
|
||||
{
|
||||
return is.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomName()
|
||||
{
|
||||
AELog.info( System.identityHashCode( is ) + " = " + is.getDisplayName() );
|
||||
return is.hasDisplayName();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -556,7 +556,6 @@ public class CableBusContainer implements AEMultiTile, ICableBusContainer
|
||||
if ( p != null )
|
||||
{
|
||||
is = p.getItemStack( PartItemStack.Network );
|
||||
is.setTagCompound( null );
|
||||
|
||||
data.writeShort( Item.getIdFromItem( is.getItem() ) );
|
||||
data.writeShort( is.getItemDamage() );
|
||||
|
||||
@@ -306,6 +306,21 @@ public class PartPlacement
|
||||
|
||||
if ( !world.isRemote )
|
||||
{
|
||||
Block block = world.getBlock( x, y, z );
|
||||
LookDirection dir = Platform.getPlayerRay( player );
|
||||
MovingObjectPosition mop = block.collisionRayTrace( world, x, y, z, dir.a, dir.b );
|
||||
if ( mop != null )
|
||||
{
|
||||
List<ItemStack> is = new LinkedList();
|
||||
SelectedPart sp = host.selectPart( mop.hitVec.addVector( -mop.blockX, -mop.blockY, -mop.blockZ ) );
|
||||
|
||||
if ( sp.part != null )
|
||||
{
|
||||
if ( !player.isSneaking() && sp.part.onActivate( player, mop.hitVec ) )
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
ForgeDirection mySide = host.addPart( held, side, player );
|
||||
if ( mySide != null )
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.api.config.Actionable;
|
||||
@@ -255,6 +256,24 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
|
||||
energy.extractAEPower( total, Actionable.MODULATE, PowerMultiplier.CONFIG );
|
||||
w.setBlock( x, y, z, Platform.air, 0, 3 );
|
||||
|
||||
AxisAlignedBB box = AxisAlignedBB.getBoundingBox( x - 0.2, y - 0.2, z - 0.2, x + 1.2, y + 1.2, z + 1.2 );
|
||||
for (Object ei : w.getEntitiesWithinAABB( EntityItem.class, box ))
|
||||
{
|
||||
if ( ei instanceof EntityItem )
|
||||
{
|
||||
EntityItem item = (EntityItem) ei;
|
||||
if ( !item.isDead )
|
||||
{
|
||||
IAEItemStack storedItem = AEItemStack.create( item.getEntityItem() );
|
||||
storedItem = Platform.poweredInsert( energy, storage.getItemInventory(), storedItem, mySrc );
|
||||
if ( storedItem != null )
|
||||
Buffer.add( storedItem );
|
||||
|
||||
item.setDead();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
ServerHelper.proxy.sendToAllNearExcept( null, x, y, z, 64, w, new PacketTransitionEffect( x, y, z, side, true ) );
|
||||
@@ -264,9 +283,9 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
|
||||
AELog.error( e );
|
||||
}
|
||||
|
||||
for (ItemStack is : out)
|
||||
for (ItemStack snaggedItem : out)
|
||||
{
|
||||
IAEItemStack storedItem = AEItemStack.create( is );
|
||||
IAEItemStack storedItem = AEItemStack.create( snaggedItem );
|
||||
storedItem = Platform.poweredInsert( energy, storage.getItemInventory(), storedItem, mySrc );
|
||||
if ( storedItem != null )
|
||||
Buffer.add( storedItem );
|
||||
|
||||
Reference in New Issue
Block a user