Compare commits

..

11 Commits

Author SHA1 Message Date
yueh f44cddf8d5 Splitted coremod into a container and loading plugin. 2017-07-23 15:37:39 +02:00
thatsIch e3bf52ff7b Merge pull request #2846 from suttonwilliamd/fix-LR-badge
Fixed "Latest Release" badge in readme.md
2017-07-13 22:55:56 +02:00
William 07913af4f8 Fixed "Latest Release" badge in readme.md
Spaces translate to %20 in URLs
2017-03-23 21:16:59 -04:00
yueh 1760113cd4 Fixes #2768: Incorrect return value when charging items via Tesla. (#2771) 2017-01-31 12:17:32 +01:00
yueh 12b05275f2 Fixes #2750: Added missing RF Integration Modules. (#2770)
* Fixes #2750: Added missing RF Integration Modules.

Readded the integration modules for both RF integrations.
These are necessary to correctly enable RF support as well as act as
fallback to disable it automatically on missing interfaces.

* Unittests and improved logging for integration modules.

Added a unittest to ensure an integration types instaniates an integration
module without throwing any exception.
Improved the logging should this ever happen at runtime again.
2017-01-31 12:17:03 +01:00
yueh c720584e49 Fixes #2729: Fix transformer regression introduced during FG downtime. (#2730)
Added a unittest to verify the necessary string returns match the actual
existing classes, in case something screws up the refactoring.
2016-12-31 18:25:16 +01:00
yueh ab89278274 Replaces old fluid handlers with the new capability based ones. (#2727)
* Changed ME Chest and P2P tunnels to use fluid capabilities.
* Renamed all occurrences of liquid to fluids.
2016-12-31 16:01:29 +01:00
yueh 7c5f777e41 Fixes #2713: Call super#onBlockActivated() for wrench interaction. (#2728) 2016-12-31 16:00:45 +01:00
yueh 8b0637d05d Fixes IDE not correctly cleaning up the list of staged files. 2016-12-31 15:21:25 +01:00
yueh 497f1c9ace Fixes #2714: Use a concurrent list to back NetworkList (#2715) 2016-12-29 15:51:17 +01:00
yueh 2ab0528015 Fixes #2724: Use capitalized oredict name for dyes, not uppercase. 2016-12-29 15:50:02 +01:00
287 changed files with 4432 additions and 4216 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
[![Travis](https://img.shields.io/travis/AppliedEnergistics/Applied-Energistics-2.svg?maxAge=2592000&style=flat-square)](https://travis-ci.org/AppliedEnergistics/Applied-Energistics-2)
[![Latest Release](https://img.shields.io/github/release/AppliedEnergistics/Applied-Energistics-2.svg?label=Latest Release&style=flat-square)](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases)
[![Latest Release](https://img.shields.io/github/release/AppliedEnergistics/Applied-Energistics-2.svg?label=Latest%20Release&style=flat-square)](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases)
# Applied Energistics 2
+1 -1
View File
@@ -68,7 +68,7 @@ jar {
}
minecraft {
coreMod = "appeng.coremod.AppEngCore"
coreMod = "appeng.coremod.AppEngLoadingPlugin"
version = minecraft_version + "-" + forge_version
+7 -7
View File
@@ -1,4 +1,4 @@
aeversion=rv5
aeversion=rv4
aechannel=alpha
aebuild=0
aegroup=appeng
@@ -7,9 +7,9 @@ aebasename=appliedenergistics2
#########################################################
# Versions #
#########################################################
minecraft_version=1.11
mcp_mappings=snapshot_20161206
forge_version=13.19.1.2189
minecraft_version=1.10.2
mcp_mappings=snapshot_20161111
forge_version=12.18.3.2185
#########################################################
# Installable #
@@ -19,7 +19,7 @@ waila_version=1.7.0-B3_1.9.4
#########################################################
# Provided APIs #
#########################################################
jei_version=4.0.4.199
tesla_version=1.11-1.3.0.51
jei_version=3.13.6.391
tesla_version=1.10.2-1.2.1.50
ic2_version=2.6.99-ex110
top_version=1.11-1.3.3-46
top_version=1.10-1.3.3-41
+4 -4
View File
@@ -51,15 +51,15 @@ configurations {
dependencies {
// installable runtime dependencies
//mods "mcp.mobius.waila:Waila:${waila_version}"
//mods "net.industrial-craft:industrialcraft-2:${ic2_version}:dev"
mods "mcp.mobius.waila:Waila:${waila_version}"
mods "net.industrial-craft:industrialcraft-2:${ic2_version}:dev"
mods "mcjty.theoneprobe:TheOneProbe:${top_version}"
// compile against provided APIs
compileOnly "mezz.jei:jei_${minecraft_version}:${jei_version}:api"
//compileOnly "mcp.mobius.waila:Waila:${waila_version}"
compileOnly "mcp.mobius.waila:Waila:${waila_version}"
compileOnly "net.darkhax.tesla:Tesla:${tesla_version}"
//compileOnly "net.industrial-craft:industrialcraft-2:${ic2_version}:api"
compileOnly "net.industrial-craft:industrialcraft-2:${ic2_version}:api"
compileOnly "mcjty.theoneprobe:TheOneProbe:${top_version}:api"
// at runtime, use the full JEI jar
@@ -76,9 +76,9 @@ public interface IParts
IItemDefinition p2PTunnelItems();
//IItemDefinition p2PTunnelLiquids();
IItemDefinition p2PTunnelFluids();
//IItemDefinition p2PTunnelEU();
IItemDefinition p2PTunnelEU();
// IItemDefinition p2PTunnelRF();
+8 -2
View File
@@ -93,6 +93,12 @@ public abstract class AEBaseBlock extends Block
this.fullBlock = this.isFullSize();
}
@Override
public final boolean isVisuallyOpaque()
{
return this.isOpaque() && this.isFullSize();
}
@Override
protected BlockStateContainer createBlockState()
{
@@ -145,10 +151,10 @@ public abstract class AEBaseBlock extends Block
{
if( Platform.isClient() )
{
final EntityPlayer player = Minecraft.getMinecraft().player;
final EntityPlayer player = Minecraft.getMinecraft().thePlayer;
final LookDirection ld = Platform.getPlayerRay( player, Platform.getEyeOffset( player ) );
final Iterable<AxisAlignedBB> bbs = collisionHandler.getSelectedBoundingBoxesFromPool( w, pos, Minecraft.getMinecraft().player, true );
final Iterable<AxisAlignedBB> bbs = collisionHandler.getSelectedBoundingBoxesFromPool( w, pos, Minecraft.getMinecraft().thePlayer, true );
AxisAlignedBB br = null;
double lastDist = 0;
@@ -126,7 +126,7 @@ public class AEBaseItemBlock extends ItemBlock
{
up = EnumFacing.UP;
final byte rotation = (byte) ( MathHelper.floor( ( player.rotationYaw * 4F ) / 360F + 2.5D ) & 3 );
final byte rotation = (byte) ( MathHelper.floor_double( ( player.rotationYaw * 4F ) / 360F + 2.5D ) & 3 );
switch( rotation )
{
+10 -13
View File
@@ -269,16 +269,13 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements ITileEntity
}
@Override
public boolean onBlockActivated( World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ )
public boolean onBlockActivated( final World w, final BlockPos pos, final IBlockState state, final EntityPlayer player, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
{
ItemStack heldItem;
if( player != null && player.getHeldItemMainhand() != null )
if( player != null && heldItem != null )
{
heldItem = player.getHeldItemMainhand();
if( Platform.isWrench( player, heldItem, pos ) && player.isSneaking() )
{
final IBlockState blockState = world.getBlockState( pos );
final IBlockState blockState = w.getBlockState( pos );
final Block block = blockState.getBlock();
if( block == null )
@@ -286,7 +283,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements ITileEntity
return false;
}
final AEBaseTile tile = this.getTileEntity( world, pos );
final AEBaseTile tile = this.getTileEntity( w, pos );
if( tile == null )
{
@@ -298,7 +295,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements ITileEntity
return false;
}
final ItemStack[] itemDropCandidates = Platform.getBlockDrops( world, pos );
final ItemStack[] itemDropCandidates = Platform.getBlockDrops( w, pos );
final ItemStack op = new ItemStack( this );
for( final ItemStack ol : itemDropCandidates )
@@ -313,11 +310,11 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements ITileEntity
}
}
if( block.removedByPlayer( blockState, world, pos, player, false ) )
if( block.removedByPlayer( blockState, w, pos, player, false ) )
{
final List<ItemStack> itemsToDrop = Lists.newArrayList( itemDropCandidates );
Platform.spawnDrops( world, pos, itemsToDrop );
world.setBlockToAir( pos );
Platform.spawnDrops( w, pos, itemsToDrop );
w.setBlockToAir( pos );
}
return false;
@@ -326,7 +323,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements ITileEntity
if( heldItem.getItem() instanceof IMemoryCard && !( this instanceof BlockCableBus ) )
{
final IMemoryCard memoryCard = (IMemoryCard) heldItem.getItem();
final AEBaseTile tileEntity = this.getTileEntity( world, pos );
final AEBaseTile tileEntity = this.getTileEntity( w, pos );
if( tileEntity == null )
{
@@ -364,7 +361,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements ITileEntity
}
}
return this.onActivated( world, pos, player, hand, player.getHeldItemMainhand(), facing, hitX, hitY, hitZ );
return this.onActivated( w, pos, player, hand, heldItem, side, hitX, hitY, hitZ );
}
@Override
@@ -19,13 +19,14 @@
package appeng.block.crafting;
import java.util.List;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.common.property.ExtendedBlockState;
@@ -84,7 +85,7 @@ public class BlockCraftingMonitor extends BlockCraftingUnit
@Override
@SideOnly( Side.CLIENT )
public void getSubBlocks( final Item item, final CreativeTabs tabs, final NonNullList<ItemStack> itemStacks )
public void getSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
{
itemStacks.add( new ItemStack( this, 1, 0 ) );
}
@@ -21,6 +21,8 @@ package appeng.block.crafting;
import java.util.EnumSet;
import javax.annotation.Nullable;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
@@ -28,6 +30,7 @@ import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
@@ -115,7 +118,7 @@ public class BlockCraftingUnit extends AEBaseTileBlock
}
@Override
public void neighborChanged( final IBlockState state, final World worldIn, final BlockPos pos, final Block blockIn, final BlockPos fromPos )
public void neighborChanged( final IBlockState state, final World worldIn, final BlockPos pos, final Block neighborBlock )
{
final TileCraftingTile cp = this.getTileEntity( worldIn, pos );
if( cp != null )
@@ -143,9 +146,10 @@ public class BlockCraftingUnit extends AEBaseTileBlock
}
@Override
public boolean onBlockActivated( final World w, final BlockPos pos, final IBlockState state, final EntityPlayer p, final EnumHand hand, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
public boolean onBlockActivated( final World w, final BlockPos pos, final IBlockState state, final EntityPlayer p, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
{
final TileCraftingTile tg = this.getTileEntity( w, pos );
if( tg != null && !p.isSneaking() && tg.isFormed() && tg.isActive() )
{
if( Platform.isClient() )
@@ -157,7 +161,7 @@ public class BlockCraftingUnit extends AEBaseTileBlock
return true;
}
return false;
return super.onBlockActivated( w, pos, state, p, hand, heldItem, side, hitX, hitY, hitZ );
}
public enum CraftingUnitType
@@ -19,11 +19,14 @@
package appeng.block.crafting;
import javax.annotation.Nullable;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
@@ -39,7 +42,6 @@ import appeng.core.sync.GuiBridge;
import appeng.tile.crafting.TileMolecularAssembler;
import appeng.util.Platform;
public class BlockMolecularAssembler extends AEBaseTileBlock
{
@@ -86,18 +88,18 @@ public class BlockMolecularAssembler extends AEBaseTileBlock
@SideOnly( Side.CLIENT )
@Override
public boolean canRenderInLayer( IBlockState state, BlockRenderLayer layer )
public boolean canRenderInLayer( BlockRenderLayer layer )
{
return layer == BlockRenderLayer.TRANSLUCENT;
}
public boolean isFullCube( IBlockState state )
public boolean isFullCube(IBlockState state)
{
return false;
}
@Override
public boolean onBlockActivated( final World w, final BlockPos pos, final IBlockState state, final EntityPlayer p, final EnumHand hand, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
public boolean onBlockActivated( final World w, final BlockPos pos, final IBlockState state, final EntityPlayer p, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
{
final TileMolecularAssembler tg = this.getTileEntity( w, pos );
if( tg != null && !p.isSneaking() )
@@ -105,6 +107,7 @@ public class BlockMolecularAssembler extends AEBaseTileBlock
Platform.openGUI( p, tg, AEPartLocation.fromFacing( side ), GuiBridge.GUI_MAC );
return true;
}
return false;
return super.onBlockActivated( w, pos, state, p, hand, heldItem, side, hitX, hitY, hitZ );
}
}
@@ -135,7 +135,7 @@ public class BlockCrank extends AEBaseTileBlock
}
@Override
public void neighborChanged( IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
public void neighborChanged( final IBlockState state, final World world, final BlockPos pos, final Block neighborBlock )
{
final AEBaseTile tile = this.getTileEntity( world, pos );
@@ -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.AppEng;
import appeng.core.CommonHelper;
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( AppEng.proxy.shouldAddParticles( r ) )
if( CommonHelper.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 world, BlockPos pos, Block blockIn, BlockPos fromPos )
public void neighborChanged( IBlockState state, World w, BlockPos pos, Block blockIn )
{
final EnumFacing up = this.getOrientable( world, pos ).getUp();
if( !this.canPlaceAt( (World) world, pos, up.getOpposite() ) )
final EnumFacing up = this.getOrientable( w, pos ).getUp();
if( !this.canPlaceAt( (World) w, pos, up.getOpposite() ) )
{
this.dropTorch( (World) world, pos );
this.dropTorch( (World) w, 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.AppEng;
import appeng.core.CommonHelper;
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( AppEng.proxy.shouldAddParticles( r ) )
if( CommonHelper.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(IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos)
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos,final Block neighborBlock )
{
final EnumFacing up = this.getOrientable( world, pos ).getUp();
if( !this.canPlaceAt( world, pos, up.getOpposite() ) )
final EnumFacing up = this.getOrientable( w, pos ).getUp();
if( !this.canPlaceAt( w, pos, up.getOpposite() ) )
{
this.dropTorch( world, pos );
this.dropTorch( w, 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.AppEng;
import appeng.core.CommonHelper;
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() && AppEng.proxy.shouldAddParticles( r ) )
if( cga != null && cga.isPowered() && CommonHelper.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( IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
{
final TileSkyCompass sc = this.getTileEntity( world, pos );
final TileSkyCompass sc = this.getTileEntity( w, pos );
final EnumFacing forward = sc.getForward();
if( !this.canPlaceAt( world, pos, forward.getOpposite() ) )
if( !this.canPlaceAt( w, pos, forward.getOpposite() ) )
{
this.dropTorch( world, pos );
this.dropTorch( w, pos );
}
}
@@ -42,8 +42,11 @@ 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;
@@ -59,8 +62,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
this.setSoundType( SoundType.GROUND );
this.setHardness( 0F );
// TODO: 1.11
//EntityRegistry.registerModEntity( EntityTinyTNTPrimed.class, "EntityTinyTNTPrimed", EntityIds.get( EntityTinyTNTPrimed.class ), AppEng.instance(), 16, 4, true );
EntityRegistry.registerModEntity( EntityTinyTNTPrimed.class, "EntityTinyTNTPrimed", EntityIds.get( EntityTinyTNTPrimed.class ), AppEng.instance(), 16, 4, true );
}
@Override
@@ -84,18 +86,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.spawnEntity( primedTinyTNTEntity );
w.spawnEntityInWorld( primedTinyTNTEntity );
w.playSound( null, primedTinyTNTEntity.posX, primedTinyTNTEntity.posY, primedTinyTNTEntity.posZ, SoundEvents.ENTITY_TNT_PRIMED, SoundCategory.BLOCKS, 1, 1 );
}
}
@Override
public void neighborChanged( IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
{
if( world.isBlockIndirectlyGettingPowered( pos ) > 0 )
if( w.isBlockIndirectlyGettingPowered( pos ) > 0 )
{
this.startFuse( world, pos, null );
world.setBlockToAir( pos );
this.startFuse( w, pos, null );
w.setBlockToAir( pos );
}
}
@@ -140,7 +142,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.spawnEntity( primedTinyTNTEntity );
w.spawnEntityInWorld( primedTinyTNTEntity );
}
}
@@ -46,7 +46,6 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.Vec3d;
@@ -237,7 +236,7 @@ public class BlockCableBus extends AEBaseTileBlock
return sp.facade.getItemStack();
}
return ItemStack.EMPTY;
return null;
}
@Override
@@ -331,11 +330,11 @@ public class BlockCableBus extends AEBaseTileBlock
}
@Override
public void neighborChanged( IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
{
if( Platform.isServer() )
{
this.cb( world, pos ).onNeighborChanged();
this.cb( w, pos ).onNeighborChanged();
}
}
@@ -378,7 +377,7 @@ public class BlockCableBus extends AEBaseTileBlock
@Override
@SideOnly( Side.CLIENT )
public void getSubBlocks( final Item item, final CreativeTabs tabs, final NonNullList<ItemStack> itemStacks )
public void getSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
{
// do nothing
}
@@ -170,9 +170,9 @@ public class BlockController extends AEBaseTileBlock
}
@Override
public void neighborChanged( IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
{
final TileController tc = this.getTileEntity( world, pos );
final TileController tc = this.getTileEntity( w, pos );
if( tc != null )
{
tc.onNeighborChange( false );
@@ -19,6 +19,8 @@
package appeng.block.networking;
import java.util.List;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.IBlockState;
@@ -26,7 +28,6 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.NonNullList;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@@ -62,7 +63,7 @@ public class BlockEnergyCell extends AEBaseTileBlock
@Override
@SideOnly( Side.CLIENT )
public void getSubBlocks( final Item item, final CreativeTabs tabs, final NonNullList<ItemStack> itemStacks )
public void getSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
{
super.getSubBlocks( item, tabs, itemStacks );
@@ -22,11 +22,14 @@ package appeng.block.networking;
import java.util.Collections;
import java.util.List;
import javax.annotation.Nullable;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
@@ -108,15 +111,11 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
}
@Override
public boolean onBlockActivated( final World w, final BlockPos pos, final IBlockState state, final EntityPlayer player, final EnumHand hand, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
public boolean onBlockActivated( final World w, final BlockPos pos, final IBlockState state, final EntityPlayer player, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
{
if( player.isSneaking() )
{
return false;
}
final TileWireless tg = this.getTileEntity( w, pos );
if( tg != null )
if( tg != null && !player.isSneaking() )
{
if( Platform.isServer() )
{
@@ -124,7 +123,8 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
}
return true;
}
return false;
return super.onBlockActivated( w, pos, state, player, hand, heldItem, side, hitX, hitY, hitZ );
}
@Override
@@ -21,6 +21,7 @@ package appeng.block.paint;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
@@ -33,7 +34,6 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
@@ -94,13 +94,13 @@ public class BlockPaint extends AEBaseTileBlock
@Override
@SideOnly( Side.CLIENT )
public void getSubBlocks( final Item item, final CreativeTabs tabs, final NonNullList<ItemStack> itemStacks )
public void getSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
{
// do nothing
}
@Override
public AxisAlignedBB getCollisionBoundingBox( IBlockState blockState, IBlockAccess worldIn, BlockPos pos )
public AxisAlignedBB getCollisionBoundingBox( final IBlockState state, final World worldIn, final BlockPos pos )
{
return null;
}
@@ -112,9 +112,9 @@ public class BlockPaint extends AEBaseTileBlock
}
@Override
public void neighborChanged( IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
{
final TilePaint tp = this.getTileEntity( world, pos );
final TilePaint tp = this.getTileEntity( w, pos );
if( tp != null )
{
@@ -101,9 +101,9 @@ public abstract class BlockQuantumBase extends AEBaseTileBlock implements ICusto
}
@Override
public void neighborChanged( IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
{
final TileQuantumBridge bridge = this.getTileEntity( world, pos );
final TileQuantumBridge bridge = this.getTileEntity( w, pos );
if( bridge != null )
{
bridge.neighborUpdate();
@@ -37,7 +37,7 @@ import net.minecraft.world.World;
import appeng.api.util.AEPartLocation;
import appeng.client.EffectType;
import appeng.core.AppEng;
import appeng.core.CommonHelper;
import appeng.core.sync.GuiBridge;
import appeng.helpers.AEGlassMaterial;
import appeng.tile.qnb.TileQuantumBridge;
@@ -60,9 +60,9 @@ public class BlockQuantumLinkChamber extends BlockQuantumBase
{
if( bridge.hasQES() )
{
if( AppEng.proxy.shouldAddParticles( rand ) )
if( CommonHelper.proxy.shouldAddParticles( rand ) )
{
AppEng.proxy.spawnEffect( EffectType.Energy, w, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, null );
CommonHelper.proxy.spawnEffect( EffectType.Energy, w, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, null );
}
}
}
@@ -28,7 +28,6 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.Explosion;
@@ -54,7 +53,7 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
@Override
@SideOnly( Side.CLIENT )
public void getSubBlocks( final Item item, final CreativeTabs tabs, final NonNullList<ItemStack> itemStacks )
public void getSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
{
// do nothing
}
@@ -47,9 +47,9 @@ public class BlockSpatialIOPort extends AEBaseTileBlock
}
@Override
public void neighborChanged( IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
{
final TileSpatialIOPort te = this.getTileEntity( world, pos );
final TileSpatialIOPort te = this.getTileEntity( w, pos );
if( te != null )
{
te.updateRedstoneState();
@@ -62,9 +62,9 @@ public class BlockSpatialPylon extends AEBaseTileBlock
}
@Override
public void neighborChanged( IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
{
final TileSpatialPylon tsp = this.getTileEntity( world, pos );
final TileSpatialPylon tsp = this.getTileEntity( w, pos );
if( tsp != null )
{
tsp.neighborChanged();
@@ -118,7 +118,7 @@ public class BlockChest extends AEBaseTileBlock
}
else
{
p.sendMessage( PlayerMessages.ChestCannotReadStorageCell.get() );
p.addChatMessage( PlayerMessages.ChestCannotReadStorageCell.get() );
}
}
@@ -48,9 +48,9 @@ public class BlockIOPort extends AEBaseTileBlock
}
@Override
public void neighborChanged( IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
{
final TileIOPort te = this.getTileEntity( world, pos );
final TileIOPort te = this.getTileEntity( w, pos );
if( te != null )
{
te.updateRedstoneState();
@@ -242,6 +242,9 @@ class BlockDefinitionBuilder implements IBlockBuilder
factory.addPreInit( side -> {
Class<? extends AEBaseTile> tileEntityClass = tileBlock.getTileEntityClass();
AEBaseTile.registerTileItem( tileEntityClass, new BlockStackSrc( block, 0, ActivityState.Enabled ) );
// TODO: Change after transition phase
GameRegistry.registerTileEntityWithAlternatives( tileEntityClass, AppEng.MOD_ID.toLowerCase() + ":" + registryName, registryName );
} );
return (T) new TileDefinition( registryName, (AEBaseTileBlock) block, item );
@@ -43,10 +43,10 @@ public final class Capabilities
@CapabilityInject( IStorageMonitorableAccessor.class )
public static Capability<IStorageMonitorableAccessor> STORAGE_MONITORABLE_ACCESSOR;
@CapabilityInject( ITeslaConsumer.class )
@CapabilityInject(ITeslaConsumer.class)
public static Capability<ITeslaConsumer> TESLA_CONSUMER;
@CapabilityInject( ITeslaHolder.class )
@CapabilityInject(ITeslaHolder.class)
public static Capability<ITeslaHolder> TESLA_HOLDER;
/**
+22 -22
View File
@@ -58,7 +58,7 @@ import appeng.client.render.tesr.InscriberTESR;
import appeng.client.render.textures.ParticleTextures;
import appeng.core.AEConfig;
import appeng.core.AELog;
import appeng.core.AppEng;
import appeng.core.CommonHelper;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketAssemblerAnimation;
import appeng.core.sync.packets.PacketValueConfig;
@@ -117,7 +117,7 @@ public class ClientHelper extends ServerHelper
{
if( Platform.isClient() )
{
return Minecraft.getMinecraft().world;
return Minecraft.getMinecraft().theWorld;
}
else
{
@@ -137,7 +137,7 @@ public class ClientHelper extends ServerHelper
if( Platform.isClient() )
{
final List<EntityPlayer> o = new ArrayList<>();
o.add( Minecraft.getMinecraft().player );
o.add( Minecraft.getMinecraft().thePlayer );
return o;
}
else
@@ -147,29 +147,29 @@ public class ClientHelper extends ServerHelper
}
@Override
public void spawnEffect( final EffectType effect, final World world, final double posX, final double posY, final double posZ, final Object o )
public void spawnEffect( final EffectType effect, final World worldObj, final double posX, final double posY, final double posZ, final Object o )
{
if( AEConfig.instance().isEnableEffects() )
{
switch( effect )
{
case Assembler:
this.spawnAssembler( world, posX, posY, posZ, o );
this.spawnAssembler( worldObj, posX, posY, posZ, o );
return;
case Vibrant:
this.spawnVibrant( world, posX, posY, posZ );
this.spawnVibrant( worldObj, posX, posY, posZ );
return;
case Crafting:
this.spawnCrafting( world, posX, posY, posZ );
this.spawnCrafting( worldObj, posX, posY, posZ );
return;
case Energy:
this.spawnEnergy( world, posX, posY, posZ );
this.spawnEnergy( worldObj, posX, posY, posZ );
return;
case Lightning:
this.spawnLightning( world, posX, posY, posZ );
this.spawnLightning( worldObj, posX, posY, posZ );
return;
case LightningArc:
this.spawnLightningArc( world, posX, posY, posZ, (Vec3d) o );
this.spawnLightningArc( worldObj, posX, posY, posZ, (Vec3d) o );
return;
default:
}
@@ -216,7 +216,7 @@ public class ClientHelper extends ServerHelper
}
final Minecraft mc = Minecraft.getMinecraft();
final EntityPlayer player = mc.player;
final EntityPlayer player = mc.thePlayer;
return this.renderModeForPlayer( player );
}
@@ -225,12 +225,12 @@ public class ClientHelper extends ServerHelper
public void triggerUpdates()
{
final Minecraft mc = Minecraft.getMinecraft();
if( mc == null || mc.player == null || mc.world == null )
if( mc == null || mc.thePlayer == null || mc.theWorld == null )
{
return;
}
final EntityPlayer player = mc.player;
final EntityPlayer player = mc.thePlayer;
final int x = (int) player.posX;
final int y = (int) player.posY;
@@ -238,7 +238,7 @@ public class ClientHelper extends ServerHelper
final int range = 16 * 16;
mc.world.markBlockRangeForRenderUpdate( x - range, y - range, z - range, x + range, y + range, z + range );
mc.theWorld.markBlockRangeForRenderUpdate( x - range, y - range, z - range, x + range, y + range, z + range );
}
@Override
@@ -262,17 +262,17 @@ public class ClientHelper extends ServerHelper
}
}
private void spawnAssembler( final World world, final double posX, final double posY, final double posZ, final Object o )
private void spawnAssembler( final World worldObj, final double posX, final double posY, final double posZ, final Object o )
{
final PacketAssemblerAnimation paa = (PacketAssemblerAnimation) o;
final AssemblerFX fx = new AssemblerFX( world, posX, posY, posZ, 0.0D, 0.0D, 0.0D, paa.rate, paa.is );
final AssemblerFX fx = new AssemblerFX( worldObj, posX, posY, posZ, 0.0D, 0.0D, 0.0D, paa.rate, paa.is );
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
}
private void spawnVibrant( final World w, final double x, final double y, final double z )
{
if( AppEng.proxy.shouldAddParticles( Platform.getRandom() ) )
if( CommonHelper.proxy.shouldAddParticles( Platform.getRandom() ) )
{
final double d0 = ( Platform.getRandomFloat() - 0.5F ) * 0.26D;
final double d1 = ( Platform.getRandomFloat() - 0.5F ) * 0.26D;
@@ -313,15 +313,15 @@ public class ClientHelper extends ServerHelper
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
}
private void spawnLightning( final World world, final double posX, final double posY, final double posZ )
private void spawnLightning( final World worldObj, final double posX, final double posY, final double posZ )
{
final LightningFX fx = new LightningFX( world, posX, posY + 0.3f, posZ, 0.0f, 0.0f, 0.0f );
final LightningFX fx = new LightningFX( worldObj, posX, posY + 0.3f, posZ, 0.0f, 0.0f, 0.0f );
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
}
private void spawnLightningArc( final World world, final double posX, final double posY, final double posZ, final Vec3d second )
private void spawnLightningArc( final World worldObj, final double posX, final double posY, final double posZ, final Vec3d second )
{
final LightningFX fx = new LightningArcFX( world, posX, posY, posZ, second.xCoord, second.yCoord, second.zCoord, 0.0f, 0.0f, 0.0f );
final LightningFX fx = new LightningArcFX( worldObj, posX, posY, posZ, second.xCoord, second.yCoord, second.zCoord, 0.0f, 0.0f, 0.0f );
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
}
@@ -334,7 +334,7 @@ public class ClientHelper extends ServerHelper
}
final Minecraft mc = Minecraft.getMinecraft();
final EntityPlayer player = mc.player;
final EntityPlayer player = mc.thePlayer;
if( player.isSneaking() )
{
final EnumHand hand;
+13 -13
View File
@@ -251,14 +251,14 @@ public abstract class AEBaseGui extends GuiContainer
{
if( fs.isEnabled() )
{
this.drawTexturedModalRect( ox + fs.xPos - 1, oy + fs.yPos - 1, fs.getSourceX() - 1, fs.getSourceY() - 1, 18,
this.drawTexturedModalRect( ox + fs.xDisplayPosition - 1, oy + fs.yDisplayPosition - 1, fs.getSourceX() - 1, fs.getSourceY() - 1, 18,
18 );
}
else
{
GlStateManager.color( 1.0F, 1.0F, 1.0F, 0.4F );
GlStateManager.enableBlend();
this.drawTexturedModalRect( ox + fs.xPos - 1, oy + fs.yPos - 1, fs.getSourceX() - 1, fs.getSourceY() - 1, 18,
this.drawTexturedModalRect( ox + fs.xDisplayPosition - 1, oy + fs.yDisplayPosition - 1, fs.getSourceX() - 1, fs.getSourceY() - 1, 18,
18 );
GlStateManager.color( 1.0F, 1.0F, 1.0F, 1.0F );
}
@@ -297,7 +297,7 @@ public abstract class AEBaseGui extends GuiContainer
protected void mouseClickMove( final int x, final int y, final int c, final long d )
{
final Slot slot = this.getSlot( x, y );
final ItemStack itemstack = this.mc.player.inventory.getItemStack();
final ItemStack itemstack = this.mc.thePlayer.inventory.getItemStack();
if( this.getScrollBar() != null )
{
@@ -326,7 +326,7 @@ public abstract class AEBaseGui extends GuiContainer
@Override
protected void handleMouseClick( final Slot slot, final int slotIdx, final int mouseButton, final ClickType clickType )
{
final EntityPlayer player = Minecraft.getMinecraft().player;
final EntityPlayer player = Minecraft.getMinecraft().thePlayer;
if( slot instanceof SlotFake )
{
@@ -521,7 +521,7 @@ public abstract class AEBaseGui extends GuiContainer
for( final Slot inventorySlot : slots )
{
if( inventorySlot != null && inventorySlot.canTakeStack(
this.mc.player ) && inventorySlot.getHasStack() && inventorySlot.inventory == slot.inventory && Container.canAddItemToSlot(
this.mc.thePlayer ) && inventorySlot.getHasStack() && inventorySlot.inventory == slot.inventory && Container.canAddItemToSlot(
inventorySlot, this.dbl_whichItem, true ) )
{
this.handleMouseClick( inventorySlot, inventorySlot.slotNumber, 1, clickType );
@@ -540,7 +540,7 @@ public abstract class AEBaseGui extends GuiContainer
{
final Slot theSlot = this.getSlotUnderMouse();
if( this.mc.player.inventory.getItemStack() == null && theSlot != null )
if( this.mc.thePlayer.inventory.getItemStack() == null && theSlot != null )
{
for( int j = 0; j < 9; ++j )
{
@@ -594,7 +594,7 @@ public abstract class AEBaseGui extends GuiContainer
for( final Slot slot : slots )
{
// isPointInRegion
if( this.isPointInRegion( slot.xPos, slot.yPos, 16, 16, mouseX, mouseY ) )
if( this.isPointInRegion( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mouseX, mouseY ) )
{
return slot;
}
@@ -704,7 +704,7 @@ public abstract class AEBaseGui extends GuiContainer
if( !this.isPowered() )
{
drawRect( s.xPos, s.yPos, 16 + s.xPos, 16 + s.yPos, 0x66111111 );
drawRect( s.xDisplayPosition, s.yDisplayPosition, 16 + s.xDisplayPosition, 16 + s.yDisplayPosition, 0x66111111 );
}
this.zLevel = 0.0F;
@@ -713,7 +713,7 @@ public abstract class AEBaseGui extends GuiContainer
// Annoying but easier than trying to splice into render item
super.drawSlot( new Size1Slot( s ) );
stackSizeRenderer.renderStackSize( fontRendererObj, ( (SlotME) s ).getAEStack(), s.getStack(), s.xPos, s.yPos );
stackSizeRenderer.renderStackSize( fontRendererObj, ( (SlotME) s ).getAEStack(), s.getStack(), s.xDisplayPosition, s.yDisplayPosition );
}
catch( final Exception err )
@@ -745,8 +745,8 @@ public abstract class AEBaseGui extends GuiContainer
GlStateManager.enableTexture2D();
GlStateManager.blendFunc( GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA );
GlStateManager.color( 1.0f, 1.0f, 1.0f, 1.0f );
final float par1 = aes.xPos;
final float par2 = aes.yPos;
final float par1 = aes.xDisplayPosition;
final float par2 = aes.yDisplayPosition;
final float par3 = uv_x * 16;
final float par4 = uv_y * 16;
@@ -786,7 +786,7 @@ public abstract class AEBaseGui extends GuiContainer
{
try
{
isValid = ( (SlotRestrictedInput) s ).isValid( is, this.mc.world );
isValid = ( (SlotRestrictedInput) s ).isValid( is, this.mc.theWorld );
}
catch( final Exception err )
{
@@ -802,7 +802,7 @@ public abstract class AEBaseGui extends GuiContainer
this.itemRender.zLevel = 100.0F;
GlStateManager.disableLighting();
drawRect( s.xPos, s.yPos, 16 + s.xPos, 16 + s.yPos, 0x66ff6666 );
drawRect( s.xDisplayPosition, s.yDisplayPosition, 16 + s.xDisplayPosition, 16 + s.yDisplayPosition, 0x66ff6666 );
GlStateManager.enableLighting();
this.zLevel = 0.0F;
@@ -82,10 +82,10 @@ public abstract class AEBaseMEGui extends AEBaseGui
currentToolTip.add( TextFormatting.GRAY + format );
}
}
else if( stack.getCount() > BigNumber || ( stack.getCount() > 1 && stack.isItemDamaged() ) )
else if( stack.stackSize > BigNumber || ( stack.stackSize > 1 && stack.isItemDamaged() ) )
{
final String local = ButtonToolTips.ItemsStored.getLocal();
final String formattedAmount = NumberFormat.getNumberInstance( Locale.US ).format( stack.getCount() );
final String formattedAmount = NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize );
final String format = String.format( local, formattedAmount );
currentToolTip.add( TextFormatting.GRAY + format );
@@ -119,7 +119,7 @@ public abstract class AEBaseMEGui extends AEBaseGui
if( myStack != null )
{
@SuppressWarnings( "unchecked" )
final List<String> currentToolTip = stack.getTooltip( this.mc.player, this.mc.gameSettings.advancedItemTooltips );
final List<String> currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
if( myStack.getStackSize() > BigNumber || ( myStack.getStackSize() > 1 && stack.isItemDamaged() ) )
{
@@ -134,10 +134,10 @@ public abstract class AEBaseMEGui extends AEBaseGui
this.drawTooltip( x, y, currentToolTip );
return;
}
else if( stack.getCount() > BigNumber )
else if( stack.stackSize > BigNumber )
{
List<String> var4 = stack.getTooltip( this.mc.player, this.mc.gameSettings.advancedItemTooltips );
var4.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.getCount() ) );
List<String> var4 = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
var4.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize ) );
this.drawTooltip( x, y, var4 );
return;
}
@@ -24,7 +24,7 @@ class Size1Slot extends Slot
public Size1Slot( Slot delegate )
{
super( delegate.inventory, delegate.getSlotIndex(), delegate.xPos, delegate.yPos );
super( delegate.inventory, delegate.getSlotIndex(), delegate.xDisplayPosition, delegate.yDisplayPosition );
this.delegate = delegate;
}
@@ -36,11 +36,11 @@ class Size1Slot extends Slot
if( orgStack != null )
{
ItemStack modifiedStack = orgStack.copy();
modifiedStack.setCount( 1 );
modifiedStack.stackSize = 1;
return modifiedStack;
}
return ItemStack.EMPTY;
return null;
}
@Override
@@ -232,7 +232,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
final String which = Integer.toString( x );
if( invData.hasKey( which ) )
{
current.getInventory().setInventorySlotContents( x, new ItemStack( invData.getCompoundTag( which ) ) );
current.getInventory().setInventorySlotContents( x, ItemStack.loadItemStackFromNBT( invData.getCompoundTag( which ) ) );
}
}
}
@@ -344,7 +344,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
for( int i = 0; i < outTag.tagCount(); i++ )
{
final ItemStack parsedItemStack = new ItemStack( outTag.getCompoundTagAt( i ) );
final ItemStack parsedItemStack = ItemStack.loadItemStackFromNBT( outTag.getCompoundTagAt( i ) );
if( parsedItemStack != null )
{
final String displayName = Platform.getItemDisplayName( AEApi.instance().storage().createItemStack( parsedItemStack ) ).toLowerCase();
@@ -323,7 +323,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
{
if( s instanceof AppEngSlot )
{
if( ( (Slot) s ).xPos < 197 )
if( ( (Slot) s ).xDisplayPosition < 197 )
{
this.repositionSlot( (AppEngSlot) s );
}
@@ -332,10 +332,10 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
if( s instanceof SlotCraftingMatrix || s instanceof SlotFakeCraftingMatrix )
{
final Slot g = (Slot) s;
if( g.xPos > 0 && g.yPos > 0 )
if( g.xDisplayPosition > 0 && g.yDisplayPosition > 0 )
{
craftingGridOffsetX = Math.min( craftingGridOffsetX, g.xPos );
craftingGridOffsetY = Math.min( craftingGridOffsetY, g.yPos );
craftingGridOffsetX = Math.min( craftingGridOffsetX, g.xDisplayPosition );
craftingGridOffsetY = Math.min( craftingGridOffsetY, g.yDisplayPosition );
}
}
}
@@ -443,7 +443,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
protected void repositionSlot( final AppEngSlot s )
{
s.yPos = s.getY() + this.ySize - 78 - 5;
s.yDisplayPosition = s.getY() + this.ySize - 78 - 5;
}
@Override
@@ -253,7 +253,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
if( myStack != null )
{
List<String> currentToolTip = stack.getTooltip( this.mc.player, this.mc.gameSettings.advancedItemTooltips );
List<String> currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
while( currentToolTip.size() > 1 )
{
@@ -176,6 +176,6 @@ public class GuiPatternTerm extends GuiMEMonitorable
{
final int offsetPlayerSide = s.isPlayerSide() ? 5 : 3;
s.yPos = s.getY() + this.ySize - 78 - offsetPlayerSide;
s.yDisplayPosition = s.getY() + this.ySize - 78 - offsetPlayerSide;
}
}
@@ -76,6 +76,11 @@ public class SlotDisconnected extends AppEngSlot
return super.getStack();
}
@Override
public void onPickupFromSlot( final EntityPlayer par1EntityPlayer, final ItemStack par2ItemStack )
{
}
@Override
public boolean getHasStack()
{
@@ -91,7 +96,7 @@ public class SlotDisconnected extends AppEngSlot
@Override
public ItemStack decrStackSize( final int par1 )
{
return ItemStack.EMPTY;
return null;
}
@Override
@@ -47,6 +47,11 @@ public class SlotME extends Slot
return null;
}
@Override
public void onPickupFromSlot( final EntityPlayer par1EntityPlayer, final ItemStack par2ItemStack )
{
}
@Override
public boolean isItemValid( final ItemStack par1ItemStack )
{
@@ -53,7 +53,7 @@ public class StackSizeRenderer
final boolean unicodeFlag = fontRenderer.getUnicodeFlag();
fontRenderer.setUnicodeFlag( false );
if( is.getCount() == 0 )
if( is.stackSize == 0 )
{
final String craftLabelText = AEConfig.instance().useTerminalUseLargeFont() ? GuiText.LargeFontCraft.getLocal() : GuiText.SmallFontCraft.getLocal();
GlStateManager.disableLighting();
@@ -70,7 +70,7 @@ public class StackSizeRenderer
GlStateManager.enableBlend();
}
final long amount = aeStack != null ? aeStack.getStackSize() : is.getCount();
final long amount = aeStack != null ? aeStack.getStackSize() : is.stackSize;
if( amount != 0 )
{
final String stackSize = this.getToBeRenderedStackSize( amount );
@@ -174,10 +174,10 @@ public class CubeBuilder
putVertexTR( builder, face, x2, y2, z1, uv );
break;
case NORTH:
putVertexTL( builder, face, x2, y2, z1, uv );
putVertexTL( builder, face, x2, y1, z1, uv );
putVertexBR( builder, face, x2, y2, z1, uv );
putVertexTR( builder, face, x2, y1, z1, uv );
putVertexTL( builder, face, x1, y1, z1, uv );
putVertexTL( builder, face, x1, y2, z1, uv );
putVertexBL( builder, face, x1, y2, z1, uv );
break;
case SOUTH:
putVertexBL( builder, face, x1, y2, z2, uv );
@@ -26,7 +26,7 @@ import net.minecraft.world.World;
import appeng.api.storage.data.IAEItemStack;
import appeng.client.EffectType;
import appeng.core.AppEng;
import appeng.core.CommonHelper;
import appeng.entity.EntityFloatingItem;
import appeng.entity.ICanDie;
@@ -46,7 +46,7 @@ public class AssemblerFX extends Particle implements ICanDie
this.motionZ = 0;
this.speed = speed;
this.fi = new EntityFloatingItem( this, w, x, y, z, is.getItemStack() );
w.spawnEntity( this.fi );
w.spawnEntityInWorld( this.fi );
this.particleMaxAge = (int) Math.ceil( Math.max( 1, 100.0f / speed ) ) + 2;
}
@@ -76,7 +76,7 @@ public class AssemblerFX extends Particle implements ICanDie
}
this.motionY -= 0.04D * (double)this.particleGravity;
this.move(this.motionX, this.motionY, this.motionZ);
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
@@ -99,10 +99,10 @@ public class AssemblerFX extends Particle implements ICanDie
if( this.time > 4.0 )
{
this.time -= 4.0;
// if ( AppEng.proxy.shouldAddParticles( r ) )
// if ( CommonHelper.proxy.shouldAddParticles( r ) )
for( int x = 0; x < (int) Math.ceil( this.speed / 5 ); x++ )
{
AppEng.proxy.spawnEffect( EffectType.Crafting, this.world, this.posX, this.posY, this.posZ, null );
CommonHelper.proxy.spawnEffect( EffectType.Crafting, this.worldObj, this.posX, this.posY, this.posZ, null );
}
}
}
@@ -55,9 +55,9 @@ public class CraftingFx extends ParticleBreaking
this.particleTextureIndex = ParticleTextures.BlockEnergyParticle;
this.particleMaxAge /= 1.2;
this.startBlkX = MathHelper.floor( this.posX );
this.startBlkY = MathHelper.floor( this.posY );
this.startBlkZ = MathHelper.floor( this.posZ );
this.startBlkX = MathHelper.floor_double( this.posX );
this.startBlkY = MathHelper.floor_double( this.posY );
this.startBlkZ = MathHelper.floor_double( this.posZ );
}
@Override
@@ -84,9 +84,9 @@ public class CraftingFx extends ParticleBreaking
float offY = (float) ( this.prevPosY + ( this.posY - this.prevPosY ) * partialTick );
float offZ = (float) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * partialTick );
final int blkX = MathHelper.floor( offX );
final int blkY = MathHelper.floor( offY );
final int blkZ = MathHelper.floor( offZ );
final int blkX = MathHelper.floor_double( offX );
final int blkY = MathHelper.floor_double( offY );
final int blkZ = MathHelper.floor_double( offZ );
if( blkX == this.startBlkX && blkY == this.startBlkY && blkZ == this.startBlkZ )
{
offX -= interpPosX;
@@ -127,7 +127,7 @@ public class CraftingFx extends ParticleBreaking
}
this.motionY -= 0.04D * (double) this.particleGravity;
this.move( this.motionX, this.motionY, this.motionZ );
this.moveEntity( this.motionX, this.motionY, this.motionZ );
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
@@ -54,9 +54,9 @@ public class EnergyFx extends ParticleBreaking
this.particleScale = 3.5f;
this.particleTextureIndex = ParticleTextures.BlockEnergyParticle;
this.startBlkX = MathHelper.floor( this.posX );
this.startBlkY = MathHelper.floor( this.posY );
this.startBlkZ = MathHelper.floor( this.posZ );
this.startBlkX = MathHelper.floor_double( this.posX );
this.startBlkY = MathHelper.floor_double( this.posY );
this.startBlkZ = MathHelper.floor_double( this.posZ );
}
@Override
@@ -78,9 +78,9 @@ public class EnergyFx extends ParticleBreaking
final float f12 = (float) ( this.prevPosY + ( this.posY - this.prevPosY ) * partialTicks - interpPosY );
final float f13 = (float) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * partialTicks - interpPosZ );
final int blkX = MathHelper.floor( this.posX );
final int blkY = MathHelper.floor( this.posY );
final int blkZ = MathHelper.floor( this.posZ );
final int blkX = MathHelper.floor_double( this.posX );
final int blkY = MathHelper.floor_double( this.posY );
final int blkZ = MathHelper.floor_double( this.posZ );
if( blkX == this.startBlkX && blkY == this.startBlkY && blkZ == this.startBlkZ )
{
@@ -117,7 +117,7 @@ public class EnergyFx extends ParticleBreaking
}
this.motionY -= 0.04D * (double) this.particleGravity;
this.move( this.motionX, this.motionY, this.motionZ );
this.moveEntity( this.motionX, this.motionY, this.motionZ );
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
@@ -89,7 +89,7 @@ public class LightningFX extends Particle
}
this.motionY -= 0.04D * (double)this.particleGravity;
this.move(this.motionX, this.motionY, this.motionZ);
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
@@ -125,7 +125,7 @@ public class LightningFX extends Particle
double oy = 0;
double oz = 0;
final EntityPlayer p = Minecraft.getMinecraft().player;
final EntityPlayer p = Minecraft.getMinecraft().thePlayer;
double offX = -rZ;
double offY = MathHelper.cos( (float) ( Math.PI / 2.0f + p.rotationPitch * 0.017453292F ) );
double offZ = rX;
@@ -68,7 +68,7 @@ public class MatterCannonFX extends ParticleBreaking
}
this.motionY -= 0.04D * (double) this.particleGravity;
this.move( this.motionX, this.motionY, this.motionZ );
this.moveEntity( this.motionX, this.motionY, this.motionZ );
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
@@ -212,10 +212,10 @@ class GlassBakedModel implements IBakedModel
// Apply the u,v shift.
// This mirrors the logic from OffsetIcon from 1.7
float u1 = MathHelper.clamp( 0 - uOffset, 0, 16 );
float u2 = MathHelper.clamp( 16 - uOffset, 0, 16 );
float v1 = MathHelper.clamp( 0 - vOffset, 0, 16 );
float v2 = MathHelper.clamp( 16 - vOffset, 0, 16 );
float u1 = MathHelper.clamp_float( 0 - uOffset, 0, 16 );
float u2 = MathHelper.clamp_float( 16 - uOffset, 0, 16 );
float v1 = MathHelper.clamp_float( 0 - vOffset, 0, 16 );
float v2 = MathHelper.clamp_float( 16 - vOffset, 0, 16 );
UnpackedBakedQuad.Builder builder = new UnpackedBakedQuad.Builder( vertexFormat );
builder.setTexture( sprite );
@@ -50,7 +50,7 @@ public class SkyCompassTESR extends FastTESR<TileSkyCompass>
public void renderTileEntityFast( TileSkyCompass te, double x, double y, double z, float partialTicks, int destroyStage, VertexBuffer buffer )
{
if( !te.hasWorld() )
if( !te.hasWorldObj() )
{
return;
}
@@ -63,7 +63,7 @@ public class SkyCompassTESR extends FastTESR<TileSkyCompass>
BlockPos pos = te.getPos();
IBlockAccess world = MinecraftForgeClient.getRegionRenderCache( te.getWorld(), pos );
IBlockState state = world.getBlockState( pos );
if( state.getPropertyKeys().contains( Properties.StaticProperty ) )
if( state.getPropertyNames().contains( Properties.StaticProperty ) )
{
state = state.withProperty( Properties.StaticProperty, false );
}
@@ -203,7 +203,7 @@ public abstract class AEBaseContainer extends Container
final NBTTagCompound data = CompressedStreamTools.readCompressed( new ByteArrayInputStream( buffer ) );
if( data != null )
{
this.setTargetStack( AEApi.instance().storage().createItemStack( new ItemStack( data ) ) );
this.setTargetStack( AEApi.instance().storage().createItemStack( ItemStack.loadItemStackFromNBT( data ) ) );
}
}
catch( final IOException e )
@@ -455,7 +455,7 @@ public abstract class AEBaseContainer extends Container
{
if( Platform.isClient() )
{
return ItemStack.EMPTY;
return null;
}
boolean hasMETiles = false;
@@ -470,14 +470,14 @@ public abstract class AEBaseContainer extends Container
if( hasMETiles && Platform.isClient() )
{
return ItemStack.EMPTY;
return null;
}
final AppEngSlot clickSlot = (AppEngSlot) this.inventorySlots.get( idx ); // require AE SLots!
if( clickSlot instanceof SlotDisabled || clickSlot instanceof SlotInaccessible )
{
return ItemStack.EMPTY;
return null;
}
if( clickSlot != null && clickSlot.getHasStack() )
{
@@ -485,7 +485,7 @@ public abstract class AEBaseContainer extends Container
if( tis == null )
{
return ItemStack.EMPTY;
return null;
}
final List<Slot> selectedSlots = new ArrayList<Slot>();
@@ -583,17 +583,17 @@ public abstract class AEBaseContainer extends Container
maxSize = d.getSlotStackLimit();
}
int placeAble = maxSize - t.getCount();
int placeAble = maxSize - t.stackSize;
if( tis.getCount() < placeAble )
if( tis.stackSize < placeAble )
{
placeAble = tis.getCount();
placeAble = tis.stackSize;
}
t.setCount( t.getCount() + placeAble );
tis.setCount( tis.getCount() - placeAble );
t.stackSize += placeAble;
tis.stackSize -= placeAble;
if( tis.getCount() <= 0 )
if( tis.stackSize <= 0 )
{
clickSlot.putStack( null );
d.onSlotChanged();
@@ -602,7 +602,7 @@ public abstract class AEBaseContainer extends Container
this.updateSlot( clickSlot );
this.updateSlot( d );
return ItemStack.EMPTY;
return null;
}
else
{
@@ -635,17 +635,17 @@ public abstract class AEBaseContainer extends Container
maxSize = d.getSlotStackLimit();
}
int placeAble = maxSize - t.getCount();
int placeAble = maxSize - t.stackSize;
if( tis.getCount() < placeAble )
if( tis.stackSize < placeAble )
{
placeAble = tis.getCount();
placeAble = tis.stackSize;
}
t.setCount( t.getCount() + placeAble );
tis.setCount( tis.getCount() - placeAble );
t.stackSize += placeAble;
tis.stackSize -= placeAble;
if( tis.getCount() <= 0 )
if( tis.stackSize <= 0 )
{
clickSlot.putStack( null );
d.onSlotChanged();
@@ -656,7 +656,7 @@ public abstract class AEBaseContainer extends Container
this.updateSlot( clickSlot );
this.updateSlot( d );
return ItemStack.EMPTY;
return null;
}
else
{
@@ -673,15 +673,15 @@ public abstract class AEBaseContainer extends Container
}
final ItemStack tmp = tis.copy();
if( tmp.getCount() > maxSize )
if( tmp.stackSize > maxSize )
{
tmp.setCount( maxSize );
tmp.stackSize = maxSize;
}
tis.setCount( tis.getCount() - tmp.getCount() );
tis.stackSize -= tmp.stackSize;
d.putStack( tmp );
if( tis.getCount() <= 0 )
if( tis.stackSize <= 0 )
{
clickSlot.putStack( null );
d.onSlotChanged();
@@ -692,7 +692,7 @@ public abstract class AEBaseContainer extends Container
this.updateSlot( clickSlot );
this.updateSlot( d );
return ItemStack.EMPTY;
return null;
}
else
{
@@ -707,7 +707,7 @@ public abstract class AEBaseContainer extends Container
}
this.updateSlot( clickSlot );
return ItemStack.EMPTY;
return null;
}
@Override
@@ -726,7 +726,7 @@ public abstract class AEBaseContainer extends Container
{
if( this.tileEntity instanceof IInventory )
{
return ( (IInventory) this.tileEntity ).isUsableByPlayer( entityplayer );
return ( (IInventory) this.tileEntity ).isUseableByPlayer( entityplayer );
}
return true;
}
@@ -781,7 +781,7 @@ public abstract class AEBaseContainer extends Container
if( hand != null )
{
final ItemStack is = hand.copy();
is.setCount( 1 );
is.stackSize = 1;
s.putStack( is );
}
@@ -793,16 +793,16 @@ public abstract class AEBaseContainer extends Container
{
if( hand == null )
{
is.setCount( Math.max( 1, is.getCount() - 1 ) );
is.stackSize = Math.max( 1, is.stackSize - 1 );
}
else if( hand.isItemEqual( is ) )
{
is.setCount(Math.min( is.getMaxStackSize(), is.getCount() + 1 ));
is.stackSize = Math.min( is.getMaxStackSize(), is.stackSize + 1 );
}
else
{
is = hand.copy();
is.setCount( 1 );
is.stackSize = 1;
}
s.putStack( is );
@@ -810,7 +810,7 @@ public abstract class AEBaseContainer extends Container
else if( hand != null )
{
is = hand.copy();
is.setCount( 1 );
is.stackSize = 1;
s.putStack( is );
}
@@ -863,12 +863,12 @@ public abstract class AEBaseContainer extends Container
ais.setStackSize( myItem.getMaxStackSize() );
final InventoryAdaptor adp = InventoryAdaptor.getAdaptor( player, EnumFacing.UP );
myItem.setCount( (int) ais.getStackSize() );
myItem.stackSize = (int) ais.getStackSize();
myItem = adp.simulateAdd( myItem );
if( myItem != null )
{
ais.setStackSize( ais.getStackSize() - myItem.getCount() );
ais.setStackSize( ais.getStackSize() - myItem.stackSize );
}
ais = Platform.poweredExtraction( this.getPowerSource(), this.getCellInventory(), ais, this.getActionSource() );
@@ -923,7 +923,7 @@ public abstract class AEBaseContainer extends Container
if( item != null )
{
if( item.getCount() >= item.getMaxStackSize() )
if( item.stackSize >= item.getMaxStackSize() )
{
liftQty = 0;
}
@@ -1034,8 +1034,8 @@ public abstract class AEBaseContainer extends Container
if( ais == null )
{
final ItemStack is = player.inventory.getItemStack();
is.setCount( is.getCount() - 1 );
if( is.getCount() <= 0 )
is.stackSize--;
if( is.stackSize <= 0 )
{
player.inventory.setItemStack( null );
}
@@ -1048,7 +1048,7 @@ public abstract class AEBaseContainer extends Container
if( player.capabilities.isCreativeMode && slotItem != null )
{
final ItemStack is = slotItem.getItemStack();
is.setCount( is.getMaxStackSize() );
is.stackSize = is.getMaxStackSize();
player.inventory.setItemStack( is );
this.updateHeld( player );
}
@@ -1071,12 +1071,12 @@ public abstract class AEBaseContainer extends Container
ais.setStackSize( myItem.getMaxStackSize() );
final InventoryAdaptor adp = InventoryAdaptor.getAdaptor( player, EnumFacing.UP );
myItem.setCount( (int) ais.getStackSize() );
myItem.stackSize = (int) ais.getStackSize();
myItem = adp.simulateAdd( myItem );
if( myItem != null )
{
ais.setStackSize( ais.getStackSize() - myItem.getCount() );
ais.setStackSize( ais.getStackSize() - myItem.stackSize );
}
ais = Platform.poweredExtraction( this.getPowerSource(), this.getCellInventory(), ais, this.getActionSource() );
@@ -1103,8 +1103,7 @@ public abstract class AEBaseContainer extends Container
{
try
{
NetworkHandler.instance().sendTo( new PacketInventoryAction( InventoryAction.UPDATE_HAND, 0, AEItemStack.create( p.inventory.getItemStack() ) ),
p );
NetworkHandler.instance().sendTo( new PacketInventoryAction( InventoryAction.UPDATE_HAND, 0, AEItemStack.create( p.inventory.getItemStack() ) ), p );
}
catch( final IOException e )
{
@@ -1119,8 +1118,7 @@ public abstract class AEBaseContainer extends Container
{
return input;
}
final IAEItemStack ais = Platform.poweredInsert( this.getPowerSource(), this.getCellInventory(), AEApi.instance().storage().createItemStack( input ),
this.getActionSource() );
final IAEItemStack ais = Platform.poweredInsert( this.getPowerSource(), this.getCellInventory(), AEApi.instance().storage().createItemStack( input ), this.getActionSource() );
if( ais == null )
{
return null;
@@ -1174,8 +1172,7 @@ public abstract class AEBaseContainer extends Container
{
try
{
NetworkHandler.instance().sendTo( new PacketValueConfig( "CustomName", this.getCustomName() ),
(EntityPlayerMP) this.getInventoryPlayer().player );
NetworkHandler.instance().sendTo( new PacketValueConfig( "CustomName", this.getCustomName() ), (EntityPlayerMP) this.getInventoryPlayer().player );
}
catch( final IOException e )
{
@@ -1235,32 +1232,32 @@ public abstract class AEBaseContainer extends Container
ItemStack testB = isA == null ? null : isA.copy();
// can put some back?
if( testA != null && testA.getCount() > a.getSlotStackLimit() )
if( testA != null && testA.stackSize > a.getSlotStackLimit() )
{
if( testB != null )
{
return;
}
final int totalA = testA.getCount();
testA.setCount( a.getSlotStackLimit() );
final int totalA = testA.stackSize;
testA.stackSize = a.getSlotStackLimit();
testB = testA.copy();
testB.setCount( totalA - testA.getCount() );
testB.stackSize = totalA - testA.stackSize;
}
if( testB != null && testB.getCount() > b.getSlotStackLimit() )
if( testB != null && testB.stackSize > b.getSlotStackLimit() )
{
if( testA != null )
{
return;
}
final int totalB = testB.getCount();
testB.setCount( b.getSlotStackLimit() );
final int totalB = testB.stackSize;
testB.stackSize = b.getSlotStackLimit();
testA = testB.copy();
testA.setCount( totalB - testA.getCount() );
testA.stackSize = totalB - testA.stackSize;
}
a.putStack( testA );
@@ -243,7 +243,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
if( i.hasNext() )
{
final ItemStack g = i.next().getItemStack();
g.setCount( 1 );
g.stackSize = 1;
inv.setInventorySlotContents( x, g );
}
else
@@ -331,7 +331,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
}
@Override
public boolean isUsableByPlayer( EntityPlayer player )
public boolean isUseableByPlayer( final EntityPlayer entityplayer )
{
return false;
}
@@ -383,12 +383,5 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
{
ContainerCellWorkbench.this.getCellUpgradeInventory().clear();
}
@Override
public boolean isEmpty()
{
// TODO Auto-generated method stub
return false;
}
}
}
@@ -66,7 +66,7 @@ public class ContainerCraftAmount extends AEBaseContainer
public World getWorld()
{
return this.getPlayerInv().player.world;
return this.getPlayerInv().player.worldObj;
}
public BaseActionSource getActionSrc()
@@ -279,7 +279,7 @@ public class ContainerCraftConfirm extends AEBaseContainer
}
catch( final Throwable e )
{
this.getPlayerInv().player.sendMessage( new TextComponentString( "Error: " + e.toString() ) );
this.getPlayerInv().player.addChatMessage( new TextComponentString( "Error: " + e.toString() ) );
AELog.debug( e );
this.setValidContainer( false );
this.result = null;
@@ -389,7 +389,7 @@ public class ContainerCraftConfirm extends AEBaseContainer
public World getWorld()
{
return this.getPlayerInv().player.world;
return this.getPlayerInv().player.worldObj;
}
public boolean isAutoStart()
@@ -80,7 +80,7 @@ public class ContainerCraftingTerm extends ContainerMEMonitorable implements IAE
ic.setInventorySlotContents( x, this.craftingSlots[x].getStack() );
}
this.outputSlot.putStack( CraftingManager.getInstance().findMatchingRecipe( ic, this.getPlayerInv().player.world ) );
this.outputSlot.putStack( CraftingManager.getInstance().findMatchingRecipe( ic, this.getPlayerInv().player.worldObj ) );
}
@Override
@@ -268,7 +268,7 @@ public final class ContainerInterfaceTerminal extends AEBaseContainer
}
else if( is != null )
{
ItemStack extra = interfaceSlot.removeItems( ( is.getCount() + 1 ) / 2, null, null );
ItemStack extra = interfaceSlot.removeItems( ( is.stackSize + 1 ) / 2, null, null );
if( extra != null )
{
extra = playerHand.addItems( extra );
@@ -125,28 +125,35 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
{
if( !this.isCraftingMode() )
{
this.craftSlot.xPos = -9000;
this.craftSlot.xDisplayPosition = -9000;
for( int y = 0; y < 3; y++ )
{
this.outputSlots[y].xPos = this.outputSlots[y].getX();
this.outputSlots[y].xDisplayPosition = this.outputSlots[y].getX();
}
}
else
{
this.craftSlot.xPos = this.craftSlot.getX();
this.craftSlot.xDisplayPosition = this.craftSlot.getX();
for( int y = 0; y < 3; y++ )
{
this.outputSlots[y].xPos = -9000;
this.outputSlots[y].xDisplayPosition = -9000;
}
}
}
@Override
public void putStackInSlot( int slotID, ItemStack stack )
public void putStackInSlot( final int par1, final ItemStack par2ItemStack )
{
super.putStackInSlot( slotID, stack );
super.putStackInSlot( par1, par2ItemStack );
this.getAndUpdateOutput();
}
@Override
public void putStacksInSlots( final ItemStack[] par1ArrayOfItemStack )
{
super.putStacksInSlots( par1ArrayOfItemStack );
this.getAndUpdateOutput();
}
@@ -159,7 +166,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
ic.setInventorySlotContents( x, this.crafting.getStackInSlot( x ) );
}
final ItemStack is = CraftingManager.getInstance().findMatchingRecipe( ic, this.getPlayerInv().player.world );
final ItemStack is = CraftingManager.getInstance().findMatchingRecipe( ic, this.getPlayerInv().player.worldObj );
this.cOut.setInventorySlotContents( 0, is );
return is;
}
@@ -203,8 +210,8 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
}
// remove one, and clear the input slot.
output.setCount( output.getCount() );
if( output.getCount() == 0 )
output.stackSize--;
if( output.stackSize == 0 )
{
this.patternSlotIN.putStack( null );
}
@@ -270,7 +277,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
{
final ItemStack out = this.getAndUpdateOutput();
if( out != null && out.getCount() > 0 )
if( out != null && out.stackSize > 0 )
{
return new ItemStack[] { out };
}
@@ -284,7 +291,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
{
final ItemStack out = outputSlot.getStack();
if( out != null && out.getCount() > 0 )
if( out != null && out.stackSize > 0 )
{
list.add( out );
hasValue = true;
@@ -384,7 +391,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
ic.setInventorySlotContents( x, packetPatternSlot.pattern[x] == null ? null : packetPatternSlot.pattern[x].getItemStack() );
}
final IRecipe r = Platform.findMatchingRecipe( ic, p.world );
final IRecipe r = Platform.findMatchingRecipe( ic, p.worldObj );
if( r == null )
{
@@ -400,17 +407,17 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
{
if( ic.getStackInSlot( x ) != null )
{
final ItemStack pulled = Platform.extractItemsByRecipe( this.getPowerSource(), this.getActionSource(), storage, p.world, r, is, ic, ic.getStackInSlot( x ), x, all, Actionable.MODULATE, ItemViewCell.createFilter( this.getViewCells() ) );
final ItemStack pulled = Platform.extractItemsByRecipe( this.getPowerSource(), this.getActionSource(), storage, p.worldObj, r, is, ic, ic.getStackInSlot( x ), x, all, Actionable.MODULATE, ItemViewCell.createFilter( this.getViewCells() ) );
real.setInventorySlotContents( x, pulled );
}
}
final IRecipe rr = Platform.findMatchingRecipe( real, p.world );
final IRecipe rr = Platform.findMatchingRecipe( real, p.worldObj );
if( rr == r && Platform.itemComparisons().isSameItem( rr.getCraftingResult( real ), is ) )
{
final SlotCrafting sc = new SlotCrafting( p, real, this.cOut, 0, 0, 0 );
sc.onTake( p, is );
sc.onPickupFromSlot( p, is );
for( int x = 0; x < real.getSizeInventory(); x++ )
{
@@ -128,9 +128,9 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
public ItemStack getStackInSlot( final int var1 )
{
final ItemStack input = this.inSlot.getStackInSlot( 0 );
if( input == ItemStack.EMPTY )
if( input == null )
{
return ItemStack.EMPTY;
return null;
}
if( SlotRestrictedInput.isMetalIngot( input ) )
@@ -147,7 +147,7 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
}
}
return ItemStack.EMPTY;
return null;
}
@Override
@@ -161,7 +161,7 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
return is;
}
}
return ItemStack.EMPTY;
return null;
}
private boolean makePlate()
@@ -171,9 +171,9 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
final ItemStack item = this.toolInv.getItemStack();
item.damageItem( 1, this.getPlayerInv().player );
if( item.getCount() == 0 )
if( item.stackSize == 0 )
{
this.getPlayerInv().mainInventory.add( this.getPlayerInv().currentItem, null );
this.getPlayerInv().mainInventory[this.getPlayerInv().currentItem] = null;
MinecraftForge.EVENT_BUS.post( new PlayerDestroyItemEvent( this.getPlayerInv().player, item, null ) );
}
@@ -185,7 +185,7 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
@Override
public ItemStack removeStackFromSlot( final int var1 )
{
return ItemStack.EMPTY;
return null;
}
@Override
@@ -222,7 +222,7 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
}
@Override
public boolean isUsableByPlayer( EntityPlayer player )
public boolean isUseableByPlayer( final EntityPlayer var1 )
{
return false;
}
@@ -274,11 +274,4 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
{
this.inSlot.setInventorySlotContents( 0, null );
}
@Override
public boolean isEmpty()
{
// TODO Auto-generated method stub
return false;
}
}
@@ -160,7 +160,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
if( i.hasNext() && this.isSlotEnabled( ( x / 9 ) - 2 ) )
{
final ItemStack g = i.next().getItemStack();
g.setCount( 1 );
g.stackSize = 1;
inv.setInventorySlotContents( x, g );
}
else
@@ -51,7 +51,7 @@ public class ContainerWireless extends AEBaseContainer
@Override
public void detectAndSendChanges()
{
final int boosters = this.boosterSlot.getStack() == null ? 0 : this.boosterSlot.getStack().getCount();
final int boosters = this.boosterSlot.getStack() == null ? 0 : this.boosterSlot.getStack().stackSize;
this.setRange( (long) ( 10 * AEConfig.instance().wireless_getMaxRange( boosters ) ) );
this.setDrain( (long) ( 100 * AEConfig.instance().wireless_getPowerDrain( boosters ) ) );
@@ -47,7 +47,7 @@ public class ContainerWirelessTerm extends ContainerMEPortableCell
{
if( Platform.isServer() && this.isValidContainer() )
{
this.getPlayerInv().player.sendMessage( PlayerMessages.OutOfRange.get() );
this.getPlayerInv().player.addChatMessage( PlayerMessages.OutOfRange.get() );
}
this.setValidContainer( false );
@@ -32,7 +32,6 @@ import net.minecraft.item.ItemSword;
import net.minecraft.item.ItemTool;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.stats.AchievementList;
import net.minecraft.util.NonNullList;
public class AppEngCraftingSlot extends AppEngSlot
@@ -86,7 +85,7 @@ public class AppEngCraftingSlot extends AppEngSlot
@Override
protected void onCrafting( final ItemStack par1ItemStack )
{
par1ItemStack.onCrafting( this.thePlayer.world, this.thePlayer, this.amountCrafted );
par1ItemStack.onCrafting( this.thePlayer.worldObj, this.thePlayer, this.amountCrafted );
this.amountCrafted = 0;
if( par1ItemStack.getItem() == Item.getItemFromBlock( Blocks.CRAFTING_TABLE ) )
@@ -141,7 +140,7 @@ public class AppEngCraftingSlot extends AppEngSlot
}
@Override
public ItemStack onTake( final EntityPlayer playerIn, final ItemStack stack )
public void onPickupFromSlot( final EntityPlayer playerIn, final ItemStack stack )
{
net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerCraftingEvent( playerIn, stack, this.craftMatrix );
this.onCrafting( stack );
@@ -153,7 +152,7 @@ public class AppEngCraftingSlot extends AppEngSlot
ic.setInventorySlotContents( x, this.craftMatrix.getStackInSlot( x ) );
}
final NonNullList<ItemStack> aitemstack = CraftingManager.getInstance().getRemainingItems( ic, playerIn.world );
final ItemStack[] aitemstack = CraftingManager.getInstance().getRemainingItems( ic, playerIn.worldObj );
for( int x = 0; x < this.craftMatrix.getSizeInventory(); x++ )
{
@@ -162,10 +161,10 @@ public class AppEngCraftingSlot extends AppEngSlot
net.minecraftforge.common.ForgeHooks.setCraftingPlayer( null );
for( int i = 0; i < aitemstack.size(); ++i )
for( int i = 0; i < aitemstack.length; ++i )
{
final ItemStack itemstack1 = this.craftMatrix.getStackInSlot( i );
final ItemStack itemstack2 = aitemstack.get( i );
final ItemStack itemstack2 = aitemstack[i];
if( itemstack1 != null )
{
@@ -184,8 +183,6 @@ public class AppEngCraftingSlot extends AppEngSlot
}
}
}
return stack;
}
/**
@@ -197,7 +194,7 @@ public class AppEngCraftingSlot extends AppEngSlot
{
if( this.getHasStack() )
{
this.amountCrafted += Math.min( par1, this.getStack().getCount() );
this.amountCrafted += Math.min( par1, this.getStack().stackSize );
}
return super.decrStackSize( par1 );
@@ -85,12 +85,12 @@ public class AppEngSlot extends Slot
{
if( !this.isEnabled() )
{
return ItemStack.EMPTY;
return null;
}
if( this.inventory.getSizeInventory() <= this.getSlotIndex() )
{
return ItemStack.EMPTY;
return null;
}
if( this.isDisplay() )
@@ -40,9 +40,9 @@ public class NullSlot extends Slot
}
@Override
public ItemStack onTake( final EntityPlayer par1EntityPlayer, final ItemStack par2ItemStack )
public void onPickupFromSlot( final EntityPlayer par1EntityPlayer, final ItemStack par2ItemStack )
{
return par2ItemStack;
}
@Override
@@ -54,7 +54,7 @@ public class NullSlot extends Slot
@Override
public ItemStack getStack()
{
return ItemStack.EMPTY;
return null;
}
@Override
@@ -78,7 +78,7 @@ public class NullSlot extends Slot
@Override
public ItemStack decrStackSize( final int par1 )
{
return ItemStack.EMPTY;
return null;
}
@Override
@@ -37,13 +37,13 @@ public class OptionalSlotFakeTypeOnly extends OptionalSlotFake
if( is != null )
{
is = is.copy();
if( is.getCount() > 1 )
if( is.stackSize > 1 )
{
is.setCount( 1 );
is.stackSize = 1;
}
else if( is.getCount() < -1 )
else if( is.stackSize < -1 )
{
is.setCount( -1 );
is.stackSize = -1;
}
}
@@ -81,9 +81,8 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
}
@Override
public ItemStack onTake( final EntityPlayer p, final ItemStack is )
public void onPickupFromSlot( final EntityPlayer p, final ItemStack is )
{
return is;
}
public void doClick( final InventoryAction action, final EntityPlayer who )
@@ -98,7 +97,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
}
final IMEMonitor<IAEItemStack> inv = this.storage.getItemInventory();
final int howManyPerCraft = this.getStack().getCount();
final int howManyPerCraft = this.getStack().stackSize;
int maxTimesToCraft = 0;
InventoryAdaptor ia = null;
@@ -142,7 +141,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
{
final List<ItemStack> drops = new ArrayList<ItemStack>();
drops.add( extra );
Platform.spawnDrops( who.world, new BlockPos( (int) who.posX, (int) who.posY, (int) who.posZ ), drops );
Platform.spawnDrops( who.worldObj, new BlockPos( (int) who.posX, (int) who.posY, (int) who.posZ ), drops );
return;
}
}
@@ -172,7 +171,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
ic.setInventorySlotContents( x, this.getPattern().getStackInSlot( x ) );
}
final IRecipe r = Platform.findMatchingRecipe( ic, p.world );
final IRecipe r = Platform.findMatchingRecipe( ic, p.worldObj );
if( r == null )
{
@@ -194,13 +193,13 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
}
if( !isBad )
{
super.onTake( p, is );
super.onPickupFromSlot( p, is );
// actually necessary to cleanup this case...
p.openContainer.onCraftMatrixChanged( this.craftInv );
return request;
}
}
return ItemStack.EMPTY;
return null;
}
is = r.getCraftingResult( ic );
@@ -211,7 +210,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
{
if( this.getPattern().getStackInSlot( x ) != null )
{
set[x] = Platform.extractItemsByRecipe( this.energySrc, this.mySrc, inv, p.world, r, is, ic, this.getPattern().getStackInSlot( x ), x, all, Actionable.MODULATE, ItemViewCell.createFilter( this.container.getViewCells() ) );
set[x] = Platform.extractItemsByRecipe( this.energySrc, this.mySrc, inv, p.worldObj, r, is, ic, this.getPattern().getStackInSlot( x ), x, all, Actionable.MODULATE, ItemViewCell.createFilter( this.container.getViewCells() ) );
ic.setInventorySlotContents( x, set[x] );
}
}
@@ -231,7 +230,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
return is;
}
return ItemStack.EMPTY;
return null;
}
private boolean preCraft( final EntityPlayer p, final IMEMonitor<IAEItemStack> inv, final ItemStack[] set, final ItemStack result )
@@ -241,7 +240,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
private void makeItem( final EntityPlayer p, final ItemStack is )
{
super.onTake( p, is );
super.onPickupFromSlot( p, is );
}
private void postCraft( final EntityPlayer p, final IMEMonitor<IAEItemStack> inv, final ItemStack[] set, final ItemStack result )
@@ -272,7 +271,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
if( drops.size() > 0 )
{
Platform.spawnDrops( p.world, new BlockPos( (int) p.posX, (int) p.posY, (int) p.posZ ), drops );
Platform.spawnDrops( p.worldObj, new BlockPos( (int) p.posX, (int) p.posY, (int) p.posZ ), drops );
}
}
@@ -33,15 +33,14 @@ public class SlotFake extends AppEngSlot
}
@Override
public ItemStack onTake( final EntityPlayer par1EntityPlayer, final ItemStack par2ItemStack )
public void onPickupFromSlot( final EntityPlayer par1EntityPlayer, final ItemStack par2ItemStack )
{
return par2ItemStack;
}
@Override
public ItemStack decrStackSize( final int par1 )
{
return ItemStack.EMPTY;
return null;
}
@Override
@@ -47,7 +47,7 @@ public class SlotFakeBlacklist extends SlotFakeTypeOnly
{
if( this.getHasStack() )
{
return this.getStack().getCount() > 0 ? 16 + 14 : 14;
return this.getStack().stackSize > 0 ? 16 + 14 : 14;
}
return -1;
}
@@ -37,13 +37,13 @@ public class SlotFakeTypeOnly extends SlotFake
if( is != null )
{
is = is.copy();
if( is.getCount() > 1 )
if( is.stackSize > 1 )
{
is.setCount( 1 );
is.stackSize = 1;
}
else if( is.getCount() < -1 )
else if( is.stackSize < -1 )
{
is.setCount( -1 );
is.stackSize = -1;
}
}
@@ -130,7 +130,7 @@ public class SlotRestrictedInput extends AppEngSlot
if( i.getItem() instanceof ICraftingPatternItem )
{
final ICraftingPatternItem b = (ICraftingPatternItem) i.getItem();
final ICraftingPatternDetails de = b.getPatternForItem( i, this.p.player.world );
final ICraftingPatternDetails de = b.getPatternForItem( i, this.p.player.worldObj );
if( de != null )
{
return de.isCraftable();
+1 -1
View File
@@ -307,7 +307,7 @@ public final class AELog
{
if( AEConfig.instance().isFeatureEnabled( AEFeature.INTEGRATION_LOGGING ) )
{
debug( exception );
error( exception );
}
}
+9 -13
View File
@@ -33,7 +33,6 @@ 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;
@@ -65,12 +64,9 @@ import appeng.services.version.VersionCheckerConfig;
import appeng.util.Platform;
@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" )
@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" )
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";
@@ -82,11 +78,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();
@@ -133,7 +129,7 @@ public final class AppEng
{
if( !Loader.isModLoaded( "appliedenergistics2-core" ) )
{
AppEng.proxy.missingCoreMod();
CommonHelper.proxy.missingCoreMod();
}
final Stopwatch watch = Stopwatch.createStarted();
@@ -165,7 +161,7 @@ public final class AppEng
if( Platform.isClient() )
{
AppEng.proxy.preinit();
CommonHelper.proxy.preinit();
}
if( versionCheckerConfig.isVersionCheckingEnabled() )
@@ -230,7 +226,7 @@ public final class AppEng
IntegrationRegistry.INSTANCE.postInit();
FMLCommonHandler.instance().registerCrashCallable( new IntegrationCrashEnhancement() );
AppEng.proxy.postInit();
CommonHelper.proxy.postInit();
AEConfig.instance().save();
NetworkRegistry.INSTANCE.registerGuiHandler( this, GuiBridge.GUI_Handler );
+4 -1
View File
@@ -26,6 +26,7 @@ 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;
@@ -36,6 +37,8 @@ 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();
@@ -49,7 +52,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 world, double posX, double posY, double posZ, Object extra );
public abstract void spawnEffect( EffectType effect, World worldObj, double posX, double posY, double posZ, Object extra );
public abstract boolean shouldAddParticles( Random r );
+3 -2
View File
@@ -23,6 +23,7 @@ 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;
@@ -48,9 +49,9 @@ public final class CreativeTab extends CreativeTabs
}
@Override
public ItemStack getTabIconItem()
public Item getTabIconItem()
{
return this.getIconItemStack();
return this.getIconItemStack().getItem();
}
@Override
@@ -46,9 +46,9 @@ public final class CreativeTabFacade extends CreativeTabs
}
@Override
public ItemStack getTabIconItem()
public Item getTabIconItem()
{
return this.getIconItemStack();
return this.getIconItemStack().getItem();
}
@Override
+2 -2
View File
@@ -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.AppEng;
import appeng.core.CommonHelper;
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 AppEng.proxy.getRenderMode();
return CommonHelper.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 p2PTunnelFluids;
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.p2PTunnelFluids = new DamagedItemDefinition( "part.tunnel.fluid", itemPart.createPart( PartType.P2PTunnelFluids ) );
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 p2PTunnelFluids()
{
return this.p2PTunnelFluids;
}
@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 = new ItemStack( inTag );
final ItemStack out = new ItemStack( outTag );
final ItemStack in = ItemStack.loadItemStackFromNBT( inTag );
final ItemStack out = ItemStack.loadItemStackFromNBT( 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 = new ItemStack( optionalTag );
final ItemStack optional = ItemStack.loadItemStackFromNBT( 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 = new ItemStack( item );
final ItemStack ammo = ItemStack.loadItemStackFromNBT( item );
final double weight = msg.getDouble( "weight" );
if( ammo == null )
@@ -118,7 +118,7 @@ public enum AEFeature
P2P_TUNNEL_ITEMS( "P2PTunnelItems", Constants.CATEGORY_P2P_TUNNELS ),
P2P_TUNNEL_REDSTONE( "P2PTunnelRedstone", Constants.CATEGORY_P2P_TUNNELS ),
P2P_TUNNEL_EU( "P2PTunnelEU", Constants.CATEGORY_P2P_TUNNELS ),
P2P_TUNNEL_LIQUIDS( "P2PTunnelLiquids", Constants.CATEGORY_P2P_TUNNELS ),
P2P_TUNNEL_FLUIDS( "P2PTunnelFluids", Constants.CATEGORY_P2P_TUNNELS ),
P2P_TUNNEL_LIGHT( "P2PTunnelLight", Constants.CATEGORY_P2P_TUNNELS ),
P2P_TUNNEL_OPEN_COMPUTERS( "P2PTunnelOpenComputers", Constants.CATEGORY_P2P_TUNNELS ),
P2P_TUNNEL_PRESSURE( "P2PTunnelPressure", Constants.CATEGORY_P2P_TUNNELS ),
@@ -70,7 +70,7 @@ public final class ColoredItemDefinition implements AEColoredItemDefinition
if( is == null )
{
return ItemStack.EMPTY;
return null;
}
return is.stack( stackSize );
@@ -28,6 +28,8 @@ 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;
@@ -132,10 +134,10 @@ public final class P2PTunnelRegistry implements IP2PTunnelRegistry
{
if( trigger != null )
{
// if( FluidRegistry.isContainer( trigger ) )
// {
// return TunnelType.FLUID;
// }
if( FluidContainerRegistry.isContainer( trigger ) )
{
return TunnelType.FLUID;
}
for( final ItemStack is : this.tunnels.keySet() )
{
@@ -157,12 +159,11 @@ public final class P2PTunnelRegistry implements IP2PTunnelRegistry
@Nullable
private ItemStack getModItem( final String modID, final String name, final int meta )
{
final Item item = Item.getByNameOrId( modID + ":" + name );
final Item item = GameRegistry.findItem( modID, name );
if( item == null )
{
return ItemStack.EMPTY;
return null;
}
final ItemStack myItemStack = new ItemStack( item, 1, meta );
@@ -89,7 +89,7 @@ public final class WirelessRegistry implements IWirelessTermRegistry
if( !this.isWirelessTerminal( item ) )
{
player.sendMessage( PlayerMessages.DeviceNotWirelessTerminal.get() );
player.addChatMessage( PlayerMessages.DeviceNotWirelessTerminal.get() );
return;
}
@@ -97,7 +97,7 @@ public final class WirelessRegistry implements IWirelessTermRegistry
final String unparsedKey = handler.getEncryptionKey( item );
if( unparsedKey.isEmpty() )
{
player.sendMessage( PlayerMessages.DeviceNotLinked.get() );
player.addChatMessage( 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.sendMessage( PlayerMessages.StationCanNotBeLocated.get() );
player.addChatMessage( PlayerMessages.StationCanNotBeLocated.get() );
return;
}
@@ -115,7 +115,7 @@ public final class WirelessRegistry implements IWirelessTermRegistry
}
else
{
player.sendMessage( PlayerMessages.DeviceNotPowered.get() );
player.addChatMessage( PlayerMessages.DeviceNotPowered.get() );
}
}
}
@@ -233,7 +233,7 @@ public final class GrinderRecipeManager implements IGrinderRegistry, IOreListene
{
return is.copy();
}
return ItemStack.EMPTY;
return null;
}
private int getDustToOreRatio( final String name )
@@ -258,7 +258,7 @@ public final class GrinderRecipeManager implements IGrinderRegistry, IOreListene
if( ratio > 1 )
{
final ItemStack extra = is.copy();
extra.setCount( ratio - 1 );
extra.stackSize = 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.setCount( 1 );
is.stackSize = 1;
final int ratio = this.getDustToOreRatio( name );
if( ratio > 1 )
{
final ItemStack extra = is.copy();
extra.setCount( ratio - 1 );
extra.stackSize = 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.size() )
else if( x >= 0 && x < player.inventory.mainInventory.length )
{
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.size() )
else if( x >= 0 && x < player.inventory.mainInventory.length )
{
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.world, pos ), player ) )
if( Platform.hasPermissions( te != null ? new DimensionalCoord( te ) : new DimensionalCoord( player.worldObj, 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().player );
appEngPacket.clientPacketData( manager, appEngPacket, Minecraft.getMinecraft().thePlayer );
}
};
@@ -31,7 +31,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import appeng.api.storage.data.IAEItemStack;
import appeng.client.EffectType;
import appeng.core.AppEng;
import appeng.core.CommonHelper;
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);
AppEng.proxy.spawnEffect( EffectType.Assembler, player.getEntityWorld(), this.x + d0, this.y + d1, this.z + d2, this );
CommonHelper.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.world, new BlockPos( this.x, this.y, this.z ), this.side, this.hitX, this.hitY, this.hitZ );
tnt.serverSideToolLogic( is, player, this.hand, player.worldObj, 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.world, this.cx << 4, this.cdy << 5, this.cz << 4 );
final DimensionalCoord loc = new DimensionalCoord( player.worldObj, 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.setCount( 1 );
displayIs.stackSize = 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 )
{
AppEng.proxy.getPlayers().get( 0 ).inventory.setItemStack( null );
ClientHelper.proxy.getPlayers().get( 0 ).inventory.setItemStack( null );
}
else
{
AppEng.proxy.getPlayers().get( 0 ).inventory.setItemStack( this.slotItem.getItemStack() );
ClientHelper.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] = new ItemStack( list.getCompoundTagAt( y ) );
this.recipe[x][y] = ItemStack.loadItemStackFromNBT( list.getCompoundTagAt( y ) );
}
}
}
@@ -144,7 +144,7 @@ public class PacketJEIRecipe extends AppEngPacket
}
}
final IRecipe r = Platform.findMatchingRecipe( testInv, pmp.world );
final IRecipe r = Platform.findMatchingRecipe( testInv, pmp.worldObj );
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.world ) ? r.getCraftingResult( testInv ) : null;
final ItemStack newItemStack = r.matches( testInv, pmp.worldObj ) ? 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.world, r, is, testInv, patternItem, x, all, realForFake, filter );
ItemStack whichItem = Platform.extractItemsByRecipe( energy, cct.getActionSource(), storage, player.worldObj, 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( AppEng.proxy.getWorld(), this.x, this.y, this.z, 0.0f, 0.0f, 0.0f );
final LightningFX fx = new LightningFX( ClientHelper.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().world;
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 );
@@ -28,7 +28,7 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import appeng.core.AppEng;
import appeng.core.CommonHelper;
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 = AppEng.proxy.getWorld();
final World world = CommonHelper.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.AppEng;
import appeng.core.CommonHelper;
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;
AppEng.proxy.updateRenderMode( sender );
CommonHelper.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.world, PartPlacement.PlaceType.INTERACT_FIRST_PASS, 0 );
AppEng.proxy.updateRenderMode( null );
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 );
}
}
@@ -34,8 +34,9 @@ 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.AppEng;
import appeng.core.CommonHelper;
import appeng.core.sync.AppEngPacket;
import appeng.core.sync.network.INetworkInfo;
import appeng.util.Platform;
@@ -85,11 +86,11 @@ public class PacketTransitionEffect extends AppEngPacket
@SideOnly( Side.CLIENT )
public void clientPacketData( final INetworkInfo network, final AppEngPacket packet, final EntityPlayer player )
{
final World world = AppEng.proxy.getWorld();
final World world = ClientHelper.proxy.getWorld();
for( int zz = 0; zz < ( this.mode ? 32 : 8 ); zz++ )
{
if( AppEng.proxy.shouldAddParticles( Platform.getRandom() ) )
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 );
@@ -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.AppEng;
import appeng.core.CommonHelper;
/**
@@ -75,7 +75,7 @@ final class PlayerData implements IWorldPlayerData, IOnWorldStartable, IOnWorldS
if( maybe.isPresent() )
{
final UUID uuid = maybe.get();
for( final EntityPlayer player : AppEng.proxy.getPlayers() )
for( final EntityPlayer player : CommonHelper.proxy.getPlayers() )
{
if( player.getUniqueID().equals( uuid ) )
{
@@ -19,10 +19,6 @@
package appeng.coremod;
import java.util.Map;
import javax.annotation.Nullable;
import com.google.common.eventbus.EventBus;
import net.minecraftforge.fml.common.DummyModContainer;
@@ -31,18 +27,15 @@ import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.ModMetadata;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.relauncher.FMLRelaunchLog;
import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;
import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin.MCVersion;
import appeng.core.AEConfig;
@MCVersion( "1.11" )
public final class AppEngCore extends DummyModContainer implements IFMLLoadingPlugin
public final class AppEngCoreContainer extends DummyModContainer
{
private final ModMetadata metadata = new ModMetadata();
public AppEngCore()
public AppEngCoreContainer()
{
FMLRelaunchLog.info( "[AppEng] Core Init" );
this.metadata.autogenerated = false;
@@ -61,37 +54,6 @@ public final class AppEngCore extends DummyModContainer implements IFMLLoadingPl
{
}
@Override
public String[] getASMTransformerClass()
{
return null; //new String[] { "appeng.coremod.asm.ASMIntegration" };
}
@Override
public String getModContainerClass()
{
return "appeng.coremod.AppEngCore";
}
@Nullable
@Override
public String getSetupClass()
{
return null;
}
@Override
public void injectData( final Map<String, Object> data )
{
}
@Override
public String getAccessTransformerClass()
{
return null;
}
@Override
public ModMetadata getMetadata()
{
@@ -0,0 +1,64 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.coremod;
import java.util.Map;
import javax.annotation.Nullable;
import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;
@IFMLLoadingPlugin.MCVersion( "1.10.2" )
@IFMLLoadingPlugin.TransformerExclusions( { "appeng.coremod." } )
public class AppEngLoadingPlugin implements IFMLLoadingPlugin
{
@Override
public String[] getASMTransformerClass()
{
return new String[] { "appeng.coremod.transformer.IntegrationTransformer" };
}
@Override
public String getModContainerClass()
{
return "appeng.coremod.AppEngCoreContainer";
}
@Nullable
@Override
public String getSetupClass()
{
return null;
}
@Override
public void injectData( final Map<String, Object> data )
{
}
@Override
public String getAccessTransformerClass()
{
return null;
}
}

Some files were not shown because too many files have changed in this diff Show More