Lots of compile fixes

This commit is contained in:
Sebastian Hartte
2020-06-04 03:02:48 +02:00
parent 6eb2a9504a
commit 237463dd94
241 changed files with 3438 additions and 3474 deletions
@@ -23,6 +23,7 @@ import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.Direction;
import net.minecraft.world.World;
import net.minecraftforge.items.IItemHandler;
@@ -59,8 +60,8 @@ public class TileSpatialIOPort extends AENetworkInvTile implements IWorldCallabl
private final IItemHandler invExt = new WrapperFilteredItemHandler( this.inv, new SpatialIOFilter() );
private YesNo lastRedstoneState = YesNo.UNDECIDED;
public TileSpatialIOPort()
{
public TileSpatialIOPort(TileEntityType<?> tileEntityTypeIn) {
super(tileEntityTypeIn);
this.getProxy().setFlags( GridFlags.REQUIRE_CHANNEL );
}
@@ -68,7 +69,7 @@ public class TileSpatialIOPort extends AENetworkInvTile implements IWorldCallabl
public CompoundNBT write(final CompoundNBT data )
{
super.write( data );
data.setInteger( "lastRedstoneState", this.lastRedstoneState.ordinal() );
data.putInt( "lastRedstoneState", this.lastRedstoneState.ordinal() );
return data;
}
@@ -78,7 +79,7 @@ public class TileSpatialIOPort extends AENetworkInvTile implements IWorldCallabl
super.read( data );
if( data.contains("lastRedstoneState") )
{
this.lastRedstoneState = YesNo.values()[data.getInteger( "lastRedstoneState" )];
this.lastRedstoneState = YesNo.values()[data.getInt( "lastRedstoneState" )];
}
}
@@ -94,7 +95,7 @@ public class TileSpatialIOPort extends AENetworkInvTile implements IWorldCallabl
public void updateRedstoneState()
{
final YesNo currentState = this.world.isBlockIndirectlyGettingPowered( this.pos ) != 0 ? YesNo.YES : YesNo.NO;
final YesNo currentState = this.world.getRedstonePowerFromNeighbors( this.pos ) != 0 ? YesNo.YES : YesNo.NO;
if( this.lastRedstoneState != currentState )
{
this.lastRedstoneState = currentState;
@@ -23,6 +23,7 @@ import java.io.IOException;
import java.util.EnumSet;
import net.minecraft.network.PacketBuffer;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.Direction;
import appeng.api.networking.GridFlags;
@@ -58,8 +59,8 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
private SpatialPylonCluster cluster;
private boolean didHaveLight = false;
public TileSpatialPylon()
{
public TileSpatialPylon(TileEntityType<?> tileEntityTypeIn) {
super(tileEntityTypeIn);
this.getProxy().setFlags( GridFlags.REQUIRE_CHANNEL, GridFlags.MULTIBLOCK );
this.getProxy().setIdlePowerUsage( 0.5 );
this.getProxy().setValidSides( EnumSet.noneOf( Direction.class ) );
@@ -72,10 +73,10 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
}
@Override
public void onChunkUnload()
public void onChunkUnloaded()
{
this.disconnect( false );
super.onChunkUnload();
super.onChunkUnloaded();
}
@Override
@@ -86,10 +87,10 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
}
@Override
public void invalidate()
public void remove()
{
this.disconnect( false );
super.invalidate();
super.remove();
}
public void neighborChanged()
@@ -195,8 +196,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
if( hasLight != this.didHaveLight )
{
this.didHaveLight = hasLight;
this.world.checkLight( this.pos );
// world.updateAllLightTypes( xCoord, yCoord, zCoord );
this.world.getLightManager().checkBlock( this.pos );
}
}