@@ -1208,13 +1208,13 @@ public class Platform
|
||||
return a.isItemEqual( b );
|
||||
}
|
||||
|
||||
public static LookDirection getPlayerRay(EntityPlayer player, float eyeoffset)
|
||||
public static LookDirection getPlayerRay(EntityPlayer player, float eyeOffset)
|
||||
{
|
||||
float f = 1.0F;
|
||||
float f1 = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * f;
|
||||
float f2 = player.prevRotationYaw + (player.rotationYaw - player.prevRotationYaw) * f;
|
||||
double d0 = player.prevPosX + (player.posX - player.prevPosX) * (double) f;
|
||||
double d1 = eyeoffset;
|
||||
double d1 = eyeOffset;
|
||||
double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f;
|
||||
|
||||
Vec3 vec3 = Vec3.createVectorHelper( d0, d1, d2 );
|
||||
@@ -1279,12 +1279,12 @@ public class Platform
|
||||
continue;
|
||||
|
||||
f1 = 0.3F;
|
||||
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand( (double) f1, (double) f1, (double) f1 );
|
||||
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept( vec3, vec31 );
|
||||
AxisAlignedBB boundingBox = entity1.boundingBox.expand( (double) f1, (double) f1, (double) f1 );
|
||||
MovingObjectPosition movingObjectPosition = boundingBox.calculateIntercept( vec3, vec31 );
|
||||
|
||||
if ( movingobjectposition1 != null )
|
||||
if ( movingObjectPosition != null )
|
||||
{
|
||||
double nd = vec3.squareDistanceTo( movingobjectposition1.hitVec );
|
||||
double nd = vec3.squareDistanceTo( movingObjectPosition.hitVec );
|
||||
|
||||
if ( nd < closest )
|
||||
{
|
||||
@@ -1298,15 +1298,15 @@ public class Platform
|
||||
}
|
||||
|
||||
MovingObjectPosition pos = null;
|
||||
Vec3 Srec = null;
|
||||
Vec3 vec = null;
|
||||
|
||||
if ( hitBlocks )
|
||||
{
|
||||
Srec = Vec3.createVectorHelper( d0, d1, d2 );
|
||||
vec = Vec3.createVectorHelper( d0, d1, d2 );
|
||||
pos = w.rayTraceBlocks( vec3, vec31, true );
|
||||
}
|
||||
|
||||
if ( entity != null && pos != null && pos.hitVec.squareDistanceTo( Srec ) > closest )
|
||||
if ( entity != null && pos != null && pos.hitVec.squareDistanceTo( vec ) > closest )
|
||||
{
|
||||
pos = new MovingObjectPosition( entity );
|
||||
}
|
||||
@@ -1443,7 +1443,7 @@ public class Platform
|
||||
gs.postAlterationOfStoredItems( StorageChannel.ITEMS, itemChanges, src );
|
||||
}
|
||||
|
||||
static public <T extends IAEStack<T>> void postListChanges(IItemList<T> before, IItemList<T> after, IMEMonitorHandlerReceiver<T> meMonitorPassthu,
|
||||
static public <T extends IAEStack<T>> void postListChanges(IItemList<T> before, IItemList<T> after, IMEMonitorHandlerReceiver<T> meMonitorPassthrough,
|
||||
BaseActionSource source)
|
||||
{
|
||||
LinkedList<T> changes = new LinkedList();
|
||||
@@ -1463,7 +1463,7 @@ public class Platform
|
||||
}
|
||||
|
||||
if ( !changes.isEmpty() )
|
||||
meMonitorPassthu.postChange( null, changes, source );
|
||||
meMonitorPassthrough.postChange( null, changes, source );
|
||||
}
|
||||
|
||||
public static int generateTileHash(TileEntity target)
|
||||
@@ -1477,16 +1477,16 @@ public class Platform
|
||||
return 0;
|
||||
else if ( target instanceof TileEntityChest )
|
||||
{
|
||||
TileEntityChest targ = (TileEntityChest) target;
|
||||
targ.checkForAdjacentChests();
|
||||
if ( targ.adjacentChestZNeg != null )
|
||||
hash ^= targ.adjacentChestZNeg.hashCode();
|
||||
else if ( targ.adjacentChestZPos != null )
|
||||
hash ^= targ.adjacentChestZPos.hashCode();
|
||||
else if ( targ.adjacentChestXPos != null )
|
||||
hash ^= targ.adjacentChestXPos.hashCode();
|
||||
else if ( targ.adjacentChestXNeg != null )
|
||||
hash ^= targ.adjacentChestXNeg.hashCode();
|
||||
TileEntityChest chest = (TileEntityChest) target;
|
||||
chest.checkForAdjacentChests();
|
||||
if ( chest.adjacentChestZNeg != null )
|
||||
hash ^= chest.adjacentChestZNeg.hashCode();
|
||||
else if ( chest.adjacentChestZPos != null )
|
||||
hash ^= chest.adjacentChestZPos.hashCode();
|
||||
else if ( chest.adjacentChestXPos != null )
|
||||
hash ^= chest.adjacentChestXPos.hashCode();
|
||||
else if ( chest.adjacentChestXNeg != null )
|
||||
hash ^= chest.adjacentChestXNeg.hashCode();
|
||||
}
|
||||
else if ( target instanceof IInventory )
|
||||
{
|
||||
@@ -1640,7 +1640,7 @@ public class Platform
|
||||
}
|
||||
|
||||
public static ItemStack extractItemsByRecipe(IEnergySource energySrc, BaseActionSource mySrc, IMEMonitor<IAEItemStack> src, World w, IRecipe r,
|
||||
ItemStack output, InventoryCrafting ci, ItemStack providedTemplate, int slot, IItemList<IAEItemStack> aitems, Actionable realForFake,
|
||||
ItemStack output, InventoryCrafting ci, ItemStack providedTemplate, int slot, IItemList<IAEItemStack> items, Actionable realForFake,
|
||||
IPartitionList<IAEItemStack> filter)
|
||||
{
|
||||
if ( energySrc.extractAEPower( 1, Actionable.SIMULATE, PowerMultiplier.CONFIG ) > 0.9 )
|
||||
@@ -1668,9 +1668,9 @@ public class Platform
|
||||
boolean checkFuzzy = ae_req.isOre() || providedTemplate.getItemDamage() == OreDictionary.WILDCARD_VALUE || providedTemplate.hasTagCompound()
|
||||
|| providedTemplate.isItemStackDamageable();
|
||||
|
||||
if ( aitems != null && checkFuzzy )
|
||||
if ( items != null && checkFuzzy )
|
||||
{
|
||||
for (IAEItemStack x : aitems)
|
||||
for (IAEItemStack x : items)
|
||||
{
|
||||
ItemStack sh = x.getItemStack();
|
||||
if ( (Platform.isSameItemType( providedTemplate, sh ) || ae_req.sameOre( x )) && !Platform.isSameItem( sh, output ) )
|
||||
@@ -1764,7 +1764,7 @@ public class Platform
|
||||
return is;
|
||||
}
|
||||
|
||||
private static Class Playerinstance;
|
||||
private static Class playerInstance;
|
||||
private static Method getOrCreateChunkWatcher;
|
||||
private static Method sendToAllPlayersWatchingChunk;
|
||||
|
||||
@@ -1783,19 +1783,19 @@ public class Platform
|
||||
|
||||
if ( getOrCreateChunkWatcher != null )
|
||||
{
|
||||
Object playerinstance = getOrCreateChunkWatcher.invoke( pm, c.xPosition, c.zPosition, false );
|
||||
if ( playerinstance != null )
|
||||
Object playerInstance = getOrCreateChunkWatcher.invoke( pm, c.xPosition, c.zPosition, false );
|
||||
if ( playerInstance != null )
|
||||
{
|
||||
Playerinstance = playerinstance.getClass();
|
||||
Platform.playerInstance = playerInstance.getClass();
|
||||
|
||||
if ( sendToAllPlayersWatchingChunk == null )
|
||||
{
|
||||
sendToAllPlayersWatchingChunk = ReflectionHelper.findMethod( Playerinstance, playerinstance, new String[] {
|
||||
sendToAllPlayersWatchingChunk = ReflectionHelper.findMethod( Platform.playerInstance, playerInstance, new String[] {
|
||||
"sendToAllPlayersWatchingChunk", "func_151251_a" }, Packet.class );
|
||||
}
|
||||
|
||||
if ( sendToAllPlayersWatchingChunk != null )
|
||||
sendToAllPlayersWatchingChunk.invoke( playerinstance, new S21PacketChunkData( c, false, verticalBits ) );
|
||||
sendToAllPlayersWatchingChunk.invoke( playerInstance, new S21PacketChunkData( c, false, verticalBits ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class AdaptorIInventory extends InventoryAdaptor
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack removeSimilarItems(int how_many, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination)
|
||||
public ItemStack removeSimilarItems(int amount, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination)
|
||||
{
|
||||
int s = i.getSizeInventory();
|
||||
for (int x = 0; x < s; x++)
|
||||
@@ -47,17 +47,17 @@ public class AdaptorIInventory extends InventoryAdaptor
|
||||
ItemStack is = i.getStackInSlot( x );
|
||||
if ( is != null && canRemoveStackFromSlot( x, is ) && (filter == null || Platform.isSameItemFuzzy( is, filter, fuzzyMode )) )
|
||||
{
|
||||
int lhow_many = how_many;
|
||||
if ( lhow_many > is.stackSize )
|
||||
lhow_many = is.stackSize;
|
||||
int newAmount = amount;
|
||||
if ( newAmount > is.stackSize )
|
||||
newAmount = is.stackSize;
|
||||
if ( destination != null && !destination.canInsert( is ) )
|
||||
lhow_many = 0;
|
||||
newAmount = 0;
|
||||
|
||||
ItemStack rv = null;
|
||||
if ( lhow_many > 0 )
|
||||
if ( newAmount > 0 )
|
||||
{
|
||||
rv = is.copy();
|
||||
rv.stackSize = lhow_many;
|
||||
rv.stackSize = newAmount;
|
||||
|
||||
if ( is.stackSize == rv.stackSize )
|
||||
{
|
||||
@@ -84,7 +84,7 @@ public class AdaptorIInventory extends InventoryAdaptor
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack simulateSimilarRemove(int how_many, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination)
|
||||
public ItemStack simulateSimilarRemove(int amount, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination)
|
||||
{
|
||||
int s = i.getSizeInventory();
|
||||
for (int x = 0; x < s; x++)
|
||||
@@ -93,16 +93,16 @@ public class AdaptorIInventory extends InventoryAdaptor
|
||||
|
||||
if ( is != null && canRemoveStackFromSlot( x, is ) && (filter == null || Platform.isSameItemFuzzy( is, filter, fuzzyMode )) )
|
||||
{
|
||||
int lhow_many = how_many;
|
||||
if ( lhow_many > is.stackSize )
|
||||
lhow_many = is.stackSize;
|
||||
int boundAmount = amount;
|
||||
if ( boundAmount > is.stackSize )
|
||||
boundAmount = is.stackSize;
|
||||
if ( destination != null && !destination.canInsert( is ) )
|
||||
lhow_many = 0;
|
||||
boundAmount = 0;
|
||||
|
||||
if ( lhow_many > 0 )
|
||||
if ( boundAmount > 0 )
|
||||
{
|
||||
ItemStack rv = is.copy();
|
||||
rv.stackSize = lhow_many;
|
||||
rv.stackSize = boundAmount;
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
@@ -111,38 +111,38 @@ public class AdaptorIInventory extends InventoryAdaptor
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack removeItems(int how_many, ItemStack filter, IInventoryDestination destination)
|
||||
public ItemStack removeItems(int amount, ItemStack filter, IInventoryDestination destination)
|
||||
{
|
||||
int s = i.getSizeInventory();
|
||||
ItemStack rv = null;
|
||||
|
||||
for (int x = 0; x < s && how_many > 0; x++)
|
||||
for (int x = 0; x < s && amount > 0; x++)
|
||||
{
|
||||
ItemStack is = i.getStackInSlot( x );
|
||||
if ( is != null && canRemoveStackFromSlot( x, is ) && (filter == null || Platform.isSameItemPrecise( is, filter )) )
|
||||
{
|
||||
int lhow_many = how_many;
|
||||
if ( lhow_many > is.stackSize )
|
||||
lhow_many = is.stackSize;
|
||||
int boundAmounts = amount;
|
||||
if ( boundAmounts > is.stackSize )
|
||||
boundAmounts = is.stackSize;
|
||||
if ( destination != null && !destination.canInsert( is ) )
|
||||
lhow_many = 0;
|
||||
boundAmounts = 0;
|
||||
|
||||
if ( lhow_many > 0 )
|
||||
if ( boundAmounts > 0 )
|
||||
{
|
||||
if ( rv == null )
|
||||
{
|
||||
rv = is.copy();
|
||||
filter = rv;
|
||||
rv.stackSize = lhow_many;
|
||||
how_many -= lhow_many;
|
||||
rv.stackSize = boundAmounts;
|
||||
amount -= boundAmounts;
|
||||
}
|
||||
else
|
||||
{
|
||||
rv.stackSize += lhow_many;
|
||||
how_many -= lhow_many;
|
||||
rv.stackSize += boundAmounts;
|
||||
amount -= boundAmounts;
|
||||
}
|
||||
|
||||
if ( is.stackSize == lhow_many )
|
||||
if ( is.stackSize == boundAmounts )
|
||||
{
|
||||
i.setInventorySlotContents( x, null );
|
||||
i.markDirty();
|
||||
@@ -150,7 +150,7 @@ public class AdaptorIInventory extends InventoryAdaptor
|
||||
else
|
||||
{
|
||||
ItemStack po = is.copy();
|
||||
po.stackSize -= lhow_many;
|
||||
po.stackSize -= boundAmounts;
|
||||
i.setInventorySlotContents( x, po );
|
||||
i.markDirty();
|
||||
}
|
||||
@@ -165,34 +165,34 @@ public class AdaptorIInventory extends InventoryAdaptor
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack simulateRemove(int how_many, ItemStack filter, IInventoryDestination destination)
|
||||
public ItemStack simulateRemove(int amount, ItemStack filter, IInventoryDestination destination)
|
||||
{
|
||||
int s = i.getSizeInventory();
|
||||
ItemStack rv = null;
|
||||
|
||||
for (int x = 0; x < s && how_many > 0; x++)
|
||||
for (int x = 0; x < s && amount > 0; x++)
|
||||
{
|
||||
ItemStack is = i.getStackInSlot( x );
|
||||
if ( is != null && canRemoveStackFromSlot( x, is ) && (filter == null || Platform.isSameItemPrecise( is, filter )) )
|
||||
{
|
||||
int lhow_many = how_many;
|
||||
if ( lhow_many > is.stackSize )
|
||||
lhow_many = is.stackSize;
|
||||
int boundAount = amount;
|
||||
if ( boundAount > is.stackSize )
|
||||
boundAount = is.stackSize;
|
||||
if ( destination != null && !destination.canInsert( is ) )
|
||||
lhow_many = 0;
|
||||
boundAount = 0;
|
||||
|
||||
if ( lhow_many > 0 )
|
||||
if ( boundAount > 0 )
|
||||
{
|
||||
if ( rv == null )
|
||||
{
|
||||
rv = is.copy();
|
||||
rv.stackSize = lhow_many;
|
||||
how_many -= lhow_many;
|
||||
rv.stackSize = boundAount;
|
||||
amount -= boundAount;
|
||||
}
|
||||
else
|
||||
{
|
||||
rv.stackSize += lhow_many;
|
||||
how_many -= lhow_many;
|
||||
rv.stackSize += boundAount;
|
||||
amount -= boundAount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,31 +10,31 @@ public class ItemSlot
|
||||
public int slot;
|
||||
|
||||
// one or the other..
|
||||
private IAEItemStack aeitemstack;
|
||||
private IAEItemStack aeItemStack;
|
||||
private ItemStack itemStack;
|
||||
|
||||
public boolean isExtractable;
|
||||
|
||||
public void setItemStack(ItemStack is)
|
||||
{
|
||||
aeitemstack = null;
|
||||
aeItemStack = null;
|
||||
itemStack = is;
|
||||
}
|
||||
|
||||
public void setAEItemStack(IAEItemStack is)
|
||||
{
|
||||
aeitemstack = is;
|
||||
aeItemStack = is;
|
||||
itemStack = null;
|
||||
}
|
||||
|
||||
public ItemStack getItemStack()
|
||||
{
|
||||
return itemStack == null ? (aeitemstack == null ? null : (itemStack = aeitemstack.getItemStack())) : itemStack;
|
||||
return itemStack == null ? (aeItemStack == null ? null : (itemStack = aeItemStack.getItemStack())) : itemStack;
|
||||
}
|
||||
|
||||
public IAEItemStack getAEItemStack()
|
||||
{
|
||||
return aeitemstack == null ? (itemStack == null ? null : (aeitemstack = AEItemStack.create( itemStack ))) : aeitemstack;
|
||||
return aeItemStack == null ? (itemStack == null ? null : (aeItemStack = AEItemStack.create( itemStack ))) : aeItemStack;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,12 +26,12 @@ public class WrapperChainedInventory implements IInventory
|
||||
private List<IInventory> l;
|
||||
private HashMap<Integer, InvOffset> offsets;
|
||||
|
||||
public WrapperChainedInventory(IInventory... ilist) {
|
||||
setInventory( ilist );
|
||||
public WrapperChainedInventory(IInventory... inventories) {
|
||||
setInventory( inventories );
|
||||
}
|
||||
|
||||
public WrapperChainedInventory(List<IInventory> ilist) {
|
||||
setInventory( ilist );
|
||||
public WrapperChainedInventory(List<IInventory> inventories) {
|
||||
setInventory( inventories );
|
||||
}
|
||||
|
||||
public void cycleOrder()
|
||||
|
||||
@@ -191,12 +191,12 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
ItemStack itemstack = ItemStack.loadItemStackFromNBT( i );
|
||||
if ( itemstack == null )
|
||||
return null;
|
||||
AEFluidStack aeis = AEFluidStack.create( itemstack );
|
||||
// aeis.priority = i.getInteger( "Priority" );
|
||||
aeis.stackSize = i.getLong( "Cnt" );
|
||||
aeis.setCountRequestable( i.getLong( "Req" ) );
|
||||
aeis.setCraftable( i.getBoolean( "Craft" ) );
|
||||
return aeis;
|
||||
AEFluidStack fluid = AEFluidStack.create( itemstack );
|
||||
// fluid.priority = i.getInteger( "Priority" );
|
||||
fluid.stackSize = i.getLong( "Cnt" );
|
||||
fluid.setCountRequestable( i.getLong( "Req" ) );
|
||||
fluid.setCraftable( i.getBoolean( "Craft" ) );
|
||||
return fluid;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -282,12 +282,12 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
if ( fluidStack == null )
|
||||
return null;
|
||||
|
||||
AEFluidStack aeis = AEFluidStack.create( fluidStack );
|
||||
// aeis.priority = (int) priority;
|
||||
aeis.stackSize = stackSize;
|
||||
aeis.setCountRequestable( countRequestable );
|
||||
aeis.setCraftable( isCraftable );
|
||||
return aeis;
|
||||
AEFluidStack fluid = AEFluidStack.create( fluidStack );
|
||||
// fluid.priority = (int) priority;
|
||||
fluid.stackSize = stackSize;
|
||||
fluid.setCountRequestable( countRequestable );
|
||||
fluid.setCraftable( isCraftable );
|
||||
return fluid;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,7 +22,7 @@ public class AEItemDef
|
||||
public Item item;
|
||||
public int damageValue;
|
||||
|
||||
public int dspDamage;
|
||||
public int displayDamage;
|
||||
public int maxDamage;
|
||||
|
||||
public AESharedNBT tagCompound;
|
||||
@@ -51,7 +51,7 @@ public class AEItemDef
|
||||
AEItemDef t = new AEItemDef( item );
|
||||
t.def = def;
|
||||
t.damageValue = damageValue;
|
||||
t.dspDamage = dspDamage;
|
||||
t.displayDamage = displayDamage;
|
||||
t.maxDamage = maxDamage;
|
||||
t.tagCompound = tagCompound;
|
||||
t.isOre = isOre;
|
||||
|
||||
@@ -69,16 +69,16 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
*/
|
||||
|
||||
/*
|
||||
* Super Hacky.
|
||||
* Super hackery.
|
||||
*
|
||||
* is.itemID = appeng.api.Materials.matQuartz.itemID; damageValue = is.getItemDamage(); is.itemID = itemID;
|
||||
*/
|
||||
|
||||
/*
|
||||
* Kinda Hacky
|
||||
* Kinda hackery
|
||||
*/
|
||||
def.damageValue = def.getDamageValueHack( is );
|
||||
def.dspDamage = is.getItemDamageForDisplay();
|
||||
def.displayDamage = is.getItemDamageForDisplay();
|
||||
def.maxDamage = is.getMaxDamage();
|
||||
|
||||
NBTTagCompound tagCompound = is.getTagCompound();
|
||||
@@ -218,12 +218,12 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
if ( itemstack == null )
|
||||
return null;
|
||||
|
||||
AEItemStack aeis = AEItemStack.create( itemstack );
|
||||
// aeis.priority = i.getInteger( "Priority" );
|
||||
aeis.stackSize = i.getLong( "Cnt" );
|
||||
aeis.setCountRequestable( i.getLong( "Req" ) );
|
||||
aeis.setCraftable( i.getBoolean( "Craft" ) );
|
||||
return aeis;
|
||||
AEItemStack item = AEItemStack.create( itemstack );
|
||||
// item.priority = i.getInteger( "Priority" );
|
||||
item.stackSize = i.getLong( "Cnt" );
|
||||
item.setCountRequestable( i.getLong( "Req" ) );
|
||||
item.setCraftable( i.getBoolean( "Craft" ) );
|
||||
return item;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -242,10 +242,10 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
public int compareTo(AEItemStack b)
|
||||
{
|
||||
int id = compare( def.item.hashCode(), b.def.item.hashCode() );
|
||||
int dv = compare( def.damageValue, b.def.damageValue );
|
||||
int dspv = compare( def.dspDamage, b.def.dspDamage );
|
||||
int damageValue = compare( def.damageValue, b.def.damageValue );
|
||||
int displayDamage = compare( def.displayDamage, b.def.displayDamage );
|
||||
// AELog.info( "NBT: " + nbt );
|
||||
return id == 0 ? (dv == 0 ? (dspv == 0 ? compareNBT( b.def ) : dspv) : dv) : id;
|
||||
return id == 0 ? (damageValue == 0 ? (displayDamage == 0 ? compareNBT( b.def ) : displayDamage) : damageValue) : id;
|
||||
}
|
||||
|
||||
private int compareNBT(AEItemDef b)
|
||||
@@ -370,12 +370,12 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
if ( itemstack == null )
|
||||
return null;
|
||||
|
||||
AEItemStack aeis = AEItemStack.create( itemstack );
|
||||
// aeis.priority = (int) priority;
|
||||
aeis.stackSize = stackSize;
|
||||
aeis.setCountRequestable( countRequestable );
|
||||
aeis.setCraftable( isCraftable );
|
||||
return aeis;
|
||||
AEItemStack item = AEItemStack.create( itemstack );
|
||||
// item.priority = (int) priority;
|
||||
item.stackSize = stackSize;
|
||||
item.setCountRequestable( countRequestable );
|
||||
item.setCraftable( isCraftable );
|
||||
return item;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -508,7 +508,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
|
||||
if ( ignoreMeta )
|
||||
{
|
||||
newDef.dspDamage = newDef.damageValue = 0;
|
||||
newDef.displayDamage = newDef.damageValue = 0;
|
||||
newDef.reHash();
|
||||
return bottom;
|
||||
}
|
||||
@@ -517,23 +517,23 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
{
|
||||
if ( fuzzy == FuzzyMode.IGNORE_ALL )
|
||||
{
|
||||
newDef.dspDamage = 0;
|
||||
newDef.displayDamage = 0;
|
||||
}
|
||||
else if ( fuzzy == FuzzyMode.PERCENT_99 )
|
||||
{
|
||||
if ( def.damageValue == 0 )
|
||||
newDef.dspDamage = 0;
|
||||
newDef.displayDamage = 0;
|
||||
else
|
||||
newDef.dspDamage = 1;
|
||||
newDef.displayDamage = 1;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
int breakpoint = fuzzy.calculateBreakPoint( def.maxDamage );
|
||||
newDef.dspDamage = breakpoint <= def.dspDamage ? breakpoint : 0;
|
||||
newDef.displayDamage = breakpoint <= def.displayDamage ? breakpoint : 0;
|
||||
}
|
||||
|
||||
newDef.damageValue = newDef.dspDamage;
|
||||
newDef.damageValue = newDef.displayDamage;
|
||||
}
|
||||
|
||||
newDef.tagCompound = AEItemDef.lowTag;
|
||||
@@ -548,7 +548,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
|
||||
if ( ignoreMeta )
|
||||
{
|
||||
newDef.dspDamage = newDef.damageValue = Integer.MAX_VALUE;
|
||||
newDef.displayDamage = newDef.damageValue = Integer.MAX_VALUE;
|
||||
newDef.reHash();
|
||||
return top;
|
||||
}
|
||||
@@ -557,22 +557,22 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
{
|
||||
if ( fuzzy == FuzzyMode.IGNORE_ALL )
|
||||
{
|
||||
newDef.dspDamage = def.maxDamage + 1;
|
||||
newDef.displayDamage = def.maxDamage + 1;
|
||||
}
|
||||
else if ( fuzzy == FuzzyMode.PERCENT_99 )
|
||||
{
|
||||
if ( def.damageValue == 0 )
|
||||
newDef.dspDamage = 0;
|
||||
newDef.displayDamage = 0;
|
||||
else
|
||||
newDef.dspDamage = def.maxDamage + 1;
|
||||
newDef.displayDamage = def.maxDamage + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
int breakpoint = fuzzy.calculateBreakPoint( def.maxDamage );
|
||||
newDef.dspDamage = def.dspDamage < breakpoint ? breakpoint - 1 : def.maxDamage + 1;
|
||||
newDef.displayDamage = def.displayDamage < breakpoint ? breakpoint - 1 : def.maxDamage + 1;
|
||||
}
|
||||
|
||||
newDef.damageValue = newDef.dspDamage;
|
||||
newDef.damageValue = newDef.displayDamage;
|
||||
}
|
||||
|
||||
newDef.tagCompound = AEItemDef.highTag;
|
||||
|
||||
@@ -83,9 +83,9 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
|
||||
return super.equals( par1Obj );
|
||||
}
|
||||
|
||||
public boolean matches(Item itemid2, int meta2, int orderlessHash)
|
||||
public boolean matches(Item item, int meta, int orderlessHash)
|
||||
{
|
||||
return itemid2 == item && meta == meta2 && hash == orderlessHash;
|
||||
return item == this.item && this.meta == meta && hash == orderlessHash;
|
||||
}
|
||||
|
||||
public boolean comparePreciseWithRegistry(AESharedNBT tagCompound)
|
||||
@@ -148,7 +148,7 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
|
||||
if ( tagCompound.hasNoTags() )
|
||||
return null;
|
||||
|
||||
Item itemid = s.getItem();
|
||||
Item item = s.getItem();
|
||||
int meta = -1;
|
||||
if ( s.getItem() != null && s.isItemStackDamageable() && s.getHasSubtypes() )
|
||||
meta = s.getItemDamage();
|
||||
@@ -156,7 +156,7 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
|
||||
if ( isShared( tagCompound ) )
|
||||
return tagCompound;
|
||||
|
||||
SharedSearchObject sso = new SharedSearchObject( itemid, meta, tagCompound );
|
||||
SharedSearchObject sso = new SharedSearchObject( item, meta, tagCompound );
|
||||
|
||||
WeakReference<SharedSearchObject> c = sharedTagCompounds.get( sso );
|
||||
if ( c != null )
|
||||
@@ -167,7 +167,7 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
|
||||
// as its already certain to exist..
|
||||
}
|
||||
|
||||
AESharedNBT clone = AESharedNBT.createFromCompound( itemid, meta, tagCompound );
|
||||
AESharedNBT clone = AESharedNBT.createFromCompound( item, meta, tagCompound );
|
||||
sso.compound = (NBTTagCompound) sso.compound.copy(); // prevent
|
||||
// modification
|
||||
// of data based
|
||||
|
||||
@@ -12,8 +12,8 @@ import appeng.api.storage.data.IAEItemStack;
|
||||
public class OreReference
|
||||
{
|
||||
|
||||
private LinkedList<ItemStack> otherOptions = new LinkedList();
|
||||
private ArrayList aeotherOptions = null;
|
||||
private LinkedList<ItemStack> otherOptions = new LinkedList<ItemStack>();
|
||||
private ArrayList<IAEItemStack> aeOtherOptions = null;
|
||||
private HashSet<Integer> ores = new HashSet<Integer>();
|
||||
|
||||
public Collection<ItemStack> getEquivalents()
|
||||
@@ -23,17 +23,17 @@ public class OreReference
|
||||
|
||||
public List<IAEItemStack> getAEEquivalents()
|
||||
{
|
||||
if ( aeotherOptions == null )
|
||||
if ( aeOtherOptions == null )
|
||||
{
|
||||
aeotherOptions = new ArrayList( otherOptions.size() );
|
||||
aeOtherOptions = new ArrayList<IAEItemStack>( otherOptions.size() );
|
||||
|
||||
// SUMMON AE STACKS!
|
||||
for (ItemStack is : otherOptions)
|
||||
if ( is.getItem() != null )
|
||||
aeotherOptions.add( AEItemStack.create( is ) );
|
||||
aeOtherOptions.add( AEItemStack.create( is ) );
|
||||
}
|
||||
|
||||
return aeotherOptions;
|
||||
return aeOtherOptions;
|
||||
}
|
||||
|
||||
public Collection<Integer> getOres()
|
||||
|
||||
Reference in New Issue
Block a user