Port to 1.11

This commit is contained in:
yueh
2016-12-08 12:42:00 +01:00
parent 589730bfad
commit ed9e6dd21c
262 changed files with 4027 additions and 3954 deletions
@@ -52,7 +52,7 @@ import appeng.client.render.effects.LightningFX;
import appeng.client.render.renderable.ItemRenderable;
import appeng.client.render.tesr.ModularTESR;
import appeng.core.AEConfig;
import appeng.core.CommonHelper;
import appeng.core.AppEng;
import appeng.helpers.ICustomCollision;
import appeng.tile.AEBaseTile;
import appeng.tile.misc.TileCharger;
@@ -118,7 +118,7 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
for( int bolts = 0; bolts < 3; bolts++ )
{
if( CommonHelper.proxy.shouldAddParticles( r ) )
if( AppEng.proxy.shouldAddParticles( r ) )
{
final LightningFX fx = new LightningFX( w, xOff + 0.5 + pos.getX(), yOff + 0.5 + pos.getY(), zOff + 0.5 + pos.getZ(), 0.0D, 0.0D, 0.0D );
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
@@ -148,12 +148,12 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
}
@Override
public void neighborChanged( IBlockState state, World w, BlockPos pos, Block blockIn )
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
{
final EnumFacing up = this.getOrientable( w, pos ).getUp();
if( !this.canPlaceAt( (World) w, pos, up.getOpposite() ) )
final EnumFacing up = this.getOrientable( world, pos ).getUp();
if( !this.canPlaceAt( (World) world, pos, up.getOpposite() ) )
{
this.dropTorch( (World) w, pos );
this.dropTorch( (World) world, pos );
}
}
@@ -45,7 +45,7 @@ import appeng.api.util.IOrientableBlock;
import appeng.block.AEBaseBlock;
import appeng.client.render.effects.LightningFX;
import appeng.core.AEConfig;
import appeng.core.CommonHelper;
import appeng.core.AppEng;
import appeng.helpers.ICustomCollision;
import appeng.helpers.MetaRotation;
@@ -151,7 +151,7 @@ public class BlockQuartzFixture extends AEBaseBlock implements IOrientableBlock,
final double zOff = -0.3 * up.getFrontOffsetZ();
for( int bolts = 0; bolts < 3; bolts++ )
{
if( CommonHelper.proxy.shouldAddParticles( r ) )
if( AppEng.proxy.shouldAddParticles( r ) )
{
final LightningFX fx = new LightningFX( w, xOff + 0.5 + pos.getX(), yOff + 0.5 + pos.getY(), zOff + 0.5 + pos.getZ(), 0.0D, 0.0D, 0.0D );
@@ -161,12 +161,12 @@ public class BlockQuartzFixture extends AEBaseBlock implements IOrientableBlock,
}
@Override
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos,final Block neighborBlock )
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos)
{
final EnumFacing up = this.getOrientable( w, pos ).getUp();
if( !this.canPlaceAt( w, pos, up.getOpposite() ) )
final EnumFacing up = this.getOrientable( world, pos ).getUp();
if( !this.canPlaceAt( world, pos, up.getOpposite() ) )
{
this.dropTorch( w, pos );
this.dropTorch( world, pos );
}
}
@@ -38,7 +38,7 @@ import appeng.api.util.IOrientableBlock;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.effects.LightningFX;
import appeng.core.AEConfig;
import appeng.core.CommonHelper;
import appeng.core.AppEng;
import appeng.tile.misc.TileQuartzGrowthAccelerator;
import appeng.util.Platform;
@@ -83,7 +83,7 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock implements IOr
final TileQuartzGrowthAccelerator cga = this.getTileEntity( w, pos );
if( cga != null && cga.isPowered() && CommonHelper.proxy.shouldAddParticles( r ) )
if( cga != null && cga.isPowered() && AppEng.proxy.shouldAddParticles( r ) )
{
final double d0 = r.nextFloat() - 0.5F;
final double d1 = r.nextFloat() - 0.5F;
@@ -78,13 +78,13 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
}
@Override
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
public void neighborChanged( IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
{
final TileSkyCompass sc = this.getTileEntity( w, pos );
final TileSkyCompass sc = this.getTileEntity( world, pos );
final EnumFacing forward = sc.getForward();
if( !this.canPlaceAt( w, pos, forward.getOpposite() ) )
if( !this.canPlaceAt( world, pos, forward.getOpposite() ) )
{
this.dropTorch( w, pos );
this.dropTorch( world, pos );
}
}
@@ -42,11 +42,8 @@ import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.Explosion;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.registry.EntityRegistry;
import appeng.block.AEBaseBlock;
import appeng.core.AppEng;
import appeng.entity.EntityIds;
import appeng.entity.EntityTinyTNTPrimed;
import appeng.helpers.ICustomCollision;
@@ -62,7 +59,8 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
this.setSoundType( SoundType.GROUND );
this.setHardness( 0F );
EntityRegistry.registerModEntity( EntityTinyTNTPrimed.class, "EntityTinyTNTPrimed", EntityIds.get( EntityTinyTNTPrimed.class ), AppEng.instance(), 16, 4, true );
// TODO: 1.11
//EntityRegistry.registerModEntity( EntityTinyTNTPrimed.class, "EntityTinyTNTPrimed", EntityIds.get( EntityTinyTNTPrimed.class ), AppEng.instance(), 16, 4, true );
}
@Override
@@ -86,18 +84,18 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
if( !w.isRemote )
{
final EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, pos.getX() + 0.5F, pos.getY() + 0.5F, pos.getZ() + 0.5F, igniter );
w.spawnEntityInWorld( primedTinyTNTEntity );
w.spawnEntity( primedTinyTNTEntity );
w.playSound( null, primedTinyTNTEntity.posX, primedTinyTNTEntity.posY, primedTinyTNTEntity.posZ, SoundEvents.ENTITY_TNT_PRIMED, SoundCategory.BLOCKS, 1, 1 );
}
}
@Override
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
public void neighborChanged( IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
{
if( w.isBlockIndirectlyGettingPowered( pos ) > 0 )
if( world.isBlockIndirectlyGettingPowered( pos ) > 0 )
{
this.startFuse( w, pos, null );
w.setBlockToAir( pos );
this.startFuse( world, pos, null );
world.setBlockToAir( pos );
}
}
@@ -142,7 +140,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
{
final EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, pos.getX() + 0.5F, pos.getY() + 0.5F, pos.getZ() + 0.5F, exp.getExplosivePlacedBy() );
primedTinyTNTEntity.setFuse( w.rand.nextInt( primedTinyTNTEntity.getFuse() / 4 ) + primedTinyTNTEntity.getFuse() / 8 );
w.spawnEntityInWorld( primedTinyTNTEntity );
w.spawnEntity( primedTinyTNTEntity );
}
}