1.15 port
This commit is contained in:
@@ -24,10 +24,10 @@ import java.util.EnumSet;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
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.util.EnumFacing;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.Direction;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.networking.GridFlags;
|
||||
@@ -62,14 +62,14 @@ public class AENetworkProxy implements IGridBlock
|
||||
private final boolean worldNode;
|
||||
private final String nbtName; // name
|
||||
private AEColor myColor = AEColor.TRANSPARENT;
|
||||
private NBTTagCompound data = null; // input
|
||||
private CompoundNBT data = null; // input
|
||||
private ItemStack myRepInstance = ItemStack.EMPTY;
|
||||
private boolean isReady = false;
|
||||
private IGridNode node = null;
|
||||
private EnumSet<EnumFacing> validSides;
|
||||
private EnumSet<Direction> validSides;
|
||||
private EnumSet<GridFlags> flags = EnumSet.noneOf( GridFlags.class );
|
||||
private double idleDraw = 1.0;
|
||||
private EntityPlayer owner;
|
||||
private PlayerEntity owner;
|
||||
|
||||
public AENetworkProxy( final IGridProxyable te, final String nbtName, final ItemStack visual, final boolean inWorld )
|
||||
{
|
||||
@@ -77,7 +77,7 @@ public class AENetworkProxy implements IGridBlock
|
||||
this.nbtName = nbtName;
|
||||
this.worldNode = inWorld;
|
||||
this.myRepInstance = visual;
|
||||
this.validSides = EnumSet.allOf( EnumFacing.class );
|
||||
this.validSides = EnumSet.allOf( Direction.class );
|
||||
}
|
||||
|
||||
public void setVisualRepresentation( final ItemStack is )
|
||||
@@ -85,7 +85,7 @@ public class AENetworkProxy implements IGridBlock
|
||||
this.myRepInstance = is;
|
||||
}
|
||||
|
||||
public void writeToNBT( final NBTTagCompound tag )
|
||||
public void writeToNBT( final CompoundNBT tag )
|
||||
{
|
||||
if( this.node != null )
|
||||
{
|
||||
@@ -93,7 +93,7 @@ public class AENetworkProxy implements IGridBlock
|
||||
}
|
||||
}
|
||||
|
||||
public void setValidSides( final EnumSet<EnumFacing> validSides )
|
||||
public void setValidSides( final EnumSet<Direction> validSides )
|
||||
{
|
||||
this.validSides = validSides;
|
||||
if( this.node != null )
|
||||
@@ -155,7 +155,7 @@ public class AENetworkProxy implements IGridBlock
|
||||
return this.node;
|
||||
}
|
||||
|
||||
public void readFromNBT( final NBTTagCompound tag )
|
||||
public void readFromNBT( final CompoundNBT tag )
|
||||
{
|
||||
this.data = tag;
|
||||
if( this.node != null && this.data != null )
|
||||
@@ -342,7 +342,7 @@ public class AENetworkProxy implements IGridBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<EnumFacing> getConnectableSides()
|
||||
public EnumSet<Direction> getConnectableSides()
|
||||
{
|
||||
return this.validSides;
|
||||
}
|
||||
@@ -434,7 +434,7 @@ public class AENetworkProxy implements IGridBlock
|
||||
return eg;
|
||||
}
|
||||
|
||||
public void setOwner( final EntityPlayer player )
|
||||
public void setOwner( final PlayerEntity player )
|
||||
{
|
||||
this.owner = player;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.me.helpers;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
||||
import appeng.api.networking.security.IActionHost;
|
||||
import appeng.api.networking.security.IActionSource;
|
||||
@@ -31,7 +31,7 @@ public class BaseActionSource implements IActionSource
|
||||
{
|
||||
|
||||
@Override
|
||||
public Optional<EntityPlayer> player()
|
||||
public Optional<PlayerEntity> player()
|
||||
{
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.me.helpers;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
||||
import appeng.api.networking.security.IActionHost;
|
||||
import appeng.api.networking.security.IActionSource;
|
||||
@@ -38,7 +38,7 @@ public class MachineSource implements IActionSource
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<EntityPlayer> player()
|
||||
public Optional<PlayerEntity> player()
|
||||
{
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.Optional;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
||||
import appeng.api.networking.security.IActionHost;
|
||||
import appeng.api.networking.security.IActionSource;
|
||||
@@ -32,10 +32,10 @@ import appeng.api.networking.security.IActionSource;
|
||||
public class PlayerSource implements IActionSource
|
||||
{
|
||||
|
||||
private final EntityPlayer player;
|
||||
private final PlayerEntity player;
|
||||
private final IActionHost via;
|
||||
|
||||
public PlayerSource( final EntityPlayer p, final IActionHost v )
|
||||
public PlayerSource( final PlayerEntity p, final IActionHost v )
|
||||
{
|
||||
Preconditions.checkNotNull( p );
|
||||
this.player = p;
|
||||
@@ -43,7 +43,7 @@ public class PlayerSource implements IActionSource
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<EntityPlayer> player()
|
||||
public Optional<PlayerEntity> player()
|
||||
{
|
||||
return Optional.of( this.player );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user