Port to 1.11
This commit is contained in:
@@ -33,6 +33,7 @@ import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||
import net.minecraftforge.fml.common.SidedProxy;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLInterModComms;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
@@ -64,9 +65,12 @@ import appeng.services.version.VersionCheckerConfig;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
@Mod( modid = AppEng.MOD_ID, acceptedMinecraftVersions = "[1.10.2]", name = AppEng.MOD_NAME, version = AEConfig.VERSION, dependencies = AppEng.MOD_DEPENDENCIES, guiFactory = "appeng.client.gui.config.AEConfigGuiFactory" )
|
||||
@Mod( modid = AppEng.MOD_ID, acceptedMinecraftVersions = "[1.11]", name = AppEng.MOD_NAME, version = AEConfig.VERSION, dependencies = AppEng.MOD_DEPENDENCIES, guiFactory = "appeng.client.gui.config.AEConfigGuiFactory" )
|
||||
public final class AppEng
|
||||
{
|
||||
@SidedProxy( clientSide = "appeng.client.ClientHelper", serverSide = "appeng.server.ServerHelper", modId = AppEng.MOD_ID )
|
||||
public static CommonHelper proxy;
|
||||
|
||||
public static final String MOD_ID = "appliedenergistics2";
|
||||
public static final String MOD_NAME = "Applied Energistics 2";
|
||||
|
||||
@@ -78,11 +82,11 @@ public final class AppEng
|
||||
// "after:gregtech_addon;after:Mekanism;after:IC2;after:ThermalExpansion;after:BuildCraft|Core;" +
|
||||
|
||||
// depend on version of forge used for build.
|
||||
"after:appliedenergistics2-core;" + "required-after:Forge@[" // require forge.
|
||||
+ net.minecraftforge.common.ForgeVersion.majorVersion + '.' // majorVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.minorVersion + '.' // minorVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.revisionVersion + '.' // revisionVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.buildVersion + ",)"; // buildVersion
|
||||
"after:appliedenergistics2-core;";// + "required-after:Forge@[" // require forge.
|
||||
//+ net.minecraftforge.common.ForgeVersion.majorVersion + '.' // majorVersion
|
||||
//+ net.minecraftforge.common.ForgeVersion.minorVersion + '.' // minorVersion
|
||||
//+ net.minecraftforge.common.ForgeVersion.revisionVersion + '.' // revisionVersion
|
||||
//+ net.minecraftforge.common.ForgeVersion.buildVersion + ",)"; // buildVersion
|
||||
|
||||
@Nonnull
|
||||
private static final AppEng INSTANCE = new AppEng();
|
||||
@@ -129,7 +133,7 @@ public final class AppEng
|
||||
{
|
||||
if( !Loader.isModLoaded( "appliedenergistics2-core" ) )
|
||||
{
|
||||
CommonHelper.proxy.missingCoreMod();
|
||||
AppEng.proxy.missingCoreMod();
|
||||
}
|
||||
|
||||
final Stopwatch watch = Stopwatch.createStarted();
|
||||
@@ -161,7 +165,7 @@ public final class AppEng
|
||||
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
CommonHelper.proxy.preinit();
|
||||
AppEng.proxy.preinit();
|
||||
}
|
||||
|
||||
if( versionCheckerConfig.isVersionCheckingEnabled() )
|
||||
@@ -226,7 +230,7 @@ public final class AppEng
|
||||
IntegrationRegistry.INSTANCE.postInit();
|
||||
FMLCommonHandler.instance().registerCrashCallable( new IntegrationCrashEnhancement() );
|
||||
|
||||
CommonHelper.proxy.postInit();
|
||||
AppEng.proxy.postInit();
|
||||
AEConfig.instance().save();
|
||||
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler( this, GuiBridge.GUI_Handler );
|
||||
|
||||
@@ -26,7 +26,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.SidedProxy;
|
||||
|
||||
import appeng.api.parts.CableRenderMode;
|
||||
import appeng.block.AEBaseBlock;
|
||||
@@ -37,8 +36,6 @@ import appeng.core.sync.AppEngPacket;
|
||||
public abstract class CommonHelper
|
||||
{
|
||||
|
||||
@SidedProxy( clientSide = "appeng.client.ClientHelper", serverSide = "appeng.server.ServerHelper" )
|
||||
public static CommonHelper proxy;
|
||||
|
||||
public abstract void preinit();
|
||||
|
||||
@@ -52,7 +49,7 @@ public abstract class CommonHelper
|
||||
|
||||
public abstract void sendToAllNearExcept( EntityPlayer p, double x, double y, double z, double dist, World w, AppEngPacket packet );
|
||||
|
||||
public abstract void spawnEffect( EffectType effect, World worldObj, double posX, double posY, double posZ, Object extra );
|
||||
public abstract void spawnEffect( EffectType effect, World world, double posX, double posY, double posZ, Object extra );
|
||||
|
||||
public abstract boolean shouldAddParticles( Random r );
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ import java.util.Optional;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -49,9 +48,9 @@ public final class CreativeTab extends CreativeTabs
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getTabIconItem()
|
||||
public ItemStack getTabIconItem()
|
||||
{
|
||||
return this.getIconItemStack().getItem();
|
||||
return this.getIconItemStack();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,9 +46,9 @@ public final class CreativeTabFacade extends CreativeTabs
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getTabIconItem()
|
||||
public ItemStack getTabIconItem()
|
||||
{
|
||||
return this.getIconItemStack().getItem();
|
||||
return this.getIconItemStack();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -55,7 +55,7 @@ import appeng.api.parts.CableRenderMode;
|
||||
import appeng.api.parts.IPartHelper;
|
||||
import appeng.api.parts.LayerBase;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.parts.PartPlacement;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.tile.networking.TileCableBus;
|
||||
@@ -328,7 +328,7 @@ public class ApiPart implements IPartHelper
|
||||
@Override
|
||||
public CableRenderMode getCableRenderMode()
|
||||
{
|
||||
return CommonHelper.proxy.getRenderMode();
|
||||
return AppEng.proxy.getRenderMode();
|
||||
}
|
||||
|
||||
private static class DefaultPackageClassNameRemapper extends Remapper
|
||||
|
||||
@@ -61,8 +61,8 @@ public final class ApiParts implements IParts
|
||||
private final IItemDefinition p2PTunnelME;
|
||||
private final IItemDefinition p2PTunnelRedstone;
|
||||
private final IItemDefinition p2PTunnelItems;
|
||||
private final IItemDefinition p2PTunnelLiquids;
|
||||
private final IItemDefinition p2PTunnelEU;
|
||||
//private final IItemDefinition p2PTunnelLiquids;
|
||||
//private final IItemDefinition p2PTunnelEU;
|
||||
// private final IItemDefinition p2PTunnelRF;
|
||||
private final IItemDefinition p2PTunnelLight;
|
||||
// private final IItemDefinition p2PTunnelOpenComputers;
|
||||
@@ -112,8 +112,8 @@ public final class ApiParts implements IParts
|
||||
this.p2PTunnelME = new DamagedItemDefinition( "part.tunnel.me", itemPart.createPart( PartType.P2PTunnelME ) );
|
||||
this.p2PTunnelRedstone = new DamagedItemDefinition( "part.tunnel.redstone", itemPart.createPart( PartType.P2PTunnelRedstone ) );
|
||||
this.p2PTunnelItems = new DamagedItemDefinition( "part.tunnel.item", itemPart.createPart( PartType.P2PTunnelItems ) );
|
||||
this.p2PTunnelLiquids = new DamagedItemDefinition( "part.tunnel.fluid", itemPart.createPart( PartType.P2PTunnelLiquids ) );
|
||||
this.p2PTunnelEU = new DamagedItemDefinition( "part.tunnel.eu", itemPart.createPart( PartType.P2PTunnelEU ) );
|
||||
//this.p2PTunnelLiquids = new DamagedItemDefinition( "part.tunnel.fluid", itemPart.createPart( PartType.P2PTunnelLiquids ) );
|
||||
//this.p2PTunnelEU = new DamagedItemDefinition( "part.tunnel.eu", itemPart.createPart( PartType.P2PTunnelEU ) );
|
||||
// this.p2PTunnelRF = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelRF ) );
|
||||
this.p2PTunnelLight = new DamagedItemDefinition( "part.tunnel.light", itemPart.createPart( PartType.P2PTunnelLight ) );
|
||||
// this.p2PTunnelOpenComputers = new DamagedItemDefinition( itemMultiPart.createPart(
|
||||
@@ -280,17 +280,17 @@ public final class ApiParts implements IParts
|
||||
return this.p2PTunnelItems;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemDefinition p2PTunnelLiquids()
|
||||
{
|
||||
return this.p2PTunnelLiquids;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemDefinition p2PTunnelEU()
|
||||
{
|
||||
return this.p2PTunnelEU;
|
||||
}
|
||||
// @Override
|
||||
// public IItemDefinition p2PTunnelLiquids()
|
||||
// {
|
||||
// return this.p2PTunnelLiquids;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public IItemDefinition p2PTunnelEU()
|
||||
// {
|
||||
// return this.p2PTunnelEU;
|
||||
// }
|
||||
|
||||
/* @Override
|
||||
* public IItemDefinition p2PTunnelRF()
|
||||
|
||||
@@ -70,8 +70,8 @@ public class IMCGrinder implements IIMCProcessor
|
||||
final NBTTagCompound inTag = (NBTTagCompound) msg.getTag( "in" );
|
||||
final NBTTagCompound outTag = (NBTTagCompound) msg.getTag( "out" );
|
||||
|
||||
final ItemStack in = ItemStack.loadItemStackFromNBT( inTag );
|
||||
final ItemStack out = ItemStack.loadItemStackFromNBT( outTag );
|
||||
final ItemStack in = new ItemStack( inTag );
|
||||
final ItemStack out = new ItemStack( outTag );
|
||||
|
||||
final int turns = msg.getInteger( "turns" );
|
||||
|
||||
@@ -88,7 +88,7 @@ public class IMCGrinder implements IIMCProcessor
|
||||
if( msg.hasKey( "optional" ) )
|
||||
{
|
||||
final NBTTagCompound optionalTag = (NBTTagCompound) msg.getTag( "optional" );
|
||||
final ItemStack optional = ItemStack.loadItemStackFromNBT( optionalTag );
|
||||
final ItemStack optional = new ItemStack( optionalTag );
|
||||
|
||||
if( optional == null )
|
||||
{
|
||||
|
||||
@@ -49,7 +49,7 @@ public class IMCMatterCannon implements IIMCProcessor
|
||||
final NBTTagCompound msg = m.getNBTValue();
|
||||
final NBTTagCompound item = (NBTTagCompound) msg.getTag( "item" );
|
||||
|
||||
final ItemStack ammo = ItemStack.loadItemStackFromNBT( item );
|
||||
final ItemStack ammo = new ItemStack( item );
|
||||
final double weight = msg.getDouble( "weight" );
|
||||
|
||||
if( ammo == null )
|
||||
|
||||
@@ -28,8 +28,6 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -134,10 +132,10 @@ public final class P2PTunnelRegistry implements IP2PTunnelRegistry
|
||||
{
|
||||
if( trigger != null )
|
||||
{
|
||||
if( FluidContainerRegistry.isContainer( trigger ) )
|
||||
{
|
||||
return TunnelType.FLUID;
|
||||
}
|
||||
// if( FluidRegistry.isContainer( trigger ) )
|
||||
// {
|
||||
// return TunnelType.FLUID;
|
||||
// }
|
||||
|
||||
for( final ItemStack is : this.tunnels.keySet() )
|
||||
{
|
||||
@@ -159,7 +157,8 @@ public final class P2PTunnelRegistry implements IP2PTunnelRegistry
|
||||
@Nullable
|
||||
private ItemStack getModItem( final String modID, final String name, final int meta )
|
||||
{
|
||||
final Item item = GameRegistry.findItem( modID, name );
|
||||
|
||||
final Item item = Item.getByNameOrId( modID + ":" + name );
|
||||
|
||||
if( item == null )
|
||||
{
|
||||
|
||||
@@ -89,7 +89,7 @@ public final class WirelessRegistry implements IWirelessTermRegistry
|
||||
|
||||
if( !this.isWirelessTerminal( item ) )
|
||||
{
|
||||
player.addChatMessage( PlayerMessages.DeviceNotWirelessTerminal.get() );
|
||||
player.sendMessage( PlayerMessages.DeviceNotWirelessTerminal.get() );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ public final class WirelessRegistry implements IWirelessTermRegistry
|
||||
final String unparsedKey = handler.getEncryptionKey( item );
|
||||
if( unparsedKey.isEmpty() )
|
||||
{
|
||||
player.addChatMessage( PlayerMessages.DeviceNotLinked.get() );
|
||||
player.sendMessage( PlayerMessages.DeviceNotLinked.get() );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ public final class WirelessRegistry implements IWirelessTermRegistry
|
||||
final ILocatable securityStation = AEApi.instance().registries().locatable().getLocatableBy( parsedKey );
|
||||
if( securityStation == null )
|
||||
{
|
||||
player.addChatMessage( PlayerMessages.StationCanNotBeLocated.get() );
|
||||
player.sendMessage( PlayerMessages.StationCanNotBeLocated.get() );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ public final class WirelessRegistry implements IWirelessTermRegistry
|
||||
}
|
||||
else
|
||||
{
|
||||
player.addChatMessage( PlayerMessages.DeviceNotPowered.get() );
|
||||
player.sendMessage( PlayerMessages.DeviceNotPowered.get() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ public final class GrinderRecipeManager implements IGrinderRegistry, IOreListene
|
||||
if( ratio > 1 )
|
||||
{
|
||||
final ItemStack extra = is.copy();
|
||||
extra.stackSize = ratio - 1;
|
||||
extra.setCount( ratio - 1 );
|
||||
this.addRecipe( item, is, extra, (float) ( AEConfig.instance().getOreDoublePercentage() / 100.0 ), 8 );
|
||||
}
|
||||
else
|
||||
@@ -305,12 +305,12 @@ public final class GrinderRecipeManager implements IGrinderRegistry, IOreListene
|
||||
if( name.equals( d.getValue() ) )
|
||||
{
|
||||
final ItemStack is = item.copy();
|
||||
is.stackSize = 1;
|
||||
is.setCount( 1 );
|
||||
final int ratio = this.getDustToOreRatio( name );
|
||||
if( ratio > 1 )
|
||||
{
|
||||
final ItemStack extra = is.copy();
|
||||
extra.stackSize = ratio - 1;
|
||||
extra.setCount( ratio - 1 );
|
||||
this.addRecipe( d.getKey(), is, extra, (float) ( AEConfig.instance().getOreDoublePercentage() / 100.0 ), 8 );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -260,7 +260,7 @@ public enum GuiBridge implements IGuiHandler
|
||||
{
|
||||
it = player.inventory.getCurrentItem();
|
||||
}
|
||||
else if( x >= 0 && x < player.inventory.mainInventory.length )
|
||||
else if( x >= 0 && x < player.inventory.mainInventory.size() )
|
||||
{
|
||||
it = player.inventory.getStackInSlot( x );
|
||||
}
|
||||
@@ -442,7 +442,7 @@ public enum GuiBridge implements IGuiHandler
|
||||
{
|
||||
it = player.inventory.getCurrentItem();
|
||||
}
|
||||
else if( x >= 0 && x < player.inventory.mainInventory.length )
|
||||
else if( x >= 0 && x < player.inventory.mainInventory.size() )
|
||||
{
|
||||
it = player.inventory.getStackInSlot( x );
|
||||
}
|
||||
@@ -505,7 +505,7 @@ public enum GuiBridge implements IGuiHandler
|
||||
final World w = player.getEntityWorld();
|
||||
final BlockPos pos = new BlockPos( x, y, z );
|
||||
|
||||
if( Platform.hasPermissions( te != null ? new DimensionalCoord( te ) : new DimensionalCoord( player.worldObj, pos ), player ) )
|
||||
if( Platform.hasPermissions( te != null ? new DimensionalCoord( te ) : new DimensionalCoord( player.world, pos ), player ) )
|
||||
{
|
||||
if( this.type.isItem() )
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ public class AppEngClientPacketHandler extends AppEngPacketHandlerBase implement
|
||||
@Override
|
||||
public void call( final AppEngPacket appEngPacket )
|
||||
{
|
||||
appEngPacket.clientPacketData( manager, appEngPacket, Minecraft.getMinecraft().thePlayer );
|
||||
appEngPacket.clientPacketData( manager, appEngPacket, Minecraft.getMinecraft().player );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.client.EffectType;
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.util.item.AEItemStack;
|
||||
@@ -81,6 +81,6 @@ public class PacketAssemblerAnimation extends AppEngPacket
|
||||
final double d1 = 0.5d;// + ((double) (Platform.getRandomFloat() - 0.5F) * 0.26D);
|
||||
final double d2 = 0.5d;// + ((double) (Platform.getRandomFloat() - 0.5F) * 0.26D);
|
||||
|
||||
CommonHelper.proxy.spawnEffect( EffectType.Assembler, player.getEntityWorld(), this.x + d0, this.y + d1, this.z + d2, this );
|
||||
AppEng.proxy.spawnEffect( EffectType.Assembler, player.getEntityWorld(), this.x + d0, this.y + d1, this.z + d2, this );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ public class PacketClick extends AppEngPacket
|
||||
if( is.getItem() instanceof ToolNetworkTool )
|
||||
{
|
||||
final ToolNetworkTool tnt = (ToolNetworkTool) is.getItem();
|
||||
tnt.serverSideToolLogic( is, player, this.hand, player.worldObj, new BlockPos( this.x, this.y, this.z ), this.side, this.hitX, this.hitY, this.hitZ );
|
||||
tnt.serverSideToolLogic( is, player, this.hand, player.world, new BlockPos( this.x, this.y, this.z ), this.side, this.hitX, this.hitY, this.hitZ );
|
||||
}
|
||||
|
||||
else if( maybeMemoryCard.isSameAs( is ) )
|
||||
|
||||
@@ -78,7 +78,7 @@ public class PacketCompassRequest extends AppEngPacket implements ICompassCallba
|
||||
{
|
||||
this.talkBackTo = player;
|
||||
|
||||
final DimensionalCoord loc = new DimensionalCoord( player.worldObj, this.cx << 4, this.cdy << 5, this.cz << 4 );
|
||||
final DimensionalCoord loc = new DimensionalCoord( player.world, this.cx << 4, this.cdy << 5, this.cz << 4 );
|
||||
WorldData.instance().compassData().service().getCompassDirection( loc, 174, this );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,10 +30,10 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.client.ClientHelper;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.ContainerOpenContext;
|
||||
import appeng.container.implementations.ContainerCraftAmount;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
@@ -143,7 +143,7 @@ public class PacketInventoryAction extends AppEngPacket
|
||||
{
|
||||
// Force to stack size 1 to fix a client-side display problem...
|
||||
ItemStack displayIs = baseContainer.getTargetStack().getItemStack().copy();
|
||||
displayIs.stackSize = 1;
|
||||
displayIs.setCount( 1 );
|
||||
cca.getCraftingItem().putStack( displayIs );
|
||||
// This is the *actual* item that matters, not the display item above
|
||||
cca.setItemToCraft( baseContainer.getTargetStack() );
|
||||
@@ -167,11 +167,11 @@ public class PacketInventoryAction extends AppEngPacket
|
||||
{
|
||||
if( this.slotItem == null )
|
||||
{
|
||||
ClientHelper.proxy.getPlayers().get( 0 ).inventory.setItemStack( null );
|
||||
AppEng.proxy.getPlayers().get( 0 ).inventory.setItemStack( null );
|
||||
}
|
||||
else
|
||||
{
|
||||
ClientHelper.proxy.getPlayers().get( 0 ).inventory.setItemStack( this.slotItem.getItemStack() );
|
||||
AppEng.proxy.getPlayers().get( 0 ).inventory.setItemStack( this.slotItem.getItemStack() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public class PacketJEIRecipe extends AppEngPacket
|
||||
this.recipe[x] = new ItemStack[list.tagCount()];
|
||||
for( int y = 0; y < list.tagCount(); y++ )
|
||||
{
|
||||
this.recipe[x][y] = ItemStack.loadItemStackFromNBT( list.getCompoundTagAt( y ) );
|
||||
this.recipe[x][y] = new ItemStack( list.getCompoundTagAt( y ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -144,7 +144,7 @@ public class PacketJEIRecipe extends AppEngPacket
|
||||
}
|
||||
}
|
||||
|
||||
final IRecipe r = Platform.findMatchingRecipe( testInv, pmp.worldObj );
|
||||
final IRecipe r = Platform.findMatchingRecipe( testInv, pmp.world );
|
||||
|
||||
if( r != null && security.hasPermission( player, SecurityPermissions.EXTRACT ) )
|
||||
{
|
||||
@@ -164,7 +164,7 @@ public class PacketJEIRecipe extends AppEngPacket
|
||||
if( currentItem != null )
|
||||
{
|
||||
testInv.setInventorySlotContents( x, currentItem );
|
||||
final ItemStack newItemStack = r.matches( testInv, pmp.worldObj ) ? r.getCraftingResult( testInv ) : null;
|
||||
final ItemStack newItemStack = r.matches( testInv, pmp.world ) ? r.getCraftingResult( testInv ) : null;
|
||||
testInv.setInventorySlotContents( x, patternItem );
|
||||
|
||||
if( newItemStack == null || !Platform.itemComparisons().isSameItem( newItemStack, is ) )
|
||||
@@ -191,7 +191,7 @@ public class PacketJEIRecipe extends AppEngPacket
|
||||
if( patternItem != null && currentItem == null )
|
||||
{
|
||||
// Grab from network by recipe
|
||||
ItemStack whichItem = Platform.extractItemsByRecipe( energy, cct.getActionSource(), storage, player.worldObj, r, is, testInv, patternItem, x, all, realForFake, filter );
|
||||
ItemStack whichItem = Platform.extractItemsByRecipe( energy, cct.getActionSource(), storage, player.world, r, is, testInv, patternItem, x, all, realForFake, filter );
|
||||
|
||||
// If that doesn't get it, grab exact items from network (?)
|
||||
// TODO see if this code is necessary
|
||||
|
||||
@@ -27,9 +27,9 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import appeng.client.ClientHelper;
|
||||
import appeng.client.render.effects.LightningFX;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.util.Platform;
|
||||
@@ -75,7 +75,7 @@ public class PacketLightning extends AppEngPacket
|
||||
{
|
||||
if( Platform.isClient() && AEConfig.instance().isEnableEffects() )
|
||||
{
|
||||
final LightningFX fx = new LightningFX( ClientHelper.proxy.getWorld(), this.x, this.y, this.z, 0.0f, 0.0f, 0.0f );
|
||||
final LightningFX fx = new LightningFX( AppEng.proxy.getWorld(), this.x, this.y, this.z, 0.0f, 0.0f, 0.0f );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ public class PacketMatterCannon extends AppEngPacket
|
||||
try
|
||||
{
|
||||
|
||||
final World world = FMLClientHandler.instance().getClient().theWorld;
|
||||
final World world = FMLClientHandler.instance().getClient().world;
|
||||
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 );
|
||||
|
||||
@@ -28,7 +28,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
|
||||
@@ -69,7 +69,7 @@ public class PacketMockExplosion extends AppEngPacket
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void clientPacketData( final INetworkInfo network, final AppEngPacket packet, final EntityPlayer player )
|
||||
{
|
||||
final World world = CommonHelper.proxy.getWorld();
|
||||
final World world = AppEng.proxy.getWorld();
|
||||
world.spawnParticle( EnumParticleTypes.EXPLOSION_LARGE, this.x, this.y, this.z, 1.0D, 0.0D, 0.0D, new int[0] );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.parts.PartPlacement;
|
||||
@@ -75,9 +75,9 @@ public class PacketPartPlacement extends AppEngPacket
|
||||
public void serverPacketData( final INetworkInfo manager, final AppEngPacket packet, final EntityPlayer player )
|
||||
{
|
||||
final EntityPlayerMP sender = (EntityPlayerMP) player;
|
||||
CommonHelper.proxy.updateRenderMode( sender );
|
||||
AppEng.proxy.updateRenderMode( sender );
|
||||
PartPlacement.setEyeHeight( this.eyeHeight );
|
||||
PartPlacement.place( sender.getHeldItem( hand ), new BlockPos( this.x, this.y, this.z ), EnumFacing.VALUES[this.face], sender, hand, sender.worldObj, PartPlacement.PlaceType.INTERACT_FIRST_PASS, 0 );
|
||||
CommonHelper.proxy.updateRenderMode( null );
|
||||
PartPlacement.place( sender.getHeldItem( hand ), new BlockPos( this.x, this.y, this.z ), EnumFacing.VALUES[this.face], sender, hand, sender.world, PartPlacement.PlaceType.INTERACT_FIRST_PASS, 0 );
|
||||
AppEng.proxy.updateRenderMode( null );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,9 +34,8 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.client.ClientHelper;
|
||||
import appeng.client.render.effects.EnergyFx;
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.util.Platform;
|
||||
@@ -86,11 +85,11 @@ public class PacketTransitionEffect extends AppEngPacket
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void clientPacketData( final INetworkInfo network, final AppEngPacket packet, final EntityPlayer player )
|
||||
{
|
||||
final World world = ClientHelper.proxy.getWorld();
|
||||
final World world = AppEng.proxy.getWorld();
|
||||
|
||||
for( int zz = 0; zz < ( this.mode ? 32 : 8 ); zz++ )
|
||||
{
|
||||
if( CommonHelper.proxy.shouldAddParticles( Platform.getRandom() ) )
|
||||
if( AppEng.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 );
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import net.minecraftforge.common.config.ConfigCategory;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.core.AppEng;
|
||||
|
||||
|
||||
/**
|
||||
@@ -75,7 +75,7 @@ final class PlayerData implements IWorldPlayerData, IOnWorldStartable, IOnWorldS
|
||||
if( maybe.isPresent() )
|
||||
{
|
||||
final UUID uuid = maybe.get();
|
||||
for( final EntityPlayer player : CommonHelper.proxy.getPlayers() )
|
||||
for( final EntityPlayer player : AppEng.proxy.getPlayers() )
|
||||
{
|
||||
if( player.getUniqueID().equals( uuid ) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user