1.15 port

This commit is contained in:
yueh
2020-05-18 14:02:45 +02:00
parent 0ea86c939c
commit 16d6d55d7f
630 changed files with 4211 additions and 12664 deletions
@@ -25,9 +25,9 @@ import java.util.List;
import java.util.Map.Entry;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.texture.ITickable;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ITickable;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.NextTickListEntry;
import net.minecraft.world.World;
@@ -62,7 +62,7 @@ public class CachedPlane
private final IMovableRegistry reg = AEApi.instance().registries().movable();
private final List<WorldCoord> updates = new ArrayList<>();
private int verticalBits;
private final IBlockState matrixBlockState;
private final BlockState matrixBlockState;
public CachedPlane( final World w, final int minX, final int minY, final int minZ, final int maxX, final int maxY, final int maxZ )
{
@@ -111,8 +111,7 @@ public class CachedPlane
{
for( int z = 0; z < this.z_size; z++ )
{
this.myColumns[x][z] = new Column( w.getChunkFromChunkCoords( ( minX + x ) >> 4,
( minZ + z ) >> 4 ), ( minX + x ) & 0xF, ( minZ + z ) & 0xF, minCY, cy_size );
this.myColumns[x][z] = new Column( w.getChunk( ( minX + x ) >> 4, ( minZ + z ) >> 4 ), ( minX + x ) & 0xF, ( minZ + z ) & 0xF, minCY, cy_size );
}
}
@@ -125,7 +124,7 @@ public class CachedPlane
final List<Entry<BlockPos, TileEntity>> rawTiles = new ArrayList<>();
final List<BlockPos> deadTiles = new ArrayList<>();
final Chunk c = w.getChunkFromChunkCoords( minCX + cx, minCZ + cz );
final Chunk c = w.getChunk( minCX + cx, minCZ + cz );
this.myChunks[cx][cz] = c;
rawTiles.addAll( ( (HashMap<BlockPos, TileEntity>) c.getTileEntityMap() ).entrySet() );
@@ -151,7 +150,7 @@ public class CachedPlane
// don't skip air, just let the code replace it...
if( details.state != null && details.state.getBlock() == Platform.AIR_BLOCK && details.state.getMaterial().isReplaceable() )
{
w.setBlockToAir( tePOS );
w.removeBlock( tePOS, false );
}
else
{
@@ -166,7 +165,7 @@ public class CachedPlane
c.getTileEntityMap().remove( cp );
}
final long k = this.getWorld().getTotalWorldTime();
final long k = this.getWorld().getGameTime();
final List<NextTickListEntry> list = this.getWorld().getPendingBlockUpdates( c, false );
if( list != null )
{
@@ -392,7 +391,7 @@ public class CachedPlane
private static class BlockStorageData
{
public IBlockState state;
public BlockState state;
public int light;
}
@@ -19,7 +19,7 @@
package appeng.spatial;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -55,7 +55,7 @@ public class DefaultSpatialHandler implements IMovableHandler
if( c.isLoaded() )
{
final IBlockState state = w.getBlockState( newPosition );
final BlockState state = w.getBlockState( newPosition );
w.addTileEntity( te );
w.notifyBlockUpdate( newPosition, state, state, 1 );
}
@@ -22,7 +22,7 @@ package appeng.spatial;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -72,7 +72,7 @@ public class StorageChunkProvider extends ChunkGeneratorOverworld
return chunk;
}
private void fillChunk( Chunk chunk, IBlockState defaultState )
private void fillChunk( Chunk chunk, BlockState defaultState )
{
for( int cx = 0; cx < 16; cx++ )
{
@@ -23,9 +23,9 @@ import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.entity.player.PlayerEntityMP;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
@@ -111,9 +111,9 @@ public class StorageHelper
// load the chunk!
newWorld.getChunkProvider().provideChunk( MathHelper.floor( link.x ) >> 4, MathHelper.floor( link.z ) >> 4 );
if( entity instanceof EntityPlayerMP && link.dim.provider instanceof StorageWorldProvider )
if( entity instanceof PlayerEntityMP && link.dim.provider instanceof StorageWorldProvider )
{
AppEng.instance().getAdvancementTriggers().getSpatialExplorer().trigger( (EntityPlayerMP) entity );
AppEng.instance().getAdvancementTriggers().getSpatialExplorer().trigger( (PlayerEntityMP) entity );
}
entity.changeDimension( link.dim.provider.getDimension(), new METeleporter( link ) );
@@ -230,7 +230,7 @@ public class StorageHelper
@Override
public void visit( final BlockPos pos )
{
final IBlockState state = this.dst.getBlockState( pos );
final BlockState state = this.dst.getBlockState( pos );
final Block blk = state.getBlock();
blk.neighborChanged( state, this.dst, pos, blk, pos );
}
@@ -240,9 +240,9 @@ public class StorageHelper
{
private final World dst;
private final IBlockState state;
private final BlockState state;
public WrapInMatrixFrame( final IBlockState state, final World dst2 )
public WrapInMatrixFrame( final BlockState state, final World dst2 )
{
this.dst = dst2;
this.state = state;
@@ -29,8 +29,8 @@ import net.minecraft.world.biome.BiomeProviderSingle;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.gen.IChunkGenerator;
import net.minecraftforge.client.IRenderHandler;
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.client.render.SpatialSkyRender;
import appeng.core.AppEng;
@@ -67,7 +67,7 @@ public class StorageWorldProvider extends WorldProvider
}
@Override
@SideOnly( Side.CLIENT )
@OnlyIn( Dist.CLIENT )
public float[] calcSunriseSunsetColors( final float celestialAngle, final float partialTicks )
{
return null;
@@ -86,7 +86,7 @@ public class StorageWorldProvider extends WorldProvider
}
@Override
@SideOnly( Side.CLIENT )
@OnlyIn( Dist.CLIENT )
public boolean isSkyColored()
{
return true;