1.15 port

This commit is contained in:
yueh
2020-05-18 14:02:45 +02:00
parent 0ea86c939c
commit 16d6d55d7f
630 changed files with 4211 additions and 12664 deletions
@@ -24,7 +24,7 @@ import java.util.Iterator;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.CompoundNBT;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemHandlerHelper;
@@ -66,27 +66,27 @@ public class AppEngInternalAEInventory implements IItemHandlerModifiable, Iterab
return this.inv[var1];
}
public void writeToNBT( final NBTTagCompound data, final String name )
public void writeToNBT( final CompoundNBT data, final String name )
{
final NBTTagCompound c = new NBTTagCompound();
final CompoundNBT c = new CompoundNBT();
this.writeToNBT( c );
data.setTag( name, c );
data.put( name, c );
}
private void writeToNBT( final NBTTagCompound target )
private void writeToNBT( final CompoundNBT target )
{
for( int x = 0; x < this.size; x++ )
{
try
{
final NBTTagCompound c = new NBTTagCompound();
final CompoundNBT c = new CompoundNBT();
if( this.inv[x] != null )
{
this.inv[x].writeToNBT( c );
}
target.setTag( "#" + x, c );
target.put( "#" + x, c );
}
catch( final Exception ignored )
{
@@ -94,22 +94,22 @@ public class AppEngInternalAEInventory implements IItemHandlerModifiable, Iterab
}
}
public void readFromNBT( final NBTTagCompound data, final String name )
public void readFromNBT( final CompoundNBT data, final String name )
{
final NBTTagCompound c = data.getCompoundTag( name );
final CompoundNBT c = data.getCompound( name );
if( c != null )
{
this.readFromNBT( c );
}
}
private void readFromNBT( final NBTTagCompound target )
private void readFromNBT( final CompoundNBT target )
{
for( int x = 0; x < this.size; x++ )
{
try
{
final NBTTagCompound c = target.getCompoundTag( "#" + x );
final CompoundNBT c = target.getCompound( "#" + x );
if( c != null )
{
@@ -26,7 +26,7 @@ import java.util.Iterator;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.CompoundNBT;
import net.minecraftforge.items.ItemStackHandler;
import appeng.util.Platform;
@@ -171,21 +171,21 @@ public class AppEngInternalInventory extends ItemStackHandler implements Iterabl
return true;
}
public void writeToNBT( final NBTTagCompound data, final String name )
public void writeToNBT( final CompoundNBT data, final String name )
{
data.setTag( name, this.serializeNBT() );
data.put( name, this.serializeNBT() );
}
public void readFromNBT( final NBTTagCompound data, final String name )
public void readFromNBT( final CompoundNBT data, final String name )
{
final NBTTagCompound c = data.getCompoundTag( name );
final CompoundNBT c = data.getCompound( name );
if( c != null )
{
this.readFromNBT( c );
}
}
public void readFromNBT( final NBTTagCompound data )
public void readFromNBT( final CompoundNBT data )
{
this.deserializeNBT( data );
}