Fix oil, fuel, quarry and pump
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 6 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 567 B After Width: | Height: | Size: 567 B |
Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 13 KiB |
32
buildcraft_resources/mods/buildcraft/textures/items/fuel.txt
Normal file
|
@ -0,0 +1,32 @@
|
|||
0*2
|
||||
1*2
|
||||
2*2
|
||||
3*2
|
||||
4*2
|
||||
5*2
|
||||
6*2
|
||||
7*2
|
||||
8*2
|
||||
9*2
|
||||
10*2
|
||||
11*2
|
||||
12*2
|
||||
13*2
|
||||
14*2
|
||||
15*2
|
||||
16*2
|
||||
17*2
|
||||
18*2
|
||||
19*2
|
||||
20*2
|
||||
21*2
|
||||
22*2
|
||||
23*2
|
||||
24*2
|
||||
25*2
|
||||
26*2
|
||||
27*2
|
||||
28*2
|
||||
29*2
|
||||
30*2
|
||||
31*2
|
|
@ -11,13 +11,18 @@ package buildcraft;
|
|||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.ForgeChunkManager;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Ticket;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.Property;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.Version;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
|
@ -35,6 +40,7 @@ import buildcraft.factory.BptBlockFrame;
|
|||
import buildcraft.factory.BptBlockRefinery;
|
||||
import buildcraft.factory.BptBlockTank;
|
||||
import buildcraft.factory.FactoryProxy;
|
||||
import buildcraft.factory.FactoryProxyClient;
|
||||
import buildcraft.factory.GuiHandler;
|
||||
import buildcraft.factory.TileAutoWorkbench;
|
||||
import buildcraft.factory.TileHopper;
|
||||
|
@ -57,6 +63,8 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
|||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@Mod(name = "BuildCraft Factory", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Factory", dependencies = DefaultProps.DEPENDENCY_CORE)
|
||||
@NetworkMod(channels = { DefaultProps.NET_CHANNEL_NAME }, packetHandler = PacketHandlerFactory.class, clientSideRequired = true, serverSideRequired = true)
|
||||
|
@ -208,6 +216,8 @@ public class BuildCraftFactory {
|
|||
{
|
||||
BuildCraftCore.mainConfiguration.save();
|
||||
}
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
public static void loadRecipes() {
|
||||
|
@ -251,4 +261,16 @@ public class BuildCraftFactory {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ForgeSubscribe
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void loadTextures(TextureStitchEvent.Pre evt) {
|
||||
if (evt.map == Minecraft.getMinecraft().renderEngine.textureMapBlocks) {
|
||||
TextureMap terrainTextures = evt.map;
|
||||
FactoryProxyClient.pumpTexture = terrainTextures.registerIcon("buildcraft:pump_tube");
|
||||
FactoryProxyClient.drillTexture = terrainTextures.registerIcon("buildcraft:blockDrillTexture");
|
||||
FactoryProxyClient.drillHeadTexture = terrainTextures.registerIcon("buildcraft:blockDrillHeadTexture");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,8 +133,8 @@ public class BptBlock {
|
|||
*/
|
||||
public void buildBlock(BptSlotInfo slot, IBptContext context) {
|
||||
// Meta needs to be specified twice, depending on the block behavior
|
||||
context.world().setBlock(slot.x, slot.y, slot.z, slot.blockId, slot.meta,1);
|
||||
context.world().setBlockMetadataWithNotify(slot.x, slot.y, slot.z, slot.meta,1);
|
||||
context.world().setBlock(slot.x, slot.y, slot.z, slot.blockId, slot.meta,3);
|
||||
context.world().setBlockMetadataWithNotify(slot.x, slot.y, slot.z, slot.meta,3);
|
||||
|
||||
if (Block.blocksList[slot.blockId] instanceof BlockContainer) {
|
||||
TileEntity tile = context.world().getBlockTileEntity(slot.x, slot.y, slot.z);
|
||||
|
|
|
@ -207,6 +207,7 @@ public class EntityRobot extends Entity implements IEntityAdditionalSpawnData {
|
|||
if (a.slot != null) {
|
||||
|
||||
BptSlot target = a.slot;
|
||||
System.out.printf("RobotChanging %d %d %d %s\n",target.x, target.y, target.z, target.mode);
|
||||
if (wait <= 0 && BlockUtil.canChangeBlock(worldObj, target.x, target.y, target.z)) {
|
||||
|
||||
if (!CoreProxy.proxy.isRenderWorld(worldObj)) {
|
||||
|
@ -214,13 +215,13 @@ public class EntityRobot extends Entity implements IEntityAdditionalSpawnData {
|
|||
if (target.mode == Mode.ClearIfInvalid) {
|
||||
|
||||
if (!target.isValid(a.context)) {
|
||||
worldObj.setBlock(target.x, target.y, target.z, 0, 0,1);
|
||||
worldObj.setBlock(target.x, target.y, target.z, 0, 0,3);
|
||||
}
|
||||
|
||||
} else if (target.stackToUse != null) {
|
||||
|
||||
worldObj.setBlock(target.x, target.y, target.z, 0);
|
||||
throw new RuntimeErrorException(null, "NOT IMPLEMENTED");
|
||||
throw new RuntimeException("NOT IMPLEMENTED");
|
||||
// target.stackToUse.getItem().onItemUse(target.stackToUse,
|
||||
// CoreProxy.getBuildCraftPlayer(worldObj), worldObj, target.x, target.y - 1,
|
||||
// target.z, 1);
|
||||
|
|
|
@ -3,6 +3,7 @@ package buildcraft.core.render;
|
|||
import java.util.HashMap;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
@ -96,7 +97,7 @@ public class RenderingEntityBlocks implements ISimpleBlockRenderingHandler {
|
|||
// renderblocks.renderStandardBlock(block, i, j, k);
|
||||
|
||||
} else if (block.getRenderType() == BuildCraftCore.legacyPipeModel) {
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture("/terrain.png");
|
||||
legacyPipeRender(renderer, world, x, y, z, block, modelId);
|
||||
|
||||
}
|
||||
|
@ -114,7 +115,7 @@ public class RenderingEntityBlocks implements ISimpleBlockRenderingHandler {
|
|||
return BuildCraftCore.blockByEntityModel;
|
||||
}
|
||||
|
||||
/* LEGACY PIPE RENDERING */
|
||||
/* LEGACY PIPE RENDERING and quarry frames! */
|
||||
private void legacyPipeRender(RenderBlocks renderblocks, IBlockAccess iblockaccess, int i, int j, int k, Block block, int l) {
|
||||
float minSize = Utils.pipeMinPos;
|
||||
float maxSize = Utils.pipeMaxPos;
|
||||
|
|
|
@ -104,7 +104,7 @@ public class BlockFrame extends Block implements IFramePipeConnection {
|
|||
public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int i, int j, int k) {
|
||||
return getCollisionBoundingBoxFromPool(world, i, j, k);
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public void addCollisionBoxesToList(World world, int i, int j, int k, AxisAlignedBB axisalignedbb, List arraylist, Entity par7Entity) {
|
||||
|
@ -196,6 +196,6 @@ public class BlockFrame extends Block implements IFramePipeConnection {
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
par1IconRegister.registerIcon("buildcraft:blockFrame");
|
||||
blockIcon = par1IconRegister.registerIcon("buildcraft:blockFrame");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,9 +44,9 @@ public class BlockPump extends BlockContainer {
|
|||
public Icon getBlockTextureFromSideAndMetadata(int i, int j) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
return textureTop;
|
||||
case 1:
|
||||
return textureBottom;
|
||||
case 1:
|
||||
return textureTop;
|
||||
default:
|
||||
return textureSide;
|
||||
}
|
||||
|
|
|
@ -20,9 +20,9 @@ import cpw.mods.fml.client.registry.ClientRegistry;
|
|||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
public class FactoryProxyClient extends FactoryProxy {
|
||||
private Icon pumpTexture;
|
||||
private Icon drillTexture;
|
||||
private Icon drillHeadTexture;
|
||||
public static Icon pumpTexture;
|
||||
public static Icon drillTexture;
|
||||
public static Icon drillHeadTexture;
|
||||
|
||||
@Override
|
||||
public void initializeTileEntities() {
|
||||
|
@ -41,10 +41,6 @@ public class FactoryProxyClient extends FactoryProxy {
|
|||
@Override
|
||||
public void initializeEntityRenders() {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMechanicalArm.class, new RenderVoid());
|
||||
TextureMap terrainTextures = Minecraft.getMinecraft().renderEngine.textureMapItems;
|
||||
pumpTexture = terrainTextures.registerIcon("buildcraft:blockPumpTubeTexture");
|
||||
drillTexture = terrainTextures.registerIcon("buildcraft:blockDrillTexture");
|
||||
drillHeadTexture = terrainTextures.registerIcon("buildcraft:blockDrillHeadTexture");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|