Some additional fixes from other branch.
This commit is contained in:
@@ -25,7 +25,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraft.fluid.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.FluidTankProperties;
|
||||
@@ -89,7 +89,7 @@ public class TileCondenser extends AEBaseInvTile implements IConfigManagerHost,
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
this.cm.writeToNBT( data );
|
||||
data.setDouble( "storedPower", this.getStoredPower() );
|
||||
data.putDouble("storedPower", this.getStoredPower());
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
@@ -538,26 +538,26 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
|
||||
|
||||
if( !plateA.isEmpty() )
|
||||
{
|
||||
final CompoundNBT tag = Platform.openNbtData( plateA );
|
||||
final CompoundNBT tag = plateA.getOrCreateTag();
|
||||
name += tag.getString( "InscribeName" );
|
||||
}
|
||||
|
||||
if( !plateB.isEmpty() )
|
||||
{
|
||||
final CompoundNBT tag = Platform.openNbtData( plateB );
|
||||
final CompoundNBT tag = plateB.getOrCreateTag();
|
||||
name += " " + tag.getString( "InscribeName" );
|
||||
}
|
||||
|
||||
final ItemStack startingItem = input.copy();
|
||||
final ItemStack renamedItem = input.copy();
|
||||
final CompoundNBT tag = Platform.openNbtData( renamedItem );
|
||||
final CompoundNBT tag = renamedItem.getOrCreateTag();
|
||||
|
||||
final CompoundNBT display = tag.getCompoundTag( "display" );
|
||||
tag.setTag( "display", display );
|
||||
|
||||
if( name.length() > 0 )
|
||||
{
|
||||
display.setString( "Name", name );
|
||||
display.putString("Name", name);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -170,7 +170,7 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, II
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
data.setBoolean( "omniDirectional", this.omniDirectional );
|
||||
data.putBoolean("omniDirectional", this.omniDirectional);
|
||||
this.duality.writeToNBT( data );
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ public class TilePaint extends AEBaseTile
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
if( data.hasKey( "dots" ) )
|
||||
if( data.contains("dots") )
|
||||
{
|
||||
this.readBuffer( Unpooled.copiedBuffer( data.getByteArray( "dots" ) ) );
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ public class TileSecurityStation extends AENetworkTile implements ITerminalHost,
|
||||
this.cm.writeToNBT( data );
|
||||
data.setByte( "paintedColor", (byte) this.paintedColor.ordinal() );
|
||||
|
||||
data.setLong( "securityKey", this.securityKey );
|
||||
data.putLong( "securityKey", this.securityKey );
|
||||
this.getConfigSlot().writeToNBT( data, "config" );
|
||||
|
||||
final CompoundNBT storedItems = new CompoundNBT();
|
||||
@@ -173,7 +173,7 @@ public class TileSecurityStation extends AENetworkTile implements ITerminalHost,
|
||||
for( final IAEItemStack ais : this.inventory.getStoredItems() )
|
||||
{
|
||||
final CompoundNBT it = new CompoundNBT();
|
||||
ais.createItemStack().writeToNBT( it );
|
||||
ais.createItemStack().write(it);
|
||||
storedItems.setTag( String.valueOf( offset ), it );
|
||||
offset++;
|
||||
}
|
||||
@@ -187,7 +187,7 @@ public class TileSecurityStation extends AENetworkTile implements ITerminalHost,
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.cm.readFromNBT( data );
|
||||
if( data.hasKey( "paintedColor" ) )
|
||||
if( data.contains("paintedColor") )
|
||||
{
|
||||
this.paintedColor = AEColor.values()[data.getByte( "paintedColor" )];
|
||||
}
|
||||
@@ -201,7 +201,7 @@ public class TileSecurityStation extends AENetworkTile implements ITerminalHost,
|
||||
final NBTBase obj = storedItems.getTag( (String) key );
|
||||
if( obj instanceof CompoundNBT )
|
||||
{
|
||||
this.inventory.getStoredItems().add( AEItemStack.fromItemStack( new ItemStack( (CompoundNBT) obj ) ) );
|
||||
this.inventory.getStoredItems().add( AEItemStack.fromItemStack( ItemStack.read((CompoundNBT) obj) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,8 +101,8 @@ public class TileVibrationChamber extends AENetworkInvTile implements IGridTicka
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
data.setDouble( "burnTime", this.getBurnTime() );
|
||||
data.setDouble( "maxBurnTime", this.getMaxBurnTime() );
|
||||
data.putDouble("burnTime", this.getBurnTime());
|
||||
data.putDouble("maxBurnTime", this.getMaxBurnTime());
|
||||
data.setInteger( "burnSpeed", this.getBurnSpeed() );
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user