Merge branch '6.3.x' of github.com:BuildCraft/BuildCraft into 6.4.x

Conflicts:
	common/buildcraft/robots/boards/BoardRobotPlanter.java
	common/buildcraft/transport/ItemFacade.java
	common/buildcraft/transport/TileGenericPipe.java
	common/buildcraft/transport/render/FacadeBlockAccess.java
This commit is contained in:
asiekierka 2015-01-24 09:35:48 +01:00
commit f5c3220c53
23 changed files with 160 additions and 92 deletions

View file

@ -22,12 +22,12 @@ apply plugin: 'forge' // adds the forge dependency
apply plugin: 'maven' // for uploading to a maven repo apply plugin: 'maven' // for uploading to a maven repo
apply plugin: 'checkstyle' apply plugin: 'checkstyle'
version = "6.3.1" version = "6.3.3"
group= "com.mod-buildcraft" group= "com.mod-buildcraft"
archivesBaseName = "buildcraft" // the name that all artifacts will use as a base. artifacts names follow this pattern: [baseName]-[appendix]-[version]-[classifier].[extension] archivesBaseName = "buildcraft" // the name that all artifacts will use as a base. artifacts names follow this pattern: [baseName]-[appendix]-[version]-[classifier].[extension]
minecraft { minecraft {
version = "1.7.10-10.13.0.1207" // McVersion-ForgeVersion this variable is later changed to contain only the MC version, while the apiVersion variable is used for the forge version. Yeah its stupid, and will be changed eentually. version = "1.7.10-10.13.2.1277" // McVersion-ForgeVersion this variable is later changed to contain only the MC version, while the apiVersion variable is used for the forge version. Yeah its stupid, and will be changed eentually.
runDir = "run" // the directory for ForgeGradle to run Minecraft in runDir = "run" // the directory for ForgeGradle to run Minecraft in

View file

@ -0,0 +1,24 @@
Additions:
[#2381] Individual robot blacklist (asie)
[#2377] Make swimming in oil a lot harder (Vexatos)
[#2376] Make oil behave like lava? (asie)
Add block description support to facades (asie)
Add fluid/power number hiding support (immibis/asie)
Add support for connected textures using getIcon() in facades (asie)
Make facade lookups much less strict (asie)
Improvements:
Performance optimization for auto workbenches (immibis)
Performance optimization for block breaking robots (hea3ven)
Bugfixes:
[#2404] Bug in energy consumption routine (asie)
[#2397] Inventory not updating properly when removing pluggables (asie)
[#2389] Facades added through IMC only allow crafting of metadata 0 in multiplayer (asie)
[#2388] add-facade IMC checks block.getRenderType() on server (asie)
[#2386] Vanilla logs not facadeable (asie)
[#2385] Robot registry NPE (asie)
[#2370] Planter robot can't plant potato and carrot (hea3ven)
[#2350] Picker robot won't drop items in pipe (hea3ven)
Check if another mod added fluids before us (asie)
Fix docking stations staying linked when changing a robot's main link (hea3ven)

View file

@ -0,0 +1,4 @@
Bugfixes:
[#2407] Crash with blocks NPEing on getSubBlocks (asie)
Crash with null-block facades and/or pipe plugs (asie)
Removed facade debug code (asie)

View file

@ -1,3 +1,3 @@
1.6.4:BuildCraft:4.2.2 1.6.4:BuildCraft:4.2.2
1.7.2:BuildCraft:6.0.16 1.7.2:BuildCraft:6.0.16
1.7.10:BuildCraft:6.3.1 1.7.10:BuildCraft:6.3.3

View file

@ -121,7 +121,6 @@ import buildcraft.builders.urbanism.BlockUrbanist;
import buildcraft.builders.urbanism.TileUrbanist; import buildcraft.builders.urbanism.TileUrbanist;
import buildcraft.builders.urbanism.UrbanistToolsIconProvider; import buildcraft.builders.urbanism.UrbanistToolsIconProvider;
import buildcraft.compat.CompatHooks; import buildcraft.compat.CompatHooks;
import buildcraft.core.BlockBuildCraft;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.InterModComms; import buildcraft.core.InterModComms;
import buildcraft.core.Version; import buildcraft.core.Version;
@ -139,7 +138,6 @@ import buildcraft.core.builders.patterns.PatternHorizon;
import buildcraft.core.builders.patterns.PatternPyramid; import buildcraft.core.builders.patterns.PatternPyramid;
import buildcraft.core.builders.patterns.PatternStairs; import buildcraft.core.builders.patterns.PatternStairs;
import buildcraft.core.proxy.CoreProxy; import buildcraft.core.proxy.CoreProxy;
import buildcraft.silicon.BlockLaser;
@Mod(name = "BuildCraft Builders", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Builders", dependencies = DefaultProps.DEPENDENCY_CORE) @Mod(name = "BuildCraft Builders", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Builders", dependencies = DefaultProps.DEPENDENCY_CORE)
public class BuildCraftBuilders extends BuildCraftMod { public class BuildCraftBuilders extends BuildCraftMod {

View file

@ -100,11 +100,13 @@ public class PathFinding {
private boolean searchForTarget(int range) { private boolean searchForTarget(int range) {
for (int dx = -range; dx <= range; dx++) { for (int dx = -range; dx <= range; dx++) {
for (int dy = -range; dy <= range; dy++) {
for (int dz = -range; dz <= range; dz++) { for (int dz = -range; dz <= range; dz++) {
int x = start.x + dx; int x = start.x + dx;
int y = Math.max(0, start.y + dy);
int z = start.z + dz; int z = start.z + dz;
if (world.getChunkProvider().chunkExists (x >> 4, z >> 4)) {
int height = world.getChunkFromChunkCoords(x >> 4, z >> 4).getHeightValue(x & 0xF, z & 0xF);
for (int dy = -range; dy <= height; dy++) {
int y = Math.max(0, start.y + dy);
if (zone != null && !zone.contains(x, y, z)) { if (zone != null && !zone.contains(x, y, z)) {
continue; continue;
} }
@ -114,6 +116,7 @@ public class PathFinding {
} }
} }
} }
}
return true; return true;
} }

View file

@ -76,7 +76,8 @@ public abstract class GuiEngine extends GuiBuildCraft {
@Override @Override
protected void initLedgers(IInventory inventory) { protected void initLedgers(IInventory inventory) {
super.initLedgers(inventory); super.initLedgers(inventory);
if(!BuildCraftCore.hidePowerNumbers) if (!BuildCraftCore.hidePowerNumbers) {
ledgerManager.add(new EngineLedger((TileEngine) tile)); ledgerManager.add(new EngineLedger((TileEngine) tile));
} }
}
} }

View file

@ -23,7 +23,6 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.WorldServer; import net.minecraft.world.WorldServer;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.BuildCraftFactory;
import buildcraft.api.core.IInvSlot; import buildcraft.api.core.IInvSlot;
import buildcraft.core.TileBuildCraft; import buildcraft.core.TileBuildCraft;
import buildcraft.core.inventory.InvUtils; import buildcraft.core.inventory.InvUtils;
@ -74,8 +73,8 @@ public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory
} }
@Override @Override
public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) { public void setInventorySlotContents(int slot, ItemStack stack) {
super.setInventorySlotContents(p_70299_1_, p_70299_2_); super.setInventorySlotContents(slot, stack);
isJammed = false; isJammed = false;
needsBalancing = true; needsBalancing = true;
} }
@ -88,10 +87,10 @@ public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory
} }
@Override @Override
public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) { public ItemStack decrStackSize(int slot, int amount) {
isJammed = false; isJammed = false;
needsBalancing = true; needsBalancing = true;
return super.decrStackSize(p_70298_1_, p_70298_2_); return super.decrStackSize(slot, amount);
} }
} }
@ -204,8 +203,9 @@ public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory
return; return;
} }
if(needsBalancing) if (needsBalancing) {
balanceSlots(); balanceSlots();
}
if (isJammed) { if (isJammed) {
return; return;

View file

@ -12,17 +12,19 @@ import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockDirt; import net.minecraft.init.Blocks;
import net.minecraft.block.BlockGrass; import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemSeeds; import net.minecraft.item.ItemReed;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.IPlantable;
import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.api.boards.RedstoneBoardRobot; import buildcraft.api.boards.RedstoneBoardRobot;
import buildcraft.api.boards.RedstoneBoardRobotNBT; import buildcraft.api.boards.RedstoneBoardRobotNBT;
import buildcraft.api.core.BlockIndex; import buildcraft.api.core.BlockIndex;
import buildcraft.api.core.BuildCraftAPI;
import buildcraft.api.robots.AIRobot; import buildcraft.api.robots.AIRobot;
import buildcraft.api.robots.EntityRobotBase; import buildcraft.api.robots.EntityRobotBase;
import buildcraft.core.inventory.filters.ArrayStackFilter; import buildcraft.core.inventory.filters.ArrayStackFilter;
@ -30,19 +32,19 @@ import buildcraft.core.inventory.filters.ArrayStackOrListFilter;
import buildcraft.core.inventory.filters.CompositeFilter; import buildcraft.core.inventory.filters.CompositeFilter;
import buildcraft.core.inventory.filters.IStackFilter; import buildcraft.core.inventory.filters.IStackFilter;
import buildcraft.core.inventory.filters.OreStackFilter; import buildcraft.core.inventory.filters.OreStackFilter;
import buildcraft.core.utils.IBlockFilter;
import buildcraft.robots.ai.AIRobotFetchAndEquipItemStack; import buildcraft.robots.ai.AIRobotFetchAndEquipItemStack;
import buildcraft.robots.ai.AIRobotGotoBlock; import buildcraft.robots.ai.AIRobotGotoBlock;
import buildcraft.robots.ai.AIRobotGotoRandomGroundBlock; import buildcraft.robots.ai.AIRobotGotoRandomGroundBlock;
import buildcraft.robots.ai.AIRobotGotoSleep; import buildcraft.robots.ai.AIRobotGotoSleep;
import buildcraft.robots.ai.AIRobotSearchBlock; import buildcraft.robots.ai.AIRobotSearchBlock;
import buildcraft.robots.ai.AIRobotUseToolOnBlock; import buildcraft.robots.ai.AIRobotUseToolOnBlock;
import buildcraft.core.utils.IBlockFilter;
import buildcraft.robots.ResourceIdBlock; import buildcraft.robots.ResourceIdBlock;
import buildcraft.robots.statements.ActionRobotFilter; import buildcraft.robots.statements.ActionRobotFilter;
public class BoardRobotPlanter extends RedstoneBoardRobot { public class BoardRobotPlanter extends RedstoneBoardRobot {
private IStackFilter stackFilter = new CompositeFilter(new OreStackFilter("treeSapling"), new SeedFilter()); private IStackFilter stackFilter = new CompositeFilter(new PlantableFilter(), new ReedFilter());
private BlockIndex blockFound; private BlockIndex blockFound;
public BoardRobotPlanter(EntityRobotBase iRobot) { public BoardRobotPlanter(EntityRobotBase iRobot) {
@ -81,25 +83,40 @@ public class BoardRobotPlanter extends RedstoneBoardRobot {
startDelegateAI(new AIRobotFetchAndEquipItemStack(robot, stackFilter)); startDelegateAI(new AIRobotFetchAndEquipItemStack(robot, stackFilter));
} }
} else { } else {
if (robot.getHeldItem().getItem() instanceof ItemSeeds) { final ItemStack itemStack = robot.getHeldItem();
startDelegateAI(new AIRobotSearchBlock(robot, new IBlockFilter() { IBlockFilter blockFilter;
if (itemStack.getItem() instanceof ItemReed) {
blockFilter = new IBlockFilter() {
@Override @Override
public boolean matches(World world, int x, int y, int z) { public boolean matches(World world, int x, int y, int z) {
return BuildCraftAPI.isFarmlandProperty.get(world, x, y, z) return world.getBlock(x, y, z).canSustainPlant(world, x, y, z, ForgeDirection.UP, (IPlantable) Blocks.reeds)
&& world.getBlock(x, y, z) != Blocks.reeds
&& !robot.getRegistry().isTaken(new ResourceIdBlock(x, y, z)) && !robot.getRegistry().isTaken(new ResourceIdBlock(x, y, z))
&& isAirAbove(world, x, y, z); && isAirAbove(world, x, y, z);
} }
})); };
} else { } else if (itemStack.getItem() instanceof ItemBlock) {
startDelegateAI(new AIRobotGotoRandomGroundBlock(robot, 100, new IBlockFilter() { final Block plantBlock = ((ItemBlock) itemStack.getItem()).field_150939_a;
blockFilter = new IBlockFilter() {
@Override @Override
public boolean matches(World world, int x, int y, int z) { public boolean matches(World world, int x, int y, int z) {
Block b = robot.worldObj.getBlock(x, y, z); return world.getBlock(x, y, z).canSustainPlant(world, x, y, z, ForgeDirection.UP, (IPlantable) plantBlock)
&& world.getBlock(x, y, z) != plantBlock
return b instanceof BlockDirt || b instanceof BlockGrass; && !robot.getRegistry().isTaken(new ResourceIdBlock(x, y, z))
&& isAirAbove(world, x, y, z);
} }
}, robot.getZoneToWork())); };
} else {
blockFilter = new IBlockFilter() {
@Override
public boolean matches(World world, int x, int y, int z) {
return world.getBlock(x, y, z).canSustainPlant(world, x, y, z, ForgeDirection.UP, (IPlantable) itemStack.getItem())
&& !robot.getRegistry().isTaken(new ResourceIdBlock(x, y, z))
&& isAirAbove(world, x, y, z);
} }
};
}
startDelegateAI(new AIRobotSearchBlock(robot, blockFilter));
} }
} }
@ -124,6 +141,7 @@ public class BoardRobotPlanter extends RedstoneBoardRobot {
} }
blockFound = gotoBlock.blockFound; blockFound = gotoBlock.blockFound;
gotoBlock.path.removeLast();
startDelegateAI(new AIRobotGotoBlock(robot, gotoBlock.path)); startDelegateAI(new AIRobotGotoBlock(robot, gotoBlock.path));
} else { } else {
startDelegateAI(new AIRobotGotoSleep(robot)); startDelegateAI(new AIRobotGotoSleep(robot));
@ -137,10 +155,23 @@ public class BoardRobotPlanter extends RedstoneBoardRobot {
} }
} }
private static class SeedFilter implements IStackFilter { private static class PlantableFilter implements IStackFilter {
@Override @Override
public boolean matches(ItemStack stack) { public boolean matches(ItemStack stack) {
return stack.getItem() instanceof ItemSeeds; if (stack.getItem() instanceof IPlantable) {
return true;
}
if (stack.getItem() instanceof ItemBlock && ((ItemBlock) stack.getItem()).field_150939_a instanceof IPlantable) {
return true;
}
return false;
}
}
private static class ReedFilter implements IStackFilter {
@Override
public boolean matches(ItemStack stack) {
return stack.getItem() instanceof ItemReed;
} }
} }

View file

@ -184,7 +184,8 @@ public class GuiAssemblyTable extends GuiAdvancedInterface {
@Override @Override
protected void initLedgers(IInventory inventory) { protected void initLedgers(IInventory inventory) {
super.initLedgers(inventory); super.initLedgers(inventory);
if(!BuildCraftCore.hidePowerNumbers) if (!BuildCraftCore.hidePowerNumbers) {
ledgerManager.add(new LaserTableLedger()); ledgerManager.add(new LaserTableLedger());
} }
}
} }

View file

@ -47,7 +47,6 @@ public class GuiIntegrationTable extends GuiLaserTable {
protected void drawGuiContainerForegroundLayer(int par1, int par2) { protected void drawGuiContainerForegroundLayer(int par1, int par2) {
drawLedgers(par1, par2); drawLedgers(par1, par2);
String title = table.getInventoryName(); String title = table.getInventoryName();
fontRendererObj.drawString(title, getCenteredOffset(title), 6, 0x404040); fontRendererObj.drawString(title, getCenteredOffset(title), 6, 0x404040);
} }

View file

@ -81,7 +81,8 @@ public abstract class GuiLaserTable extends GuiBuildCraft {
@Override @Override
protected void initLedgers(IInventory inventory) { protected void initLedgers(IInventory inventory) {
super.initLedgers(inventory); super.initLedgers(inventory);
if(!BuildCraftCore.hidePowerNumbers) if (!BuildCraftCore.hidePowerNumbers) {
ledgerManager.add(new LaserTableLedger()); ledgerManager.add(new LaserTableLedger());
} }
}
} }

View file

@ -57,6 +57,8 @@ import buildcraft.api.gates.GateExpansions;
import buildcraft.api.gates.IGateExpansion; import buildcraft.api.gates.IGateExpansion;
import buildcraft.api.robots.EntityRobotBase; import buildcraft.api.robots.EntityRobotBase;
import buildcraft.api.tools.IToolWrench; import buildcraft.api.tools.IToolWrench;
import buildcraft.api.transport.IPipe;
import buildcraft.api.transport.IPipeTile;
import buildcraft.api.transport.PipeWire; import buildcraft.api.transport.PipeWire;
import buildcraft.api.transport.pluggable.IPipePluggableItem; import buildcraft.api.transport.pluggable.IPipePluggableItem;
import buildcraft.api.transport.pluggable.PipePluggable; import buildcraft.api.transport.pluggable.PipePluggable;
@ -296,20 +298,15 @@ public class BlockGenericPipe extends BlockBuildCraft {
} }
private RaytraceResult doRayTrace(World world, int x, int y, int z, Vec3 origin, Vec3 direction) { private RaytraceResult doRayTrace(World world, int x, int y, int z, Vec3 origin, Vec3 direction) {
TileEntity pipeTileEntity = world.getTileEntity(x, y, z); Pipe<?> pipe = getPipe(world, x, y, z);
TileGenericPipe tileG = null; if (!isValid(pipe)) {
if (pipeTileEntity instanceof TileGenericPipe) {
tileG = (TileGenericPipe) pipeTileEntity;
}
if (tileG == null) {
return null; return null;
} }
Pipe<?> pipe = tileG.pipe; TileGenericPipe tileG = pipe.container;
if (!isValid(pipe)) { if (tileG == null) {
return null; return null;
} }
@ -947,12 +944,14 @@ public class BlockGenericPipe extends BlockBuildCraft {
public static Pipe<?> getPipe(IBlockAccess blockAccess, int i, int j, int k) { public static Pipe<?> getPipe(IBlockAccess blockAccess, int i, int j, int k) {
TileEntity tile = blockAccess.getTileEntity(i, j, k); TileEntity tile = blockAccess.getTileEntity(i, j, k);
if (!(tile instanceof TileGenericPipe) || tile.isInvalid()) { if (tile instanceof IPipeTile && !tile.isInvalid()) {
return null; IPipe pipe = ((IPipeTile) tile).getPipe();
} else { if (pipe instanceof Pipe<?>) {
return ((TileGenericPipe) tile).pipe; return (Pipe<?>) pipe;
} }
} }
return null;
}
public static boolean isFullyDefined(Pipe<?> pipe) { public static boolean isFullyDefined(Pipe<?> pipe) {
return pipe != null && pipe.transport != null && pipe.container != null; return pipe != null && pipe.transport != null && pipe.container != null;
@ -1120,10 +1119,10 @@ public class BlockGenericPipe extends BlockBuildCraft {
if (neighbours != null) { if (neighbours != null) {
for (int i = 0; i < 6; i++) { for (int i = 0; i < 6; i++) {
if (neighbours[i] != null && neighbours[i].getTile() instanceof TileGenericPipe && if (neighbours[i] != null && neighbours[i].getTile() instanceof IPipeTile &&
!neighbours[i].getTile().isInvalid() && !neighbours[i].getTile().isInvalid() &&
((TileGenericPipe) neighbours[i].getTile()).pipe != null) { ((IPipeTile) neighbours[i].getTile()).getPipe() instanceof Pipe<?>) {
((TileGenericPipe) neighbours[i].getTile()).pipe.updateSignalState(); ((Pipe<?>) ((IPipeTile) neighbours[i].getTile()).getPipe()).updateSignalState();
} }
} }
} }

View file

@ -10,10 +10,8 @@ package buildcraft.transport;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import com.google.common.collect.Sets;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
@ -243,15 +241,20 @@ public class ItemFacade extends ItemBuildCraft implements IFacadeItem, IPipePlug
} }
private void registerValidFacades(Block block, Item item) { private void registerValidFacades(Block block, Item item) {
//for (int i = 0; i < 16; i++) {
ArrayList<ItemStack> stacks = new ArrayList<ItemStack>(16); ArrayList<ItemStack> stacks = new ArrayList<ItemStack>(16);
try {
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) { if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) {
block.getSubBlocks(item, null, stacks); for (CreativeTabs ct : item.getCreativeTabs()) {
block.getSubBlocks(item, ct, stacks);
}
} else { } else {
for (int i = 0; i < 16; i++) { for (int i = 0; i < 16; i++) {
stacks.add(new ItemStack(item, 1, i)); stacks.add(new ItemStack(item, 1, i));
} }
} }
} catch (Exception e) {
e.printStackTrace();
}
for (ItemStack stack : stacks) { for (ItemStack stack : stacks) {
try { try {
int i = stack.getItemDamage(); int i = stack.getItemDamage();

View file

@ -26,13 +26,13 @@ public final class PipeToolTipManager {
private static final Map<Class<? extends Pipe<?>>, String> toolTips = new HashMap<Class<? extends Pipe<?>>, String>(); private static final Map<Class<? extends Pipe<?>>, String> toolTips = new HashMap<Class<? extends Pipe<?>>, String>();
static { static {
if(!BuildCraftCore.hidePowerNumbers) { if (!BuildCraftCore.hidePowerNumbers) {
for (Map.Entry<Class<? extends Pipe<?>>, Integer> pipe : PipeTransportPower.powerCapacities.entrySet()) { for (Map.Entry<Class<? extends Pipe<?>>, Integer> pipe : PipeTransportPower.powerCapacities.entrySet()) {
PipeToolTipManager.addToolTip(pipe.getKey(), String.format("%d RF/t", pipe.getValue())); PipeToolTipManager.addToolTip(pipe.getKey(), String.format("%d RF/t", pipe.getValue()));
} }
} }
if(!BuildCraftCore.hideFluidNumbers) { if (!BuildCraftCore.hideFluidNumbers) {
for (Map.Entry<Class<? extends Pipe<?>>, Integer> pipe : PipeTransportFluids.fluidCapacities.entrySet()) { for (Map.Entry<Class<? extends Pipe<?>>, Integer> pipe : PipeTransportFluids.fluidCapacities.entrySet()) {
PipeToolTipManager.addToolTip(pipe.getKey(), String.format("%d mB/t", pipe.getValue())); PipeToolTipManager.addToolTip(pipe.getKey(), String.format("%d mB/t", pipe.getValue()));
} }

View file

@ -544,6 +544,7 @@ public class PipeTransportPower extends PipeTransport {
if (externalPower[dir.ordinal()] < max) { if (externalPower[dir.ordinal()] < max) {
result = externalPower[dir.ordinal()]; result = externalPower[dir.ordinal()];
externalPower[dir.ordinal()] = 0;
} else { } else {
result = max; result = max;
externalPower[dir.ordinal()] -= max; externalPower[dir.ordinal()] -= max;

View file

@ -137,9 +137,9 @@ public class TileGenericPipe extends TileEntity implements IFluidHandler,
String c = pluggableData.getString("pluggableClass"); String c = pluggableData.getString("pluggableClass");
if ("buildcraft.transport.gates.ItemGate$GatePluggable".equals(c)) { if ("buildcraft.transport.gates.ItemGate$GatePluggable".equals(c)) {
pluggableClass = GatePluggable.class; pluggableClass = GatePluggable.class;
} else if ("buildcraft.transport.gates.ItemFacade$FacadePluggable".equals(c)) { } else if ("buildcraft.transport.ItemFacade$FacadePluggable".equals(c)) {
pluggableClass = FacadePluggable.class; pluggableClass = FacadePluggable.class;
} else if ("buildcraft.transport.gates.ItemPlug$PlugPluggable".equals(c)) { } else if ("buildcraft.transport.ItemPlug$PlugPluggable".equals(c)) {
pluggableClass = PlugPluggable.class; pluggableClass = PlugPluggable.class;
} else if ("buildcraft.transport.gates.ItemRobotStation$RobotStationPluggable".equals(c)) { } else if ("buildcraft.transport.gates.ItemRobotStation$RobotStationPluggable".equals(c)) {
pluggableClass = PipeManager.getPluggableByName("robotStation"); pluggableClass = PipeManager.getPluggableByName("robotStation");

View file

@ -77,9 +77,7 @@ public class ActionIterator implements Iterable<StatementSlot> {
} }
if (isValid()) { if (isValid()) {
next = new StatementSlot(); next = pipe.gates[curDir.ordinal()].activeActions.get(index);
next.statement = pipe.gates[curDir.ordinal()].actions[index];
next.parameters = pipe.gates[curDir.ordinal()].actionParameters[index];
} else { } else {
next = null; next = null;
} }

View file

@ -14,7 +14,6 @@ import java.util.LinkedList;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.util.ChatComponentText; import net.minecraft.util.ChatComponentText;
import net.minecraft.util.ChatComponentTranslation;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -22,7 +21,6 @@ import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.BuildCraftCore; import buildcraft.BuildCraftCore;
import buildcraft.BuildCraftEnergy;
import buildcraft.BuildCraftTransport; import buildcraft.BuildCraftTransport;
import buildcraft.api.core.IIconProvider; import buildcraft.api.core.IIconProvider;
import buildcraft.api.statements.IActionInternal; import buildcraft.api.statements.IActionInternal;

View file

@ -36,12 +36,12 @@ public class FacadeBlockAccess implements IBlockAccess {
} }
@Override @Override
public TileEntity getTileEntity(int p_147438_1_, int p_147438_2_, int p_147438_3_) { public TileEntity getTileEntity(int x, int y, int z) {
return null; return null;
} }
@Override @Override
public int getLightBrightnessForSkyBlocks(int p_72802_1_, int p_72802_2_, int p_72802_3_, int p_72802_4_) { public int getLightBrightnessForSkyBlocks(int x, int y, int z, int a) {
return 0; return 0;
} }
@ -60,7 +60,7 @@ public class FacadeBlockAccess implements IBlockAccess {
} }
@Override @Override
public int isBlockProvidingPowerTo(int p_72879_1_, int p_72879_2_, int p_72879_3_, int p_72879_4_) { public int isBlockProvidingPowerTo(int x, int y, int z, int side) {
return 0; return 0;
} }
@ -85,7 +85,7 @@ public class FacadeBlockAccess implements IBlockAccess {
} }
@Override @Override
public boolean isSideSolid(int x, int y, int z, ForgeDirection side, boolean _default) { public boolean isSideSolid(int x, int y, int z, ForgeDirection side, boolean def) {
return world.isSideSolid(x, y, z, side, _default); return world.isSideSolid(x, y, z, side, def);
} }
} }

View file

@ -158,13 +158,16 @@ public class FacadeItemRenderer implements IItemRenderer {
GL11.glPushMatrix(); GL11.glPushMatrix();
// Enable glBlending for transparency // Enable glBlending for transparency
if (block != null && block.getRenderBlockPass() > 0) { if (block != null) {
if (block.getRenderBlockPass() > 0) {
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F); GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(770, 771, 1, 0); OpenGlHelper.glBlendFunc(770, 771, 1, 0);
} }
RenderUtils.setGLColorFromInt(block.getRenderColor(decodedMeta)); RenderUtils.setGLColorFromInt(block.getRenderColor(decodedMeta));
}
if (hollow) { if (hollow) {
GL11.glTranslatef(translateX, translateY, translateZ); GL11.glTranslatef(translateX, translateY, translateZ);
drawHollowCube(tessellator, render, block, decodedMeta); drawHollowCube(tessellator, render, block, decodedMeta);

View file

@ -21,7 +21,6 @@ import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.api.core.render.ITextureStates; import buildcraft.api.core.render.ITextureStates;
import buildcraft.transport.BlockGenericPipe; import buildcraft.transport.BlockGenericPipe;
/* /*
* This is fake block to render pluggables and pipes without altering host state * This is fake block to render pluggables and pipes without altering host state
* May prove useful if we will make API for roboports, pipes, plugs and facades * May prove useful if we will make API for roboports, pipes, plugs and facades

View file

@ -10,8 +10,10 @@ package buildcraft.transport.render;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
@ -102,8 +104,11 @@ public class PipeRendererWorld implements ISimpleBlockRenderingHandler {
fakeBlock.setColor(0xFFFFFF); fakeBlock.setColor(0xFFFFFF);
} else if (renderPass == 1) { } else if (renderPass == 1) {
// Fix a bug in Minecraft 1.7.2-1.7.10 // Fix a bug in Minecraft 1.7.2-1.7.10
// TODO: Remove in 1.8 IIcon i = PipeIconProvider.TYPE.Transparent.getIcon();
renderblocks.renderFaceXNeg(fakeBlock, x, y, z, PipeIconProvider.TYPE.Transparent.getIcon()); Tessellator.instance.addVertexWithUV(x, y, z, 0, 0);
Tessellator.instance.addVertexWithUV(x, y, z, 0, 0);
Tessellator.instance.addVertexWithUV(x, y, z, 0, 0);
Tessellator.instance.addVertexWithUV(x, y, z, 0, 0);
} }
renderblocks.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); renderblocks.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);