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,9 +24,9 @@ import java.nio.BufferOverflowException;
import javax.annotation.Nonnull;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntityMP;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.IContainerListener;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
@@ -91,7 +91,7 @@ public class ContainerFluidTerminal extends AEBaseContainer implements IConfigMa
// Holds the fluid the client wishes to extract, or null for insert
private IAEFluidStack clientRequestedTargetFluid = null;
public ContainerFluidTerminal( InventoryPlayer ip, ITerminalHost terminal )
public ContainerFluidTerminal( PlayerInventory ip, ITerminalHost terminal )
{
super( ip, terminal );
this.terminal = terminal;
@@ -181,7 +181,7 @@ public class ContainerFluidTerminal extends AEBaseContainer implements IConfigMa
}
@Override
public void onContainerClosed( final EntityPlayer player )
public void onContainerClosed( final PlayerEntity player )
{
super.onContainerClosed( player );
if( this.monitor != null )
@@ -192,7 +192,7 @@ public class ContainerFluidTerminal extends AEBaseContainer implements IConfigMa
private void queueInventory( final IContainerListener c )
{
if( Platform.isServer() && c instanceof EntityPlayer && this.monitor != null )
if( Platform.isServer() && c instanceof PlayerEntity && this.monitor != null )
{
try
{
@@ -207,14 +207,14 @@ public class ContainerFluidTerminal extends AEBaseContainer implements IConfigMa
}
catch( final BufferOverflowException boe )
{
NetworkHandler.instance().sendTo( piu, (EntityPlayerMP) c );
NetworkHandler.instance().sendTo( piu, (PlayerEntityMP) c );
piu = new PacketMEFluidInventoryUpdate();
piu.appendFluid( send );
}
}
NetworkHandler.instance().sendTo( piu, (EntityPlayerMP) c );
NetworkHandler.instance().sendTo( piu, (PlayerEntityMP) c );
}
catch( final IOException e )
{
@@ -281,11 +281,11 @@ public class ContainerFluidTerminal extends AEBaseContainer implements IConfigMa
this.clientCM.putSetting( set, sideLocal );
for( final IContainerListener crafter : this.listeners )
{
if( crafter instanceof EntityPlayerMP )
if( crafter instanceof PlayerEntityMP )
{
try
{
NetworkHandler.instance().sendTo( new PacketValueConfig( set.name(), sideLocal.name() ), (EntityPlayerMP) crafter );
NetworkHandler.instance().sendTo( new PacketValueConfig( set.name(), sideLocal.name() ), (PlayerEntityMP) crafter );
}
catch( final IOException e )
{
@@ -324,9 +324,9 @@ public class ContainerFluidTerminal extends AEBaseContainer implements IConfigMa
for( final Object c : this.listeners )
{
if( c instanceof EntityPlayer )
if( c instanceof PlayerEntity )
{
NetworkHandler.instance().sendTo( piu, (EntityPlayerMP) c );
NetworkHandler.instance().sendTo( piu, (PlayerEntityMP) c );
}
}
}
@@ -343,7 +343,7 @@ public class ContainerFluidTerminal extends AEBaseContainer implements IConfigMa
}
@Override
public void doAction( EntityPlayerMP player, InventoryAction action, int slot, long id )
public void doAction( PlayerEntityMP player, InventoryAction action, int slot, long id )
{
if( action != InventoryAction.FILL_ITEM && action != InventoryAction.EMPTY_ITEM )
{