Some additional fixes from other branch.
This commit is contained in:
@@ -116,27 +116,27 @@ public class BusCollisionHelper implements IPartCollisionHelper
|
||||
maxY /= 16.0;
|
||||
maxZ /= 16.0;
|
||||
|
||||
double aX = minX * this.x.getFrontOffsetX() + minY * this.y.getFrontOffsetX() + minZ * this.z.getFrontOffsetX();
|
||||
double aY = minX * this.x.getFrontOffsetY() + minY * this.y.getFrontOffsetY() + minZ * this.z.getFrontOffsetY();
|
||||
double aZ = minX * this.x.getFrontOffsetZ() + minY * this.y.getFrontOffsetZ() + minZ * this.z.getFrontOffsetZ();
|
||||
double aX = minX * this.x.getXOffset() + minY * this.y.getXOffset() + minZ * this.z.getXOffset();
|
||||
double aY = minX * this.x.getYOffset() + minY * this.y.getYOffset() + minZ * this.z.getYOffset();
|
||||
double aZ = minX * this.x.getZOffset() + minY * this.y.getZOffset() + minZ * this.z.getZOffset();
|
||||
|
||||
double bX = maxX * this.x.getFrontOffsetX() + maxY * this.y.getFrontOffsetX() + maxZ * this.z.getFrontOffsetX();
|
||||
double bY = maxX * this.x.getFrontOffsetY() + maxY * this.y.getFrontOffsetY() + maxZ * this.z.getFrontOffsetY();
|
||||
double bZ = maxX * this.x.getFrontOffsetZ() + maxY * this.y.getFrontOffsetZ() + maxZ * this.z.getFrontOffsetZ();
|
||||
double bX = maxX * this.x.getXOffset() + maxY * this.y.getXOffset() + maxZ * this.z.getXOffset();
|
||||
double bY = maxX * this.x.getYOffset() + maxY * this.y.getYOffset() + maxZ * this.z.getYOffset();
|
||||
double bZ = maxX * this.x.getZOffset() + maxY * this.y.getZOffset() + maxZ * this.z.getZOffset();
|
||||
|
||||
if( this.x.getFrontOffsetX() + this.y.getFrontOffsetX() + this.z.getFrontOffsetX() < 0 )
|
||||
if( this.x.getXOffset() + this.y.getXOffset() + this.z.getXOffset() < 0 )
|
||||
{
|
||||
aX += 1;
|
||||
bX += 1;
|
||||
}
|
||||
|
||||
if( this.x.getFrontOffsetY() + this.y.getFrontOffsetY() + this.z.getFrontOffsetY() < 0 )
|
||||
if( this.x.getYOffset() + this.y.getYOffset() + this.z.getYOffset() < 0 )
|
||||
{
|
||||
aY += 1;
|
||||
bY += 1;
|
||||
}
|
||||
|
||||
if( this.x.getFrontOffsetZ() + this.y.getFrontOffsetZ() + this.z.getFrontOffsetZ() < 0 )
|
||||
if( this.x.getZOffset() + this.y.getZOffset() + this.z.getZOffset() < 0 )
|
||||
{
|
||||
aZ += 1;
|
||||
bZ += 1;
|
||||
|
||||
@@ -322,7 +322,7 @@ public class PartFormationPlane extends PartAbstractFormationPlane<IAEItemStack>
|
||||
result = is.getItem().createEntity( w, ei, is );
|
||||
if( result != null )
|
||||
{
|
||||
ei.setDead();
|
||||
ei.remove();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -330,9 +330,9 @@ public class PartFormationPlane extends PartAbstractFormationPlane<IAEItemStack>
|
||||
}
|
||||
}
|
||||
|
||||
if( !w.spawnEntity( result ) )
|
||||
if( !w.addEntity( result ) )
|
||||
{
|
||||
result.setDead();
|
||||
result.remove();
|
||||
worked = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraft.world.ServerWorld;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import net.minecraftforge.common.util.FakePlayerFactory;
|
||||
|
||||
@@ -69,7 +69,7 @@ public class PartIdentityAnnihilationPlane extends PartAnnihilationPlane
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float calculateEnergyUsage( final WorldServer w, final BlockPos pos, final List<ItemStack> items )
|
||||
protected float calculateEnergyUsage(final ServerWorld w, final BlockPos pos, final List<ItemStack> items )
|
||||
{
|
||||
final float requiredEnergy = super.calculateEnergyUsage( w, pos, items );
|
||||
|
||||
@@ -77,7 +77,7 @@ public class PartIdentityAnnihilationPlane extends PartAnnihilationPlane
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<ItemStack> obtainBlockDrops( final WorldServer w, final BlockPos pos )
|
||||
protected List<ItemStack> obtainBlockDrops(final ServerWorld w, final BlockPos pos )
|
||||
{
|
||||
final FakePlayer fakePlayer = FakePlayerFactory.getMinecraft( w );
|
||||
final BlockState state = w.getBlockState( pos );
|
||||
|
||||
@@ -515,9 +515,9 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
|
||||
public void writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
data.setLong( "lastReportedValue", this.lastReportedValue );
|
||||
data.setLong( "reportingValue", this.reportingValue );
|
||||
data.setBoolean( "prevState", this.prevState );
|
||||
data.putLong( "lastReportedValue", this.lastReportedValue );
|
||||
data.putLong( "reportingValue", this.reportingValue );
|
||||
data.putBoolean("prevState", this.prevState);
|
||||
this.config.writeToNBT( data, "config" );
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ public class PartCable extends AEBasePart implements IPartCable
|
||||
super( is );
|
||||
this.getProxy().setFlags( GridFlags.PREFERRED );
|
||||
this.getProxy().setIdlePowerUsage( 0.0 );
|
||||
this.getProxy().setColor( AEColor.values()[( (ItemPart) is.getItem() ).variantOf( is.getItemDamage() )] );
|
||||
this.getProxy().setColor( AEColor.values()[( (ItemPart) is.getItem() ).variantOf( is.getDamage() )] );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -97,12 +97,12 @@ public abstract class AbstractPartMonitor extends AbstractPartDisplay implements
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
|
||||
data.setBoolean( "isLocked", this.isLocked );
|
||||
data.putBoolean("isLocked", this.isLocked);
|
||||
|
||||
final CompoundNBT myItem = new CompoundNBT();
|
||||
if( this.configuredItem != null )
|
||||
{
|
||||
this.configuredItem.writeToNBT( myItem );
|
||||
this.configuredItem.write(myItem);
|
||||
}
|
||||
|
||||
data.setTag( "configuredItem", myItem );
|
||||
|
||||
@@ -87,9 +87,9 @@ public class PartCraftingTerminal extends AbstractPartTerminal
|
||||
@Override
|
||||
public GuiBridge getGui( final PlayerEntity p )
|
||||
{
|
||||
int x = (int) p.posX;
|
||||
int y = (int) p.posY;
|
||||
int z = (int) p.posZ;
|
||||
int x = (int) p.getPosX();
|
||||
int y = (int) p.getPosY();
|
||||
int z = (int) p.getPosZ();
|
||||
if( this.getHost().getTile() != null )
|
||||
{
|
||||
x = this.getTile().getPos().getX();
|
||||
|
||||
@@ -92,8 +92,8 @@ public class PartPatternTerminal extends AbstractPartTerminal
|
||||
public void writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
data.setBoolean( "craftingMode", this.craftingMode );
|
||||
data.setBoolean( "substitute", this.substitute );
|
||||
data.putBoolean("craftingMode", this.craftingMode);
|
||||
data.putBoolean("substitute", this.substitute);
|
||||
this.pattern.writeToNBT( data, "pattern" );
|
||||
this.output.writeToNBT( data, "outputList" );
|
||||
this.crafting.writeToNBT( data, "craftingGrid" );
|
||||
@@ -102,9 +102,9 @@ public class PartPatternTerminal extends AbstractPartTerminal
|
||||
@Override
|
||||
public GuiBridge getGui( final PlayerEntity p )
|
||||
{
|
||||
int x = (int) p.posX;
|
||||
int y = (int) p.posY;
|
||||
int z = (int) p.posZ;
|
||||
int x = (int) p.getPosX();
|
||||
int y = (int) p.getPosY();
|
||||
int z = (int) p.getPosZ();
|
||||
if( this.getHost().getTile() != null )
|
||||
{
|
||||
x = this.getTile().getPos().getX();
|
||||
|
||||
Reference in New Issue
Block a user