Pretty much all of security minus the gui.
and all the stuff I did that i forgot to comment.
This commit is contained in:
@@ -2,6 +2,7 @@ package appeng.me.helpers;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
@@ -20,6 +21,7 @@ import appeng.api.networking.ticking.ITickManager;
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.api.util.IOrientable;
|
||||
import appeng.core.WorldSettings;
|
||||
import appeng.helpers.TickHandler;
|
||||
import appeng.me.GridAccessException;
|
||||
import appeng.me.cache.P2PCache;
|
||||
@@ -47,6 +49,8 @@ public class AENetworkProxy implements IGridBlock
|
||||
final private String nbtName; // name
|
||||
NBTTagCompound data = null; // input
|
||||
|
||||
private EntityPlayer owner;
|
||||
|
||||
@Override
|
||||
public ItemStack getMachineRepresentation()
|
||||
{
|
||||
@@ -75,6 +79,11 @@ public class AENetworkProxy implements IGridBlock
|
||||
node.loadFromNBT( nbtName, data );
|
||||
data = null;
|
||||
}
|
||||
else if ( node != null && owner != null )
|
||||
{
|
||||
node.setPlayerID( WorldSettings.getInstance().getPlayerID( owner.username ) );
|
||||
owner = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -312,4 +321,9 @@ public class AENetworkProxy implements IGridBlock
|
||||
gp.gridChanged();
|
||||
}
|
||||
|
||||
public void setOwner(EntityPlayer player)
|
||||
{
|
||||
owner = player;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user