Merge branch 'master' of https://bitbucket.org/AlgorithmX2/appliedenergistics2 into rv1
This commit is contained in:
commit
87bd8f3c22
|
@ -187,8 +187,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||
this( c, mat, null );
|
||||
setLightOpacity( 15 );
|
||||
setLightLevel( 0 );
|
||||
setHardness( 1.2F );
|
||||
setHardness( 2.2F );
|
||||
setTileProvider( false );
|
||||
setHarvestLevel( "pickaxe", 0 );
|
||||
}
|
||||
|
||||
// update Block value.
|
||||
|
|
|
@ -19,6 +19,7 @@ public class BlockGrinder extends AEBaseBlock
|
|||
super( BlockGrinder.class, Material.rock );
|
||||
setfeature( EnumSet.of( AEFeature.GrindStone ) );
|
||||
setTileEntiy( TileGrinder.class );
|
||||
setHardness( 3.2F );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -27,7 +28,7 @@ public class BlockGrinder extends AEBaseBlock
|
|||
TileGrinder tg = getTileEntity( w, x, y, z );
|
||||
if ( tg != null && !p.isSneaking() )
|
||||
{
|
||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation(side),GuiBridge.GUI_GRINDER );
|
||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_GRINDER );
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -25,6 +25,7 @@ public class BlockVibrationChamber extends AEBaseBlock
|
|||
super( BlockVibrationChamber.class, Material.iron );
|
||||
setfeature( EnumSet.of( AEFeature.PowerGen ) );
|
||||
setTileEntiy( TileVibrationChamber.class );
|
||||
setHardness( 4.2F );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -46,8 +46,17 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
|||
@SubscribeEvent
|
||||
public void breakFaster(PlayerEvent.BreakSpeed Ev)
|
||||
{
|
||||
if ( Ev.block == this && (Ev.originalSpeed > 7 || Ev.metadata > 0) )
|
||||
Ev.newSpeed /= 0.1;
|
||||
if ( Ev.block == this && Ev.entityPlayer != null )
|
||||
{
|
||||
ItemStack is = Ev.entityPlayer.inventory.getCurrentItem();
|
||||
int level = -1;
|
||||
|
||||
if ( is != null )
|
||||
level = is.getItem().getHarvestLevel( is, "pickaxe" );
|
||||
|
||||
if ( Ev.metadata > 0 || level >= 3 || Ev.originalSpeed > 7.0 )
|
||||
Ev.newSpeed /= 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
public BlockSkyStone() {
|
||||
|
|
|
@ -274,9 +274,18 @@ public class MeteoritePlacer
|
|||
{
|
||||
boolean lava = Math.random() > 0.9;
|
||||
|
||||
for (int i = x - 30; i < x + 30; i++)
|
||||
for (int j = y - 5; j < y + 40; j++)
|
||||
for (int k = z - 30; k < z + 30; k++)
|
||||
int maxY = Math.min( y + 20, 255 );
|
||||
int minX = x - 40;
|
||||
int maxX = x + 40;
|
||||
int minZ = z - 40;
|
||||
int maxZ = z + 40;
|
||||
|
||||
for (int j = y - 5; j < maxY; j++)
|
||||
{
|
||||
boolean changed = false;
|
||||
|
||||
for (int i = minX; i < maxX; i++)
|
||||
for (int k = minZ; k < maxZ; k++)
|
||||
{
|
||||
double dx = i - x;
|
||||
double dz = k - z;
|
||||
|
@ -292,10 +301,22 @@ public class MeteoritePlacer
|
|||
put( w, i, j, k, Blocks.lava );
|
||||
}
|
||||
else
|
||||
put( w, i, j, k, Platform.air );
|
||||
changed = put( w, i, j, k, Platform.air ) || changed;
|
||||
}
|
||||
}
|
||||
|
||||
if ( changed && j > maxY - 5 )
|
||||
{
|
||||
maxY = Math.min( maxY + 5, 255 );
|
||||
|
||||
minX -= 7;
|
||||
maxX += 7;
|
||||
|
||||
minZ -= 7;
|
||||
maxZ += 7;
|
||||
}
|
||||
}
|
||||
|
||||
for (Object o : w.getEntitiesWithinAABB( EntityItem.class, AxisAlignedBB.getBoundingBox( x - 30, y - 5, z - 30, x + 30, y + 30, z + 30 ) ))
|
||||
{
|
||||
Entity e = (Entity) o;
|
||||
|
@ -476,12 +497,15 @@ public class MeteoritePlacer
|
|||
}
|
||||
}
|
||||
|
||||
private void put(World w, int i, int j, int k, Block blk)
|
||||
private boolean put(World w, int i, int j, int k, Block blk)
|
||||
{
|
||||
if ( w.getBlock( i, j, k ) == Blocks.bedrock )
|
||||
return;
|
||||
Block original = w.getBlock( i, j, k );
|
||||
|
||||
if ( original == Blocks.bedrock || original == blk )
|
||||
return false;
|
||||
|
||||
w.setBlock( i, j, k, blk );
|
||||
return true;
|
||||
}
|
||||
|
||||
private void put(World w, int i, int j, int k, Block blk, int meta)
|
||||
|
|
|
@ -77,12 +77,10 @@ public class TileEnergyAcceptor extends AENetworkPowerTile
|
|||
try
|
||||
{
|
||||
IEnergyGrid grid = gridProxy.getEnergy();
|
||||
double overFlow = grid.injectPower( newPower, Actionable.SIMULATE );
|
||||
|
||||
if ( mode == Actionable.MODULATE )
|
||||
grid.injectPower( Math.max( 0.0, newPower - overFlow ), Actionable.MODULATE );
|
||||
|
||||
return super.funnelPowerIntoStorage( overFlow, mode );
|
||||
double leftOver = grid.injectPower( newPower, mode );
|
||||
if ( mode == Actionable.SIMULATE )
|
||||
return leftOver;
|
||||
return 0.0;
|
||||
}
|
||||
catch (GridAccessException e)
|
||||
{
|
||||
|
|
|
@ -73,7 +73,6 @@ public abstract class IC2 extends MinecraftJoules6 implements IEnergySink
|
|||
super.setPowerSides( sides );
|
||||
removeFromENet();
|
||||
addToENet();
|
||||
|
||||
}
|
||||
|
||||
final private void addToENet()
|
||||
|
|
|
@ -30,6 +30,10 @@ public abstract class MinecraftJoules6 extends MinecraftJoules5 implements IBatt
|
|||
@Method(iname = "MJ6")
|
||||
public double addEnergy(double amount)
|
||||
{
|
||||
double demand = getExternalPowerDemand( PowerUnits.MJ, Double.MAX_VALUE );
|
||||
if ( amount > demand )
|
||||
amount = demand;
|
||||
|
||||
double overflow = injectExternalPower( PowerUnits.MJ, amount );
|
||||
return amount - overflow;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue