Merge branch 'BuildCraft-5.0.x' into BuildCraft-5.1.x
This commit is contained in:
commit
753dc868d2
1 changed files with 17 additions and 5 deletions
|
@ -51,6 +51,7 @@ import buildcraft.core.utils.Utils;
|
|||
import buildcraft.transport.gates.GateDefinition;
|
||||
import buildcraft.transport.gates.GateFactory;
|
||||
import buildcraft.transport.gates.ItemGate;
|
||||
import buildcraft.transport.utils.FacadeMatrix;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
@ -600,14 +601,25 @@ public class BlockGenericPipe extends BlockBuildCraft {
|
|||
|
||||
if (rayTraceResult != null && rayTraceResult.boundingBox != null) {
|
||||
switch (rayTraceResult.hitPart) {
|
||||
case Gate:
|
||||
case Gate:
|
||||
Pipe pipe = getPipe(world, x, y, z);
|
||||
return pipe.gate.getGateItem();
|
||||
case Plug:
|
||||
case Plug:
|
||||
return new ItemStack(BuildCraftTransport.plugItem);
|
||||
case Pipe:
|
||||
return new ItemStack(getPipe(world, x, y, z).item);
|
||||
case Facade:
|
||||
ForgeDirection dir = ForgeDirection
|
||||
.getOrientation(target.sideHit);
|
||||
FacadeMatrix matrix = getPipe(world, x, y, z).container.renderState.facadeMatrix;
|
||||
Block block = matrix.getFacadeBlock(dir);
|
||||
if (block != null) {
|
||||
return ItemFacade.getStack(block,
|
||||
matrix.getFacadeMetaId(dir));
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.getPickBlock(target, world, x, y, z);
|
||||
return null;
|
||||
}
|
||||
|
||||
/* Wrappers ************************************************************ */
|
||||
|
@ -1076,7 +1088,7 @@ public class BlockGenericPipe extends BlockBuildCraft {
|
|||
* the particles. Useful when you have entirely different texture sheets for
|
||||
* different sides/locations in the world.
|
||||
*
|
||||
* @param world The current world
|
||||
* @param worldObj The current world
|
||||
* @param target The target the player is looking at {x/y/z/side/sub}
|
||||
* @param effectRenderer A reference to the current effect renderer.
|
||||
* @return True to prevent vanilla digging particles form spawning.
|
||||
|
@ -1139,7 +1151,7 @@ public class BlockGenericPipe extends BlockBuildCraft {
|
|||
* your block. So be sure to do proper sanity checks before assuming that
|
||||
* the location is this block.
|
||||
*
|
||||
* @param world The current world
|
||||
* @param worldObj The current world
|
||||
* @param x X position to spawn the particle
|
||||
* @param y Y position to spawn the particle
|
||||
* @param z Z position to spawn the particle
|
||||
|
|
Loading…
Reference in a new issue