Port to 1.11
This commit is contained in:
@@ -60,17 +60,17 @@ public class TileChunkLoader extends AEBaseTile implements ITickable
|
||||
return;
|
||||
}
|
||||
|
||||
this.ct = ForgeChunkManager.requestTicket( AppEng.instance(), this.worldObj, Type.NORMAL );
|
||||
this.ct = ForgeChunkManager.requestTicket( AppEng.instance(), this.world, Type.NORMAL );
|
||||
|
||||
if( this.ct == null )
|
||||
{
|
||||
final MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if( server != null )
|
||||
{
|
||||
final List<EntityPlayerMP> pl = server.getPlayerList().getPlayerList();
|
||||
final List<EntityPlayerMP> pl = server.getPlayerList().getPlayers();
|
||||
for( final EntityPlayerMP p : pl )
|
||||
{
|
||||
p.addChatMessage( new TextComponentString( "Can't chunk load.." ) );
|
||||
p.sendMessage( new TextComponentString( "Can't chunk load.." ) );
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -28,7 +28,7 @@ import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.util.Platform;
|
||||
|
||||
@@ -50,9 +50,9 @@ public class TileCubeGenerator extends AEBaseTile implements ITickable
|
||||
|
||||
if( this.countdown % 20 == 0 )
|
||||
{
|
||||
for( final EntityPlayer e : CommonHelper.proxy.getPlayers() )
|
||||
for( final EntityPlayer e : AppEng.proxy.getPlayers() )
|
||||
{
|
||||
e.addChatMessage( new TextComponentString( "Spawning in... " + ( this.countdown / 20 ) ) );
|
||||
e.sendMessage( new TextComponentString( "Spawning in... " + ( this.countdown / 20 ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ public class TileCubeGenerator extends AEBaseTile implements ITickable
|
||||
|
||||
private void spawn()
|
||||
{
|
||||
this.worldObj.setBlockToAir( this.pos );
|
||||
this.world.setBlockToAir( this.pos );
|
||||
|
||||
final Item i = this.is.getItem();
|
||||
final EnumFacing side = EnumFacing.UP;
|
||||
@@ -79,7 +79,7 @@ public class TileCubeGenerator extends AEBaseTile implements ITickable
|
||||
for( int z = -half; z < half; z++ )
|
||||
{
|
||||
final BlockPos p = this.pos.add( x, y - 1, z );
|
||||
i.onItemUse( this.is.copy(), this.who, this.worldObj, p, EnumHand.MAIN_HAND, side, 0.5f, 0.0f, 0.5f );
|
||||
i.onItemUse( this.who, this.world, p, EnumHand.MAIN_HAND, side, 0.5f, 0.0f, 0.5f );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -114,7 +114,7 @@ public class TileCubeGenerator extends AEBaseTile implements ITickable
|
||||
this.size = 64;
|
||||
}
|
||||
|
||||
player.addChatMessage( new TextComponentString( "Size: " + this.size ) );
|
||||
player.sendMessage( new TextComponentString( "Size: " + this.size ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -19,15 +19,14 @@
|
||||
package appeng.debug;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.tile.AEBaseTile;
|
||||
@@ -56,7 +55,7 @@ public class TileItemGen extends AEBaseTile implements IInventory
|
||||
}
|
||||
else
|
||||
{
|
||||
final List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
final NonNullList<ItemStack> list = NonNullList.create();
|
||||
mi.getSubItems( mi, mi.getCreativeTab(), list );
|
||||
POSSIBLE_ITEMS.addAll( list );
|
||||
}
|
||||
@@ -123,7 +122,7 @@ public class TileItemGen extends AEBaseTile implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer( final EntityPlayer entityplayer )
|
||||
public boolean isUsableByPlayer( final EntityPlayer entityplayer )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -175,4 +174,11 @@ public class TileItemGen extends AEBaseTile implements IInventory
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ import java.util.Set;
|
||||
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
@@ -57,7 +56,7 @@ import appeng.util.Platform;
|
||||
public class ToolDebugCard extends AEBaseItem
|
||||
{
|
||||
@Override
|
||||
public EnumActionResult onItemUseFirst( final ItemStack heldItem, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ, final EnumHand hand )
|
||||
public EnumActionResult onItemUseFirst( final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ, final EnumHand hand )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
@@ -208,7 +207,7 @@ public class ToolDebugCard extends AEBaseItem
|
||||
|
||||
private void outputMsg( final ICommandSender player, final String string )
|
||||
{
|
||||
player.addChatMessage( new TextComponentString( string ) );
|
||||
player.sendMessage( new TextComponentString( string ) );
|
||||
}
|
||||
|
||||
private String timeMeasurement( final long nanos )
|
||||
|
||||
@@ -24,7 +24,6 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
@@ -42,7 +41,7 @@ public class ToolEraser extends AEBaseItem
|
||||
private static final int BLOCK_ERASE_LIMIT = 90000;
|
||||
|
||||
@Override
|
||||
public EnumActionResult onItemUseFirst( final ItemStack heldItem, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ, final EnumHand hand )
|
||||
public EnumActionResult onItemUseFirst( final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ, final EnumHand hand )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.debug;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
@@ -37,7 +36,7 @@ import appeng.worldgen.meteorite.StandardWorld;
|
||||
public class ToolMeteoritePlacer extends AEBaseItem
|
||||
{
|
||||
@Override
|
||||
public EnumActionResult onItemUseFirst( final ItemStack heldItem, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ, final EnumHand hand )
|
||||
public EnumActionResult onItemUseFirst( final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ, final EnumHand hand )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
@@ -49,7 +48,7 @@ public class ToolMeteoritePlacer extends AEBaseItem
|
||||
|
||||
if( !worked )
|
||||
{
|
||||
player.addChatMessage( new TextComponentString( "Un-suitable Location." ) );
|
||||
player.sendMessage( new TextComponentString( "Un-suitable Location." ) );
|
||||
}
|
||||
|
||||
return EnumActionResult.SUCCESS;
|
||||
|
||||
@@ -23,7 +23,6 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
@@ -47,7 +46,7 @@ import appeng.util.Platform;
|
||||
public class ToolReplicatorCard extends AEBaseItem
|
||||
{
|
||||
@Override
|
||||
public EnumActionResult onItemUseFirst( final ItemStack heldItem, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ, final EnumHand hand )
|
||||
public EnumActionResult onItemUseFirst( final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ, final EnumHand hand )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
@@ -68,7 +67,7 @@ public class ToolReplicatorCard extends AEBaseItem
|
||||
tag.setInteger( "z", z );
|
||||
tag.setInteger( "side", side.ordinal() );
|
||||
tag.setInteger( "dimid", world.provider.getDimension() );
|
||||
heldItem.setTagCompound( tag );
|
||||
player.getHeldItemMainhand().setTagCompound( tag );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -77,7 +76,7 @@ public class ToolReplicatorCard extends AEBaseItem
|
||||
}
|
||||
else
|
||||
{
|
||||
final NBTTagCompound ish = heldItem.getTagCompound();
|
||||
final NBTTagCompound ish = player.getHeldItemMainhand().getTagCompound();
|
||||
if( ish != null )
|
||||
{
|
||||
final int src_x = ish.getInteger( "x" );
|
||||
@@ -178,6 +177,6 @@ public class ToolReplicatorCard extends AEBaseItem
|
||||
|
||||
private void outputMsg( final ICommandSender player, final String string )
|
||||
{
|
||||
player.addChatMessage( new TextComponentString( string ) );
|
||||
player.sendMessage( new TextComponentString( string ) );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user