Just a few fixes for 7.1.18, whenever it comes out.
This commit is contained in:
parent
c50632d93f
commit
3668dc883a
5
buildcraft_resources/changelog/7.1.18
Normal file
5
buildcraft_resources/changelog/7.1.18
Normal file
|
@ -0,0 +1,5 @@
|
|||
Bugs fixed:
|
||||
|
||||
* [#3262] Builders and fillers not working above y=128 in the end (AlexIIL)
|
||||
* [#3395] Filler in the Nether - Crash (AlexIIL)
|
||||
* [#3283] Engine Blocks can be crafted, even if they were disabled in the config (AlexIIL)
|
|
@ -53,6 +53,9 @@ public class BlockEngine extends BlockEngineBase {
|
|||
|
||||
@Override
|
||||
public TileEntity createTileEntity(World world, int metadata) {
|
||||
if (engineTiles[metadata] == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return (TileEntity) engineTiles[metadata].newInstance();
|
||||
} catch (Exception e) {
|
||||
|
@ -71,6 +74,7 @@ public class BlockEngine extends BlockEngineBase {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasEngine(int meta) {
|
||||
return engineTiles[meta] != null;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ public class SpringPopulate {
|
|||
|
||||
world.setBlock(posX, y + 1, posZ, BuildCraftCore.springBlock);
|
||||
|
||||
for (int j = y + 2; j < world.getActualHeight(); j++) {
|
||||
for (int j = y + 2; j < world.getHeight(); j++) {
|
||||
if (world.isAirBlock(posX, j, posZ)) {
|
||||
break;
|
||||
} else {
|
||||
|
|
|
@ -29,7 +29,7 @@ public class PatternHorizon extends FillerPattern {
|
|||
int zMin = (int) box.pMin().z;
|
||||
|
||||
int xMax = (int) box.pMax().x;
|
||||
int yMax = world.getActualHeight();
|
||||
int yMax = world.getHeight();
|
||||
int zMax = (int) box.pMax().z;
|
||||
|
||||
Template bpt = new Template(box.sizeX(), yMax - yMin + 1, box.sizeZ());
|
||||
|
|
|
@ -34,6 +34,7 @@ import buildcraft.api.events.BlockInteractionEvent;
|
|||
import buildcraft.api.transport.IItemPipe;
|
||||
import buildcraft.core.lib.block.BlockBuildCraft;
|
||||
import buildcraft.core.lib.render.ICustomHighlight;
|
||||
import buildcraft.core.lib.utils.Utils;
|
||||
|
||||
public abstract class BlockEngineBase extends BlockBuildCraft implements ICustomHighlight {
|
||||
private static final AxisAlignedBB[][] boxes = {
|
||||
|
@ -256,4 +257,11 @@ public abstract class BlockEngineBase extends BlockBuildCraft implements ICustom
|
|||
public abstract String getUnlocalizedName(int metadata);
|
||||
|
||||
public abstract TileEntity createTileEntity(World world, int metadata);
|
||||
|
||||
/**
|
||||
* Checks to see if this block has an engine tile for the given metadata.
|
||||
*
|
||||
* Used for checking in {@link Utils#isRegistered(net.minecraft.item.ItemStack)}
|
||||
*/
|
||||
public abstract boolean hasEngine(int meta);
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ import buildcraft.core.DefaultProps;
|
|||
import buildcraft.core.internal.IDropControlInventory;
|
||||
import buildcraft.core.internal.IFramePipeConnection;
|
||||
import buildcraft.core.lib.block.TileBuildCraft;
|
||||
import buildcraft.core.lib.engines.BlockEngineBase;
|
||||
import buildcraft.core.lib.inventory.ITransactor;
|
||||
import buildcraft.core.lib.inventory.InvUtils;
|
||||
import buildcraft.core.lib.inventory.Transactor;
|
||||
|
@ -80,7 +81,14 @@ public final class Utils {
|
|||
}
|
||||
|
||||
public static boolean isRegistered(ItemStack stack) {
|
||||
return stack != null && isRegistered(stack.getItem());
|
||||
if (stack == null) {
|
||||
return false;
|
||||
}
|
||||
Block block = Block.getBlockFromItem(stack.getItem());
|
||||
if (block instanceof BlockEngineBase) {
|
||||
return isRegistered(block) && ((BlockEngineBase) block).hasEngine(stack.getItemDamage());
|
||||
}
|
||||
return isRegistered(stack.getItem());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,7 +26,7 @@ public class DimensionProperty implements IWorldAccess {
|
|||
|
||||
public DimensionProperty(World iWorld, WorldProperty iProp) {
|
||||
world = iWorld;
|
||||
worldHeight = iWorld.getActualHeight();
|
||||
worldHeight = iWorld.getHeight();
|
||||
world.addWorldAccess(this);
|
||||
worldProperty = iProp;
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ public final class OilPopulate {
|
|||
wellHeight = LARGE_WELL_HEIGHT;
|
||||
}
|
||||
int maxHeight = groundLevel + wellHeight;
|
||||
if (maxHeight >= world.getActualHeight() - 1) {
|
||||
if (maxHeight >= world.getHeight() - 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -103,9 +103,12 @@ public class TileRefinery extends TileBuildCraft implements IFluidHandler, IHasW
|
|||
|
||||
if (getBattery().useEnergy(craftingResult.energyCost, craftingResult.energyCost, false) > 0) {
|
||||
CraftingResult<FluidStack> r = currentRecipe.craft(this, false);
|
||||
if (r != null && r.crafted != null) {
|
||||
// Shouldn't really happen, but its not properly documented
|
||||
result.fill(r.crafted.copy(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasWork() {
|
||||
|
|
|
@ -61,7 +61,7 @@ public class BoardRobotBomber extends RedstoneBoardRobot {
|
|||
startDelegateAI(new AIRobotSearchRandomGroundBlock(robot, 100, new IBlockFilter() {
|
||||
@Override
|
||||
public boolean matches(World world, int x, int y, int z) {
|
||||
return y < world.getActualHeight() - flyingHeight && !world.isAirBlock(x, y, z);
|
||||
return y < world.getHeight() - flyingHeight && !world.isAirBlock(x, y, z);
|
||||
}
|
||||
}, robot.getZoneToWork()));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue