First update pass (1/3) - ~1400 -> 82 errors
This is first update pass, which is mainly import reorganization, name fixes, etc... Although some parts of second were done where changes aren't important. Errors: ~1400 -> 82.
This commit is contained in:
@@ -38,7 +38,7 @@ public class BlockChunkloader extends AEBaseTileBlock implements LoadingCallback
|
||||
|
||||
public BlockChunkloader()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
this.setTileEntity( TileChunkLoader.class );
|
||||
ForgeChunkManager.setForcedChunkLoadingCallback( AppEng.instance(), this );
|
||||
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
|
||||
|
||||
@@ -21,10 +21,14 @@ package appeng.debug;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
@@ -36,13 +40,13 @@ public class BlockCubeGenerator extends AEBaseTileBlock
|
||||
|
||||
public BlockCubeGenerator()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
this.setTileEntity( TileCubeGenerator.class );
|
||||
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
final TileCubeGenerator tcg = this.getTileEntity( w, pos );
|
||||
if( tcg != null )
|
||||
|
||||
@@ -32,7 +32,7 @@ public class BlockItemGen extends AEBaseTileBlock
|
||||
|
||||
public BlockItemGen()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
this.setTileEntity( TileItemGen.class );
|
||||
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
|
||||
}
|
||||
|
||||
@@ -21,10 +21,14 @@ package appeng.debug;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
@@ -36,13 +40,13 @@ public class BlockPhantomNode extends AEBaseTileBlock
|
||||
|
||||
public BlockPhantomNode()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
this.setTileEntity( TilePhantomNode.class );
|
||||
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
final TilePhantomNode tpn = this.getTileEntity( w, pos );
|
||||
tpn.triggerCrashMode();
|
||||
|
||||
@@ -23,9 +23,9 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.world.ChunkCoordIntPair;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraftforge.common.ForgeChunkManager;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Ticket;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Type;
|
||||
@@ -69,17 +69,17 @@ public class TileChunkLoader extends AEBaseTile implements ITickable
|
||||
final MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if( server != null )
|
||||
{
|
||||
final List<EntityPlayerMP> pl = server.getConfigurationManager().playerEntityList;
|
||||
final List<EntityPlayerMP> pl = server.getPlayerList().getPlayerList();
|
||||
for( final EntityPlayerMP p : pl )
|
||||
{
|
||||
p.addChatMessage( new ChatComponentText( "Can't chunk load.." ) );
|
||||
p.addChatMessage( new TextComponentString( "Can't chunk load.." ) );
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
AELog.info( "New Ticket " + this.ct.toString() );
|
||||
ForgeChunkManager.forceChunk( this.ct, new ChunkCoordIntPair( this.pos.getX() >> 4, this.pos.getZ() >> 4 ) );
|
||||
ForgeChunkManager.forceChunk( this.ct, new ChunkPos( this.pos.getX() >> 4, this.pos.getZ() >> 4 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,10 +22,11 @@ package appeng.debug;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.tile.AEBaseTile;
|
||||
@@ -53,7 +54,7 @@ public class TileCubeGenerator extends AEBaseTile implements ITickable
|
||||
{
|
||||
for( final EntityPlayer e : CommonHelper.proxy.getPlayers() )
|
||||
{
|
||||
e.addChatMessage( new ChatComponentText( "Spawning in... " + ( this.countdown / 20 ) ) );
|
||||
e.addChatMessage( new TextComponentString( "Spawning in... " + ( this.countdown / 20 ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +81,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, side, 0.5f, 0.0f, 0.5f );
|
||||
i.onItemUse( this.is.copy(), this.who, this.worldObj, p, EnumHand.MAIN_HAND, side, 0.5f, 0.0f, 0.5f );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -115,7 +116,7 @@ public class TileCubeGenerator extends AEBaseTile implements ITickable
|
||||
this.size = 64;
|
||||
}
|
||||
|
||||
player.addChatMessage( new ChatComponentText( "Size: " + this.size ) );
|
||||
player.addChatMessage( new TextComponentString( "Size: " + this.size ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ 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.IChatComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.tile.AEBaseTile;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class TileItemGen extends AEBaseTile implements IInventory
|
||||
{
|
||||
if( POSSIBLE_ITEMS.isEmpty() )
|
||||
{
|
||||
for( final Object obj : Item.itemRegistry )
|
||||
for( final Object obj : Item.REGISTRY )
|
||||
{
|
||||
final Item mi = (Item) obj;
|
||||
if( mi != null )
|
||||
@@ -147,7 +147,7 @@ public class TileItemGen extends AEBaseTile implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent getDisplayName()
|
||||
public ITextComponent getDisplayName()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -27,9 +27,11 @@ 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.BlockPos;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.networking.IGridConnection;
|
||||
@@ -62,11 +64,11 @@ public class ToolDebugCard extends AEBaseItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUseFirst( final ItemStack stack, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
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 )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
return false;
|
||||
return EnumActionResult.PASS;
|
||||
}
|
||||
|
||||
if( player.isSneaking() )
|
||||
@@ -208,12 +210,12 @@ public class ToolDebugCard extends AEBaseItem
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
|
||||
private void outputMsg( final ICommandSender player, final String string )
|
||||
{
|
||||
player.addChatMessage( new ChatComponentText( string ) );
|
||||
player.addChatMessage( new TextComponentString( string ) );
|
||||
}
|
||||
|
||||
private String timeMeasurement( final long nanos )
|
||||
|
||||
@@ -26,8 +26,10 @@ 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.BlockPos;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.core.AELog;
|
||||
@@ -47,11 +49,11 @@ public class ToolEraser extends AEBaseItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUseFirst( final ItemStack stack, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
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 )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
return false;
|
||||
return EnumActionResult.PASS;
|
||||
}
|
||||
|
||||
final IBlockState state = world.getBlockState( pos );
|
||||
@@ -86,6 +88,6 @@ public class ToolEraser extends AEBaseItem
|
||||
|
||||
AELog.info( "Delete " + blocks + " blocks" );
|
||||
|
||||
return true;
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,9 +23,11 @@ import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.core.features.AEFeature;
|
||||
@@ -43,11 +45,11 @@ public class ToolMeteoritePlacer extends AEBaseItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUseFirst( final ItemStack stack, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
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 )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
return false;
|
||||
return EnumActionResult.PASS;
|
||||
}
|
||||
|
||||
final MeteoritePlacer mp = new MeteoritePlacer();
|
||||
@@ -55,9 +57,9 @@ public class ToolMeteoritePlacer extends AEBaseItem
|
||||
|
||||
if( !worked )
|
||||
{
|
||||
player.addChatMessage( new ChatComponentText( "Un-suitable Location." ) );
|
||||
player.addChatMessage( new TextComponentString( "Un-suitable Location." ) );
|
||||
}
|
||||
|
||||
return true;
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,9 +28,11 @@ 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.BlockPos;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
|
||||
@@ -51,13 +53,13 @@ public class ToolReplicatorCard extends AEBaseItem
|
||||
{
|
||||
this.setFeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onItemUseFirst( final ItemStack stack, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
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 )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
return false;
|
||||
return EnumActionResult.PASS;
|
||||
}
|
||||
|
||||
int x = pos.getX();
|
||||
@@ -73,8 +75,8 @@ public class ToolReplicatorCard extends AEBaseItem
|
||||
tag.setInteger( "y", y );
|
||||
tag.setInteger( "z", z );
|
||||
tag.setInteger( "side", side.ordinal() );
|
||||
tag.setInteger( "dimid", world.provider.getDimensionId() );
|
||||
stack.setTagCompound( tag );
|
||||
tag.setInteger( "dimid", world.provider.getDimension() );
|
||||
heldItem.setTagCompound( tag );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -83,7 +85,7 @@ public class ToolReplicatorCard extends AEBaseItem
|
||||
}
|
||||
else
|
||||
{
|
||||
final NBTTagCompound ish = stack.getTagCompound();
|
||||
final NBTTagCompound ish = heldItem.getTagCompound();
|
||||
if( ish != null )
|
||||
{
|
||||
final int src_x = ish.getInteger( "x" );
|
||||
@@ -148,6 +150,7 @@ public class ToolReplicatorCard extends AEBaseItem
|
||||
nte.readFromNBT( (NBTTagCompound) data.copy() );
|
||||
world.setTileEntity( d, nte );
|
||||
}
|
||||
//TODO 1.9.4 - markBlockForUpdate => ?
|
||||
world.markBlockForUpdate( d );
|
||||
}
|
||||
}
|
||||
@@ -178,11 +181,11 @@ public class ToolReplicatorCard extends AEBaseItem
|
||||
this.outputMsg( player, "No Source Defined" );
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
|
||||
private void outputMsg( final ICommandSender player, final String string )
|
||||
{
|
||||
player.addChatMessage( new ChatComponentText( string ) );
|
||||
player.addChatMessage( new TextComponentString( string ) );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user