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
@@ -5,7 +5,7 @@ package appeng.fluids.container;
import java.util.Collections;
import java.util.Map;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.IContainerListener;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
@@ -25,7 +25,7 @@ public abstract class ContainerFluidConfigurable extends ContainerUpgradeable im
{
private FluidSyncHelper sync = null;
public ContainerFluidConfigurable( InventoryPlayer ip, IUpgradeableHost te )
public ContainerFluidConfigurable( PlayerInventory ip, IUpgradeableHost te )
{
super( ip, te );
}
@@ -2,7 +2,7 @@
package appeng.fluids.container;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraftforge.items.IItemHandler;
import appeng.api.config.SecurityPermissions;
@@ -17,7 +17,7 @@ public class ContainerFluidFormationPlane extends ContainerFluidConfigurable
{
private final PartFluidFormationPlane plane;
public ContainerFluidFormationPlane( final InventoryPlayer ip, final PartFluidFormationPlane te )
public ContainerFluidFormationPlane( final PlayerInventory ip, final PartFluidFormationPlane te )
{
super( ip, te );
this.plane = te;
@@ -39,19 +39,19 @@ public class ContainerFluidFormationPlane extends ContainerFluidConfigurable
protected void setupConfig()
{
final IItemHandler upgrades = this.getUpgradeable().getInventoryByName( "upgrades" );
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.getInventoryPlayer() ) )
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.getPlayerInventory() ) )
.setNotDraggable() );
this.addSlotToContainer(
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.getInventoryPlayer() ) )
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.getPlayerInventory() ) )
.setNotDraggable() );
this.addSlotToContainer(
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.getInventoryPlayer() ) )
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.getPlayerInventory() ) )
.setNotDraggable() );
this.addSlotToContainer(
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.getInventoryPlayer() ) )
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.getPlayerInventory() ) )
.setNotDraggable() );
this.addSlotToContainer(
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, this.getInventoryPlayer() ) )
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, this.getPlayerInventory() ) )
.setNotDraggable() );
}
@@ -19,7 +19,7 @@
package appeng.fluids.container;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.entity.player.PlayerInventory;
import appeng.fluids.parts.PartSharedFluidBus;
import appeng.fluids.util.IAEFluidTank;
@@ -34,7 +34,7 @@ public class ContainerFluidIO extends ContainerFluidConfigurable
{
private final PartSharedFluidBus bus;
public ContainerFluidIO( InventoryPlayer ip, PartSharedFluidBus te )
public ContainerFluidIO( PlayerInventory ip, PartSharedFluidBus te )
{
super( ip, te );
this.bus = te;
@@ -22,7 +22,7 @@ package appeng.fluids.container;
import java.util.Collections;
import java.util.Map;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.IContainerListener;
import appeng.api.config.SecurityPermissions;
@@ -40,7 +40,7 @@ public class ContainerFluidInterface extends ContainerFluidConfigurable
private final DualityFluidInterface myDuality;
private final FluidSyncHelper tankSync;
public ContainerFluidInterface( final InventoryPlayer ip, final IFluidInterfaceHost te )
public ContainerFluidInterface( final PlayerInventory ip, final IFluidInterfaceHost te )
{
super( ip, te.getDualityFluidInterface().getHost() );
@@ -3,10 +3,10 @@ package appeng.fluids.container;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import appeng.api.config.RedstoneMode;
import appeng.api.config.SecurityPermissions;
@@ -21,25 +21,25 @@ public class ContainerFluidLevelEmitter extends ContainerFluidConfigurable
{
private final PartFluidLevelEmitter lvlEmitter;
@SideOnly( Side.CLIENT )
@OnlyIn( Dist.CLIENT )
private GuiTextField textField;
@GuiSync( 3 )
public long EmitterValue = -1;
public ContainerFluidLevelEmitter( final InventoryPlayer ip, final PartFluidLevelEmitter te )
public ContainerFluidLevelEmitter( final PlayerInventory ip, final PartFluidLevelEmitter te )
{
super( ip, te );
this.lvlEmitter = te;
}
@SideOnly( Side.CLIENT )
@OnlyIn( Dist.CLIENT )
public void setTextField( final GuiTextField level )
{
this.textField = level;
this.textField.setText( String.valueOf( this.EmitterValue ) );
}
public void setLevel( final long l, final EntityPlayer player )
public void setLevel( final long l, final PlayerEntity player )
{
this.lvlEmitter.setReportingValue( l );
this.EmitterValue = l;
@@ -21,7 +21,7 @@ package appeng.fluids.container;
import java.util.Iterator;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraftforge.items.IItemHandler;
import appeng.api.AEApi;
@@ -59,7 +59,7 @@ public class ContainerFluidStorageBus extends ContainerFluidConfigurable
@GuiSync( 4 )
public StorageFilter storageFilter = StorageFilter.EXTRACTABLE_ONLY;
public ContainerFluidStorageBus( InventoryPlayer ip, PartFluidStorageBus te )
public ContainerFluidStorageBus( PlayerInventory ip, PartFluidStorageBus te )
{
super( ip, te );
this.storageBus = te;
@@ -75,19 +75,19 @@ public class ContainerFluidStorageBus extends ContainerFluidConfigurable
protected void setupConfig()
{
final IItemHandler upgrades = this.getUpgradeable().getInventoryByName( "upgrades" );
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.getInventoryPlayer() ) )
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.getPlayerInventory() ) )
.setNotDraggable() );
this.addSlotToContainer(
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.getInventoryPlayer() ) )
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.getPlayerInventory() ) )
.setNotDraggable() );
this.addSlotToContainer(
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.getInventoryPlayer() ) )
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.getPlayerInventory() ) )
.setNotDraggable() );
this.addSlotToContainer(
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.getInventoryPlayer() ) )
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.getPlayerInventory() ) )
.setNotDraggable() );
this.addSlotToContainer(
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, this.getInventoryPlayer() ) )
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, this.getPlayerInventory() ) )
.setNotDraggable() );
}
@@ -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 )
{