1.15 port
This commit is contained in:
@@ -22,11 +22,11 @@ package appeng.fluids.block;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -45,9 +45,9 @@ public class BlockFluidInterface extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final PlayerEntity p, final Hand hand, final @Nullable ItemStack heldItem, final Direction side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
if( p.isShiftKeyDown() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ package appeng.fluids.client.gui;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
|
||||
import appeng.client.gui.implementations.GuiUpgradeable;
|
||||
import appeng.client.gui.widgets.GuiTabButton;
|
||||
@@ -25,9 +25,9 @@ public class GuiFluidFormationPlane extends GuiUpgradeable
|
||||
private final PartFluidFormationPlane plane;
|
||||
private GuiTabButton priority;
|
||||
|
||||
public GuiFluidFormationPlane( InventoryPlayer inventoryPlayer, PartFluidFormationPlane te )
|
||||
public GuiFluidFormationPlane( PlayerInventory PlayerInventory, PartFluidFormationPlane te )
|
||||
{
|
||||
super( new ContainerFluidFormationPlane( inventoryPlayer, te ) );
|
||||
super( new ContainerFluidFormationPlane( PlayerInventory, te ) );
|
||||
this.ySize = 251;
|
||||
this.plane = te;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.fluids.client.gui;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
|
||||
import appeng.client.gui.implementations.GuiUpgradeable;
|
||||
import appeng.core.localization.GuiText;
|
||||
@@ -40,9 +40,9 @@ public class GuiFluidIO extends GuiUpgradeable
|
||||
{
|
||||
private final PartSharedFluidBus bus;
|
||||
|
||||
public GuiFluidIO( InventoryPlayer inventoryPlayer, PartSharedFluidBus te )
|
||||
public GuiFluidIO( PlayerInventory PlayerInventory, PartSharedFluidBus te )
|
||||
{
|
||||
super( new ContainerFluidIO( inventoryPlayer, te ) );
|
||||
super( new ContainerFluidIO( PlayerInventory, te ) );
|
||||
this.bus = te;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ package appeng.fluids.client.gui;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
|
||||
import appeng.client.gui.implementations.GuiUpgradeable;
|
||||
import appeng.client.gui.widgets.GuiTabButton;
|
||||
@@ -45,7 +45,7 @@ public class GuiFluidInterface extends GuiUpgradeable
|
||||
private final IFluidInterfaceHost host;
|
||||
private GuiTabButton priority;
|
||||
|
||||
public GuiFluidInterface( final InventoryPlayer ip, final IFluidInterfaceHost te )
|
||||
public GuiFluidInterface( final PlayerInventory ip, final IFluidInterfaceHost te )
|
||||
{
|
||||
super( new ContainerFluidInterface( ip, te ) );
|
||||
this.ySize = 231;
|
||||
|
||||
@@ -5,7 +5,7 @@ package appeng.fluids.client.gui;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.Settings;
|
||||
@@ -36,9 +36,9 @@ public class GuiFluidLevelEmitter extends GuiUpgradeable
|
||||
private GuiButton minus100;
|
||||
private GuiButton minus1000;
|
||||
|
||||
public GuiFluidLevelEmitter( final InventoryPlayer inventoryPlayer, final PartFluidLevelEmitter te )
|
||||
public GuiFluidLevelEmitter( final PlayerInventory PlayerInventory, final PartFluidLevelEmitter te )
|
||||
{
|
||||
super( new ContainerFluidLevelEmitter( inventoryPlayer, te ) );
|
||||
super( new ContainerFluidLevelEmitter( PlayerInventory, te ) );
|
||||
this.levelEmitter = te;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.io.IOException;
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.ActionItems;
|
||||
@@ -62,9 +62,9 @@ public class GuiFluidStorageBus extends GuiUpgradeable
|
||||
private GuiImgButton clear;
|
||||
private final PartFluidStorageBus bus;
|
||||
|
||||
public GuiFluidStorageBus( InventoryPlayer inventoryPlayer, PartFluidStorageBus te )
|
||||
public GuiFluidStorageBus( PlayerInventory PlayerInventory, PartFluidStorageBus te )
|
||||
{
|
||||
super( new ContainerFluidStorageBus( inventoryPlayer, te ) );
|
||||
super( new ContainerFluidStorageBus( PlayerInventory, te ) );
|
||||
this.ySize = 251;
|
||||
this.bus = te;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ import java.util.Locale;
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.ClickType;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
@@ -81,12 +81,12 @@ public class GuiFluidTerminal extends AEBaseMEGui implements ISortSource, IConfi
|
||||
private GuiImgButton sortByBox;
|
||||
private GuiImgButton sortDirBox;
|
||||
|
||||
public GuiFluidTerminal( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
||||
public GuiFluidTerminal( final PlayerInventory PlayerInventory, final ITerminalHost te )
|
||||
{
|
||||
this( inventoryPlayer, te, new ContainerFluidTerminal( inventoryPlayer, te ) );
|
||||
this( PlayerInventory, te, new ContainerFluidTerminal( PlayerInventory, te ) );
|
||||
}
|
||||
|
||||
public GuiFluidTerminal( InventoryPlayer inventoryPlayer, final ITerminalHost te, final ContainerFluidTerminal c )
|
||||
public GuiFluidTerminal( PlayerInventory PlayerInventory, final ITerminalHost te, final ContainerFluidTerminal c )
|
||||
{
|
||||
super( c );
|
||||
this.terminal = te;
|
||||
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
@@ -59,7 +59,7 @@ public class GuiFluidSlot extends GuiCustomSlot
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canClick( final EntityPlayer player )
|
||||
public boolean canClick( final PlayerEntity player )
|
||||
{
|
||||
final ItemStack mouseStack = player.inventory.getItemStack();
|
||||
return mouseStack.isEmpty() || mouseStack.hasCapability( CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY, null );
|
||||
|
||||
@@ -24,8 +24,8 @@ import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.util.AEColor;
|
||||
@@ -33,7 +33,7 @@ import appeng.client.gui.widgets.ITooltip;
|
||||
import appeng.fluids.util.IAEFluidTank;
|
||||
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
@OnlyIn( Dist.CLIENT )
|
||||
public class GuiFluidTank extends GuiButton implements ITooltip
|
||||
{
|
||||
private final IAEFluidTank tank;
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -21,9 +21,9 @@ package appeng.fluids.helper;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
@@ -229,13 +229,13 @@ public class DualityFluidInterface implements IGridTickable, IStorageMonitorable
|
||||
return new DimensionalCoord( this.iHost.getTileEntity() );
|
||||
}
|
||||
|
||||
public boolean hasCapability( Capability<?> capabilityClass, EnumFacing facing )
|
||||
public boolean hasCapability( Capability<?> capabilityClass, Direction facing )
|
||||
{
|
||||
return capabilityClass == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY || capabilityClass == Capabilities.STORAGE_MONITORABLE_ACCESSOR;
|
||||
}
|
||||
|
||||
@SuppressWarnings( "unchecked" )
|
||||
public <T> T getCapability( Capability<T> capabilityClass, EnumFacing facing )
|
||||
public <T> T getCapability( Capability<T> capabilityClass, Direction facing )
|
||||
{
|
||||
if( capabilityClass == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY )
|
||||
{
|
||||
@@ -492,14 +492,14 @@ public class DualityFluidInterface implements IGridTickable, IStorageMonitorable
|
||||
this.priority = newValue;
|
||||
}
|
||||
|
||||
public void writeToNBT( final NBTTagCompound data )
|
||||
public void writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
data.setInteger( "priority", this.priority );
|
||||
this.tanks.writeToNBT( data, "storage" );
|
||||
this.config.writeToNBT( data, "config" );
|
||||
}
|
||||
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
this.config.readFromNBT( data, "config" );
|
||||
this.tanks.readFromNBT( data, "storage" );
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.PlayerEntityMP;
|
||||
import net.minecraft.inventory.IContainerListener;
|
||||
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
@@ -59,9 +59,9 @@ public class FluidSyncHelper
|
||||
|
||||
for( final IContainerListener l : listeners )
|
||||
{
|
||||
if( l instanceof EntityPlayerMP )
|
||||
if( l instanceof PlayerEntityMP )
|
||||
{
|
||||
NetworkHandler.instance().sendTo( new PacketFluidSlot( data ), (EntityPlayerMP) l );
|
||||
NetworkHandler.instance().sendTo( new PacketFluidSlot( data ), (PlayerEntityMP) l );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ package appeng.fluids.helper;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
|
||||
import appeng.api.implementations.IUpgradeableHost;
|
||||
import appeng.api.networking.security.IActionHost;
|
||||
@@ -33,7 +33,7 @@ public interface IFluidInterfaceHost extends IActionHost, IGridProxyable, IUpgra
|
||||
{
|
||||
DualityFluidInterface getDualityFluidInterface();
|
||||
|
||||
EnumSet<EnumFacing> getTargets();
|
||||
EnumSet<Direction> getTargets();
|
||||
|
||||
TileEntity getTileEntity();
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.fluids.items;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
@@ -103,7 +103,7 @@ public final class BasicFluidStorageCell extends AbstractStorageCell<IAEFluidSta
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dropEmptyStorageCellCase( final InventoryAdaptor ia, final EntityPlayer player )
|
||||
protected void dropEmptyStorageCellCase( final InventoryAdaptor ia, final PlayerEntity player )
|
||||
{
|
||||
AEApi.instance().definitions().materials().emptyStorageCell().maybeStack( 1 ).ifPresent( is ->
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.fluids.items;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
@@ -55,7 +55,7 @@ public class FluidDummyItem extends AEBaseItem
|
||||
{
|
||||
if( is.hasTagCompound() )
|
||||
{
|
||||
NBTTagCompound tag = is.getTagCompound();
|
||||
CompoundNBT tag = is.getTagCompound();
|
||||
return FluidStack.loadFluidStackFromNBT( tag );
|
||||
}
|
||||
return null;
|
||||
@@ -69,7 +69,7 @@ public class FluidDummyItem extends AEBaseItem
|
||||
}
|
||||
else
|
||||
{
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
CompoundNBT tag = new CompoundNBT();
|
||||
fs.writeToNBT( tag );
|
||||
is.setTagCompound( tag );
|
||||
}
|
||||
|
||||
@@ -6,12 +6,12 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLiquid;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.FluidUtil;
|
||||
import net.minecraftforge.fluids.IFluidBlock;
|
||||
@@ -84,8 +84,8 @@ public class PartFluidAnnihilationPlane extends PartBasicState implements IGridT
|
||||
|
||||
final BlockPos pos = te.getPos();
|
||||
|
||||
final EnumFacing e = bch.getWorldX();
|
||||
final EnumFacing u = bch.getWorldY();
|
||||
final Direction e = bch.getWorldX();
|
||||
final Direction u = bch.getWorldY();
|
||||
|
||||
if( this.isAnnihilationPlane( te.getWorld().getTileEntity( pos.offset( e.getOpposite() ) ), this.getSide() ) )
|
||||
{
|
||||
@@ -115,33 +115,33 @@ public class PartFluidAnnihilationPlane extends PartBasicState implements IGridT
|
||||
public PlaneConnections getConnections()
|
||||
{
|
||||
|
||||
final EnumFacing facingRight, facingUp;
|
||||
final Direction facingRight, facingUp;
|
||||
AEPartLocation location = this.getSide();
|
||||
switch( location )
|
||||
{
|
||||
case UP:
|
||||
facingRight = EnumFacing.EAST;
|
||||
facingUp = EnumFacing.NORTH;
|
||||
facingRight = Direction.EAST;
|
||||
facingUp = Direction.NORTH;
|
||||
break;
|
||||
case DOWN:
|
||||
facingRight = EnumFacing.WEST;
|
||||
facingUp = EnumFacing.NORTH;
|
||||
facingRight = Direction.WEST;
|
||||
facingUp = Direction.NORTH;
|
||||
break;
|
||||
case NORTH:
|
||||
facingRight = EnumFacing.WEST;
|
||||
facingUp = EnumFacing.UP;
|
||||
facingRight = Direction.WEST;
|
||||
facingUp = Direction.UP;
|
||||
break;
|
||||
case SOUTH:
|
||||
facingRight = EnumFacing.EAST;
|
||||
facingUp = EnumFacing.UP;
|
||||
facingRight = Direction.EAST;
|
||||
facingUp = Direction.UP;
|
||||
break;
|
||||
case WEST:
|
||||
facingRight = EnumFacing.SOUTH;
|
||||
facingUp = EnumFacing.UP;
|
||||
facingRight = Direction.SOUTH;
|
||||
facingUp = Direction.UP;
|
||||
break;
|
||||
case EAST:
|
||||
facingRight = EnumFacing.NORTH;
|
||||
facingUp = EnumFacing.UP;
|
||||
facingRight = Direction.NORTH;
|
||||
facingUp = Direction.UP;
|
||||
break;
|
||||
default:
|
||||
case INTERNAL:
|
||||
@@ -182,7 +182,7 @@ public class PartFluidAnnihilationPlane extends PartBasicState implements IGridT
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborChanged( IBlockAccess w, BlockPos pos, BlockPos neighbor )
|
||||
public void onNeighborChanged( IBlockReader w, BlockPos pos, BlockPos neighbor )
|
||||
{
|
||||
if( pos.offset( this.getSide().getFacing() ).equals( neighbor ) )
|
||||
{
|
||||
@@ -244,7 +244,7 @@ public class PartFluidAnnihilationPlane extends PartBasicState implements IGridT
|
||||
final TileEntity te = this.getTile();
|
||||
final World w = te.getWorld();
|
||||
final BlockPos pos = te.getPos().offset( this.getSide().getFacing() );
|
||||
final IBlockState state = w.getBlockState( pos );
|
||||
final BlockState state = w.getBlockState( pos );
|
||||
final Block block = state.getBlock();
|
||||
|
||||
if( block instanceof IFluidBlock || block instanceof BlockLiquid )
|
||||
|
||||
@@ -8,12 +8,12 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLiquid;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
@@ -117,7 +117,7 @@ public class PartFluidFormationPlane extends PartAbstractFormationPlane<IAEFluid
|
||||
final World w = te.getWorld();
|
||||
final AEPartLocation side = this.getSide();
|
||||
final BlockPos pos = te.getPos().offset( side.getFacing() );
|
||||
final IBlockState state = w.getBlockState( pos );
|
||||
final BlockState state = w.getBlockState( pos );
|
||||
|
||||
if( this.canReplace( w, state, state.getBlock(), pos ) )
|
||||
{
|
||||
@@ -140,7 +140,7 @@ public class PartFluidFormationPlane extends PartAbstractFormationPlane<IAEFluid
|
||||
return input;
|
||||
}
|
||||
|
||||
private boolean canReplace( World w, IBlockState state, Block block, BlockPos pos )
|
||||
private boolean canReplace( World w, BlockState state, Block block, BlockPos pos )
|
||||
{
|
||||
return block.isReplaceable( w, pos ) && !( block instanceof IFluidBlock ) && !( block instanceof BlockLiquid ) && !state.getMaterial().isLiquid();
|
||||
}
|
||||
@@ -155,7 +155,7 @@ public class PartFluidFormationPlane extends PartAbstractFormationPlane<IAEFluid
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.config.readFromNBT( data, "config" );
|
||||
@@ -163,7 +163,7 @@ public class PartFluidFormationPlane extends PartAbstractFormationPlane<IAEFluid
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT( final NBTTagCompound data )
|
||||
public void writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
this.config.writeToNBT( data, "config" );
|
||||
@@ -183,7 +183,7 @@ public class PartFluidFormationPlane extends PartAbstractFormationPlane<IAEFluid
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate( final EntityPlayer player, final EnumHand hand, final Vec3d pos )
|
||||
public boolean onPartActivate( final PlayerEntity player, final Hand hand, final Vec3d pos )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
|
||||
@@ -21,12 +21,12 @@ package appeng.fluids.parts;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
@@ -114,14 +114,14 @@ public class PartFluidInterface extends PartBasicState implements IGridTickable,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.duality.readFromNBT( data );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT( final NBTTagCompound data )
|
||||
public void writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
this.duality.writeToNBT( data );
|
||||
@@ -134,7 +134,7 @@ public class PartFluidInterface extends PartBasicState implements IGridTickable,
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate( final EntityPlayer p, final EnumHand hand, final Vec3d pos )
|
||||
public boolean onPartActivate( final PlayerEntity p, final Hand hand, final Vec3d pos )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
@@ -163,7 +163,7 @@ public class PartFluidInterface extends PartBasicState implements IGridTickable,
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<EnumFacing> getTargets()
|
||||
public EnumSet<Direction> getTargets()
|
||||
{
|
||||
return EnumSet.of( this.getSide().getFacing() );
|
||||
}
|
||||
|
||||
@@ -4,11 +4,11 @@ package appeng.fluids.parts;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -323,7 +323,7 @@ public class PartFluidLevelEmitter extends PartUpgradeable implements IStackWatc
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate( final EntityPlayer player, final EnumHand hand, final Vec3d pos )
|
||||
public boolean onPartActivate( final PlayerEntity player, final Hand hand, final Vec3d pos )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
@@ -355,7 +355,7 @@ public class PartFluidLevelEmitter extends PartUpgradeable implements IStackWatc
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.lastReportedValue = data.getLong( "lastReportedValue" );
|
||||
@@ -365,7 +365,7 @@ public class PartFluidLevelEmitter extends PartUpgradeable implements IStackWatc
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT( final NBTTagCompound data )
|
||||
public void writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
data.setLong( "lastReportedValue", this.lastReportedValue );
|
||||
|
||||
@@ -25,12 +25,12 @@ import java.util.Objects;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
@@ -116,7 +116,7 @@ public class PartFluidStorageBus extends PartSharedStorageBus implements IMEMoni
|
||||
|
||||
private IMEInventory<IAEFluidStack> getInventoryWrapper( TileEntity target )
|
||||
{
|
||||
EnumFacing targetSide = this.getSide().getFacing().getOpposite();
|
||||
Direction targetSide = this.getSide().getFacing().getOpposite();
|
||||
// Prioritize a handler to directly link to another ME network
|
||||
IStorageMonitorableAccessor accessor = target.getCapability( Capabilities.STORAGE_MONITORABLE_ACCESSOR, targetSide );
|
||||
if( accessor != null )
|
||||
@@ -222,7 +222,7 @@ public class PartFluidStorageBus extends PartSharedStorageBus implements IMEMoni
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate( final EntityPlayer player, final EnumHand hand, final Vec3d pos )
|
||||
public boolean onPartActivate( final PlayerEntity player, final Hand hand, final Vec3d pos )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
@@ -241,14 +241,14 @@ public class PartFluidStorageBus extends PartSharedStorageBus implements IMEMoni
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.config.readFromNBT( data, "config" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT( final NBTTagCompound data )
|
||||
public void writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
this.config.writeToNBT( data, "config" );
|
||||
@@ -429,7 +429,7 @@ public class PartFluidStorageBus extends PartSharedStorageBus implements IMEMoni
|
||||
return 0;
|
||||
}
|
||||
|
||||
final EnumFacing targetSide = this.getSide().getFacing().getOpposite();
|
||||
final Direction targetSide = this.getSide().getFacing().getOpposite();
|
||||
|
||||
if( target.hasCapability( Capabilities.STORAGE_MONITORABLE_ACCESSOR, targetSide ) )
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.fluids.parts;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@@ -54,7 +54,7 @@ public class PartFluidTerminal extends AbstractPartTerminal
|
||||
}
|
||||
|
||||
@Override
|
||||
public GuiBridge getGui( EntityPlayer player )
|
||||
public GuiBridge getGui( PlayerEntity player )
|
||||
{
|
||||
return GuiBridge.GUI_FLUID_TERMINAL;
|
||||
}
|
||||
|
||||
@@ -19,15 +19,15 @@
|
||||
package appeng.fluids.parts;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -69,7 +69,7 @@ public abstract class PartSharedFluidBus extends PartUpgradeable implements IGri
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborChanged( IBlockAccess w, BlockPos pos, BlockPos neighbor )
|
||||
public void onNeighborChanged( IBlockReader w, BlockPos pos, BlockPos neighbor )
|
||||
{
|
||||
this.updateState();
|
||||
if( this.lastRedstone != this.getHost().hasRedstone( this.getSide() ) )
|
||||
@@ -102,7 +102,7 @@ public abstract class PartSharedFluidBus extends PartUpgradeable implements IGri
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate( final EntityPlayer player, final EnumHand hand, final Vec3d pos )
|
||||
public boolean onPartActivate( final PlayerEntity player, final Hand hand, final Vec3d pos )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
@@ -158,14 +158,14 @@ public abstract class PartSharedFluidBus extends PartUpgradeable implements IGri
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( NBTTagCompound extra )
|
||||
public void readFromNBT( CompoundNBT extra )
|
||||
{
|
||||
super.readFromNBT( extra );
|
||||
this.config.readFromNBT( extra, "config" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT( NBTTagCompound extra )
|
||||
public void writeToNBT( CompoundNBT extra )
|
||||
{
|
||||
super.writeToNBT( extra );
|
||||
this.config.writeToNBT( extra, "config" );
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.fluids.registries;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@@ -46,7 +46,7 @@ public class BasicFluidCellGuiHandler implements ICellGuiHandler
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openChestGui( final EntityPlayer player, final IChestOrDrive chest, final ICellHandler cellHandler, final IMEInventoryHandler inv, final ItemStack is, final IStorageChannel chan )
|
||||
public void openChestGui( final PlayerEntity player, final IChestOrDrive chest, final ICellHandler cellHandler, final IMEInventoryHandler inv, final ItemStack is, final IStorageChannel chan )
|
||||
{
|
||||
Platform.openGUI( player, (TileEntity) chest, AEPartLocation.fromFacing( chest.getUp() ), GuiBridge.GUI_FLUID_TERMINAL );
|
||||
}
|
||||
|
||||
@@ -24,9 +24,9 @@ import java.util.EnumSet;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
@@ -97,7 +97,7 @@ public class TileFluidInterface extends AENetworkTile implements IGridTickable,
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
this.duality.writeToNBT( data );
|
||||
@@ -105,7 +105,7 @@ public class TileFluidInterface extends AENetworkTile implements IGridTickable,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.duality.readFromNBT( data );
|
||||
@@ -124,9 +124,9 @@ public class TileFluidInterface extends AENetworkTile implements IGridTickable,
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<EnumFacing> getTargets()
|
||||
public EnumSet<Direction> getTargets()
|
||||
{
|
||||
return EnumSet.allOf( EnumFacing.class );
|
||||
return EnumSet.allOf( Direction.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -142,13 +142,13 @@ public class TileFluidInterface extends AENetworkTile implements IGridTickable,
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCapability( Capability<?> capability, @Nullable EnumFacing facing )
|
||||
public boolean hasCapability( Capability<?> capability, @Nullable Direction facing )
|
||||
{
|
||||
return this.duality.hasCapability( capability, facing ) || super.hasCapability( capability, facing );
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getCapability( Capability<T> capability, @Nullable EnumFacing facing )
|
||||
public <T> T getCapability( Capability<T> capability, @Nullable Direction facing )
|
||||
{
|
||||
T result = this.duality.getCapability( capability, facing );
|
||||
if( result != null )
|
||||
|
||||
@@ -4,7 +4,7 @@ package appeng.fluids.util;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.capability.IFluidTankProperties;
|
||||
|
||||
@@ -277,20 +277,20 @@ public class AEFluidInventory implements IAEFluidTank
|
||||
return totalDrained;
|
||||
}
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
private void writeToNBT( final NBTTagCompound target )
|
||||
private void writeToNBT( final CompoundNBT target )
|
||||
{
|
||||
for( int x = 0; x < this.fluids.length; x++ )
|
||||
{
|
||||
try
|
||||
{
|
||||
final NBTTagCompound c = new NBTTagCompound();
|
||||
final CompoundNBT c = new CompoundNBT();
|
||||
|
||||
if( this.fluids[x] != null )
|
||||
{
|
||||
@@ -305,22 +305,22 @@ public class AEFluidInventory implements IAEFluidTank
|
||||
}
|
||||
}
|
||||
|
||||
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.getCompoundTag( 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.fluids.length; x++ )
|
||||
{
|
||||
try
|
||||
{
|
||||
final NBTTagCompound c = target.getCompoundTag( "#" + x );
|
||||
final CompoundNBT c = target.getCompoundTag( "#" + x );
|
||||
|
||||
if( c != null )
|
||||
{
|
||||
|
||||
@@ -29,10 +29,11 @@ import javax.annotation.Nonnull;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.fluid.Fluid;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.CompressedStreamTools;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -50,7 +51,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
{
|
||||
|
||||
private final Fluid fluid;
|
||||
private NBTTagCompound tagCompound;
|
||||
private CompoundNBT tagCompound;
|
||||
|
||||
private AEFluidStack( final AEFluidStack fluidStack )
|
||||
{
|
||||
@@ -76,13 +77,13 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
throw new IllegalArgumentException( "Fluid is null." );
|
||||
}
|
||||
|
||||
this.setStackSize( fluidStack.amount );
|
||||
this.setStackSize( fluidStack.getAmount() );
|
||||
this.setCraftable( false );
|
||||
this.setCountRequestable( 0 );
|
||||
|
||||
if( fluidStack.tag != null )
|
||||
if( fluidStack.getTag() != null )
|
||||
{
|
||||
this.tagCompound = fluidStack.tag.copy();
|
||||
this.tagCompound = fluidStack.getTag().copy();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +97,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
return new AEFluidStack( input );
|
||||
}
|
||||
|
||||
public static IAEFluidStack fromNBT( final NBTTagCompound data )
|
||||
public static IAEFluidStack fromNBT( final CompoundNBT data )
|
||||
{
|
||||
final FluidStack fluidStack = FluidStack.loadFluidStackFromNBT( data );
|
||||
|
||||
@@ -127,7 +128,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
final boolean hasTagCompound = ( mask & 0x80 ) > 0;
|
||||
|
||||
// don't send this...
|
||||
final NBTTagCompound d = new NBTTagCompound();
|
||||
final CompoundNBT d = new CompoundNBT();
|
||||
|
||||
final byte len2 = buffer.readByte();
|
||||
final byte[] name = new byte[len2];
|
||||
@@ -178,7 +179,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT( final NBTTagCompound data )
|
||||
public void writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
data.setString( "FluidName", this.fluid.getName() );
|
||||
data.setByte( "Count", (byte) 0 );
|
||||
@@ -318,7 +319,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToPacket( final ByteBuf buffer ) throws IOException
|
||||
public void writeToPacket( final PacketBuffer buffer ) throws IOException
|
||||
{
|
||||
final byte mask = (byte) ( ( this.getType( this.getStackSize() ) << 2 ) | ( this
|
||||
.getType( this.getCountRequestable() ) << 4 ) | ( (byte) ( this.isCraftable() ? 1 : 0 ) << 6 ) | ( this.hasTagCompound() ? 1 : 0 ) << 7 );
|
||||
@@ -331,7 +332,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
this.putPacketValue( buffer, this.getCountRequestable() );
|
||||
}
|
||||
|
||||
private void writeToStream( final ByteBuf buffer ) throws IOException
|
||||
private void writeToStream( final PacketBuffer buffer ) throws IOException
|
||||
{
|
||||
final byte[] name = this.fluid.getName().getBytes( "UTF-8" );
|
||||
buffer.writeByte( (byte) name.length );
|
||||
|
||||
Reference in New Issue
Block a user