Work on GUIs (specifically to get SkyChest GUI)

This commit is contained in:
Sebastian Hartte
2020-06-02 02:14:09 +02:00
parent 271e8889a1
commit 9f63859769
109 changed files with 1133 additions and 1301 deletions
@@ -33,6 +33,7 @@ import net.minecraft.tileentity.ITickableTileEntity;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.math.MathHelper;
import net.minecraftforge.items.IItemHandler;
import appeng.tile.AEBaseInvTile;
@@ -43,6 +44,7 @@ public class TileSkyChest extends AEBaseInvTile implements ITickableTileEntity,
{
private final AppEngInternalInventory inv = new AppEngInternalInventory( this, 9 * 4 );
// server
private int numPlayersUsing;
// client..
@@ -76,12 +78,6 @@ public class TileSkyChest extends AEBaseInvTile implements ITickableTileEntity,
return c; // TESR yo!
}
@Override
public boolean requiresTESR()
{
return true;
}
@Override
public boolean canRenderBreaking()
{
@@ -147,17 +143,9 @@ public class TileSkyChest extends AEBaseInvTile implements ITickableTileEntity,
@Override
public void tick()
{
int i = this.pos.getX();
int j = this.pos.getY();
int k = this.pos.getZ();
this.prevLidAngle = this.lidAngle;
float f1 = 0.1F;
if( this.numPlayersUsing == 0 && this.lidAngle > 0.0F || this.numPlayersUsing > 0 && this.lidAngle < 1.0F )
{
float f2 = this.lidAngle;
if( this.numPlayersUsing > 0 )
{
this.lidAngle += 0.1F;
@@ -167,17 +155,7 @@ public class TileSkyChest extends AEBaseInvTile implements ITickableTileEntity,
this.lidAngle -= 0.1F;
}
if( this.lidAngle > 1.0F )
{
this.lidAngle = 1.0F;
}
float f3 = 0.5F;
if( this.lidAngle < 0.0F )
{
this.lidAngle = 0.0F;
}
this.lidAngle = MathHelper.clamp(this.lidAngle, 0, 1);
}
}
@@ -187,26 +165,6 @@ public class TileSkyChest extends AEBaseInvTile implements ITickableTileEntity,
}
public float getLidAngle()
{
return this.lidAngle;
}
public void setLidAngle( final float lidAngle )
{
this.lidAngle = lidAngle;
}
public float getPrevLidAngle()
{
return this.prevLidAngle;
}
public void setPrevLidAngle( float prevLidAngle )
{
this.prevLidAngle = prevLidAngle;
}
public int getPlayerOpen()
{
return this.numPlayersUsing;