Initial 1.4.6 port.
This commit is contained in:
parent
e42c71e9a3
commit
a2d69bc4f8
19 changed files with 85 additions and 76 deletions
|
@ -60,7 +60,6 @@ import cpw.mods.fml.common.Mod.Instance;
|
|||
import cpw.mods.fml.common.Mod.PostInit;
|
||||
import cpw.mods.fml.common.Mod.PreInit;
|
||||
import cpw.mods.fml.common.Mod.ServerStarting;
|
||||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
|
@ -70,6 +69,7 @@ import cpw.mods.fml.common.registry.EntityRegistry;
|
|||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import cpw.mods.fml.common.registry.TickRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
@Mod(name = "BuildCraft", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Core", dependencies = "required-after:Forge@[6.3.0.0,)")
|
||||
@NetworkMod(channels = { DefaultProps.NET_CHANNEL_NAME }, packetHandler = PacketHandler.class, clientSideRequired = true, serverSideRequired = true)
|
||||
|
|
|
@ -423,15 +423,15 @@ public class BuildCraftTransport {
|
|||
Splitter splitter = Splitter.on("@").trimResults();
|
||||
for (IMCMessage m : event.getMessages()) {
|
||||
if ("add-facade".equals(m.key)) {
|
||||
String[] array = Iterables.toArray(splitter.split(m.value), String.class);
|
||||
String[] array = Iterables.toArray(splitter.split(m.getStringValue()), String.class);
|
||||
if (array.length != 2) {
|
||||
Logger.getLogger("Buildcraft").log(Level.INFO, String.format("Received an invalid add-facade request %s from mod %s", m.value, m.sender));
|
||||
Logger.getLogger("Buildcraft").log(Level.INFO, String.format("Received an invalid add-facade request %s from mod %s", m.getStringValue(), m.getSender()));
|
||||
continue;
|
||||
}
|
||||
Integer blId = Ints.tryParse(array[0]);
|
||||
Integer metaId = Ints.tryParse(array[1]);
|
||||
if (blId == null || metaId == null) {
|
||||
Logger.getLogger("Buildcraft").log(Level.INFO, String.format("Received an invalid add-facade request %s from mod %s", m.value, m.sender));
|
||||
Logger.getLogger("Buildcraft").log(Level.INFO, String.format("Received an invalid add-facade request %s from mod %s", m.getStringValue(), m.getSender()));
|
||||
continue;
|
||||
}
|
||||
ItemFacade.addFacade(new ItemStack(blId, 1, metaId));
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.util.TreeMap;
|
|||
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
public abstract class PipeManager {
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ package buildcraft.builders;
|
|||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import net.minecraftforge.event.world.WorldEvent;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
public class EventHandlerBuilders {
|
||||
|
||||
|
|
|
@ -2,10 +2,11 @@ package buildcraft.core;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.asm.SideOnly;
|
||||
|
||||
public class ItemRedstoneChipset extends ItemBuildCraft {
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ public class RenderingEntityBlocks implements ISimpleBlockRenderingHandler {
|
|||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
block.setBlockBounds(Utils.pipeMinPos, 0.0F, Utils.pipeMinPos, Utils.pipeMaxPos, 1.0F, Utils.pipeMaxPos);
|
||||
renderer.func_83018_a(block);
|
||||
renderer.updateCustomBlockBounds(block);
|
||||
block.setBlockBoundsForItemRender();
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
tessellator.startDrawingQuads();
|
||||
|
@ -120,42 +120,42 @@ public class RenderingEntityBlocks implements ISimpleBlockRenderingHandler {
|
|||
float maxSize = Utils.pipeMaxPos;
|
||||
|
||||
block.setBlockBounds(minSize, minSize, minSize, maxSize, maxSize, maxSize);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, i, j, k);
|
||||
|
||||
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i - 1, j, k)) {
|
||||
block.setBlockBounds(0.0F, minSize, minSize, minSize, maxSize, maxSize);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, i, j, k);
|
||||
}
|
||||
|
||||
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i + 1, j, k)) {
|
||||
block.setBlockBounds(maxSize, minSize, minSize, 1.0F, maxSize, maxSize);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, i, j, k);
|
||||
}
|
||||
|
||||
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j - 1, k)) {
|
||||
block.setBlockBounds(minSize, 0.0F, minSize, maxSize, minSize, maxSize);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, i, j, k);
|
||||
}
|
||||
|
||||
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j + 1, k)) {
|
||||
block.setBlockBounds(minSize, maxSize, minSize, maxSize, 1.0F, maxSize);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, i, j, k);
|
||||
}
|
||||
|
||||
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j, k - 1)) {
|
||||
block.setBlockBounds(minSize, minSize, 0.0F, maxSize, maxSize, minSize);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, i, j, k);
|
||||
}
|
||||
|
||||
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j, k + 1)) {
|
||||
block.setBlockBounds(minSize, minSize, maxSize, maxSize, maxSize, 1.0F);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, i, j, k);
|
||||
}
|
||||
|
||||
|
|
|
@ -420,11 +420,13 @@ public class TileQuarry extends TileMachine implements IMachine, IPowerReceptor,
|
|||
if (entity.isDead) {
|
||||
continue;
|
||||
}
|
||||
if (entity.item.stackSize <= 0) {
|
||||
|
||||
ItemStack mineable = entity.func_92014_d();
|
||||
if (mineable.stackSize <= 0) {
|
||||
continue;
|
||||
}
|
||||
CoreProxy.proxy.removeEntity(entity);
|
||||
mineStack(entity.item);
|
||||
mineStack(mineable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,9 @@ package buildcraft.silicon;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
@ -13,8 +16,6 @@ import buildcraft.BuildCraftSilicon;
|
|||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.asm.SideOnly;
|
||||
|
||||
public class BlockAssemblyTable extends BlockContainer {
|
||||
|
||||
|
|
|
@ -43,11 +43,11 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler {
|
|||
renderblocks.uvRotateBottom = 2;
|
||||
|
||||
block.setBlockBounds(0.0F, 0.0F, 0.0F, 4F / 16F, 1, 1);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
|
||||
block.setBlockBounds(4F / 16F, 5F / 16F, 5F / 16F, 13F / 16F, 11F / 16F, 11F / 16F);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
} else if (meta == ForgeDirection.WEST.ordinal()) {
|
||||
renderblocks.uvRotateEast = 1;
|
||||
|
@ -56,22 +56,22 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler {
|
|||
renderblocks.uvRotateBottom = 1;
|
||||
|
||||
block.setBlockBounds(1F - 4F / 16F, 0.0F, 0.0F, 1, 1, 1);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
|
||||
block.setBlockBounds(1F - 13F / 16F, 5F / 16F, 5F / 16F, 1F - 4F / 16F, 11F / 16F, 11F / 16F);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
} else if (meta == ForgeDirection.NORTH.ordinal()) {
|
||||
renderblocks.uvRotateSouth = 1;
|
||||
renderblocks.uvRotateNorth = 2;
|
||||
|
||||
block.setBlockBounds(0.0F, 0.0F, 1F - 4F / 16F, 1, 1, 1);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
|
||||
block.setBlockBounds(5F / 16F, 5F / 16F, 1F - 13F / 16F, 11F / 16F, 11F / 16F, 1F - 4F / 16F);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
} else if (meta == ForgeDirection.SOUTH.ordinal()) {
|
||||
renderblocks.uvRotateSouth = 2;
|
||||
|
@ -80,11 +80,11 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler {
|
|||
renderblocks.uvRotateBottom = 3;
|
||||
|
||||
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1, 1, 4F / 16F);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
|
||||
block.setBlockBounds(5F / 16F, 5F / 16F, 4F / 16F, 11F / 16F, 11F / 16F, 13F / 16F);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
} else if (meta == ForgeDirection.DOWN.ordinal()) {
|
||||
renderblocks.uvRotateEast = 3;
|
||||
|
@ -93,19 +93,19 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler {
|
|||
renderblocks.uvRotateNorth = 3;
|
||||
|
||||
block.setBlockBounds(0.0F, 1.0F - 4F / 16F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
|
||||
block.setBlockBounds(5F / 16F, 1F - 13F / 16F, 5F / 16F, 11F / 16F, 1F - 4F / 16F, 11F / 16F);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
} else if (meta == ForgeDirection.UP.ordinal()) {
|
||||
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1, 4F / 16F, 1);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
|
||||
block.setBlockBounds(5F / 16F, 4F / 16F, 5F / 16F, 11F / 16F, 13F / 16F, 11F / 16F);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
|
@ -127,11 +127,11 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler {
|
|||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
|
||||
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1, 4F / 16F, 1);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderBlockInInv(renderblocks, block, 0);
|
||||
|
||||
block.setBlockBounds(5F / 16F, 4F / 16F, 5F / 16F, 11F / 16F, 13F / 16F, 11F / 16F);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderBlockInInv(renderblocks, block, 1);
|
||||
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
|
|
|
@ -13,6 +13,9 @@ import java.util.List;
|
|||
import java.util.Random;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -35,8 +38,6 @@ import buildcraft.core.DefaultProps;
|
|||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import buildcraft.transport.render.PipeWorldRenderer;
|
||||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.asm.SideOnly;
|
||||
|
||||
public class BlockGenericPipe extends BlockContainer {
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ import buildcraft.core.proxy.CoreProxy;
|
|||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.asm.SideOnly;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemFacade extends ItemBuildCraft {
|
||||
|
||||
|
|
|
@ -2,11 +2,12 @@ package buildcraft.transport;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.core.ItemBuildCraft;
|
||||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.asm.SideOnly;
|
||||
|
||||
public class ItemGate extends ItemBuildCraft {
|
||||
|
||||
|
|
|
@ -14,6 +14,9 @@ import java.io.DataOutputStream;
|
|||
import java.io.IOException;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -48,8 +51,6 @@ import buildcraft.core.network.PacketTileState;
|
|||
import buildcraft.core.utils.Utils;
|
||||
import buildcraft.transport.Gate.GateKind;
|
||||
import buildcraft.transport.network.PipeRenderStatePacket;
|
||||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.asm.SideOnly;
|
||||
|
||||
public class TileGenericPipe extends TileEntity implements IPowerReceptor, ITankContainer, IPipeEntry, IPipeTile, IOverrideDefaultTriggers, ITileBufferHolder,
|
||||
IPipeConnection, IDropControlInventory, IPipeRenderState, ISyncedTile {
|
||||
|
|
|
@ -215,15 +215,17 @@ public class PipeItemsObsidian extends Pipe implements IPowerReceptor {
|
|||
|
||||
if (entity instanceof EntityItem) {
|
||||
EntityItem item = (EntityItem) entity;
|
||||
ItemStack contained = item.func_92014_d();
|
||||
|
||||
CoreProxy.proxy.obsidianPipePickup(worldObj, item, this.container);
|
||||
|
||||
float energyUsed = powerProvider.useEnergy(distance, item.item.stackSize * distance, true);
|
||||
float energyUsed = powerProvider.useEnergy(distance, contained.stackSize * distance, true);
|
||||
|
||||
if (distance == 0 || energyUsed / distance == item.item.stackSize) {
|
||||
stack = item.item;
|
||||
if (distance == 0 || energyUsed / distance == contained.stackSize) {
|
||||
stack = contained;
|
||||
CoreProxy.proxy.removeEntity(entity);
|
||||
} else {
|
||||
stack = item.item.splitStack((int) (energyUsed / distance));
|
||||
stack = contained.splitStack((int) (energyUsed / distance));
|
||||
}
|
||||
|
||||
speed = Math.sqrt(item.motionX * item.motionX + item.motionY * item.motionY + item.motionZ * item.motionZ);
|
||||
|
@ -263,7 +265,7 @@ public class PipeItemsObsidian extends Pipe implements IPowerReceptor {
|
|||
if (entity instanceof EntityItem) {
|
||||
EntityItem item = (EntityItem) entity;
|
||||
|
||||
if (item.item.stackSize <= 0)
|
||||
if (item.func_92014_d().stackSize <= 0)
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < entitiesDropped.length; ++i)
|
||||
|
|
|
@ -31,7 +31,7 @@ public class FacadeItemRenderer implements IItemRenderer {
|
|||
GL11.glPushMatrix();
|
||||
ForgeHooksClient.bindTexture(block.getTextureFile(), 0);
|
||||
block.setBlockBounds(0F, 0F, 1F - 1F / 16F, 1F, 1F, 1F);
|
||||
render.func_83018_a(block);
|
||||
render.updateCustomBlockBounds(block);
|
||||
GL11.glTranslatef(translateX, translateY, translateZ);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
|
@ -67,7 +67,7 @@ public class FacadeItemRenderer implements IItemRenderer {
|
|||
int textureID = 7 * 16 + 13; // Structure pipe
|
||||
block.setBlockBounds(Utils.pipeMinPos, Utils.pipeMinPos, Utils.pipeMinPos, Utils.pipeMaxPos, Utils.pipeMaxPos, Utils.pipeMaxPos - 1F / 16F);
|
||||
block.setBlockBoundsForItemRender();
|
||||
render.func_83018_a(block);
|
||||
render.updateCustomBlockBounds(block);
|
||||
GL11.glTranslatef(translateX, translateY, translateZ + 0.25F);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
|
|
|
@ -28,7 +28,7 @@ public class PipeItemRenderer implements IItemRenderer {
|
|||
|
||||
block.setBlockBounds(Utils.pipeMinPos, 0.0F, Utils.pipeMinPos, Utils.pipeMaxPos, 1.0F, Utils.pipeMaxPos);
|
||||
block.setBlockBoundsForItemRender();
|
||||
render.func_83018_a(block);
|
||||
render.updateCustomBlockBounds(block);
|
||||
|
||||
GL11.glTranslatef(translateX, translateY, translateZ);
|
||||
tessellator.startDrawingQuads();
|
||||
|
|
|
@ -85,48 +85,48 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
|||
|
||||
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.UNKNOWN);
|
||||
block.setBlockBounds(minSize, minSize, minSize, maxSize, maxSize, maxSize);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
|
||||
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.WEST)) {
|
||||
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.WEST);
|
||||
block.setBlockBounds(0.0F, minSize, minSize, minSize, maxSize, maxSize);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.EAST)) {
|
||||
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.EAST);
|
||||
block.setBlockBounds(maxSize, minSize, minSize, 1.0F, maxSize, maxSize);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.DOWN)) {
|
||||
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.DOWN);
|
||||
block.setBlockBounds(minSize, 0.0F, minSize, maxSize, minSize, maxSize);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.UP)) {
|
||||
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.UP);
|
||||
block.setBlockBounds(minSize, maxSize, minSize, maxSize, 1.0F, maxSize);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.NORTH)) {
|
||||
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.NORTH);
|
||||
block.setBlockBounds(minSize, minSize, 0.0F, maxSize, maxSize, minSize);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.SOUTH)) {
|
||||
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.SOUTH);
|
||||
block.setBlockBounds(minSize, minSize, maxSize, maxSize, maxSize, 1.0F);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
|
@ -190,7 +190,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
|||
rotated[1][0] -= zFightOffset / 2;
|
||||
transform(rotated, direction);
|
||||
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
|
||||
rotated = deepClone(zeroState);
|
||||
|
@ -198,7 +198,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
|||
rotated[1][0] -= zFightOffset / 2;
|
||||
transform(rotated, direction);
|
||||
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
|
||||
rotated = deepClone(zeroState);
|
||||
|
@ -207,7 +207,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
|||
rotated[1][1] -= zFightOffset;
|
||||
transform(rotated, direction);
|
||||
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
|
||||
rotated = deepClone(zeroState);
|
||||
|
@ -216,13 +216,13 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
|||
rotated[1][1] -= zFightOffset;
|
||||
transform(rotated, direction);
|
||||
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
} else { // Solid facade
|
||||
float[][] rotated = deepClone(zeroState);
|
||||
transform(rotated, direction);
|
||||
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
|||
transform(rotated, direction);
|
||||
|
||||
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
|||
if (minZ != Utils.pipeMinPos || maxZ != Utils.pipeMaxPos || !found) {
|
||||
block.setBlockBounds(cx == Utils.pipeMinPos ? cx - 0.05F : cx, cy == Utils.pipeMinPos ? cy - 0.05F : cy, minZ, cx == Utils.pipeMinPos ? cx
|
||||
: cx + 0.05F, cy == Utils.pipeMinPos ? cy : cy + 0.05F, maxZ);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
|
@ -450,7 +450,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
|||
if (minX != Utils.pipeMinPos || maxX != Utils.pipeMaxPos || !found) {
|
||||
block.setBlockBounds(minX, cy == Utils.pipeMinPos ? cy - 0.05F : cy, cz == Utils.pipeMinPos ? cz - 0.05F : cz, maxX, cy == Utils.pipeMinPos ? cy
|
||||
: cy + 0.05F, cz == Utils.pipeMinPos ? cz : cz + 0.05F);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
|
@ -459,14 +459,14 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
|||
if (minY != Utils.pipeMinPos || maxY != Utils.pipeMaxPos || !found) {
|
||||
block.setBlockBounds(cx == Utils.pipeMinPos ? cx - 0.05F : cx, minY, cz == Utils.pipeMinPos ? cz - 0.05F : cz, cx == Utils.pipeMinPos ? cx
|
||||
: cx + 0.05F, maxY, cz == Utils.pipeMinPos ? cz : cz + 0.05F);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
if (center || !found) {
|
||||
block.setBlockBounds(cx == Utils.pipeMinPos ? cx - 0.05F : cx, cy == Utils.pipeMinPos ? cy - 0.05F : cy, cz == Utils.pipeMinPos ? cz - 0.05F : cz,
|
||||
cx == Utils.pipeMinPos ? cx : cx + 0.05F, cy == Utils.pipeMinPos ? cy : cy + 0.05F, cz == Utils.pipeMinPos ? cz : cz + 0.05F);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
|
@ -481,37 +481,37 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
|||
|
||||
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.WEST) && !state.facadeMatrix.isConnected(ForgeDirection.WEST)) {
|
||||
block.setBlockBounds(Utils.pipeMinPos - 0.10F, min, min, Utils.pipeMinPos, max, max);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.EAST) && !state.facadeMatrix.isConnected(ForgeDirection.EAST)) {
|
||||
block.setBlockBounds(Utils.pipeMaxPos, min, min, Utils.pipeMaxPos + 0.10F, max, max);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.DOWN) && !state.facadeMatrix.isConnected(ForgeDirection.DOWN)) {
|
||||
block.setBlockBounds(min, Utils.pipeMinPos - 0.10F, min, max, Utils.pipeMinPos, max);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.UP) && !state.facadeMatrix.isConnected(ForgeDirection.UP)) {
|
||||
block.setBlockBounds(min, Utils.pipeMaxPos, min, max, Utils.pipeMaxPos + 0.10F, max);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.NORTH) && !state.facadeMatrix.isConnected(ForgeDirection.NORTH)) {
|
||||
block.setBlockBounds(min, min, Utils.pipeMinPos - 0.10F, max, max, Utils.pipeMinPos);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.SOUTH) && !state.facadeMatrix.isConnected(ForgeDirection.SOUTH)) {
|
||||
block.setBlockBounds(min, min, Utils.pipeMaxPos, max, max, Utils.pipeMaxPos + 0.10F);
|
||||
renderblocks.func_83018_a(block);
|
||||
renderblocks.updateCustomBlockBounds(block);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -464,7 +464,7 @@ public class RenderPipe extends TileEntitySpecialRenderer {
|
|||
GL11.glTranslatef(f5, f7, f9);
|
||||
}
|
||||
|
||||
RenderPipe.dummyEntityItem.item = itemstack;
|
||||
RenderPipe.dummyEntityItem.func_92013_a(itemstack);
|
||||
|
||||
customRenderer.renderItem(ItemRenderType.ENTITY, itemstack, renderBlocks, RenderPipe.dummyEntityItem);
|
||||
GL11.glPopMatrix();
|
||||
|
@ -506,7 +506,7 @@ public class RenderPipe extends TileEntitySpecialRenderer {
|
|||
ForgeHooksClient.bindTexture(Item.itemsList[itemstack.itemID].getTextureFile(), 0);
|
||||
|
||||
for (int i = 0; i <= itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); ++i) {
|
||||
int iconIndex = itemstack.getItem().getIconFromItemStackForMultiplePasses(itemstack, i);
|
||||
int iconIndex = itemstack.getItem().getIconIndex(itemstack, i);
|
||||
float scale = 1.0F;
|
||||
|
||||
int itemColour = Item.itemsList[itemstack.itemID].getColorFromItemStack(itemstack, i);
|
||||
|
|
|
@ -34,7 +34,7 @@ public class TileEntityPickupFX extends EntityFX {
|
|||
field_679_o = entity1;
|
||||
field_677_q = 3;
|
||||
|
||||
yDestination = Utils.getPipeFloorOf(entity.item);
|
||||
yDestination = Utils.getPipeFloorOf(entity.func_92014_d());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue