Merge pull request #1421 from thatsIch/e-local-variable-naming-conventions
Replaces all local variables regarding their naming conventions
This commit is contained in:
commit
b8f22202d4
18 changed files with 132 additions and 132 deletions
|
@ -72,15 +72,15 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TileQuartzGrowthAccelerator tileQuartzGrowthAccelerator = this.getTileEntity( w, x, y, z );
|
TileQuartzGrowthAccelerator cga = this.getTileEntity( w, x, y, z );
|
||||||
|
|
||||||
if( tileQuartzGrowthAccelerator != null && tileQuartzGrowthAccelerator.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
|
if( cga != null && cga.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
|
||||||
{
|
{
|
||||||
double d0 = r.nextFloat() - 0.5F;
|
double d0 = r.nextFloat() - 0.5F;
|
||||||
double d1 = r.nextFloat() - 0.5F;
|
double d1 = r.nextFloat() - 0.5F;
|
||||||
|
|
||||||
ForgeDirection up = tileQuartzGrowthAccelerator.getUp();
|
ForgeDirection up = cga.getUp();
|
||||||
ForgeDirection forward = tileQuartzGrowthAccelerator.getForward();
|
ForgeDirection forward = cga.getForward();
|
||||||
ForgeDirection west = Platform.crossProduct( forward, up );
|
ForgeDirection west = Platform.crossProduct( forward, up );
|
||||||
|
|
||||||
double rx = 0.5 + x;
|
double rx = 0.5 + x;
|
||||||
|
|
|
@ -129,14 +129,14 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
|
||||||
@Override
|
@Override
|
||||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, int x, int y, int z, Entity e, boolean isVisual )
|
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, int x, int y, int z, Entity e, boolean isVisual )
|
||||||
{
|
{
|
||||||
double OnePx = 2.0 / 16.0;
|
double onePixel = 2.0 / 16.0;
|
||||||
return Collections.singletonList( AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) );
|
return Collections.singletonList( AxisAlignedBB.getBoundingBox( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addCollidingBlockToList( World w, int x, int y, int z, AxisAlignedBB bb, List<AxisAlignedBB> out, Entity e )
|
public void addCollidingBlockToList( World w, int x, int y, int z, AxisAlignedBB bb, List<AxisAlignedBB> out, Entity e )
|
||||||
{
|
{
|
||||||
double OnePx = 2.0 / 16.0;
|
double onePixel = 2.0 / 16.0;
|
||||||
out.add( AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) );
|
out.add( AxisAlignedBB.getBoundingBox( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,32 +82,32 @@ public class BlockQuantumRing extends AEBaseBlock implements ICustomCollision
|
||||||
@Override
|
@Override
|
||||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, int x, int y, int z, Entity e, boolean isVisual )
|
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, int x, int y, int z, Entity e, boolean isVisual )
|
||||||
{
|
{
|
||||||
double OnePx = 2.0 / 16.0;
|
double onePixel = 2.0 / 16.0;
|
||||||
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
|
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
|
||||||
if( bridge != null && bridge.isCorner() )
|
if( bridge != null && bridge.isCorner() )
|
||||||
{
|
{
|
||||||
OnePx = 4.0 / 16.0;
|
onePixel = 4.0 / 16.0;
|
||||||
}
|
}
|
||||||
else if( bridge != null && bridge.isFormed() )
|
else if( bridge != null && bridge.isFormed() )
|
||||||
{
|
{
|
||||||
OnePx = 1.0 / 16.0;
|
onePixel = 1.0 / 16.0;
|
||||||
}
|
}
|
||||||
return Collections.singletonList( AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) );
|
return Collections.singletonList( AxisAlignedBB.getBoundingBox( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addCollidingBlockToList( World w, int x, int y, int z, AxisAlignedBB bb, List<AxisAlignedBB> out, Entity e )
|
public void addCollidingBlockToList( World w, int x, int y, int z, AxisAlignedBB bb, List<AxisAlignedBB> out, Entity e )
|
||||||
{
|
{
|
||||||
double OnePx = 2.0 / 16.0;
|
double onePixel = 2.0 / 16.0;
|
||||||
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
|
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
|
||||||
if( bridge != null && bridge.isCorner() )
|
if( bridge != null && bridge.isCorner() )
|
||||||
{
|
{
|
||||||
OnePx = 4.0 / 16.0;
|
onePixel = 4.0 / 16.0;
|
||||||
}
|
}
|
||||||
else if( bridge != null && bridge.isFormed() )
|
else if( bridge != null && bridge.isFormed() )
|
||||||
{
|
{
|
||||||
OnePx = 1.0 / 16.0;
|
onePixel = 1.0 / 16.0;
|
||||||
}
|
}
|
||||||
out.add( AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) );
|
out.add( AxisAlignedBB.getBoundingBox( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,11 +148,11 @@ public class BlockSkyChest extends AEBaseBlock implements ICustomCollision
|
||||||
o = sk.getUp();
|
o = sk.getUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
double X = o.offsetX == 0 ? 0.06 : 0.0;
|
double offsetX = o.offsetX == 0 ? 0.06 : 0.0;
|
||||||
double Y = o.offsetY == 0 ? 0.06 : 0.0;
|
double offsetY = o.offsetY == 0 ? 0.06 : 0.0;
|
||||||
double Z = o.offsetZ == 0 ? 0.06 : 0.0;
|
double offsetZ = o.offsetZ == 0 ? 0.06 : 0.0;
|
||||||
|
|
||||||
return Collections.singletonList( AxisAlignedBB.getBoundingBox( Math.max( 0.0, X - o.offsetX * sc ), Math.max( 0.0, Y - o.offsetY * sc ), Math.max( 0.0, Z - o.offsetZ * sc ), Math.min( 1.0, ( 1.0 - X ) - o.offsetX * sc ), Math.min( 1.0, ( 1.0 - Y ) - o.offsetY * sc ), Math.min( 1.0, ( 1.0 - Z ) - o.offsetZ * sc ) ) );
|
return Collections.singletonList( AxisAlignedBB.getBoundingBox( Math.max( 0.0, offsetX - o.offsetX * sc ), Math.max( 0.0, offsetY - o.offsetY * sc ), Math.max( 0.0, offsetZ - o.offsetZ * sc ), Math.min( 1.0, ( 1.0 - offsetX ) - o.offsetX * sc ), Math.min( 1.0, ( 1.0 - offsetY ) - o.offsetY * sc ), Math.min( 1.0, ( 1.0 - offsetZ ) - o.offsetZ * sc ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -99,13 +99,13 @@ public class RenderBlockPaint extends BaseBlockRender
|
||||||
double offset = offsetConstant;
|
double offset = offsetConstant;
|
||||||
offsetConstant += 0.001;
|
offsetConstant += 0.001;
|
||||||
|
|
||||||
double H = 0.1;
|
double buffer = 0.1;
|
||||||
|
|
||||||
double pos_x = s.x();
|
double pos_x = s.x();
|
||||||
double pos_y = s.y();
|
double pos_y = s.y();
|
||||||
|
|
||||||
pos_x = Math.max( H, Math.min( 1.0 - H, pos_x ) );
|
pos_x = Math.max( buffer, Math.min( 1.0 - buffer, pos_x ) );
|
||||||
pos_y = Math.max( H, Math.min( 1.0 - H, pos_y ) );
|
pos_y = Math.max( buffer, Math.min( 1.0 - buffer, pos_y ) );
|
||||||
|
|
||||||
if( s.side == ForgeDirection.SOUTH || s.side == ForgeDirection.NORTH )
|
if( s.side == ForgeDirection.SOUTH || s.side == ForgeDirection.NORTH )
|
||||||
{
|
{
|
||||||
|
@ -131,47 +131,47 @@ public class RenderBlockPaint extends BaseBlockRender
|
||||||
{
|
{
|
||||||
case UP:
|
case UP:
|
||||||
offset = 1.0 - offset;
|
offset = 1.0 - offset;
|
||||||
tess.addVertexWithUV( pos_x - H, y + offset, pos_y - H, ico.getMinU(), ico.getMinV() );
|
tess.addVertexWithUV( pos_x - buffer, y + offset, pos_y - buffer, ico.getMinU(), ico.getMinV() );
|
||||||
tess.addVertexWithUV( pos_x + H, y + offset, pos_y - H, ico.getMaxU(), ico.getMinV() );
|
tess.addVertexWithUV( pos_x + buffer, y + offset, pos_y - buffer, ico.getMaxU(), ico.getMinV() );
|
||||||
tess.addVertexWithUV( pos_x + H, y + offset, pos_y + H, ico.getMaxU(), ico.getMaxV() );
|
tess.addVertexWithUV( pos_x + buffer, y + offset, pos_y + buffer, ico.getMaxU(), ico.getMaxV() );
|
||||||
tess.addVertexWithUV( pos_x - H, y + offset, pos_y + H, ico.getMinU(), ico.getMaxV() );
|
tess.addVertexWithUV( pos_x - buffer, y + offset, pos_y + buffer, ico.getMinU(), ico.getMaxV() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DOWN:
|
case DOWN:
|
||||||
tess.addVertexWithUV( pos_x + H, y + offset, pos_y - H, ico.getMinU(), ico.getMinV() );
|
tess.addVertexWithUV( pos_x + buffer, y + offset, pos_y - buffer, ico.getMinU(), ico.getMinV() );
|
||||||
tess.addVertexWithUV( pos_x - H, y + offset, pos_y - H, ico.getMaxU(), ico.getMinV() );
|
tess.addVertexWithUV( pos_x - buffer, y + offset, pos_y - buffer, ico.getMaxU(), ico.getMinV() );
|
||||||
tess.addVertexWithUV( pos_x - H, y + offset, pos_y + H, ico.getMaxU(), ico.getMaxV() );
|
tess.addVertexWithUV( pos_x - buffer, y + offset, pos_y + buffer, ico.getMaxU(), ico.getMaxV() );
|
||||||
tess.addVertexWithUV( pos_x + H, y + offset, pos_y + H, ico.getMinU(), ico.getMaxV() );
|
tess.addVertexWithUV( pos_x + buffer, y + offset, pos_y + buffer, ico.getMinU(), ico.getMaxV() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EAST:
|
case EAST:
|
||||||
offset = 1.0 - offset;
|
offset = 1.0 - offset;
|
||||||
tess.addVertexWithUV( x + offset, pos_x + H, pos_y - H, ico.getMinU(), ico.getMinV() );
|
tess.addVertexWithUV( x + offset, pos_x + buffer, pos_y - buffer, ico.getMinU(), ico.getMinV() );
|
||||||
tess.addVertexWithUV( x + offset, pos_x - H, pos_y - H, ico.getMaxU(), ico.getMinV() );
|
tess.addVertexWithUV( x + offset, pos_x - buffer, pos_y - buffer, ico.getMaxU(), ico.getMinV() );
|
||||||
tess.addVertexWithUV( x + offset, pos_x - H, pos_y + H, ico.getMaxU(), ico.getMaxV() );
|
tess.addVertexWithUV( x + offset, pos_x - buffer, pos_y + buffer, ico.getMaxU(), ico.getMaxV() );
|
||||||
tess.addVertexWithUV( x + offset, pos_x + H, pos_y + H, ico.getMinU(), ico.getMaxV() );
|
tess.addVertexWithUV( x + offset, pos_x + buffer, pos_y + buffer, ico.getMinU(), ico.getMaxV() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WEST:
|
case WEST:
|
||||||
tess.addVertexWithUV( x + offset, pos_x - H, pos_y - H, ico.getMinU(), ico.getMinV() );
|
tess.addVertexWithUV( x + offset, pos_x - buffer, pos_y - buffer, ico.getMinU(), ico.getMinV() );
|
||||||
tess.addVertexWithUV( x + offset, pos_x + H, pos_y - H, ico.getMaxU(), ico.getMinV() );
|
tess.addVertexWithUV( x + offset, pos_x + buffer, pos_y - buffer, ico.getMaxU(), ico.getMinV() );
|
||||||
tess.addVertexWithUV( x + offset, pos_x + H, pos_y + H, ico.getMaxU(), ico.getMaxV() );
|
tess.addVertexWithUV( x + offset, pos_x + buffer, pos_y + buffer, ico.getMaxU(), ico.getMaxV() );
|
||||||
tess.addVertexWithUV( x + offset, pos_x - H, pos_y + H, ico.getMinU(), ico.getMaxV() );
|
tess.addVertexWithUV( x + offset, pos_x - buffer, pos_y + buffer, ico.getMinU(), ico.getMaxV() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SOUTH:
|
case SOUTH:
|
||||||
offset = 1.0 - offset;
|
offset = 1.0 - offset;
|
||||||
tess.addVertexWithUV( pos_x + H, pos_y - H, z + offset, ico.getMinU(), ico.getMinV() );
|
tess.addVertexWithUV( pos_x + buffer, pos_y - buffer, z + offset, ico.getMinU(), ico.getMinV() );
|
||||||
tess.addVertexWithUV( pos_x - H, pos_y - H, z + offset, ico.getMaxU(), ico.getMinV() );
|
tess.addVertexWithUV( pos_x - buffer, pos_y - buffer, z + offset, ico.getMaxU(), ico.getMinV() );
|
||||||
tess.addVertexWithUV( pos_x - H, pos_y + H, z + offset, ico.getMaxU(), ico.getMaxV() );
|
tess.addVertexWithUV( pos_x - buffer, pos_y + buffer, z + offset, ico.getMaxU(), ico.getMaxV() );
|
||||||
tess.addVertexWithUV( pos_x + H, pos_y + H, z + offset, ico.getMinU(), ico.getMaxV() );
|
tess.addVertexWithUV( pos_x + buffer, pos_y + buffer, z + offset, ico.getMinU(), ico.getMaxV() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NORTH:
|
case NORTH:
|
||||||
tess.addVertexWithUV( pos_x - H, pos_y - H, z + offset, ico.getMinU(), ico.getMinV() );
|
tess.addVertexWithUV( pos_x - buffer, pos_y - buffer, z + offset, ico.getMinU(), ico.getMinV() );
|
||||||
tess.addVertexWithUV( pos_x + H, pos_y - H, z + offset, ico.getMaxU(), ico.getMinV() );
|
tess.addVertexWithUV( pos_x + buffer, pos_y - buffer, z + offset, ico.getMaxU(), ico.getMinV() );
|
||||||
tess.addVertexWithUV( pos_x + H, pos_y + H, z + offset, ico.getMaxU(), ico.getMaxV() );
|
tess.addVertexWithUV( pos_x + buffer, pos_y + buffer, z + offset, ico.getMaxU(), ico.getMaxV() );
|
||||||
tess.addVertexWithUV( pos_x - H, pos_y + H, z + offset, ico.getMinU(), ico.getMaxV() );
|
tess.addVertexWithUV( pos_x - buffer, pos_y + buffer, z + offset, ico.getMinU(), ico.getMaxV() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -24,6 +24,8 @@ import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
@ -32,8 +34,6 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.ChatComponentText;
|
import net.minecraft.util.ChatComponentText;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
|
||||||
|
|
||||||
import appeng.api.AEApi;
|
import appeng.api.AEApi;
|
||||||
import appeng.api.config.Actionable;
|
import appeng.api.config.Actionable;
|
||||||
import appeng.api.config.SecurityPermissions;
|
import appeng.api.config.SecurityPermissions;
|
||||||
|
@ -323,27 +323,27 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
||||||
|
|
||||||
public void startJob()
|
public void startJob()
|
||||||
{
|
{
|
||||||
GuiBridge OriginalGui = null;
|
GuiBridge originalGui = null;
|
||||||
|
|
||||||
IActionHost ah = this.getActionHost();
|
IActionHost ah = this.getActionHost();
|
||||||
if( ah instanceof WirelessTerminalGuiObject )
|
if( ah instanceof WirelessTerminalGuiObject )
|
||||||
{
|
{
|
||||||
OriginalGui = GuiBridge.GUI_WIRELESS_TERM;
|
originalGui = GuiBridge.GUI_WIRELESS_TERM;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ah instanceof PartTerminal )
|
if( ah instanceof PartTerminal )
|
||||||
{
|
{
|
||||||
OriginalGui = GuiBridge.GUI_ME;
|
originalGui = GuiBridge.GUI_ME;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ah instanceof PartCraftingTerminal )
|
if( ah instanceof PartCraftingTerminal )
|
||||||
{
|
{
|
||||||
OriginalGui = GuiBridge.GUI_CRAFTING_TERMINAL;
|
originalGui = GuiBridge.GUI_CRAFTING_TERMINAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ah instanceof PartPatternTerminal )
|
if( ah instanceof PartPatternTerminal )
|
||||||
{
|
{
|
||||||
OriginalGui = GuiBridge.GUI_PATTERN_TERMINAL;
|
originalGui = GuiBridge.GUI_PATTERN_TERMINAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( this.result != null && !this.simulation )
|
if( this.result != null && !this.simulation )
|
||||||
|
@ -351,12 +351,12 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
||||||
ICraftingGrid cc = this.getGrid().getCache( ICraftingGrid.class );
|
ICraftingGrid cc = this.getGrid().getCache( ICraftingGrid.class );
|
||||||
ICraftingLink g = cc.submitJob( this.result, null, this.selectedCpu == -1 ? null : this.cpus.get( this.selectedCpu ).cpu, true, this.getActionSrc() );
|
ICraftingLink g = cc.submitJob( this.result, null, this.selectedCpu == -1 ? null : this.cpus.get( this.selectedCpu ).cpu, true, this.getActionSrc() );
|
||||||
this.autoStart = false;
|
this.autoStart = false;
|
||||||
if( g != null && OriginalGui != null && this.openContext != null )
|
if( g != null && originalGui != null && this.openContext != null )
|
||||||
{
|
{
|
||||||
NetworkHandler.instance.sendTo( new PacketSwitchGuis( OriginalGui ), (EntityPlayerMP) this.invPlayer.player );
|
NetworkHandler.instance.sendTo( new PacketSwitchGuis( originalGui ), (EntityPlayerMP) this.invPlayer.player );
|
||||||
|
|
||||||
TileEntity te = this.openContext.getTile();
|
TileEntity te = this.openContext.getTile();
|
||||||
Platform.openGUI( this.invPlayer.player, te, this.openContext.side, OriginalGui );
|
Platform.openGUI( this.invPlayer.player, te, this.openContext.side, originalGui );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -240,9 +240,9 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||||
|
|
||||||
this.updatePowerStatus();
|
this.updatePowerStatus();
|
||||||
|
|
||||||
boolean oldCanAccessViewCells = this.canAccessViewCells;
|
boolean oldAccessible = this.canAccessViewCells;
|
||||||
this.canAccessViewCells = this.hasAccess( SecurityPermissions.BUILD, false );
|
this.canAccessViewCells = this.hasAccess( SecurityPermissions.BUILD, false );
|
||||||
if( this.canAccessViewCells != oldCanAccessViewCells )
|
if( this.canAccessViewCells != oldAccessible )
|
||||||
{
|
{
|
||||||
for( int y = 0; y < 5; y++ )
|
for( int y = 0; y < 5; y++ )
|
||||||
{
|
{
|
||||||
|
|
|
@ -84,25 +84,25 @@ public class CraftGuide extends CraftGuideAPIObject implements IIntegrationModul
|
||||||
this.parent = generator;
|
this.parent = generator;
|
||||||
|
|
||||||
RecipeTemplate craftingTemplate;
|
RecipeTemplate craftingTemplate;
|
||||||
RecipeTemplate smallCraftingTemplate;
|
RecipeTemplate smallTemplate;
|
||||||
|
|
||||||
if( uristqwerty.CraftGuide.CraftGuide.newerBackgroundStyle )
|
if( uristqwerty.CraftGuide.CraftGuide.newerBackgroundStyle )
|
||||||
{
|
{
|
||||||
craftingTemplate = generator.createRecipeTemplate( this.craftingSlotsOwnBackground, null );
|
craftingTemplate = generator.createRecipeTemplate( this.craftingSlotsOwnBackground, null );
|
||||||
smallCraftingTemplate = generator.createRecipeTemplate( this.smallCraftingSlotsOwnBackground, null );
|
smallTemplate = generator.createRecipeTemplate( this.smallCraftingSlotsOwnBackground, null );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
craftingTemplate = new DefaultRecipeTemplate( this.craftingSlots, RecipeGeneratorImplementation.workbench, new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 1, 1, 79, 58 ), new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 82, 1, 79, 58 ) );
|
craftingTemplate = new DefaultRecipeTemplate( this.craftingSlots, RecipeGeneratorImplementation.workbench, new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 1, 1, 79, 58 ), new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 82, 1, 79, 58 ) );
|
||||||
|
|
||||||
smallCraftingTemplate = new DefaultRecipeTemplate( this.smallCraftingSlots, RecipeGeneratorImplementation.workbench, new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 1, 61, 79, 58 ), new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 82, 61, 79, 58 ) );
|
smallTemplate = new DefaultRecipeTemplate( this.smallCraftingSlots, RecipeGeneratorImplementation.workbench, new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 1, 61, 79, 58 ), new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 82, 61, 79, 58 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
RecipeTemplate shapelessTemplate = new DefaultRecipeTemplate( this.shapelessCraftingSlots, RecipeGeneratorImplementation.workbench, new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 1, 121, 79, 58 ), new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 82, 121, 79, 58 ) );
|
RecipeTemplate shapelessTemplate = new DefaultRecipeTemplate( this.shapelessCraftingSlots, RecipeGeneratorImplementation.workbench, new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 1, 121, 79, 58 ), new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 82, 121, 79, 58 ) );
|
||||||
|
|
||||||
RecipeTemplate furnaceTemplate = new DefaultRecipeTemplate( this.furnaceSlots, new ItemStack( Blocks.furnace ), new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 1, 181, 79, 58 ), new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 82, 181, 79, 58 ) );
|
RecipeTemplate furnaceTemplate = new DefaultRecipeTemplate( this.furnaceSlots, new ItemStack( Blocks.furnace ), new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 1, 181, 79, 58 ), new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 82, 181, 79, 58 ) );
|
||||||
|
|
||||||
this.addCraftingRecipes( craftingTemplate, smallCraftingTemplate, shapelessTemplate, this );
|
this.addCraftingRecipes( craftingTemplate, smallTemplate, shapelessTemplate, this );
|
||||||
this.addGrinderRecipes( furnaceTemplate, this );
|
this.addGrinderRecipes( furnaceTemplate, this );
|
||||||
this.addInscriberRecipes( furnaceTemplate, this );
|
this.addInscriberRecipes( furnaceTemplate, this );
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,16 +95,16 @@ public class NEI extends BaseModule implements INEI, IContainerTooltipHandler
|
||||||
|
|
||||||
// crafting terminal...
|
// crafting terminal...
|
||||||
Method registerGuiOverlay = this.apiClass.getDeclaredMethod( "registerGuiOverlay", Class.class, String.class, IStackPositioner.class );
|
Method registerGuiOverlay = this.apiClass.getDeclaredMethod( "registerGuiOverlay", Class.class, String.class, IStackPositioner.class );
|
||||||
Class IOverlayHandler = Class.forName( "codechicken.nei.api.IOverlayHandler" );
|
Class overlayHandler = Class.forName( "codechicken.nei.api.IOverlayHandler" );
|
||||||
Class DefaultOverlayHandler = NEICraftingHandler.class;
|
Class defaultHandler = NEICraftingHandler.class;
|
||||||
|
|
||||||
Method registerGuiOverlayHandler = this.apiClass.getDeclaredMethod( "registerGuiOverlayHandler", Class.class, IOverlayHandler, String.class );
|
Method registrar = this.apiClass.getDeclaredMethod( "registerGuiOverlayHandler", Class.class, overlayHandler, String.class );
|
||||||
registerGuiOverlay.invoke( this.apiClass, GuiCraftingTerm.class, "crafting", new TerminalCraftingSlotFinder() );
|
registerGuiOverlay.invoke( this.apiClass, GuiCraftingTerm.class, "crafting", new TerminalCraftingSlotFinder() );
|
||||||
registerGuiOverlay.invoke( this.apiClass, GuiPatternTerm.class, "crafting", new TerminalCraftingSlotFinder() );
|
registerGuiOverlay.invoke( this.apiClass, GuiPatternTerm.class, "crafting", new TerminalCraftingSlotFinder() );
|
||||||
|
|
||||||
Constructor DefaultOverlayHandlerConstructor = DefaultOverlayHandler.getConstructor( int.class, int.class );
|
Constructor defaultConstructor = defaultHandler.getConstructor( int.class, int.class );
|
||||||
registerGuiOverlayHandler.invoke( this.apiClass, GuiCraftingTerm.class, DefaultOverlayHandlerConstructor.newInstance( 6, 75 ), "crafting" );
|
registrar.invoke( this.apiClass, GuiCraftingTerm.class, defaultConstructor.newInstance( 6, 75 ), "crafting" );
|
||||||
registerGuiOverlayHandler.invoke( this.apiClass, GuiPatternTerm.class, DefaultOverlayHandlerConstructor.newInstance( 6, 75 ), "crafting" );
|
registrar.invoke( this.apiClass, GuiPatternTerm.class, defaultConstructor.newInstance( 6, 75 ), "crafting" );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void registerRecipeHandler( Object o ) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
|
public void registerRecipeHandler( Object o ) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
|
||||||
|
|
|
@ -193,13 +193,13 @@ public class BSCrateStorageAdaptor extends InventoryAdaptor
|
||||||
public ItemStack simulateAdd( ItemStack toBeSimulated )
|
public ItemStack simulateAdd( ItemStack toBeSimulated )
|
||||||
{
|
{
|
||||||
int items = this.cs.getSpaceForItem( toBeSimulated );
|
int items = this.cs.getSpaceForItem( toBeSimulated );
|
||||||
ItemStack B = Platform.cloneItemStack( toBeSimulated );
|
ItemStack cloned = Platform.cloneItemStack( toBeSimulated );
|
||||||
if( toBeSimulated.stackSize <= items )
|
if( toBeSimulated.stackSize <= items )
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
B.stackSize -= items;
|
cloned.stackSize -= items;
|
||||||
return B;
|
return cloned;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -22,6 +22,8 @@ package appeng.items.tools.powered;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.google.common.base.Optional;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockDispenser;
|
import net.minecraft.block.BlockDispenser;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
|
@ -41,8 +43,6 @@ import net.minecraft.util.Vec3;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import com.google.common.base.Optional;
|
|
||||||
|
|
||||||
import appeng.api.AEApi;
|
import appeng.api.AEApi;
|
||||||
import appeng.api.config.Actionable;
|
import appeng.api.config.Actionable;
|
||||||
import appeng.api.config.FuzzyMode;
|
import appeng.api.config.FuzzyMode;
|
||||||
|
@ -325,10 +325,10 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||||
|
|
||||||
private void standardAmmo( float penetration, World w, EntityPlayer p, Vec3 vec3, Vec3 vec31, Vec3 direction, double d0, double d1, double d2 )
|
private void standardAmmo( float penetration, World w, EntityPlayer p, Vec3 vec3, Vec3 vec31, Vec3 direction, double d0, double d1, double d2 )
|
||||||
{
|
{
|
||||||
boolean hasDestroyedSomething = true;
|
boolean hasDestroyed = true;
|
||||||
while( penetration > 0 && hasDestroyedSomething )
|
while( penetration > 0 && hasDestroyed )
|
||||||
{
|
{
|
||||||
hasDestroyedSomething = false;
|
hasDestroyed = false;
|
||||||
|
|
||||||
AxisAlignedBB bb = AxisAlignedBB.getBoundingBox( Math.min( vec3.xCoord, vec31.xCoord ), Math.min( vec3.yCoord, vec31.yCoord ), Math.min( vec3.zCoord, vec31.zCoord ), Math.max( vec3.xCoord, vec31.xCoord ), Math.max( vec3.yCoord, vec31.yCoord ), Math.max( vec3.zCoord, vec31.zCoord ) ).expand( 16, 16, 16 );
|
AxisAlignedBB bb = AxisAlignedBB.getBoundingBox( Math.min( vec3.xCoord, vec31.xCoord ), Math.min( vec3.yCoord, vec31.yCoord ), Math.min( vec3.zCoord, vec31.zCoord ), Math.max( vec3.xCoord, vec31.xCoord ), Math.max( vec3.yCoord, vec31.yCoord ), Math.max( vec3.zCoord, vec31.zCoord ) ).expand( 16, 16, 16 );
|
||||||
|
|
||||||
|
@ -408,17 +408,17 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||||
el.attackEntityFrom( dmgSrc, dmg );
|
el.attackEntityFrom( dmgSrc, dmg );
|
||||||
if( !el.isEntityAlive() )
|
if( !el.isEntityAlive() )
|
||||||
{
|
{
|
||||||
hasDestroyedSomething = true;
|
hasDestroyed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( pos.entityHit instanceof EntityItem )
|
else if( pos.entityHit instanceof EntityItem )
|
||||||
{
|
{
|
||||||
hasDestroyedSomething = true;
|
hasDestroyed = true;
|
||||||
pos.entityHit.setDead();
|
pos.entityHit.setDead();
|
||||||
}
|
}
|
||||||
else if( pos.entityHit.attackEntityFrom( dmgSrc, dmg ) )
|
else if( pos.entityHit.attackEntityFrom( dmgSrc, dmg ) )
|
||||||
{
|
{
|
||||||
hasDestroyedSomething = true;
|
hasDestroyed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( pos.typeOfHit == MovingObjectType.BLOCK )
|
else if( pos.typeOfHit == MovingObjectType.BLOCK )
|
||||||
|
@ -438,7 +438,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||||
{
|
{
|
||||||
if( penetration > hardness && Platform.hasPermissions( new DimensionalCoord( w, pos.blockX, pos.blockY, pos.blockZ ), p ) )
|
if( penetration > hardness && Platform.hasPermissions( new DimensionalCoord( w, pos.blockX, pos.blockY, pos.blockZ ), p ) )
|
||||||
{
|
{
|
||||||
hasDestroyedSomething = true;
|
hasDestroyed = true;
|
||||||
penetration -= hardness;
|
penetration -= hardness;
|
||||||
penetration *= 0.60;
|
penetration *= 0.60;
|
||||||
w.func_147480_a( pos.blockX, pos.blockY, pos.blockZ, true );
|
w.func_147480_a( pos.blockX, pos.blockY, pos.blockZ, true );
|
||||||
|
|
|
@ -164,40 +164,40 @@ public class PartP2PIC2Power extends PartP2PTunnel<PartP2PIC2Power> implements i
|
||||||
return amount;
|
return amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
LinkedList<PartP2PIC2Power> Options = new LinkedList<PartP2PIC2Power>();
|
LinkedList<PartP2PIC2Power> options = new LinkedList<PartP2PIC2Power>();
|
||||||
for( PartP2PIC2Power o : outs )
|
for( PartP2PIC2Power o : outs )
|
||||||
{
|
{
|
||||||
if( o.OutputEnergyA <= 0.01 )
|
if( o.OutputEnergyA <= 0.01 )
|
||||||
{
|
{
|
||||||
Options.add( o );
|
options.add( o );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( Options.isEmpty() )
|
if( options.isEmpty() )
|
||||||
{
|
{
|
||||||
for( PartP2PIC2Power o : outs )
|
for( PartP2PIC2Power o : outs )
|
||||||
{
|
{
|
||||||
if( o.OutputEnergyB <= 0.01 )
|
if( o.OutputEnergyB <= 0.01 )
|
||||||
{
|
{
|
||||||
Options.add( o );
|
options.add( o );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( Options.isEmpty() )
|
if( options.isEmpty() )
|
||||||
{
|
{
|
||||||
for( PartP2PIC2Power o : outs )
|
for( PartP2PIC2Power o : outs )
|
||||||
{
|
{
|
||||||
Options.add( o );
|
options.add( o );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( Options.isEmpty() )
|
if( options.isEmpty() )
|
||||||
{
|
{
|
||||||
return amount;
|
return amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
PartP2PIC2Power x = Platform.pickRandom( Options );
|
PartP2PIC2Power x = Platform.pickRandom( options );
|
||||||
|
|
||||||
if( x != null && x.OutputEnergyA <= 0.001 )
|
if( x != null && x.OutputEnergyA <= 0.001 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,9 +46,9 @@ public class GroupIngredient implements IIngredient
|
||||||
{
|
{
|
||||||
this.name = myName;
|
this.name = myName;
|
||||||
|
|
||||||
for( IIngredient I : ingredients )
|
for( IIngredient ingredient : ingredients )
|
||||||
{
|
{
|
||||||
if( I.isAir() )
|
if( ingredient.isAir() )
|
||||||
{
|
{
|
||||||
throw new RecipeError( "Cannot include air in a group." );
|
throw new RecipeError( "Cannot include air in a group." );
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,9 @@ import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipOutputStream;
|
import java.util.zip.ZipOutputStream;
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
import com.google.common.base.Optional;
|
||||||
|
import com.google.common.collect.HashMultimap;
|
||||||
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
@ -38,9 +41,6 @@ import cpw.mods.fml.common.LoaderState;
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier;
|
import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier;
|
||||||
|
|
||||||
import com.google.common.base.Optional;
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
|
|
||||||
import appeng.api.AEApi;
|
import appeng.api.AEApi;
|
||||||
import appeng.api.definitions.IBlocks;
|
import appeng.api.definitions.IBlocks;
|
||||||
import appeng.api.definitions.IDefinitions;
|
import appeng.api.definitions.IDefinitions;
|
||||||
|
@ -128,8 +128,8 @@ public class RecipeHandler implements IRecipeHandler
|
||||||
|
|
||||||
final Optional<Item> maybeCrystalSeedItem = items.crystalSeed().maybeItem();
|
final Optional<Item> maybeCrystalSeedItem = items.crystalSeed().maybeItem();
|
||||||
final Optional<Item> maybeSkyStoneItem = blocks.skyStone().maybeItem();
|
final Optional<Item> maybeSkyStoneItem = blocks.skyStone().maybeItem();
|
||||||
final Optional<Item> maybeCraftingStorageItem = blocks.craftingStorage1k().maybeItem();
|
final Optional<Item> maybeCStorageItem = blocks.craftingStorage1k().maybeItem();
|
||||||
final Optional<Item> maybeCraftingUnitItem = blocks.craftingUnit().maybeItem();
|
final Optional<Item> maybeCUnitItem = blocks.craftingUnit().maybeItem();
|
||||||
final Optional<Item> maybeSkyChestItem = blocks.skyChest().maybeItem();
|
final Optional<Item> maybeSkyChestItem = blocks.skyChest().maybeItem();
|
||||||
|
|
||||||
if( maybeCrystalSeedItem.isPresent() && is.getItem() == maybeCrystalSeedItem.get() )
|
if( maybeCrystalSeedItem.isPresent() && is.getItem() == maybeCrystalSeedItem.get() )
|
||||||
|
@ -164,7 +164,7 @@ public class RecipeHandler implements IRecipeHandler
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( maybeCraftingStorageItem.isPresent() && is.getItem() == maybeCraftingStorageItem.get() )
|
else if( maybeCStorageItem.isPresent() && is.getItem() == maybeCStorageItem.get() )
|
||||||
{
|
{
|
||||||
switch( is.getItemDamage() )
|
switch( is.getItemDamage() )
|
||||||
{
|
{
|
||||||
|
@ -180,7 +180,7 @@ public class RecipeHandler implements IRecipeHandler
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( maybeCraftingUnitItem.isPresent() && is.getItem() == maybeCraftingUnitItem.get() )
|
else if( maybeCUnitItem.isPresent() && is.getItem() == maybeCUnitItem.get() )
|
||||||
{
|
{
|
||||||
switch( is.getItemDamage() )
|
switch( is.getItemDamage() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -191,7 +191,7 @@ public class Platform
|
||||||
p = PowerUnits.AE.convertTo( displayUnits, p );
|
p = PowerUnits.AE.convertTo( displayUnits, p );
|
||||||
|
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
String Lvl = "";
|
String level = "";
|
||||||
String[] preFixes = new String[] { "k", "M", "G", "T", "P", "T", "P", "E", "Z", "Y" };
|
String[] preFixes = new String[] { "k", "M", "G", "T", "P", "T", "P", "E", "Z", "Y" };
|
||||||
String unitName = displayUnits.name();
|
String unitName = displayUnits.name();
|
||||||
|
|
||||||
|
@ -208,12 +208,12 @@ public class Platform
|
||||||
while( p > 1000 && offset < preFixes.length )
|
while( p > 1000 && offset < preFixes.length )
|
||||||
{
|
{
|
||||||
p /= 1000;
|
p /= 1000;
|
||||||
Lvl = preFixes[offset];
|
level = preFixes[offset];
|
||||||
offset++;
|
offset++;
|
||||||
}
|
}
|
||||||
|
|
||||||
DecimalFormat df = new DecimalFormat( "#.##" );
|
DecimalFormat df = new DecimalFormat( "#.##" );
|
||||||
return df.format( p ) + ' ' + Lvl + unitName + ( isRate ? "/t" : "" );
|
return df.format( p ) + ' ' + level + unitName + ( isRate ? "/t" : "" );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ForgeDirection crossProduct( ForgeDirection forward, ForgeDirection up )
|
public static ForgeDirection crossProduct( ForgeDirection forward, ForgeDirection up )
|
||||||
|
@ -1273,10 +1273,10 @@ public class Platform
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float APercentDamaged = 1.0f - (float) a.getItemDamageForDisplay() / (float) a.getMaxDamage();
|
float percentDamagedOfA = 1.0f - (float) a.getItemDamageForDisplay() / (float) a.getMaxDamage();
|
||||||
float BPercentDamaged = 1.0f - (float) b.getItemDamageForDisplay() / (float) b.getMaxDamage();
|
float percentDamagedOfB = 1.0f - (float) b.getItemDamageForDisplay() / (float) b.getMaxDamage();
|
||||||
|
|
||||||
return ( APercentDamaged > mode.breakPoint ) == ( BPercentDamaged > mode.breakPoint );
|
return ( percentDamagedOfA > mode.breakPoint ) == ( percentDamagedOfB > mode.breakPoint );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch( Throwable e )
|
catch( Throwable e )
|
||||||
|
@ -1291,10 +1291,10 @@ public class Platform
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float APercentDamaged = (float) a.getItemDamage() / (float) a.getMaxDamage();
|
float percentDamagedOfA = (float) a.getItemDamage() / (float) a.getMaxDamage();
|
||||||
float BPercentDamaged = (float) b.getItemDamage() / (float) b.getMaxDamage();
|
float percentDamagedOfB = (float) b.getItemDamage() / (float) b.getMaxDamage();
|
||||||
|
|
||||||
return ( APercentDamaged > mode.breakPoint ) == ( BPercentDamaged > mode.breakPoint );
|
return ( percentDamagedOfA > mode.breakPoint ) == ( percentDamagedOfB > mode.breakPoint );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1649,9 +1649,9 @@ public class Platform
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
for( Integer Side : sides )
|
for( int side : sides )
|
||||||
{
|
{
|
||||||
int c = ( Side << ( offset % 8 ) ) ^ ( 1 << dir.ordinal() );
|
int c = ( side << ( offset % 8 ) ) ^ ( 1 << dir.ordinal() );
|
||||||
offset++;
|
offset++;
|
||||||
hash = c + ( hash << 6 ) + ( hash << 16 ) - hash;
|
hash = c + ( hash << 6 ) + ( hash << 16 ) - hash;
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,8 +113,8 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||||
{
|
{
|
||||||
byte mask = data.readByte();
|
byte mask = data.readByte();
|
||||||
// byte PriorityType = (byte) (mask & 0x03);
|
// byte PriorityType = (byte) (mask & 0x03);
|
||||||
byte StackType = (byte) ( ( mask & 0x0C ) >> 2 );
|
byte stackType = (byte) ( ( mask & 0x0C ) >> 2 );
|
||||||
byte CountReqType = (byte) ( ( mask & 0x30 ) >> 4 );
|
byte countReqType = (byte) ( ( mask & 0x30 ) >> 4 );
|
||||||
boolean isCraftable = ( mask & 0x40 ) > 0;
|
boolean isCraftable = ( mask & 0x40 ) > 0;
|
||||||
boolean hasTagCompound = ( mask & 0x80 ) > 0;
|
boolean hasTagCompound = ( mask & 0x80 ) > 0;
|
||||||
|
|
||||||
|
@ -140,8 +140,8 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||||
}
|
}
|
||||||
|
|
||||||
// long priority = getPacketValue( PriorityType, data );
|
// long priority = getPacketValue( PriorityType, data );
|
||||||
long stackSize = getPacketValue( StackType, data );
|
long stackSize = getPacketValue( stackType, data );
|
||||||
long countRequestable = getPacketValue( CountReqType, data );
|
long countRequestable = getPacketValue( countReqType, data );
|
||||||
|
|
||||||
FluidStack fluidStack = FluidStack.loadFluidStackFromNBT( d );
|
FluidStack fluidStack = FluidStack.loadFluidStackFromNBT( d );
|
||||||
if( fluidStack == null )
|
if( fluidStack == null )
|
||||||
|
|
|
@ -147,8 +147,8 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||||
{
|
{
|
||||||
byte mask = data.readByte();
|
byte mask = data.readByte();
|
||||||
// byte PriorityType = (byte) (mask & 0x03);
|
// byte PriorityType = (byte) (mask & 0x03);
|
||||||
byte StackType = (byte) ( ( mask & 0x0C ) >> 2 );
|
byte stackType = (byte) ( ( mask & 0x0C ) >> 2 );
|
||||||
byte CountReqType = (byte) ( ( mask & 0x30 ) >> 4 );
|
byte countReqType = (byte) ( ( mask & 0x30 ) >> 4 );
|
||||||
boolean isCraftable = ( mask & 0x40 ) > 0;
|
boolean isCraftable = ( mask & 0x40 ) > 0;
|
||||||
boolean hasTagCompound = ( mask & 0x80 ) > 0;
|
boolean hasTagCompound = ( mask & 0x80 ) > 0;
|
||||||
|
|
||||||
|
@ -171,8 +171,8 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||||
}
|
}
|
||||||
|
|
||||||
// long priority = getPacketValue( PriorityType, data );
|
// long priority = getPacketValue( PriorityType, data );
|
||||||
long stackSize = getPacketValue( StackType, data );
|
long stackSize = getPacketValue( stackType, data );
|
||||||
long countRequestable = getPacketValue( CountReqType, data );
|
long countRequestable = getPacketValue( countReqType, data );
|
||||||
|
|
||||||
ItemStack itemstack = ItemStack.loadItemStackFromNBT( d );
|
ItemStack itemstack = ItemStack.loadItemStackFromNBT( d );
|
||||||
if( itemstack == null )
|
if( itemstack == null )
|
||||||
|
@ -289,10 +289,10 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float APercentDamaged = 1.0f - (float) a.getItemDamageForDisplay() / (float) a.getMaxDamage();
|
float percentDamageOfA = 1.0f - (float) a.getItemDamageForDisplay() / (float) a.getMaxDamage();
|
||||||
float BPercentDamaged = 1.0f - (float) b.getItemDamageForDisplay() / (float) b.getMaxDamage();
|
float percentDamageOfB = 1.0f - (float) b.getItemDamageForDisplay() / (float) b.getMaxDamage();
|
||||||
|
|
||||||
return ( APercentDamaged > mode.breakPoint ) == ( BPercentDamaged > mode.breakPoint );
|
return ( percentDamageOfA > mode.breakPoint ) == ( percentDamageOfB > mode.breakPoint );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch( Throwable e )
|
catch( Throwable e )
|
||||||
|
@ -307,10 +307,10 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float APercentDamaged = (float) a.getItemDamage() / (float) a.getMaxDamage();
|
float percentDamageOfA = (float) a.getItemDamage() / (float) a.getMaxDamage();
|
||||||
float BPercentDamaged = (float) b.getItemDamage() / (float) b.getMaxDamage();
|
float percentDamageOfB = (float) b.getItemDamage() / (float) b.getMaxDamage();
|
||||||
|
|
||||||
return ( APercentDamaged > mode.breakPoint ) == ( BPercentDamaged > mode.breakPoint );
|
return ( percentDamageOfA > mode.breakPoint ) == ( percentDamageOfB > mode.breakPoint );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -343,10 +343,10 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float APercentDamaged = 1.0f - (float) a.getItemDamageForDisplay() / (float) a.getMaxDamage();
|
float percentDamageOfA = 1.0f - (float) a.getItemDamageForDisplay() / (float) a.getMaxDamage();
|
||||||
float BPercentDamaged = 1.0f - (float) o.getItemDamageForDisplay() / (float) o.getMaxDamage();
|
float percentDamageOfB = 1.0f - (float) o.getItemDamageForDisplay() / (float) o.getMaxDamage();
|
||||||
|
|
||||||
return ( APercentDamaged > mode.breakPoint ) == ( BPercentDamaged > mode.breakPoint );
|
return ( percentDamageOfA > mode.breakPoint ) == ( percentDamageOfB > mode.breakPoint );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch( Throwable e )
|
catch( Throwable e )
|
||||||
|
@ -361,10 +361,10 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float APercentDamaged = (float) a.getItemDamage() / (float) a.getMaxDamage();
|
float percentDamageOfA = (float) a.getItemDamage() / (float) a.getMaxDamage();
|
||||||
float BPercentDamaged = (float) o.getItemDamage() / (float) o.getMaxDamage();
|
float percentDamageOfB = (float) o.getItemDamage() / (float) o.getMaxDamage();
|
||||||
|
|
||||||
return ( APercentDamaged > mode.breakPoint ) == ( BPercentDamaged > mode.breakPoint );
|
return ( percentDamageOfA > mode.breakPoint ) == ( percentDamageOfB > mode.breakPoint );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -437,10 +437,10 @@ public final class MeteoritePlacer
|
||||||
|
|
||||||
public double getSqDistance( int x, int z )
|
public double getSqDistance( int x, int z )
|
||||||
{
|
{
|
||||||
int Cx = this.settings.getInteger( "x" ) - x;
|
int chunkX = this.settings.getInteger( "x" ) - x;
|
||||||
int Cz = this.settings.getInteger( "z" ) - z;
|
int chunkZ = this.settings.getInteger( "z" ) - z;
|
||||||
|
|
||||||
return Cx * Cx + Cz * Cz;
|
return chunkX * chunkX + chunkZ * chunkZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean spawnMeteorite( IMeteoriteWorld w, int x, int y, int z )
|
public boolean spawnMeteorite( IMeteoriteWorld w, int x, int y, int z )
|
||||||
|
|
Loading…
Reference in a new issue