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:
@@ -29,7 +29,7 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.network.IGuiHandler;
|
||||
import net.minecraftforge.fml.relauncher.ReflectionHelper;
|
||||
|
||||
@@ -58,7 +58,7 @@ public final class AppEngServerPacketHandler extends AppEngPacketHandlerBase imp
|
||||
};
|
||||
|
||||
pack.setCallParam( callState );
|
||||
PacketThreadUtil.checkThreadAndEnqueue( pack, handler, ( (EntityPlayerMP) player ).getServerForPlayer() );
|
||||
PacketThreadUtil.checkThreadAndEnqueue( pack, handler, ( (EntityPlayerMP) player ).getServer() );
|
||||
callState.call( pack );
|
||||
}
|
||||
catch( final InstantiationException e )
|
||||
|
||||
@@ -82,7 +82,7 @@ public class NetworkHandler
|
||||
@SubscribeEvent
|
||||
public void newConnection( final ServerConnectionFromClientEvent ev )
|
||||
{
|
||||
WorldData.instance().dimensionData().sendToPlayer( ev.manager );
|
||||
WorldData.instance().dimensionData().sendToPlayer( ev.getManager() );
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@@ -97,12 +97,12 @@ public class NetworkHandler
|
||||
@SubscribeEvent
|
||||
public void serverPacket( final ServerCustomPacketEvent ev )
|
||||
{
|
||||
final NetHandlerPlayServer srv = (NetHandlerPlayServer) ev.packet.handler();
|
||||
final NetHandlerPlayServer srv = (NetHandlerPlayServer) ev.getPacket().handler();
|
||||
if( this.serveHandler != null )
|
||||
{
|
||||
try
|
||||
{
|
||||
this.serveHandler.onPacketData( null, ev.handler, ev.packet, srv.playerEntity );
|
||||
this.serveHandler.onPacketData( null, ev.getHandler(), ev.getPacket(), srv.playerEntity );
|
||||
}
|
||||
catch( final ThreadQuickExitException ignored )
|
||||
{
|
||||
@@ -118,7 +118,7 @@ public class NetworkHandler
|
||||
{
|
||||
try
|
||||
{
|
||||
this.clientHandler.onPacketData( null, ev.handler, ev.packet, null );
|
||||
this.clientHandler.onPacketData( null, ev.getHandler(), ev.getPacket(), null );
|
||||
}
|
||||
catch( final ThreadQuickExitException ignored )
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ import io.netty.buffer.Unpooled;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.definitions.IComparableDefinition;
|
||||
|
||||
@@ -41,8 +41,8 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.client.gui.implementations.GuICraftingCPU;
|
||||
import appeng.client.gui.implementations.GuiCraftConfirm;
|
||||
import appeng.client.gui.implementations.GuiCraftingCPU;
|
||||
import appeng.client.gui.implementations.GuiMEMonitorable;
|
||||
import appeng.client.gui.implementations.GuiNetworkStatus;
|
||||
import appeng.core.AELog;
|
||||
@@ -154,9 +154,9 @@ public class PacketMEInventoryUpdate extends AppEngPacket
|
||||
( (GuiCraftConfirm) gs ).postUpdate( this.list, this.ref );
|
||||
}
|
||||
|
||||
if( gs instanceof GuiCraftingCPU )
|
||||
if( gs instanceof GuICraftingCPU )
|
||||
{
|
||||
( (GuiCraftingCPU) gs ).postUpdate( this.list, this.ref );
|
||||
( (GuICraftingCPU) gs ).postUpdate( this.list, this.ref );
|
||||
}
|
||||
|
||||
if( gs instanceof GuiMEMonitorable )
|
||||
|
||||
@@ -96,7 +96,7 @@ public class PacketMatterCannon extends AppEngPacket
|
||||
final World world = FMLClientHandler.instance().getClient().theWorld;
|
||||
for( int a = 1; a < this.len; a++ )
|
||||
{
|
||||
final MatterCannonFX fx = new MatterCannonFX( world, this.x + this.dx * a, this.y + this.dy * a, this.z + this.dz * a, Items.diamond );
|
||||
final MatterCannonFX fx = new MatterCannonFX( world, this.x + this.dx * a, this.y + this.dy * a, this.z + this.dz * a, Items.DIAMOND );
|
||||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
|
||||
@@ -62,7 +62,7 @@ public class PacketNewStorageDimension extends AppEngPacket
|
||||
{
|
||||
try
|
||||
{
|
||||
DimensionManager.registerDimension( this.newDim, AEConfig.instance.storageProviderID );
|
||||
DimensionManager.registerDimension( this.newDim, AppEng.instance().getRegistration().getStorageDimensionType() );
|
||||
}
|
||||
catch( final IllegalArgumentException iae )
|
||||
{
|
||||
|
||||
@@ -24,8 +24,8 @@ import io.netty.buffer.Unpooled;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
@@ -73,6 +73,7 @@ public class PacketPartPlacement extends AppEngPacket
|
||||
final EntityPlayerMP sender = (EntityPlayerMP) player;
|
||||
CommonHelper.proxy.updateRenderMode( sender );
|
||||
PartPlacement.setEyeHeight( this.eyeHeight );
|
||||
//TODO 1.9.4 - 2 hands! Just do something!
|
||||
PartPlacement.place( sender.getHeldItem(), new BlockPos( this.x, this.y, this.z ), EnumFacing.VALUES[this.face], sender, sender.worldObj, PartPlacement.PlaceType.INTERACT_FIRST_PASS, 0 );
|
||||
CommonHelper.proxy.updateRenderMode( null );
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -92,16 +92,16 @@ public class PacketTransitionEffect extends AppEngPacket
|
||||
{
|
||||
if( CommonHelper.proxy.shouldAddParticles( Platform.getRandom() ) )
|
||||
{
|
||||
final EnergyFx fx = new EnergyFx( world, this.x + ( this.mode ? ( Platform.getRandomInt() % 100 ) * 0.01 : ( Platform.getRandomInt() % 100 ) * 0.005 - 0.25 ), this.y + ( this.mode ? ( Platform.getRandomInt() % 100 ) * 0.01 : ( Platform.getRandomInt() % 100 ) * 0.005 - 0.25 ), this.z + ( this.mode ? ( Platform.getRandomInt() % 100 ) * 0.01 : ( Platform.getRandomInt() % 100 ) * 0.005 - 0.25 ), Items.diamond );
|
||||
final EnergyFx fx = new EnergyFx( world, this.x + ( this.mode ? ( Platform.getRandomInt() % 100 ) * 0.01 : ( Platform.getRandomInt() % 100 ) * 0.005 - 0.25 ), this.y + ( this.mode ? ( Platform.getRandomInt() % 100 ) * 0.01 : ( Platform.getRandomInt() % 100 ) * 0.005 - 0.25 ), this.z + ( this.mode ? ( Platform.getRandomInt() % 100 ) * 0.01 : ( Platform.getRandomInt() % 100 ) * 0.005 - 0.25 ), Items.DIAMOND );
|
||||
|
||||
if( !this.mode )
|
||||
{
|
||||
fx.fromItem( this.d );
|
||||
}
|
||||
|
||||
fx.motionX = -0.1 * this.d.xOffset;
|
||||
fx.motionY = -0.1 * this.d.yOffset;
|
||||
fx.motionZ = -0.1 * this.d.zOffset;
|
||||
fx.setMotionX( -0.1f * this.d.xOffset);
|
||||
fx.setMotionY( -0.1f * this.d.yOffset);
|
||||
fx.setMotionZ( -0.1f * this.d.zOffset);
|
||||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
@@ -111,7 +111,7 @@ public class PacketTransitionEffect extends AppEngPacket
|
||||
{
|
||||
final Block block = world.getBlockState( new BlockPos( (int) this.x, (int) this.y, (int) this.z ) ).getBlock();
|
||||
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound( new PositionedSoundRecord( new ResourceLocation( block.stepSound.getBreakSound() ), ( block.stepSound.getVolume() + 1.0F ) / 2.0F, block.stepSound.getFrequency() * 0.8F, (float) this.x + 0.5F, (float) this.y + 0.5F, (float) this.z + 0.5F ) );
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound( new PositionedSoundRecord( block.getSoundType().getBreakSound(), SoundCategory.BLOCKS, ( block.getSoundType().getVolume() + 1.0F ) / 2.0F, block.getSoundType().getPitch() * 0.8F, (float) this.x + 0.5F, (float) this.y + 0.5F, (float) this.z + 0.5F ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.api.util.IConfigurableObject;
|
||||
import appeng.client.gui.implementations.GuiCraftingCPU;
|
||||
import appeng.client.gui.implementations.GuICraftingCPU;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.implementations.ContainerCellWorkbench;
|
||||
import appeng.container.implementations.ContainerCraftConfirm;
|
||||
@@ -97,6 +97,7 @@ public class PacketValueConfig extends AppEngPacket
|
||||
{
|
||||
final Container c = player.openContainer;
|
||||
|
||||
//TODO 1.9.4 - 2 hands! Just do something!
|
||||
if( this.Name.equals( "Item" ) && player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IMouseWheelItem )
|
||||
{
|
||||
final ItemStack is = player.getHeldItem();
|
||||
@@ -249,9 +250,9 @@ public class PacketValueConfig extends AppEngPacket
|
||||
else if( this.Name.equals( "CraftingStatus" ) && this.Value.equals( "Clear" ) )
|
||||
{
|
||||
final GuiScreen gs = Minecraft.getMinecraft().currentScreen;
|
||||
if( gs instanceof GuiCraftingCPU )
|
||||
if( gs instanceof GuICraftingCPU )
|
||||
{
|
||||
( (GuiCraftingCPU) gs ).clearItems();
|
||||
( (GuICraftingCPU) gs ).clearItems();
|
||||
}
|
||||
}
|
||||
else if( c instanceof IConfigurableObject )
|
||||
|
||||
Reference in New Issue
Block a user