1.15 port
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
package appeng.crafting;
|
||||
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.networking.crafting.ICraftingCPU;
|
||||
@@ -39,14 +39,14 @@ public class CraftingLink implements ICraftingLink
|
||||
private boolean done = false;
|
||||
private CraftingLinkNexus tie;
|
||||
|
||||
public CraftingLink( final NBTTagCompound data, final ICraftingRequester req )
|
||||
public CraftingLink( final CompoundNBT data, final ICraftingRequester req )
|
||||
{
|
||||
this.CraftID = data.getString( "CraftID" );
|
||||
this.setCanceled( data.getBoolean( "canceled" ) );
|
||||
this.setDone( data.getBoolean( "done" ) );
|
||||
this.standalone = data.getBoolean( "standalone" );
|
||||
|
||||
if( !data.hasKey( "req" ) || !data.getBoolean( "req" ) )
|
||||
if( !data.contains( "req" ) || !data.getBoolean( "req" ) )
|
||||
{
|
||||
throw new IllegalStateException( "Invalid Crafting Link for Object" );
|
||||
}
|
||||
@@ -55,14 +55,14 @@ public class CraftingLink implements ICraftingLink
|
||||
this.cpu = null;
|
||||
}
|
||||
|
||||
public CraftingLink( final NBTTagCompound data, final ICraftingCPU cpu )
|
||||
public CraftingLink( final CompoundNBT data, final ICraftingCPU cpu )
|
||||
{
|
||||
this.CraftID = data.getString( "CraftID" );
|
||||
this.setCanceled( data.getBoolean( "canceled" ) );
|
||||
this.setDone( data.getBoolean( "done" ) );
|
||||
this.standalone = data.getBoolean( "standalone" );
|
||||
|
||||
if( !data.hasKey( "req" ) || data.getBoolean( "req" ) )
|
||||
if( !data.contains( "req" ) || data.getBoolean( "req" ) )
|
||||
{
|
||||
throw new IllegalStateException( "Invalid Crafting Link for Object" );
|
||||
}
|
||||
@@ -138,13 +138,13 @@ public class CraftingLink implements ICraftingLink
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT( final NBTTagCompound tag )
|
||||
public void writeToNBT( final CompoundNBT tag )
|
||||
{
|
||||
tag.setString( "CraftID", this.CraftID );
|
||||
tag.setBoolean( "canceled", this.isCanceled() );
|
||||
tag.setBoolean( "done", this.isDone() );
|
||||
tag.setBoolean( "standalone", this.standalone );
|
||||
tag.setBoolean( "req", this.getRequester() != null );
|
||||
tag.putString( "CraftID", this.CraftID );
|
||||
tag.putBoolean( "canceled", this.isCanceled() );
|
||||
tag.putBoolean( "done", this.isDone() );
|
||||
tag.putBoolean( "standalone", this.standalone );
|
||||
tag.putBoolean( "req", this.getRequester() != null );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user