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:
commit
f5c3220c53
23 changed files with 160 additions and 92 deletions
|
@ -22,12 +22,12 @@ apply plugin: 'forge' // adds the forge dependency
|
|||
apply plugin: 'maven' // for uploading to a maven repo
|
||||
apply plugin: 'checkstyle'
|
||||
|
||||
version = "6.3.1"
|
||||
version = "6.3.3"
|
||||
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]
|
||||
|
||||
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
|
||||
|
||||
|
|
24
buildcraft_resources/changelog/6.3.2
Normal file
24
buildcraft_resources/changelog/6.3.2
Normal 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)
|
4
buildcraft_resources/changelog/6.3.3
Normal file
4
buildcraft_resources/changelog/6.3.3
Normal 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)
|
|
@ -1,3 +1,3 @@
|
|||
1.6.4:BuildCraft:4.2.2
|
||||
1.7.2:BuildCraft:6.0.16
|
||||
1.7.10:BuildCraft:6.3.1
|
||||
1.7.10:BuildCraft:6.3.3
|
||||
|
|
|
@ -121,7 +121,6 @@ import buildcraft.builders.urbanism.BlockUrbanist;
|
|||
import buildcraft.builders.urbanism.TileUrbanist;
|
||||
import buildcraft.builders.urbanism.UrbanistToolsIconProvider;
|
||||
import buildcraft.compat.CompatHooks;
|
||||
import buildcraft.core.BlockBuildCraft;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.InterModComms;
|
||||
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.PatternStairs;
|
||||
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)
|
||||
public class BuildCraftBuilders extends BuildCraftMod {
|
||||
|
|
|
@ -100,11 +100,13 @@ public class PathFinding {
|
|||
|
||||
private boolean searchForTarget(int range) {
|
||||
for (int dx = -range; dx <= range; dx++) {
|
||||
for (int dy = -range; dy <= range; dy++) {
|
||||
for (int dz = -range; dz <= range; dz++) {
|
||||
int x = start.x + dx;
|
||||
int y = Math.max(0, start.y + dy);
|
||||
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)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -114,6 +116,7 @@ public class PathFinding {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,8 @@ public abstract class GuiEngine extends GuiBuildCraft {
|
|||
@Override
|
||||
protected void initLedgers(IInventory inventory) {
|
||||
super.initLedgers(inventory);
|
||||
if(!BuildCraftCore.hidePowerNumbers)
|
||||
if (!BuildCraftCore.hidePowerNumbers) {
|
||||
ledgerManager.add(new EngineLedger((TileEngine) tile));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import buildcraft.BuildCraftFactory;
|
||||
import buildcraft.api.core.IInvSlot;
|
||||
import buildcraft.core.TileBuildCraft;
|
||||
import buildcraft.core.inventory.InvUtils;
|
||||
|
@ -74,8 +73,8 @@ public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) {
|
||||
super.setInventorySlotContents(p_70299_1_, p_70299_2_);
|
||||
public void setInventorySlotContents(int slot, ItemStack stack) {
|
||||
super.setInventorySlotContents(slot, stack);
|
||||
isJammed = false;
|
||||
needsBalancing = true;
|
||||
}
|
||||
|
@ -88,10 +87,10 @@ public class TileAutoWorkbench extends TileBuildCraft implements ISidedInventory
|
|||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) {
|
||||
public ItemStack decrStackSize(int slot, int amount) {
|
||||
isJammed = false;
|
||||
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;
|
||||
}
|
||||
|
||||
if(needsBalancing)
|
||||
if (needsBalancing) {
|
||||
balanceSlots();
|
||||
}
|
||||
|
||||
if (isJammed) {
|
||||
return;
|
||||
|
|
|
@ -12,17 +12,19 @@ import java.util.ArrayList;
|
|||
import java.util.Collection;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDirt;
|
||||
import net.minecraft.block.BlockGrass;
|
||||
import net.minecraft.item.ItemSeeds;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemReed;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
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.RedstoneBoardRobotNBT;
|
||||
import buildcraft.api.core.BlockIndex;
|
||||
import buildcraft.api.core.BuildCraftAPI;
|
||||
import buildcraft.api.robots.AIRobot;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
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.IStackFilter;
|
||||
import buildcraft.core.inventory.filters.OreStackFilter;
|
||||
import buildcraft.core.utils.IBlockFilter;
|
||||
import buildcraft.robots.ai.AIRobotFetchAndEquipItemStack;
|
||||
import buildcraft.robots.ai.AIRobotGotoBlock;
|
||||
import buildcraft.robots.ai.AIRobotGotoRandomGroundBlock;
|
||||
import buildcraft.robots.ai.AIRobotGotoSleep;
|
||||
import buildcraft.robots.ai.AIRobotSearchBlock;
|
||||
import buildcraft.robots.ai.AIRobotUseToolOnBlock;
|
||||
import buildcraft.core.utils.IBlockFilter;
|
||||
import buildcraft.robots.ResourceIdBlock;
|
||||
import buildcraft.robots.statements.ActionRobotFilter;
|
||||
|
||||
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;
|
||||
|
||||
public BoardRobotPlanter(EntityRobotBase iRobot) {
|
||||
|
@ -81,25 +83,40 @@ public class BoardRobotPlanter extends RedstoneBoardRobot {
|
|||
startDelegateAI(new AIRobotFetchAndEquipItemStack(robot, stackFilter));
|
||||
}
|
||||
} else {
|
||||
if (robot.getHeldItem().getItem() instanceof ItemSeeds) {
|
||||
startDelegateAI(new AIRobotSearchBlock(robot, new IBlockFilter() {
|
||||
final ItemStack itemStack = robot.getHeldItem();
|
||||
IBlockFilter blockFilter;
|
||||
if (itemStack.getItem() instanceof ItemReed) {
|
||||
blockFilter = new IBlockFilter() {
|
||||
@Override
|
||||
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))
|
||||
&& isAirAbove(world, x, y, z);
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
startDelegateAI(new AIRobotGotoRandomGroundBlock(robot, 100, new IBlockFilter() {
|
||||
};
|
||||
} else if (itemStack.getItem() instanceof ItemBlock) {
|
||||
final Block plantBlock = ((ItemBlock) itemStack.getItem()).field_150939_a;
|
||||
blockFilter = new IBlockFilter() {
|
||||
@Override
|
||||
public boolean matches(World world, int x, int y, int z) {
|
||||
Block b = robot.worldObj.getBlock(x, y, z);
|
||||
|
||||
return b instanceof BlockDirt || b instanceof BlockGrass;
|
||||
return world.getBlock(x, y, z).canSustainPlant(world, x, y, z, ForgeDirection.UP, (IPlantable) plantBlock)
|
||||
&& world.getBlock(x, y, z) != plantBlock
|
||||
&& !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;
|
||||
gotoBlock.path.removeLast();
|
||||
startDelegateAI(new AIRobotGotoBlock(robot, gotoBlock.path));
|
||||
} else {
|
||||
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
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -184,7 +184,8 @@ public class GuiAssemblyTable extends GuiAdvancedInterface {
|
|||
@Override
|
||||
protected void initLedgers(IInventory inventory) {
|
||||
super.initLedgers(inventory);
|
||||
if(!BuildCraftCore.hidePowerNumbers)
|
||||
if (!BuildCraftCore.hidePowerNumbers) {
|
||||
ledgerManager.add(new LaserTableLedger());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,6 @@ public class GuiIntegrationTable extends GuiLaserTable {
|
|||
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
||||
drawLedgers(par1, par2);
|
||||
|
||||
|
||||
String title = table.getInventoryName();
|
||||
fontRendererObj.drawString(title, getCenteredOffset(title), 6, 0x404040);
|
||||
}
|
||||
|
|
|
@ -81,7 +81,8 @@ public abstract class GuiLaserTable extends GuiBuildCraft {
|
|||
@Override
|
||||
protected void initLedgers(IInventory inventory) {
|
||||
super.initLedgers(inventory);
|
||||
if(!BuildCraftCore.hidePowerNumbers)
|
||||
if (!BuildCraftCore.hidePowerNumbers) {
|
||||
ledgerManager.add(new LaserTableLedger());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,8 @@ import buildcraft.api.gates.GateExpansions;
|
|||
import buildcraft.api.gates.IGateExpansion;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
import buildcraft.api.transport.IPipe;
|
||||
import buildcraft.api.transport.IPipeTile;
|
||||
import buildcraft.api.transport.PipeWire;
|
||||
import buildcraft.api.transport.pluggable.IPipePluggableItem;
|
||||
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) {
|
||||
TileEntity pipeTileEntity = world.getTileEntity(x, y, z);
|
||||
Pipe<?> pipe = getPipe(world, x, y, z);
|
||||
|
||||
TileGenericPipe tileG = null;
|
||||
if (pipeTileEntity instanceof TileGenericPipe) {
|
||||
tileG = (TileGenericPipe) pipeTileEntity;
|
||||
}
|
||||
|
||||
if (tileG == null) {
|
||||
if (!isValid(pipe)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Pipe<?> pipe = tileG.pipe;
|
||||
TileGenericPipe tileG = pipe.container;
|
||||
|
||||
if (!isValid(pipe)) {
|
||||
if (tileG == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -947,12 +944,14 @@ public class BlockGenericPipe extends BlockBuildCraft {
|
|||
public static Pipe<?> getPipe(IBlockAccess blockAccess, int i, int j, int k) {
|
||||
TileEntity tile = blockAccess.getTileEntity(i, j, k);
|
||||
|
||||
if (!(tile instanceof TileGenericPipe) || tile.isInvalid()) {
|
||||
return null;
|
||||
} else {
|
||||
return ((TileGenericPipe) tile).pipe;
|
||||
if (tile instanceof IPipeTile && !tile.isInvalid()) {
|
||||
IPipe pipe = ((IPipeTile) tile).getPipe();
|
||||
if (pipe instanceof Pipe<?>) {
|
||||
return (Pipe<?>) pipe;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean isFullyDefined(Pipe<?> pipe) {
|
||||
return pipe != null && pipe.transport != null && pipe.container != null;
|
||||
|
@ -1120,10 +1119,10 @@ public class BlockGenericPipe extends BlockBuildCraft {
|
|||
|
||||
if (neighbours != null) {
|
||||
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() &&
|
||||
((TileGenericPipe) neighbours[i].getTile()).pipe != null) {
|
||||
((TileGenericPipe) neighbours[i].getTile()).pipe.updateSignalState();
|
||||
((IPipeTile) neighbours[i].getTile()).getPipe() instanceof Pipe<?>) {
|
||||
((Pipe<?>) ((IPipeTile) neighbours[i].getTile()).getPipe()).updateSignalState();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,10 +10,8 @@ package buildcraft.transport;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
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) {
|
||||
//for (int i = 0; i < 16; i++) {
|
||||
ArrayList<ItemStack> stacks = new ArrayList<ItemStack>(16);
|
||||
try {
|
||||
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) {
|
||||
block.getSubBlocks(item, null, stacks);
|
||||
for (CreativeTabs ct : item.getCreativeTabs()) {
|
||||
block.getSubBlocks(item, ct, stacks);
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < 16; i++) {
|
||||
stacks.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
for (ItemStack stack : stacks) {
|
||||
try {
|
||||
int i = stack.getItemDamage();
|
||||
|
|
|
@ -26,13 +26,13 @@ public final class PipeToolTipManager {
|
|||
private static final Map<Class<? extends Pipe<?>>, String> toolTips = new HashMap<Class<? extends Pipe<?>>, String>();
|
||||
|
||||
static {
|
||||
if(!BuildCraftCore.hidePowerNumbers) {
|
||||
if (!BuildCraftCore.hidePowerNumbers) {
|
||||
for (Map.Entry<Class<? extends Pipe<?>>, Integer> pipe : PipeTransportPower.powerCapacities.entrySet()) {
|
||||
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()) {
|
||||
PipeToolTipManager.addToolTip(pipe.getKey(), String.format("%d mB/t", pipe.getValue()));
|
||||
}
|
||||
|
|
|
@ -544,6 +544,7 @@ public class PipeTransportPower extends PipeTransport {
|
|||
|
||||
if (externalPower[dir.ordinal()] < max) {
|
||||
result = externalPower[dir.ordinal()];
|
||||
externalPower[dir.ordinal()] = 0;
|
||||
} else {
|
||||
result = max;
|
||||
externalPower[dir.ordinal()] -= max;
|
||||
|
|
|
@ -137,9 +137,9 @@ public class TileGenericPipe extends TileEntity implements IFluidHandler,
|
|||
String c = pluggableData.getString("pluggableClass");
|
||||
if ("buildcraft.transport.gates.ItemGate$GatePluggable".equals(c)) {
|
||||
pluggableClass = GatePluggable.class;
|
||||
} else if ("buildcraft.transport.gates.ItemFacade$FacadePluggable".equals(c)) {
|
||||
} else if ("buildcraft.transport.ItemFacade$FacadePluggable".equals(c)) {
|
||||
pluggableClass = FacadePluggable.class;
|
||||
} else if ("buildcraft.transport.gates.ItemPlug$PlugPluggable".equals(c)) {
|
||||
} else if ("buildcraft.transport.ItemPlug$PlugPluggable".equals(c)) {
|
||||
pluggableClass = PlugPluggable.class;
|
||||
} else if ("buildcraft.transport.gates.ItemRobotStation$RobotStationPluggable".equals(c)) {
|
||||
pluggableClass = PipeManager.getPluggableByName("robotStation");
|
||||
|
|
|
@ -77,9 +77,7 @@ public class ActionIterator implements Iterable<StatementSlot> {
|
|||
}
|
||||
|
||||
if (isValid()) {
|
||||
next = new StatementSlot();
|
||||
next.statement = pipe.gates[curDir.ordinal()].actions[index];
|
||||
next.parameters = pipe.gates[curDir.ordinal()].actionParameters[index];
|
||||
next = pipe.gates[curDir.ordinal()].activeActions.get(index);
|
||||
} else {
|
||||
next = null;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ import java.util.LinkedList;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
@ -22,7 +21,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.BuildCraftEnergy;
|
||||
import buildcraft.BuildCraftTransport;
|
||||
import buildcraft.api.core.IIconProvider;
|
||||
import buildcraft.api.statements.IActionInternal;
|
||||
|
|
|
@ -36,12 +36,12 @@ public class FacadeBlockAccess implements IBlockAccess {
|
|||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ public class FacadeBlockAccess implements IBlockAccess {
|
|||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ public class FacadeBlockAccess implements IBlockAccess {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isSideSolid(int x, int y, int z, ForgeDirection side, boolean _default) {
|
||||
return world.isSideSolid(x, y, z, side, _default);
|
||||
public boolean isSideSolid(int x, int y, int z, ForgeDirection side, boolean def) {
|
||||
return world.isSideSolid(x, y, z, side, def);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -158,13 +158,16 @@ public class FacadeItemRenderer implements IItemRenderer {
|
|||
GL11.glPushMatrix();
|
||||
|
||||
// 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.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
}
|
||||
|
||||
RenderUtils.setGLColorFromInt(block.getRenderColor(decodedMeta));
|
||||
}
|
||||
|
||||
if (hollow) {
|
||||
GL11.glTranslatef(translateX, translateY, translateZ);
|
||||
drawHollowCube(tessellator, render, block, decodedMeta);
|
||||
|
|
|
@ -21,7 +21,6 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
import buildcraft.api.core.render.ITextureStates;
|
||||
import buildcraft.transport.BlockGenericPipe;
|
||||
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
|
|
@ -10,8 +10,10 @@ package buildcraft.transport.render;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
|
@ -102,8 +104,11 @@ public class PipeRendererWorld implements ISimpleBlockRenderingHandler {
|
|||
fakeBlock.setColor(0xFFFFFF);
|
||||
} else if (renderPass == 1) {
|
||||
// Fix a bug in Minecraft 1.7.2-1.7.10
|
||||
// TODO: Remove in 1.8
|
||||
renderblocks.renderFaceXNeg(fakeBlock, x, y, z, PipeIconProvider.TYPE.Transparent.getIcon());
|
||||
IIcon i = 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);
|
||||
|
|
Loading…
Reference in a new issue