Merged proxies.

This commit is contained in:
SirSengir 2012-08-18 11:18:57 +02:00
parent 146682c092
commit 69958df8b7
75 changed files with 541 additions and 711 deletions

View file

@ -1,32 +0,0 @@
/**
* Copyright (c) SpaceToad, 2011
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.builders;
import buildcraft.builders.TileBlueprintLibrary;
import net.minecraft.src.Block;
import net.minecraft.src.ModLoader;
import net.minecraft.src.World;
public class BuildersProxy {
public static boolean canPlaceTorch(World w, int i, int j, int k) {
Block block = Block.blocksList[w.getBlockId(i, j, k)];
if (block == null || !block.renderAsNormalBlock())
return false;
else
return true;
}
public static String getOwner(TileBlueprintLibrary library) {
return ModLoader.getMinecraftInstance().thePlayer.username;
}
}

View file

@ -1,148 +0,0 @@
/**
* Copyright (c) SpaceToad, 2011
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.core;
import java.io.File;
import java.util.Random;
import buildcraft.core.ItemBlockBuildCraft;
import buildcraft.core.network.BuildCraftPacket;
import net.minecraft.client.Minecraft;
import net.minecraft.src.Block;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.IInventory;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraft.src.ModLoader;
import net.minecraft.src.Packet;
import net.minecraft.src.StringTranslate;
import net.minecraft.src.World;
import net.minecraft.src.WorldClient;
public class CoreProxy {
public static String getCurrentLanguage() {
return StringTranslate.getInstance().getCurrentLanguage();
}
// / FIXING GENERAL MLMP AND DEOBFUSCATION DERPINESS
public static void addName(Object obj, String s) {
ModLoader.addName(obj, s);
}
public static void registerBlock(Block block) {
Item.itemsList[block.blockID] = null;
Item.itemsList[block.blockID] = new ItemBlockBuildCraft(block.blockID - 256, block.getBlockName());
}
public static void registerTileEntity(@SuppressWarnings("rawtypes") Class clas, String ident) {
ModLoader.registerTileEntity(clas, ident);
}
public static void addCraftingRecipe(ItemStack result, Object[] recipe) {
ModLoader.addRecipe(result, recipe);
}
public static void addShapelessRecipe(ItemStack result, Object[] recipe) {
ModLoader.addShapelessRecipe(result, recipe);
}
public static void onCraftingPickup(World world, EntityPlayer player, ItemStack stack) {
stack.onCrafting(world, player, stack.stackSize);
}
public static File getPropertyFile() {
return new File(Minecraft.getMinecraftDir(), "/config/BuildCraft.cfg");
}
public static File getBuildCraftBase() {
return new File(Minecraft.getMinecraftDir(), "/config/buildcraft/");
}
// public static void sendToPlayers(Packet packet, World w, int x, int y, int z, int maxDistance, NetworkMod mod) {}
public static void sendToPlayer(EntityPlayer entityplayer, BuildCraftPacket packet) {}
public static void sendToServer(Packet packet) {
// ModLoaderMp.sendPacket(mod, packet);
ModLoader.getMinecraftInstance().getSendQueue().addToSendQueue(packet);
}
public static void addLocalization(String s1, String string) {
ModLoader.addLocalization(s1, string);
}
public static void TakenFromCrafting(EntityPlayer entityplayer, ItemStack itemstack, IInventory iinventory) {
ModLoader.takenFromCrafting(entityplayer, itemstack, iinventory);
}
public static String playerName() {
return ModLoader.getMinecraftInstance().thePlayer.username;
}
/* FORMER API PROXY */
public static boolean isClient(World world) {
return world instanceof WorldClient;
}
public static boolean isServerSide() {
return false;
}
public static boolean isRemote() {
return ModLoader.getMinecraftInstance().theWorld.isRemote;
}
public static void removeEntity(Entity entity) {
entity.setDead();
if (entity.worldObj instanceof WorldClient)
((WorldClient) entity.worldObj).removeEntityFromWorld(entity.entityId);
}
public static Random createNewRandom(World world) {
return new Random(world.getSeed());
}
/* BUILDCRAFT PLAYER */
private static EntityPlayer buildCraftPlayer;
private static EntityPlayer createNewPlayer(World world) {
return new EntityPlayer(world) {
@Override
public void sendChatToPlayer(String var1) {
// TODO Auto-generated method stub
}
@Override
public boolean canCommandSenderUseCommand(String var1) {
// TODO Auto-generated method stub
return false;
}
};
}
public static EntityPlayer getBuildCraftPlayer(World world) {
if (CoreProxy.buildCraftPlayer == null) {
CoreProxy.buildCraftPlayer = createNewPlayer(world);
}
return CoreProxy.buildCraftPlayer;
}
public static String getItemDisplayName(ItemStack stack){
if (Item.itemsList[stack.itemID] == null) return "";
return Item.itemsList[stack.itemID].getItemDisplayName(stack);
}
}

View file

@ -1,24 +0,0 @@
/**
* Copyright (c) SpaceToad, 2011
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.transport;
import buildcraft.transport.render.TileEntityPickupFX;
import net.minecraft.src.EntityItem;
import net.minecraft.src.ModLoader;
import net.minecraft.src.TileEntity;
import net.minecraft.src.World;
public class TransportProxy {
static public void obsidianPipePickup(World world, EntityItem item, TileEntity tile) {
ModLoader.getMinecraftInstance().effectRenderer.addEffect(new TileEntityPickupFX(world, item, tile));
}
}

View file

@ -1,140 +0,0 @@
/**
* Copyright (c) SpaceToad, 2011
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.core;
import java.io.File;
import java.util.Random;
import buildcraft.core.network.BuildCraftPacket;
import net.minecraft.src.Block;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityItem;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.EntityPlayerMP;
import net.minecraft.src.IBlockAccess;
import net.minecraft.src.IInventory;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraft.src.ModLoader;
import net.minecraft.src.Packet;
import net.minecraft.src.World;
public class CoreProxy {
public static String getCurrentLanguage() {
return null;
}
// / FIXING GENERAL MLMP AND DEOBFUSCATION DERPINESS
public static void addName(Object obj, String s) {}
public static void registerBlock(Block block) {
Item.itemsList[block.blockID] = null;
Item.itemsList[block.blockID] = new ItemBlockBuildCraft(block.blockID - 256, block.getBlockName());
}
public static void registerTileEntity(Class clas, String ident) {
ModLoader.registerTileEntity(clas, ident);
}
public static void onCraftingPickup(World world, EntityPlayer player, ItemStack stack) {
stack.onCrafting(world, player, stack.stackSize);
}
public static void addCraftingRecipe(ItemStack result, Object[] recipe) {
ModLoader.addRecipe(result, recipe);
}
public static void addShapelessRecipe(ItemStack result, Object[] recipe) {
ModLoader.addShapelessRecipe(result, recipe);
}
public static File getPropertyFile() {
return new File("BuildCraft.cfg");
}
public static void sendToPlayers(Packet packet, World w, int x, int y, int z, int maxDistance, NetworkMod mod) {
if (packet != null) {
for (int j = 0; j < w.playerEntities.size(); j++) {
EntityPlayerMP player = (EntityPlayerMP) w.playerEntities.get(j);
if (Math.abs(player.posX - x) <= maxDistance && Math.abs(player.posY - y) <= maxDistance
&& Math.abs(player.posZ - z) <= maxDistance)
player.playerNetServerHandler.sendPacket(packet);
}
}
}
public static void sendToPlayer(EntityPlayer entityplayer, BuildCraftPacket packet) {
EntityPlayerMP player = (EntityPlayerMP) entityplayer;
player.playerNetServerHandler.sendPacket(packet.getPacket());
}
public static void sendToServer(Packet packet) {}
public static File getBuildCraftBase() {
return new File("buildcraft/");
}
public static void addLocalization(String s1, String string) {}
public static int addCustomTexture(String pathToTexture) {
return 0;
}
public static void TakenFromCrafting(EntityPlayer thePlayer, ItemStack itemstack, IInventory craftMatrix) {
ModLoader.takenFromCrafting(thePlayer, itemstack, craftMatrix);
}
/* FORMER API PROXY */
public static boolean isClient(World world) {
return false;
}
public static boolean isServerSide() {
return true;
}
public static boolean isRemote() {
return false;
}
public static void removeEntity(Entity entity) {
entity.setDead();
}
public static Random createNewRandom(World world) {
return new Random(world.getSeed());
}
/* BUILDCRAFT PLAYER */
private static EntityPlayer buildCraftPlayer;
private static EntityPlayer createNewPlayer(World world) {
return new EntityPlayer(world) {
};
}
public static EntityPlayer getBuildCraftPlayer(World world) {
if (CoreProxy.buildCraftPlayer == null) {
CoreProxy.buildCraftPlayer = createNewPlayer(world);
}
return CoreProxy.buildCraftPlayer;
}
public static String getItemDisplayName(ItemStack newStack) {
return "";
}
}

View file

@ -1,22 +0,0 @@
/**
* Copyright (c) SpaceToad, 2011
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.transport;
import net.minecraft.src.EntityItem;
import net.minecraft.src.TileEntity;
import net.minecraft.src.World;
public class TransportProxy {
public static void obsidianPipePickup(World world, EntityItem item, TileEntity tile) {
}
}

View file

@ -64,8 +64,8 @@ import buildcraft.builders.TileMarker;
import buildcraft.builders.TilePathMarker; import buildcraft.builders.TilePathMarker;
import buildcraft.core.BptPlayerIndex; import buildcraft.core.BptPlayerIndex;
import buildcraft.core.BptRootIndex; import buildcraft.core.BptRootIndex;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.ProxyCore;
import net.minecraft.src.Block; import net.minecraft.src.Block;
import net.minecraft.src.Item; import net.minecraft.src.Item;
@ -142,42 +142,42 @@ public class BuildCraftBuilders {
templateItem = new ItemBptTemplate(Integer.parseInt(templateItemId.value)); templateItem = new ItemBptTemplate(Integer.parseInt(templateItemId.value));
templateItem.setItemName("templateItem"); templateItem.setItemName("templateItem");
CoreProxy.addName(templateItem, "Template"); ProxyCore.proxy.addName(templateItem, "Template");
blueprintItem = new ItemBptBluePrint(Integer.parseInt(blueprintItemId.value)); blueprintItem = new ItemBptBluePrint(Integer.parseInt(blueprintItemId.value));
blueprintItem.setItemName("blueprintItem"); blueprintItem.setItemName("blueprintItem");
CoreProxy.addName(blueprintItem, "Blueprint"); ProxyCore.proxy.addName(blueprintItem, "Blueprint");
markerBlock = new BlockMarker(Integer.parseInt(markerId.value)); markerBlock = new BlockMarker(Integer.parseInt(markerId.value));
CoreProxy.registerBlock(markerBlock.setBlockName("markerBlock")); ProxyCore.proxy.registerBlock(markerBlock.setBlockName("markerBlock"));
CoreProxy.addName(markerBlock, "Land Mark"); ProxyCore.proxy.addName(markerBlock, "Land Mark");
pathMarkerBlock = new BlockPathMarker(Integer.parseInt(pathMarkerId.value)); pathMarkerBlock = new BlockPathMarker(Integer.parseInt(pathMarkerId.value));
CoreProxy.registerBlock(pathMarkerBlock.setBlockName("pathMarkerBlock")); ProxyCore.proxy.registerBlock(pathMarkerBlock.setBlockName("pathMarkerBlock"));
CoreProxy.addName(pathMarkerBlock, "Path Mark"); ProxyCore.proxy.addName(pathMarkerBlock, "Path Mark");
fillerBlock = new BlockFiller(Integer.parseInt(fillerId.value)); fillerBlock = new BlockFiller(Integer.parseInt(fillerId.value));
CoreProxy.registerBlock(fillerBlock.setBlockName("fillerBlock")); ProxyCore.proxy.registerBlock(fillerBlock.setBlockName("fillerBlock"));
CoreProxy.addName(fillerBlock, "Filler"); ProxyCore.proxy.addName(fillerBlock, "Filler");
builderBlock = new BlockBuilder(Integer.parseInt(builderId.value)); builderBlock = new BlockBuilder(Integer.parseInt(builderId.value));
CoreProxy.registerBlock(builderBlock.setBlockName("builderBlock")); ProxyCore.proxy.registerBlock(builderBlock.setBlockName("builderBlock"));
CoreProxy.addName(builderBlock, "Builder"); ProxyCore.proxy.addName(builderBlock, "Builder");
architectBlock = new BlockArchitect(Integer.parseInt(architectId.value)); architectBlock = new BlockArchitect(Integer.parseInt(architectId.value));
CoreProxy.registerBlock(architectBlock.setBlockName("architectBlock")); ProxyCore.proxy.registerBlock(architectBlock.setBlockName("architectBlock"));
CoreProxy.addName(architectBlock, "Architect Table"); ProxyCore.proxy.addName(architectBlock, "Architect Table");
libraryBlock = new BlockBlueprintLibrary(Integer.parseInt(libraryId.value)); libraryBlock = new BlockBlueprintLibrary(Integer.parseInt(libraryId.value));
CoreProxy.registerBlock(libraryBlock.setBlockName("libraryBlock")); ProxyCore.proxy.registerBlock(libraryBlock.setBlockName("libraryBlock"));
CoreProxy.addName(libraryBlock, "Blueprint Library"); ProxyCore.proxy.addName(libraryBlock, "Blueprint Library");
CoreProxy.registerTileEntity(TileMarker.class, "Marker"); ProxyCore.proxy.registerTileEntity(TileMarker.class, "Marker");
CoreProxy.registerTileEntity(TileFiller.class, "Filler"); ProxyCore.proxy.registerTileEntity(TileFiller.class, "Filler");
CoreProxy.registerTileEntity(TileBuilder.class, "net.minecraft.src.builders.TileBuilder"); ProxyCore.proxy.registerTileEntity(TileBuilder.class, "net.minecraft.src.builders.TileBuilder");
CoreProxy.registerTileEntity(TileArchitect.class, "net.minecraft.src.builders.TileTemplate"); ProxyCore.proxy.registerTileEntity(TileArchitect.class, "net.minecraft.src.builders.TileTemplate");
CoreProxy.registerTileEntity(TilePathMarker.class, "net.minecraft.src.builders.TilePathMarker"); ProxyCore.proxy.registerTileEntity(TilePathMarker.class, "net.minecraft.src.builders.TilePathMarker");
CoreProxy.registerTileEntity(TileBlueprintLibrary.class, "net.minecraft.src.builders.TileBlueprintLibrary"); ProxyCore.proxy.registerTileEntity(TileBlueprintLibrary.class, "net.minecraft.src.builders.TileBlueprintLibrary");
// / INIT FILLER PATTERNS // / INIT FILLER PATTERNS
FillerManager.registry.addRecipe(new FillerFillAll(), new Object[] { "bbb", "bbb", "bbb", Character.valueOf('b'), FillerManager.registry.addRecipe(new FillerFillAll(), new Object[] { "bbb", "bbb", "bbb", Character.valueOf('b'),
@ -301,34 +301,34 @@ public class BuildCraftBuilders {
public static void loadRecipes() { public static void loadRecipes() {
CoreProxy.addCraftingRecipe(new ItemStack(templateItem, 1), new Object[] { "ppp", "pip", "ppp", Character.valueOf('i'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(templateItem, 1), new Object[] { "ppp", "pip", "ppp", Character.valueOf('i'),
new ItemStack(Item.dyePowder, 1, 0), Character.valueOf('p'), Item.paper }); new ItemStack(Item.dyePowder, 1, 0), Character.valueOf('p'), Item.paper });
CoreProxy.addCraftingRecipe(new ItemStack(blueprintItem, 1), new Object[] { "ppp", "pip", "ppp", Character.valueOf('i'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(blueprintItem, 1), new Object[] { "ppp", "pip", "ppp", Character.valueOf('i'),
new ItemStack(Item.dyePowder, 1, 4), Character.valueOf('p'), Item.paper }); new ItemStack(Item.dyePowder, 1, 4), Character.valueOf('p'), Item.paper });
CoreProxy.addCraftingRecipe(new ItemStack(markerBlock, 1), new Object[] { "l ", "r ", Character.valueOf('l'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(markerBlock, 1), new Object[] { "l ", "r ", Character.valueOf('l'),
new ItemStack(Item.dyePowder, 1, 4), Character.valueOf('r'), Block.torchRedstoneActive }); new ItemStack(Item.dyePowder, 1, 4), Character.valueOf('r'), Block.torchRedstoneActive });
CoreProxy.addCraftingRecipe(new ItemStack(pathMarkerBlock, 1), new Object[] { "l ", "r ", Character.valueOf('l'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(pathMarkerBlock, 1), new Object[] { "l ", "r ", Character.valueOf('l'),
new ItemStack(Item.dyePowder, 1, 2), Character.valueOf('r'), Block.torchRedstoneActive }); new ItemStack(Item.dyePowder, 1, 2), Character.valueOf('r'), Block.torchRedstoneActive });
CoreProxy.addCraftingRecipe(new ItemStack(fillerBlock, 1), new Object[] { "btb", "ycy", "gCg", Character.valueOf('b'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(fillerBlock, 1), new Object[] { "btb", "ycy", "gCg", Character.valueOf('b'),
new ItemStack(Item.dyePowder, 1, 0), Character.valueOf('t'), markerBlock, Character.valueOf('y'), new ItemStack(Item.dyePowder, 1, 0), Character.valueOf('t'), markerBlock, Character.valueOf('y'),
new ItemStack(Item.dyePowder, 1, 11), Character.valueOf('c'), Block.workbench, Character.valueOf('g'), new ItemStack(Item.dyePowder, 1, 11), Character.valueOf('c'), Block.workbench, Character.valueOf('g'),
BuildCraftCore.goldGearItem, Character.valueOf('C'), Block.chest }); BuildCraftCore.goldGearItem, Character.valueOf('C'), Block.chest });
CoreProxy.addCraftingRecipe(new ItemStack(builderBlock, 1), new Object[] { "btb", "ycy", "gCg", Character.valueOf('b'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(builderBlock, 1), new Object[] { "btb", "ycy", "gCg", Character.valueOf('b'),
new ItemStack(Item.dyePowder, 1, 0), Character.valueOf('t'), markerBlock, Character.valueOf('y'), new ItemStack(Item.dyePowder, 1, 0), Character.valueOf('t'), markerBlock, Character.valueOf('y'),
new ItemStack(Item.dyePowder, 1, 11), Character.valueOf('c'), Block.workbench, Character.valueOf('g'), new ItemStack(Item.dyePowder, 1, 11), Character.valueOf('c'), Block.workbench, Character.valueOf('g'),
BuildCraftCore.diamondGearItem, Character.valueOf('C'), Block.chest }); BuildCraftCore.diamondGearItem, Character.valueOf('C'), Block.chest });
CoreProxy.addCraftingRecipe(new ItemStack(architectBlock, 1), new Object[] { "btb", "ycy", "gCg", Character.valueOf('b'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(architectBlock, 1), new Object[] { "btb", "ycy", "gCg", Character.valueOf('b'),
new ItemStack(Item.dyePowder, 1, 0), Character.valueOf('t'), markerBlock, Character.valueOf('y'), new ItemStack(Item.dyePowder, 1, 0), Character.valueOf('t'), markerBlock, Character.valueOf('y'),
new ItemStack(Item.dyePowder, 1, 11), Character.valueOf('c'), Block.workbench, Character.valueOf('g'), new ItemStack(Item.dyePowder, 1, 11), Character.valueOf('c'), Block.workbench, Character.valueOf('g'),
BuildCraftCore.diamondGearItem, Character.valueOf('C'), new ItemStack(templateItem, 1) }); BuildCraftCore.diamondGearItem, Character.valueOf('C'), new ItemStack(templateItem, 1) });
CoreProxy.addCraftingRecipe(new ItemStack(libraryBlock, 1), new Object[] { "bbb", "bBb", "bbb", Character.valueOf('b'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(libraryBlock, 1), new Object[] { "bbb", "bBb", "bbb", Character.valueOf('b'),
new ItemStack(blueprintItem), Character.valueOf('B'), Block.bookShelf }); new ItemStack(blueprintItem), Character.valueOf('B'), Block.bookShelf });
} }

View file

@ -24,12 +24,12 @@ import buildcraft.core.ActionRedstoneOutput;
import buildcraft.core.BlockIndex; import buildcraft.core.BlockIndex;
import buildcraft.core.BptItem; import buildcraft.core.BptItem;
import buildcraft.core.BuildCraftConfiguration; import buildcraft.core.BuildCraftConfiguration;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultActionProvider; import buildcraft.core.DefaultActionProvider;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.DefaultTriggerProvider; import buildcraft.core.DefaultTriggerProvider;
import buildcraft.core.ItemBuildCraft; import buildcraft.core.ItemBuildCraft;
import buildcraft.core.ItemWrench; import buildcraft.core.ItemWrench;
import buildcraft.core.ProxyCore;
import buildcraft.core.RedstonePowerFramework; import buildcraft.core.RedstonePowerFramework;
import buildcraft.core.TriggerInventory; import buildcraft.core.TriggerInventory;
import buildcraft.core.TriggerLiquidContainer; import buildcraft.core.TriggerLiquidContainer;
@ -144,7 +144,7 @@ public class BuildCraftCore {
initialized = true; initialized = true;
mainConfiguration = new BuildCraftConfiguration(new File(CoreProxy.getBuildCraftBase(), "config/buildcraft.cfg"), true); mainConfiguration = new BuildCraftConfiguration(new File(ProxyCore.proxy.getBuildCraftBase(), "config/buildcraft.cfg"), true);
mainConfiguration.load(); mainConfiguration.load();
redLaserTexture = 0 * 16 + 2; redLaserTexture = 0 * 16 + 2;
@ -210,7 +210,7 @@ public class BuildCraftCore {
initializeGears(); initializeGears();
wrenchItem = (new ItemWrench(Integer.parseInt(wrenchId.value))).setIconIndex(0 * 16 + 2).setItemName("wrenchItem"); wrenchItem = (new ItemWrench(Integer.parseInt(wrenchId.value))).setIconIndex(0 * 16 + 2).setItemName("wrenchItem");
CoreProxy.addName(wrenchItem, "Wrench"); ProxyCore.proxy.addName(wrenchItem, "Wrench");
LiquidManager.liquids.add(new LiquidData(new LiquidStack(Block.waterStill, BuildCraftAPI.BUCKET_VOLUME), new LiquidStack(Block.waterMoving, BuildCraftAPI.BUCKET_VOLUME), new ItemStack(Item.bucketWater), new ItemStack(Item.bucketEmpty))); LiquidManager.liquids.add(new LiquidData(new LiquidStack(Block.waterStill, BuildCraftAPI.BUCKET_VOLUME), new LiquidStack(Block.waterMoving, BuildCraftAPI.BUCKET_VOLUME), new ItemStack(Item.bucketWater), new ItemStack(Item.bucketEmpty)));
LiquidManager.liquids.add(new LiquidData(new LiquidStack(Block.lavaStill, BuildCraftAPI.BUCKET_VOLUME), new LiquidStack(Block.lavaMoving, BuildCraftAPI.BUCKET_VOLUME), new ItemStack(Item.bucketLava), new ItemStack(Item.bucketEmpty))); LiquidManager.liquids.add(new LiquidData(new LiquidStack(Block.lavaStill, BuildCraftAPI.BUCKET_VOLUME), new LiquidStack(Block.lavaMoving, BuildCraftAPI.BUCKET_VOLUME), new ItemStack(Item.bucketLava), new ItemStack(Item.bucketEmpty)));
@ -228,22 +228,22 @@ public class BuildCraftCore {
public static void loadRecipes() { public static void loadRecipes() {
CoreProxy.addCraftingRecipe(new ItemStack(wrenchItem), new Object[] { "I I", " G ", " I ", Character.valueOf('I'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(wrenchItem), new Object[] { "I I", " G ", " I ", Character.valueOf('I'),
Item.ingotIron, Character.valueOf('G'), stoneGearItem }); Item.ingotIron, Character.valueOf('G'), stoneGearItem });
CoreProxy.addCraftingRecipe(new ItemStack(woodenGearItem), new Object[] { " S ", "S S", " S ", Character.valueOf('S'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(woodenGearItem), new Object[] { " S ", "S S", " S ", Character.valueOf('S'),
Item.stick }); Item.stick });
CoreProxy.addCraftingRecipe(new ItemStack(stoneGearItem), new Object[] { " I ", "IGI", " I ", Character.valueOf('I'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(stoneGearItem), new Object[] { " I ", "IGI", " I ", Character.valueOf('I'),
Block.cobblestone, Character.valueOf('G'), woodenGearItem }); Block.cobblestone, Character.valueOf('G'), woodenGearItem });
CoreProxy.addCraftingRecipe(new ItemStack(ironGearItem), new Object[] { " I ", "IGI", " I ", Character.valueOf('I'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(ironGearItem), new Object[] { " I ", "IGI", " I ", Character.valueOf('I'),
Item.ingotIron, Character.valueOf('G'), stoneGearItem }); Item.ingotIron, Character.valueOf('G'), stoneGearItem });
CoreProxy.addCraftingRecipe(new ItemStack(goldGearItem), new Object[] { " I ", "IGI", " I ", Character.valueOf('I'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(goldGearItem), new Object[] { " I ", "IGI", " I ", Character.valueOf('I'),
Item.ingotGold, Character.valueOf('G'), ironGearItem }); Item.ingotGold, Character.valueOf('G'), ironGearItem });
CoreProxy.addCraftingRecipe(new ItemStack(diamondGearItem), new Object[] { " I ", "IGI", " I ", Character.valueOf('I'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(diamondGearItem), new Object[] { " I ", "IGI", " I ", Character.valueOf('I'),
Item.diamond, Character.valueOf('G'), goldGearItem }); Item.diamond, Character.valueOf('G'), goldGearItem });
} }
@ -273,23 +273,23 @@ public class BuildCraftCore {
woodenGearItem = (new ItemBuildCraft(Integer.parseInt(woodenGearId.value))).setIconIndex(1 * 16 + 0).setItemName( woodenGearItem = (new ItemBuildCraft(Integer.parseInt(woodenGearId.value))).setIconIndex(1 * 16 + 0).setItemName(
"woodenGearItem"); "woodenGearItem");
CoreProxy.addName(woodenGearItem, "Wooden Gear"); ProxyCore.proxy.addName(woodenGearItem, "Wooden Gear");
stoneGearItem = (new ItemBuildCraft(Integer.parseInt(stoneGearId.value))).setIconIndex(1 * 16 + 1).setItemName( stoneGearItem = (new ItemBuildCraft(Integer.parseInt(stoneGearId.value))).setIconIndex(1 * 16 + 1).setItemName(
"stoneGearItem"); "stoneGearItem");
CoreProxy.addName(stoneGearItem, "Stone Gear"); ProxyCore.proxy.addName(stoneGearItem, "Stone Gear");
ironGearItem = (new ItemBuildCraft(Integer.parseInt(ironGearId.value))).setIconIndex(1 * 16 + 2).setItemName( ironGearItem = (new ItemBuildCraft(Integer.parseInt(ironGearId.value))).setIconIndex(1 * 16 + 2).setItemName(
"ironGearItem"); "ironGearItem");
CoreProxy.addName(ironGearItem, "Iron Gear"); ProxyCore.proxy.addName(ironGearItem, "Iron Gear");
goldGearItem = (new ItemBuildCraft(Integer.parseInt(goldenGearId.value))).setIconIndex(1 * 16 + 3).setItemName( goldGearItem = (new ItemBuildCraft(Integer.parseInt(goldenGearId.value))).setIconIndex(1 * 16 + 3).setItemName(
"goldGearItem"); "goldGearItem");
CoreProxy.addName(goldGearItem, "Gold Gear"); ProxyCore.proxy.addName(goldGearItem, "Gold Gear");
diamondGearItem = (new ItemBuildCraft(Integer.parseInt(diamondGearId.value))).setIconIndex(1 * 16 + 4).setItemName( diamondGearItem = (new ItemBuildCraft(Integer.parseInt(diamondGearId.value))).setIconIndex(1 * 16 + 4).setItemName(
"diamondGearItem"); "diamondGearItem");
CoreProxy.addName(diamondGearItem, "Diamond Gear"); ProxyCore.proxy.addName(diamondGearItem, "Diamond Gear");
BuildCraftCore.mainConfiguration.save(); BuildCraftCore.mainConfiguration.save();

View file

@ -22,9 +22,9 @@ import buildcraft.api.liquids.LiquidManager;
import buildcraft.api.liquids.LiquidStack; import buildcraft.api.liquids.LiquidStack;
import buildcraft.api.recipes.RefineryRecipe; import buildcraft.api.recipes.RefineryRecipe;
import buildcraft.core.BlockIndex; import buildcraft.core.BlockIndex;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.ItemBuildCraft; import buildcraft.core.ItemBuildCraft;
import buildcraft.core.ProxyCore;
import buildcraft.energy.BlockEngine; import buildcraft.energy.BlockEngine;
import buildcraft.energy.BlockOilFlowing; import buildcraft.energy.BlockOilFlowing;
import buildcraft.energy.BlockOilStill; import buildcraft.energy.BlockOilStill;
@ -107,17 +107,17 @@ public class BuildCraftEnergy {
Item.itemsList[engineBlock.blockID] = null; Item.itemsList[engineBlock.blockID] = null;
Item.itemsList[engineBlock.blockID] = (new ItemEngine(engineBlock.blockID - 256)); Item.itemsList[engineBlock.blockID] = (new ItemEngine(engineBlock.blockID - 256));
CoreProxy.addName(new ItemStack(engineBlock, 1, 0), "Redstone Engine"); ProxyCore.proxy.addName(new ItemStack(engineBlock, 1, 0), "Redstone Engine");
CoreProxy.addName(new ItemStack(engineBlock, 1, 1), "Steam Engine"); ProxyCore.proxy.addName(new ItemStack(engineBlock, 1, 1), "Steam Engine");
CoreProxy.addName(new ItemStack(engineBlock, 1, 2), "Combustion Engine"); ProxyCore.proxy.addName(new ItemStack(engineBlock, 1, 2), "Combustion Engine");
oilMoving = (new BlockOilFlowing(Integer.parseInt(oilMovingId.value), Material.water)).setBlockName("oil"); oilMoving = (new BlockOilFlowing(Integer.parseInt(oilMovingId.value), Material.water)).setBlockName("oil");
CoreProxy.addName(oilMoving.setBlockName("oilMoving"), "Oil"); ProxyCore.proxy.addName(oilMoving.setBlockName("oilMoving"), "Oil");
CoreProxy.registerBlock(oilMoving); ProxyCore.proxy.registerBlock(oilMoving);
oilStill = (new BlockOilStill(Integer.parseInt(oilStillId.value), Material.water)).setBlockName("oil"); oilStill = (new BlockOilStill(Integer.parseInt(oilStillId.value), Material.water)).setBlockName("oil");
CoreProxy.addName(oilStill.setBlockName("oilStill"), "Oil"); ProxyCore.proxy.addName(oilStill.setBlockName("oilStill"), "Oil");
CoreProxy.registerBlock(oilStill); ProxyCore.proxy.registerBlock(oilStill);
// Oil and fuel // Oil and fuel
if (oilMoving.blockID + 1 != oilStill.blockID) if (oilMoving.blockID + 1 != oilStill.blockID)
@ -127,14 +127,14 @@ public class BuildCraftEnergy {
bucketOil = (new ItemBucketOil(Integer.parseInt(bucketOilId.value))).setItemName("bucketOil").setContainerItem( bucketOil = (new ItemBucketOil(Integer.parseInt(bucketOilId.value))).setItemName("bucketOil").setContainerItem(
Item.bucketEmpty); Item.bucketEmpty);
CoreProxy.addName(bucketOil, "Oil Bucket"); ProxyCore.proxy.addName(bucketOil, "Oil Bucket");
fuel = new ItemBuildCraft(Integer.parseInt(itemFuelId.value)).setItemName("fuel"); fuel = new ItemBuildCraft(Integer.parseInt(itemFuelId.value)).setItemName("fuel");
CoreProxy.addName(fuel, "Fuel"); ProxyCore.proxy.addName(fuel, "Fuel");
bucketFuel = new ItemBuildCraft(Integer.parseInt(bucketFuelId.value)).setIconIndex(0 * 16 + 3).setItemName("bucketFuel") bucketFuel = new ItemBuildCraft(Integer.parseInt(bucketFuelId.value)).setIconIndex(0 * 16 + 3).setItemName("bucketFuel")
.setMaxStackSize(1).setContainerItem(Item.bucketEmpty); .setMaxStackSize(1).setContainerItem(Item.bucketEmpty);
CoreProxy.addName(bucketFuel, "Fuel Bucket"); ProxyCore.proxy.addName(bucketFuel, "Fuel Bucket");
RefineryRecipe.registerRefineryRecipe(new RefineryRecipe(new LiquidStack(oilStill.blockID, 1, 0), null, new LiquidStack(fuel.shiftedIndex, 1, 0), 10, 1)); RefineryRecipe.registerRefineryRecipe(new RefineryRecipe(new LiquidStack(oilStill.blockID, 1, 0), null, new LiquidStack(fuel.shiftedIndex, 1, 0), 10, 1));
@ -160,13 +160,13 @@ public class BuildCraftEnergy {
public static void loadRecipes() { public static void loadRecipes() {
CoreProxy.addCraftingRecipe(new ItemStack(engineBlock, 1, 0), new Object[] { "www", " g ", "GpG", Character.valueOf('w'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(engineBlock, 1, 0), new Object[] { "www", " g ", "GpG", Character.valueOf('w'),
Block.planks, Character.valueOf('g'), Block.glass, Character.valueOf('G'), BuildCraftCore.woodenGearItem, Block.planks, Character.valueOf('g'), Block.glass, Character.valueOf('G'), BuildCraftCore.woodenGearItem,
Character.valueOf('p'), Block.pistonBase }); Character.valueOf('p'), Block.pistonBase });
CoreProxy.addCraftingRecipe(new ItemStack(engineBlock, 1, 1), new Object[] { "www", " g ", "GpG", Character.valueOf('w'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(engineBlock, 1, 1), new Object[] { "www", " g ", "GpG", Character.valueOf('w'),
Block.cobblestone, Character.valueOf('g'), Block.glass, Character.valueOf('G'), BuildCraftCore.stoneGearItem, Block.cobblestone, Character.valueOf('g'), Block.glass, Character.valueOf('G'), BuildCraftCore.stoneGearItem,
Character.valueOf('p'), Block.pistonBase }); Character.valueOf('p'), Block.pistonBase });
CoreProxy.addCraftingRecipe(new ItemStack(engineBlock, 1, 2), new Object[] { "www", " g ", "GpG", Character.valueOf('w'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(engineBlock, 1, 2), new Object[] { "www", " g ", "GpG", Character.valueOf('w'),
Item.ingotIron, Character.valueOf('g'), Block.glass, Character.valueOf('G'), BuildCraftCore.ironGearItem, Item.ingotIron, Character.valueOf('g'), Block.glass, Character.valueOf('G'), BuildCraftCore.ironGearItem,
Character.valueOf('p'), Block.pistonBase }); Character.valueOf('p'), Block.pistonBase });
} }

View file

@ -9,8 +9,8 @@
package buildcraft; package buildcraft;
import buildcraft.mod_BuildCraftCore; import buildcraft.mod_BuildCraftCore;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.ProxyCore;
import buildcraft.factory.BlockAutoWorkbench; import buildcraft.factory.BlockAutoWorkbench;
import buildcraft.factory.BlockFrame; import buildcraft.factory.BlockFrame;
import buildcraft.factory.BlockHopper; import buildcraft.factory.BlockHopper;
@ -97,55 +97,55 @@ public class BuildCraftFactory {
BuildCraftCore.mainConfiguration.save(); BuildCraftCore.mainConfiguration.save();
miningWellBlock = new BlockMiningWell(Integer.parseInt(minigWellId.value)); miningWellBlock = new BlockMiningWell(Integer.parseInt(minigWellId.value));
CoreProxy.registerBlock(miningWellBlock.setBlockName("miningWellBlock")); ProxyCore.proxy.registerBlock(miningWellBlock.setBlockName("miningWellBlock"));
CoreProxy.addName(miningWellBlock, "Mining Well"); ProxyCore.proxy.addName(miningWellBlock, "Mining Well");
plainPipeBlock = new BlockPlainPipe(Integer.parseInt(plainPipeId.value)); plainPipeBlock = new BlockPlainPipe(Integer.parseInt(plainPipeId.value));
CoreProxy.registerBlock(plainPipeBlock.setBlockName("plainPipeBlock")); ProxyCore.proxy.registerBlock(plainPipeBlock.setBlockName("plainPipeBlock"));
CoreProxy.addName(plainPipeBlock, "Mining Pipe"); ProxyCore.proxy.addName(plainPipeBlock, "Mining Pipe");
autoWorkbenchBlock = new BlockAutoWorkbench(Integer.parseInt(autoWorkbenchId.value)); autoWorkbenchBlock = new BlockAutoWorkbench(Integer.parseInt(autoWorkbenchId.value));
CoreProxy.registerBlock(autoWorkbenchBlock.setBlockName("autoWorkbenchBlock")); ProxyCore.proxy.registerBlock(autoWorkbenchBlock.setBlockName("autoWorkbenchBlock"));
CoreProxy.addName(autoWorkbenchBlock, "Automatic Crafting Table"); ProxyCore.proxy.addName(autoWorkbenchBlock, "Automatic Crafting Table");
frameBlock = new BlockFrame(Integer.parseInt(frameId.value)); frameBlock = new BlockFrame(Integer.parseInt(frameId.value));
CoreProxy.registerBlock(frameBlock.setBlockName("frameBlock")); ProxyCore.proxy.registerBlock(frameBlock.setBlockName("frameBlock"));
CoreProxy.addName(frameBlock, "Frame"); ProxyCore.proxy.addName(frameBlock, "Frame");
quarryBlock = new BlockQuarry(Integer.parseInt(quarryId.value)); quarryBlock = new BlockQuarry(Integer.parseInt(quarryId.value));
CoreProxy.registerBlock(quarryBlock.setBlockName("machineBlock")); ProxyCore.proxy.registerBlock(quarryBlock.setBlockName("machineBlock"));
CoreProxy.addName(quarryBlock, "Quarry"); ProxyCore.proxy.addName(quarryBlock, "Quarry");
tankBlock = new BlockTank(Integer.parseInt(tankId.value)); tankBlock = new BlockTank(Integer.parseInt(tankId.value));
CoreProxy.registerBlock(tankBlock.setBlockName("tankBlock")); ProxyCore.proxy.registerBlock(tankBlock.setBlockName("tankBlock"));
CoreProxy.addName(tankBlock, "Tank"); ProxyCore.proxy.addName(tankBlock, "Tank");
pumpBlock = new BlockPump(Integer.parseInt(pumpId.value)); pumpBlock = new BlockPump(Integer.parseInt(pumpId.value));
CoreProxy.registerBlock(pumpBlock.setBlockName("pumpBlock")); ProxyCore.proxy.registerBlock(pumpBlock.setBlockName("pumpBlock"));
CoreProxy.addName(pumpBlock, "Pump"); ProxyCore.proxy.addName(pumpBlock, "Pump");
refineryBlock = new BlockRefinery(Integer.parseInt(refineryId.value)); refineryBlock = new BlockRefinery(Integer.parseInt(refineryId.value));
CoreProxy.registerBlock(refineryBlock.setBlockName("refineryBlock")); ProxyCore.proxy.registerBlock(refineryBlock.setBlockName("refineryBlock"));
CoreProxy.addName(refineryBlock, "Refinery"); ProxyCore.proxy.addName(refineryBlock, "Refinery");
hopperDisabled = Boolean.parseBoolean(hopperDisable.value); hopperDisabled = Boolean.parseBoolean(hopperDisable.value);
if (!hopperDisabled) { if (!hopperDisabled) {
hopperBlock = new BlockHopper(Integer.parseInt(hopperId.value)); hopperBlock = new BlockHopper(Integer.parseInt(hopperId.value));
CoreProxy.registerBlock(hopperBlock.setBlockName("blockHopper")); ProxyCore.proxy.registerBlock(hopperBlock.setBlockName("blockHopper"));
CoreProxy.addName(hopperBlock, "Hopper"); ProxyCore.proxy.addName(hopperBlock, "Hopper");
} }
CoreProxy.registerTileEntity(TileQuarry.class, "Machine"); ProxyCore.proxy.registerTileEntity(TileQuarry.class, "Machine");
CoreProxy.registerTileEntity(TileMiningWell.class, "MiningWell"); ProxyCore.proxy.registerTileEntity(TileMiningWell.class, "MiningWell");
CoreProxy.registerTileEntity(TileAutoWorkbench.class, "AutoWorkbench"); ProxyCore.proxy.registerTileEntity(TileAutoWorkbench.class, "AutoWorkbench");
CoreProxy.registerTileEntity(TilePump.class, "net.minecraft.src.buildcraft.factory.TilePump"); ProxyCore.proxy.registerTileEntity(TilePump.class, "net.minecraft.src.buildcraft.factory.TilePump");
CoreProxy.registerTileEntity(TileTank.class, "net.minecraft.src.buildcraft.factory.TileTank"); ProxyCore.proxy.registerTileEntity(TileTank.class, "net.minecraft.src.buildcraft.factory.TileTank");
CoreProxy.registerTileEntity(TileRefinery.class, "net.minecraft.src.buildcraft.factory.Refinery"); ProxyCore.proxy.registerTileEntity(TileRefinery.class, "net.minecraft.src.buildcraft.factory.Refinery");
CoreProxy.registerTileEntity(TileLaser.class, "net.minecraft.src.buildcraft.factory.TileLaser"); ProxyCore.proxy.registerTileEntity(TileLaser.class, "net.minecraft.src.buildcraft.factory.TileLaser");
CoreProxy.registerTileEntity(TileAssemblyTable.class, "net.minecraft.src.buildcraft.factory.TileAssemblyTable"); ProxyCore.proxy.registerTileEntity(TileAssemblyTable.class, "net.minecraft.src.buildcraft.factory.TileAssemblyTable");
if (!hopperDisabled) { if (!hopperDisabled) {
CoreProxy.registerTileEntity(TileHopper.class, "net.minecraft.src.buildcraft.factory.TileHopper"); ProxyCore.proxy.registerTileEntity(TileHopper.class, "net.minecraft.src.buildcraft.factory.TileHopper");
} }
drillTexture = 2 * 16 + 1; drillTexture = 2 * 16 + 1;
@ -164,31 +164,31 @@ public class BuildCraftFactory {
public static void loadRecipes() { public static void loadRecipes() {
if (allowMining) { if (allowMining) {
CoreProxy.addCraftingRecipe(new ItemStack(miningWellBlock, 1), ProxyCore.proxy.addCraftingRecipe(new ItemStack(miningWellBlock, 1),
new Object[] { "ipi", "igi", "iPi", Character.valueOf('p'), Item.redstone, Character.valueOf('i'), new Object[] { "ipi", "igi", "iPi", Character.valueOf('p'), Item.redstone, Character.valueOf('i'),
Item.ingotIron, Character.valueOf('g'), BuildCraftCore.ironGearItem, Character.valueOf('P'), Item.ingotIron, Character.valueOf('g'), BuildCraftCore.ironGearItem, Character.valueOf('P'),
Item.pickaxeSteel }); Item.pickaxeSteel });
CoreProxy.addCraftingRecipe(new ItemStack(quarryBlock), new Object[] { "ipi", "gig", "dDd", Character.valueOf('i'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(quarryBlock), new Object[] { "ipi", "gig", "dDd", Character.valueOf('i'),
BuildCraftCore.ironGearItem, Character.valueOf('p'), Item.redstone, Character.valueOf('g'), BuildCraftCore.ironGearItem, Character.valueOf('p'), Item.redstone, Character.valueOf('g'),
BuildCraftCore.goldGearItem, Character.valueOf('d'), BuildCraftCore.diamondGearItem, Character.valueOf('D'), BuildCraftCore.goldGearItem, Character.valueOf('d'), BuildCraftCore.diamondGearItem, Character.valueOf('D'),
Item.pickaxeDiamond, }); Item.pickaxeDiamond, });
} }
CoreProxy.addCraftingRecipe(new ItemStack(autoWorkbenchBlock), new Object[] { " g ", "gwg", " g ", Character.valueOf('w'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(autoWorkbenchBlock), new Object[] { " g ", "gwg", " g ", Character.valueOf('w'),
Block.workbench, Character.valueOf('g'), BuildCraftCore.woodenGearItem }); Block.workbench, Character.valueOf('g'), BuildCraftCore.woodenGearItem });
CoreProxy.addCraftingRecipe(new ItemStack(pumpBlock), new Object[] { "T ", "W ", Character.valueOf('T'), tankBlock, ProxyCore.proxy.addCraftingRecipe(new ItemStack(pumpBlock), new Object[] { "T ", "W ", Character.valueOf('T'), tankBlock,
Character.valueOf('W'), miningWellBlock, }); Character.valueOf('W'), miningWellBlock, });
CoreProxy.addCraftingRecipe(new ItemStack(tankBlock), new Object[] { "ggg", "g g", "ggg", Character.valueOf('g'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(tankBlock), new Object[] { "ggg", "g g", "ggg", Character.valueOf('g'),
Block.glass, }); Block.glass, });
CoreProxy.addCraftingRecipe(new ItemStack(refineryBlock), new Object[] { " ", "RTR", "TGT", Character.valueOf('T'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(refineryBlock), new Object[] { " ", "RTR", "TGT", Character.valueOf('T'),
tankBlock, Character.valueOf('G'), BuildCraftCore.diamondGearItem, Character.valueOf('R'), tankBlock, Character.valueOf('G'), BuildCraftCore.diamondGearItem, Character.valueOf('R'),
Block.torchRedstoneActive, }); Block.torchRedstoneActive, });
if (!hopperDisabled) { if (!hopperDisabled) {
CoreProxy.addCraftingRecipe(new ItemStack(hopperBlock), new Object[] { "ICI", "IGI", " I ", Character.valueOf('I'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(hopperBlock), new Object[] { "ICI", "IGI", " I ", Character.valueOf('I'),
Item.ingotIron, Character.valueOf('C'), Block.chest, Character.valueOf('G'), BuildCraftCore.stoneGearItem }); Item.ingotIron, Character.valueOf('C'), Block.chest, Character.valueOf('G'), BuildCraftCore.stoneGearItem });
} }

View file

@ -14,9 +14,9 @@ import buildcraft.mod_BuildCraftCore;
import buildcraft.api.bptblocks.BptBlockInventory; import buildcraft.api.bptblocks.BptBlockInventory;
import buildcraft.api.bptblocks.BptBlockRotateMeta; import buildcraft.api.bptblocks.BptBlockRotateMeta;
import buildcraft.api.recipes.AssemblyRecipe; import buildcraft.api.recipes.AssemblyRecipe;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.ItemRedstoneChipset; import buildcraft.core.ItemRedstoneChipset;
import buildcraft.core.ProxyCore;
import buildcraft.silicon.BlockAssemblyTable; import buildcraft.silicon.BlockAssemblyTable;
import buildcraft.silicon.BlockLaser; import buildcraft.silicon.BlockLaser;
import buildcraft.silicon.GuiHandler; import buildcraft.silicon.GuiHandler;
@ -56,12 +56,12 @@ public class BuildCraftSilicon {
BuildCraftCore.mainConfiguration.save(); BuildCraftCore.mainConfiguration.save();
laserBlock = new BlockLaser(Integer.parseInt(laserId.value)); laserBlock = new BlockLaser(Integer.parseInt(laserId.value));
CoreProxy.addName(laserBlock.setBlockName("laserBlock"), "Laser"); ProxyCore.proxy.addName(laserBlock.setBlockName("laserBlock"), "Laser");
CoreProxy.registerBlock(laserBlock); ProxyCore.proxy.registerBlock(laserBlock);
assemblyTableBlock = new BlockAssemblyTable(Integer.parseInt(assemblyTableId.value)); assemblyTableBlock = new BlockAssemblyTable(Integer.parseInt(assemblyTableId.value));
CoreProxy.addName(assemblyTableBlock.setBlockName("assemblyTableBlock"), "Assembly Table"); ProxyCore.proxy.addName(assemblyTableBlock.setBlockName("assemblyTableBlock"), "Assembly Table");
CoreProxy.registerBlock(assemblyTableBlock); ProxyCore.proxy.registerBlock(assemblyTableBlock);
redstoneChipset = new ItemRedstoneChipset(DefaultProps.REDSTONE_CHIPSET); redstoneChipset = new ItemRedstoneChipset(DefaultProps.REDSTONE_CHIPSET);
redstoneChipset.setItemName("redstoneChipset"); redstoneChipset.setItemName("redstoneChipset");
@ -69,89 +69,89 @@ public class BuildCraftSilicon {
// / REDSTONE CHIPSETS // / REDSTONE CHIPSETS
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.redstone) }, 10000, AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.redstone) }, 10000,
new ItemStack(redstoneChipset, 1, 0))); new ItemStack(redstoneChipset, 1, 0)));
CoreProxy.addName(new ItemStack(redstoneChipset, 1, 0), "Redstone Chipset"); ProxyCore.proxy.addName(new ItemStack(redstoneChipset, 1, 0), "Redstone Chipset");
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.redstone), AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.redstone),
new ItemStack(Item.ingotIron) }, 20000, new ItemStack(redstoneChipset, 1, 1))); new ItemStack(Item.ingotIron) }, 20000, new ItemStack(redstoneChipset, 1, 1)));
CoreProxy.addName(new ItemStack(redstoneChipset, 1, 1), "Redstone Iron Chipset"); ProxyCore.proxy.addName(new ItemStack(redstoneChipset, 1, 1), "Redstone Iron Chipset");
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.redstone), AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.redstone),
new ItemStack(Item.ingotGold) }, 40000, new ItemStack(redstoneChipset, 1, 2))); new ItemStack(Item.ingotGold) }, 40000, new ItemStack(redstoneChipset, 1, 2)));
CoreProxy.addName(new ItemStack(redstoneChipset, 1, 2), "Redstone Golden Chipset"); ProxyCore.proxy.addName(new ItemStack(redstoneChipset, 1, 2), "Redstone Golden Chipset");
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.redstone), AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.redstone),
new ItemStack(Item.diamond) }, 80000, new ItemStack(redstoneChipset, 1, 3))); new ItemStack(Item.diamond) }, 80000, new ItemStack(redstoneChipset, 1, 3)));
CoreProxy.addName(new ItemStack(redstoneChipset, 1, 3), "Redstone Diamond Chipset"); ProxyCore.proxy.addName(new ItemStack(redstoneChipset, 1, 3), "Redstone Diamond Chipset");
// PULSATING CHIPSETS // PULSATING CHIPSETS
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.redstone), AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.redstone),
new ItemStack(Item.enderPearl) }, 40000, new ItemStack(redstoneChipset, 2, 4))); new ItemStack(Item.enderPearl) }, 40000, new ItemStack(redstoneChipset, 2, 4)));
CoreProxy.addName(new ItemStack(redstoneChipset, 1, 4), "Pulsating Chipset"); ProxyCore.proxy.addName(new ItemStack(redstoneChipset, 1, 4), "Pulsating Chipset");
// / REDSTONE GATES // / REDSTONE GATES
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(redstoneChipset, 1, 0) }, 20000, AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(redstoneChipset, 1, 0) }, 20000,
new ItemStack(BuildCraftTransport.pipeGate, 1, 0))); new ItemStack(BuildCraftTransport.pipeGate, 1, 0)));
CoreProxy.addName(new ItemStack(BuildCraftTransport.pipeGate, 1, 0), "Gate"); ProxyCore.proxy.addName(new ItemStack(BuildCraftTransport.pipeGate, 1, 0), "Gate");
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] {
new ItemStack(BuildCraftTransport.pipeGate, 1, 0), new ItemStack(redstoneChipset, 1, 4), new ItemStack(BuildCraftTransport.pipeGate, 1, 0), new ItemStack(redstoneChipset, 1, 4),
new ItemStack(redstoneChipset, 1, 1) }, 10000, new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 0))); new ItemStack(redstoneChipset, 1, 1) }, 10000, new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 0)));
CoreProxy.addName(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 0), "Autarchic Gate"); ProxyCore.proxy.addName(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 0), "Autarchic Gate");
// / IRON AND GATES // / IRON AND GATES
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(redstoneChipset, 1, 1), AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(redstoneChipset, 1, 1),
new ItemStack(BuildCraftTransport.redPipeWire) }, 40000, new ItemStack(BuildCraftTransport.pipeGate, 1, 1))); new ItemStack(BuildCraftTransport.redPipeWire) }, 40000, new ItemStack(BuildCraftTransport.pipeGate, 1, 1)));
CoreProxy.addName(new ItemStack(BuildCraftTransport.pipeGate, 1, 1), "Iron AND Gate"); ProxyCore.proxy.addName(new ItemStack(BuildCraftTransport.pipeGate, 1, 1), "Iron AND Gate");
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] {
new ItemStack(BuildCraftTransport.pipeGate, 1, 1), new ItemStack(redstoneChipset, 1, 4), new ItemStack(BuildCraftTransport.pipeGate, 1, 1), new ItemStack(redstoneChipset, 1, 4),
new ItemStack(redstoneChipset, 1, 1) }, 20000, new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 1))); new ItemStack(redstoneChipset, 1, 1) }, 20000, new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 1)));
CoreProxy.addName(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 1), "Autarchic Iron AND Gate"); ProxyCore.proxy.addName(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 1), "Autarchic Iron AND Gate");
// / IRON OR GATES // / IRON OR GATES
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(redstoneChipset, 1, 1), AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(redstoneChipset, 1, 1),
new ItemStack(BuildCraftTransport.redPipeWire) }, 40000, new ItemStack(BuildCraftTransport.pipeGate, 1, 2))); new ItemStack(BuildCraftTransport.redPipeWire) }, 40000, new ItemStack(BuildCraftTransport.pipeGate, 1, 2)));
CoreProxy.addName(new ItemStack(BuildCraftTransport.pipeGate, 1, 2), "Iron OR Gate"); ProxyCore.proxy.addName(new ItemStack(BuildCraftTransport.pipeGate, 1, 2), "Iron OR Gate");
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] {
new ItemStack(BuildCraftTransport.pipeGate, 1, 2), new ItemStack(redstoneChipset, 1, 4), new ItemStack(BuildCraftTransport.pipeGate, 1, 2), new ItemStack(redstoneChipset, 1, 4),
new ItemStack(redstoneChipset, 1, 1) }, 20000, new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 2))); new ItemStack(redstoneChipset, 1, 1) }, 20000, new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 2)));
CoreProxy.addName(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 2), "Autarchic Iron OR Gate"); ProxyCore.proxy.addName(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 2), "Autarchic Iron OR Gate");
// / GOLD AND GATES // / GOLD AND GATES
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(redstoneChipset, 1, 2), AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(redstoneChipset, 1, 2),
new ItemStack(BuildCraftTransport.redPipeWire), new ItemStack(BuildCraftTransport.bluePipeWire) }, 80000, new ItemStack(BuildCraftTransport.redPipeWire), new ItemStack(BuildCraftTransport.bluePipeWire) }, 80000,
new ItemStack(BuildCraftTransport.pipeGate, 1, 3))); new ItemStack(BuildCraftTransport.pipeGate, 1, 3)));
CoreProxy.addName(new ItemStack(BuildCraftTransport.pipeGate, 1, 3), "Gold AND Gate"); ProxyCore.proxy.addName(new ItemStack(BuildCraftTransport.pipeGate, 1, 3), "Gold AND Gate");
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] {
new ItemStack(BuildCraftTransport.pipeGate, 1, 3), new ItemStack(redstoneChipset, 1, 4), new ItemStack(BuildCraftTransport.pipeGate, 1, 3), new ItemStack(redstoneChipset, 1, 4),
new ItemStack(redstoneChipset, 1, 1) }, 40000, new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 3))); new ItemStack(redstoneChipset, 1, 1) }, 40000, new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 3)));
CoreProxy.addName(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 3), "Autarchic Gold AND Gate"); ProxyCore.proxy.addName(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 3), "Autarchic Gold AND Gate");
// / GOLD OR GATES // / GOLD OR GATES
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(redstoneChipset, 1, 2), AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(redstoneChipset, 1, 2),
new ItemStack(BuildCraftTransport.redPipeWire), new ItemStack(BuildCraftTransport.bluePipeWire) }, 80000, new ItemStack(BuildCraftTransport.redPipeWire), new ItemStack(BuildCraftTransport.bluePipeWire) }, 80000,
new ItemStack(BuildCraftTransport.pipeGate, 1, 4))); new ItemStack(BuildCraftTransport.pipeGate, 1, 4)));
CoreProxy.addName(new ItemStack(BuildCraftTransport.pipeGate, 1, 4), "Gold OR Gate"); ProxyCore.proxy.addName(new ItemStack(BuildCraftTransport.pipeGate, 1, 4), "Gold OR Gate");
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] {
new ItemStack(BuildCraftTransport.pipeGate, 1, 4), new ItemStack(redstoneChipset, 1, 4), new ItemStack(BuildCraftTransport.pipeGate, 1, 4), new ItemStack(redstoneChipset, 1, 4),
new ItemStack(redstoneChipset, 1, 1) }, 40000, new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 4))); new ItemStack(redstoneChipset, 1, 1) }, 40000, new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 4)));
CoreProxy.addName(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 4), "Autarchic Gold OR Gate"); ProxyCore.proxy.addName(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 4), "Autarchic Gold OR Gate");
// / DIAMOND AND GATES // / DIAMOND AND GATES
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(redstoneChipset, 1, 3), AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(redstoneChipset, 1, 3),
new ItemStack(BuildCraftTransport.redPipeWire), new ItemStack(BuildCraftTransport.bluePipeWire), new ItemStack(BuildCraftTransport.redPipeWire), new ItemStack(BuildCraftTransport.bluePipeWire),
new ItemStack(BuildCraftTransport.greenPipeWire), new ItemStack(BuildCraftTransport.yellowPipeWire) }, 160000, new ItemStack(BuildCraftTransport.greenPipeWire), new ItemStack(BuildCraftTransport.yellowPipeWire) }, 160000,
new ItemStack(BuildCraftTransport.pipeGate, 1, 5))); new ItemStack(BuildCraftTransport.pipeGate, 1, 5)));
CoreProxy.addName(new ItemStack(BuildCraftTransport.pipeGate, 1, 5), "Diamond AND Gate"); ProxyCore.proxy.addName(new ItemStack(BuildCraftTransport.pipeGate, 1, 5), "Diamond AND Gate");
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] {
new ItemStack(BuildCraftTransport.pipeGate, 1, 5), new ItemStack(redstoneChipset, 1, 4), new ItemStack(BuildCraftTransport.pipeGate, 1, 5), new ItemStack(redstoneChipset, 1, 4),
new ItemStack(redstoneChipset, 1, 1) }, 80000, new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 5))); new ItemStack(redstoneChipset, 1, 1) }, 80000, new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 5)));
CoreProxy.addName(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 5), "Autarchic Diamond AND Gate"); ProxyCore.proxy.addName(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 5), "Autarchic Diamond AND Gate");
// / DIAMOND OR GATES // / DIAMOND OR GATES
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(redstoneChipset, 1, 3), AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(redstoneChipset, 1, 3),
new ItemStack(BuildCraftTransport.redPipeWire), new ItemStack(BuildCraftTransport.bluePipeWire), new ItemStack(BuildCraftTransport.redPipeWire), new ItemStack(BuildCraftTransport.bluePipeWire),
new ItemStack(BuildCraftTransport.greenPipeWire), new ItemStack(BuildCraftTransport.yellowPipeWire) }, 160000, new ItemStack(BuildCraftTransport.greenPipeWire), new ItemStack(BuildCraftTransport.yellowPipeWire) }, 160000,
new ItemStack(BuildCraftTransport.pipeGate, 1, 6))); new ItemStack(BuildCraftTransport.pipeGate, 1, 6)));
CoreProxy.addName(new ItemStack(BuildCraftTransport.pipeGate, 1, 6), "Diamond OR Gate"); ProxyCore.proxy.addName(new ItemStack(BuildCraftTransport.pipeGate, 1, 6), "Diamond OR Gate");
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] {
new ItemStack(BuildCraftTransport.pipeGate, 1, 6), new ItemStack(redstoneChipset, 1, 4), new ItemStack(BuildCraftTransport.pipeGate, 1, 6), new ItemStack(redstoneChipset, 1, 4),
new ItemStack(redstoneChipset, 1, 1) }, 80000, new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 6))); new ItemStack(redstoneChipset, 1, 1) }, 80000, new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 6)));
CoreProxy.addName(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 6), "Autarchic Diamond OR Gate"); ProxyCore.proxy.addName(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 6), "Autarchic Diamond OR Gate");
new BptBlockRotateMeta(laserBlock.blockID, new int[] { 2, 5, 3, 4 }, true); new BptBlockRotateMeta(laserBlock.blockID, new int[] { 2, 5, 3, 4 }, true);
new BptBlockInventory(assemblyTableBlock.blockID); new BptBlockInventory(assemblyTableBlock.blockID);
@ -163,10 +163,10 @@ public class BuildCraftSilicon {
public static void loadRecipes() { public static void loadRecipes() {
CoreProxy.addCraftingRecipe(new ItemStack(laserBlock), new Object[] { "ORR", "DDR", "ORR", Character.valueOf('O'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(laserBlock), new Object[] { "ORR", "DDR", "ORR", Character.valueOf('O'),
Block.obsidian, Character.valueOf('R'), Item.redstone, Character.valueOf('D'), Item.diamond, }); Block.obsidian, Character.valueOf('R'), Item.redstone, Character.valueOf('D'), Item.diamond, });
CoreProxy.addCraftingRecipe(new ItemStack(assemblyTableBlock), ProxyCore.proxy.addCraftingRecipe(new ItemStack(assemblyTableBlock),
new Object[] { "ORO", "ODO", "OGO", Character.valueOf('O'), Block.obsidian, Character.valueOf('R'), new Object[] { "ORO", "ODO", "OGO", Character.valueOf('O'), Block.obsidian, Character.valueOf('R'),
Item.redstone, Character.valueOf('D'), Item.diamond, Character.valueOf('G'), Item.redstone, Character.valueOf('D'), Item.diamond, Character.valueOf('G'),
BuildCraftCore.diamondGearItem, }); BuildCraftCore.diamondGearItem, });
@ -174,39 +174,39 @@ public class BuildCraftSilicon {
//Add reverse recipies for all gates //Add reverse recipies for all gates
//Iron //Iron
CoreProxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGate, 1, 2), ProxyCore.proxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGate, 1, 2),
new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGate, 1, 1)}); new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGate, 1, 1)});
CoreProxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGate, 1, 1), ProxyCore.proxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGate, 1, 1),
new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGate, 1, 2)}); new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGate, 1, 2)});
//Gold //Gold
CoreProxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGate, 1, 4), ProxyCore.proxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGate, 1, 4),
new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGate, 1, 3)}); new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGate, 1, 3)});
CoreProxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGate, 1, 3), ProxyCore.proxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGate, 1, 3),
new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGate, 1, 4)}); new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGate, 1, 4)});
//Diamond //Diamond
CoreProxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGate, 1, 6), ProxyCore.proxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGate, 1, 6),
new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGate, 1, 5)}); new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGate, 1, 5)});
CoreProxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGate, 1, 5), ProxyCore.proxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGate, 1, 5),
new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGate, 1, 6)}); new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGate, 1, 6)});
//Iron - Autarchic //Iron - Autarchic
CoreProxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 2), ProxyCore.proxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 2),
new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 1)}); new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 1)});
CoreProxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 1), ProxyCore.proxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 1),
new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 2)}); new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 2)});
//Gold - Autarchic //Gold - Autarchic
CoreProxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 4), ProxyCore.proxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 4),
new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 3)}); new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 3)});
CoreProxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 3), ProxyCore.proxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 3),
new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 4)}); new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 4)});
//Diamond - Autarchic //Diamond - Autarchic
CoreProxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 6), ProxyCore.proxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 6),
new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 5)}); new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 5)});
CoreProxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 5), ProxyCore.proxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 5),
new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 6)}); new Object[]{new ItemStack(redstoneChipset, 1, 0), new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 6)});

View file

@ -21,9 +21,9 @@ import buildcraft.api.recipes.AssemblyRecipe;
import buildcraft.api.transport.IPipe; import buildcraft.api.transport.IPipe;
import buildcraft.api.transport.IExtractionHandler; import buildcraft.api.transport.IExtractionHandler;
import buildcraft.api.transport.PipeManager; import buildcraft.api.transport.PipeManager;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.ItemBuildCraft; import buildcraft.core.ItemBuildCraft;
import buildcraft.core.ProxyCore;
import buildcraft.transport.ActionEnergyPulser; import buildcraft.transport.ActionEnergyPulser;
import buildcraft.transport.ActionSignalOutput; import buildcraft.transport.ActionSignalOutput;
import buildcraft.transport.BlockGenericPipe; import buildcraft.transport.BlockGenericPipe;
@ -254,9 +254,9 @@ public class BuildCraftTransport {
pipeWaterproof = new ItemBuildCraft(DefaultProps.PIPE_WATERPROOF_ID).setIconIndex(2 * 16 + 1); pipeWaterproof = new ItemBuildCraft(DefaultProps.PIPE_WATERPROOF_ID).setIconIndex(2 * 16 + 1);
pipeWaterproof.setItemName("pipeWaterproof"); pipeWaterproof.setItemName("pipeWaterproof");
CoreProxy.addName(pipeWaterproof, "Pipe Waterproof"); ProxyCore.proxy.addName(pipeWaterproof, "Pipe Waterproof");
genericPipeBlock = new BlockGenericPipe(Integer.parseInt(genericPipeId.value)); genericPipeBlock = new BlockGenericPipe(Integer.parseInt(genericPipeId.value));
CoreProxy.registerBlock(genericPipeBlock); ProxyCore.proxy.registerBlock(genericPipeBlock);
// Fixing retro-compatiblity // Fixing retro-compatiblity
mod_BuildCraftTransport.registerTilePipe(TileDummyGenericPipe.class, "net.minecraft.src.buildcraft.GenericPipe"); mod_BuildCraftTransport.registerTilePipe(TileDummyGenericPipe.class, "net.minecraft.src.buildcraft.GenericPipe");
@ -338,25 +338,25 @@ public class BuildCraftTransport {
redPipeWire = new ItemBuildCraft(DefaultProps.RED_PIPE_WIRE).setIconIndex(4 * 16 + 0); redPipeWire = new ItemBuildCraft(DefaultProps.RED_PIPE_WIRE).setIconIndex(4 * 16 + 0);
redPipeWire.setItemName("redPipeWire"); redPipeWire.setItemName("redPipeWire");
CoreProxy.addName(redPipeWire, "Red Pipe Wire"); ProxyCore.proxy.addName(redPipeWire, "Red Pipe Wire");
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.dyePowder, 1, 1), AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.dyePowder, 1, 1),
new ItemStack(Item.redstone, 1), new ItemStack(Item.ingotIron, 1) }, 500, new ItemStack(redPipeWire, 8))); new ItemStack(Item.redstone, 1), new ItemStack(Item.ingotIron, 1) }, 500, new ItemStack(redPipeWire, 8)));
bluePipeWire = new ItemBuildCraft(DefaultProps.BLUE_PIPE_WIRE).setIconIndex(4 * 16 + 1); bluePipeWire = new ItemBuildCraft(DefaultProps.BLUE_PIPE_WIRE).setIconIndex(4 * 16 + 1);
bluePipeWire.setItemName("bluePipeWire"); bluePipeWire.setItemName("bluePipeWire");
CoreProxy.addName(bluePipeWire, "Blue Pipe Wire"); ProxyCore.proxy.addName(bluePipeWire, "Blue Pipe Wire");
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.dyePowder, 1, 4), AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.dyePowder, 1, 4),
new ItemStack(Item.redstone, 1), new ItemStack(Item.ingotIron, 1) }, 500, new ItemStack(bluePipeWire, 8))); new ItemStack(Item.redstone, 1), new ItemStack(Item.ingotIron, 1) }, 500, new ItemStack(bluePipeWire, 8)));
greenPipeWire = new ItemBuildCraft(DefaultProps.GREEN_PIPE_WIRE).setIconIndex(4 * 16 + 2); greenPipeWire = new ItemBuildCraft(DefaultProps.GREEN_PIPE_WIRE).setIconIndex(4 * 16 + 2);
greenPipeWire.setItemName("greenPipeWire"); greenPipeWire.setItemName("greenPipeWire");
CoreProxy.addName(greenPipeWire, "Green Pipe Wire"); ProxyCore.proxy.addName(greenPipeWire, "Green Pipe Wire");
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.dyePowder, 1, 2), AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.dyePowder, 1, 2),
new ItemStack(Item.redstone, 1), new ItemStack(Item.ingotIron, 1) }, 500, new ItemStack(greenPipeWire, 8))); new ItemStack(Item.redstone, 1), new ItemStack(Item.ingotIron, 1) }, 500, new ItemStack(greenPipeWire, 8)));
yellowPipeWire = new ItemBuildCraft(DefaultProps.YELLOW_PIPE_WIRE).setIconIndex(4 * 16 + 3); yellowPipeWire = new ItemBuildCraft(DefaultProps.YELLOW_PIPE_WIRE).setIconIndex(4 * 16 + 3);
yellowPipeWire.setItemName("yellowPipeWire"); yellowPipeWire.setItemName("yellowPipeWire");
CoreProxy.addName(yellowPipeWire, "Yellow Pipe Wire"); ProxyCore.proxy.addName(yellowPipeWire, "Yellow Pipe Wire");
AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.dyePowder, 1, 11), AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] { new ItemStack(Item.dyePowder, 1, 11),
new ItemStack(Item.redstone, 1), new ItemStack(Item.ingotIron, 1) }, 500, new ItemStack(yellowPipeWire, 8))); new ItemStack(Item.redstone, 1), new ItemStack(Item.ingotIron, 1) }, 500, new ItemStack(yellowPipeWire, 8)));
@ -392,15 +392,15 @@ public class BuildCraftTransport {
public static void loadRecipes() { public static void loadRecipes() {
// Add base recipe for pipe waterproof. // Add base recipe for pipe waterproof.
CoreProxy.addCraftingRecipe(new ItemStack(pipeWaterproof, 1), new Object[] { "W ", " ", Character.valueOf('W'), ProxyCore.proxy.addCraftingRecipe(new ItemStack(pipeWaterproof, 1), new Object[] { "W ", " ", Character.valueOf('W'),
new ItemStack(Item.dyePowder, 1, 2) }); new ItemStack(Item.dyePowder, 1, 2) });
// Add pipe recipes // Add pipe recipes
for (PipeRecipe pipe : pipeRecipes) for (PipeRecipe pipe : pipeRecipes)
if (pipe.isShapeless) if (pipe.isShapeless)
CoreProxy.addShapelessRecipe(pipe.result, pipe.input); ProxyCore.proxy.addShapelessRecipe(pipe.result, pipe.input);
else else
CoreProxy.addCraftingRecipe(pipe.result, pipe.input); ProxyCore.proxy.addCraftingRecipe(pipe.result, pipe.input);
} }
private static Item createPipe(int defaultID, Class<? extends Pipe> clas, String descr, Object ingredient1, private static Item createPipe(int defaultID, Class<? extends Pipe> clas, String descr, Object ingredient1,
@ -413,7 +413,7 @@ public class BuildCraftTransport {
int id = Integer.parseInt(prop.value); int id = Integer.parseInt(prop.value);
ItemPipe res = BlockGenericPipe.registerPipe(id, clas); ItemPipe res = BlockGenericPipe.registerPipe(id, clas);
res.setItemName(clas.getSimpleName()); res.setItemName(clas.getSimpleName());
CoreProxy.addName(res, descr); ProxyCore.proxy.addName(res, descr);
// Add appropriate recipe to temporary list // Add appropriate recipe to temporary list
PipeRecipe recipe = new PipeRecipe(); PipeRecipe recipe = new PipeRecipe();

View file

@ -15,9 +15,9 @@ import buildcraft.mod_BuildCraftBuilders;
import buildcraft.api.core.Orientations; import buildcraft.api.core.Orientations;
import buildcraft.api.core.Position; import buildcraft.api.core.Position;
import buildcraft.api.tools.IToolWrench; import buildcraft.api.tools.IToolWrench;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.GuiIds; import buildcraft.core.GuiIds;
import buildcraft.core.ProxyCore;
import buildcraft.core.Utils; import buildcraft.core.Utils;
import net.minecraft.src.BlockContainer; import net.minecraft.src.BlockContainer;
@ -92,7 +92,7 @@ public class BlockArchitect extends BlockContainer {
return true; return true;
} else { } else {
if (!CoreProxy.isClient(world)) if (!ProxyCore.proxy.isClient(world))
entityplayer.openGui(mod_BuildCraftBuilders.instance, GuiIds.ARCHITECT_TABLE, world, i, j, k); entityplayer.openGui(mod_BuildCraftBuilders.instance, GuiIds.ARCHITECT_TABLE, world, i, j, k);
return true; return true;

View file

@ -12,9 +12,9 @@ package buildcraft.builders;
import java.util.ArrayList; import java.util.ArrayList;
import buildcraft.mod_BuildCraftBuilders; import buildcraft.mod_BuildCraftBuilders;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.GuiIds; import buildcraft.core.GuiIds;
import buildcraft.core.ProxyCore;
import net.minecraft.src.BlockContainer; import net.minecraft.src.BlockContainer;
import net.minecraft.src.EntityLiving; import net.minecraft.src.EntityLiving;
@ -48,7 +48,7 @@ public class BlockBlueprintLibrary extends BlockContainer {
TileBlueprintLibrary tile = (TileBlueprintLibrary) world.getBlockTileEntity(i, j, k); TileBlueprintLibrary tile = (TileBlueprintLibrary) world.getBlockTileEntity(i, j, k);
if (!tile.locked || entityplayer.username.equals(tile.owner)) if (!tile.locked || entityplayer.username.equals(tile.owner))
if (!CoreProxy.isClient(world)) if (!ProxyCore.proxy.isClient(world))
entityplayer.openGui(mod_BuildCraftBuilders.instance, GuiIds.BLUEPRINT_LIBRARY, world, i, j, k); entityplayer.openGui(mod_BuildCraftBuilders.instance, GuiIds.BLUEPRINT_LIBRARY, world, i, j, k);
return true; return true;

View file

@ -15,9 +15,9 @@ import buildcraft.mod_BuildCraftBuilders;
import buildcraft.api.core.Orientations; import buildcraft.api.core.Orientations;
import buildcraft.api.core.Position; import buildcraft.api.core.Position;
import buildcraft.api.tools.IToolWrench; import buildcraft.api.tools.IToolWrench;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.GuiIds; import buildcraft.core.GuiIds;
import buildcraft.core.ProxyCore;
import buildcraft.core.Utils; import buildcraft.core.Utils;
import net.minecraft.src.BlockContainer; import net.minecraft.src.BlockContainer;
@ -105,7 +105,7 @@ public class BlockBuilder extends BlockContainer {
return true; return true;
} else { } else {
if (!CoreProxy.isClient(world)) if (!ProxyCore.proxy.isClient(world))
entityplayer.openGui(mod_BuildCraftBuilders.instance, GuiIds.BUILDER, world, i, j, k); entityplayer.openGui(mod_BuildCraftBuilders.instance, GuiIds.BUILDER, world, i, j, k);
return true; return true;

View file

@ -13,9 +13,9 @@ import java.util.ArrayList;
import buildcraft.mod_BuildCraftBuilders; import buildcraft.mod_BuildCraftBuilders;
import buildcraft.api.filler.IFillerPattern; import buildcraft.api.filler.IFillerPattern;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.GuiIds; import buildcraft.core.GuiIds;
import buildcraft.core.ProxyCore;
import buildcraft.core.Utils; import buildcraft.core.Utils;
import net.minecraft.src.BlockContainer; import net.minecraft.src.BlockContainer;
@ -51,7 +51,7 @@ public class BlockFiller extends BlockContainer {
if (entityplayer.isSneaking()) if (entityplayer.isSneaking())
return false; return false;
if (!CoreProxy.isClient(world)) if (!ProxyCore.proxy.isClient(world))
entityplayer.openGui(mod_BuildCraftBuilders.instance, GuiIds.FILLER, world, i, j, k); entityplayer.openGui(mod_BuildCraftBuilders.instance, GuiIds.FILLER, world, i, j, k);
return true; return true;

View file

@ -9,6 +9,7 @@
package buildcraft.builders; package buildcraft.builders;
import buildcraft.builders.TileBlueprintLibrary;
import net.minecraft.src.Block; import net.minecraft.src.Block;
import net.minecraft.src.World; import net.minecraft.src.World;

View file

@ -6,7 +6,7 @@ import buildcraft.BuildCraftBuilders;
import buildcraft.builders.IBuilderHook; import buildcraft.builders.IBuilderHook;
import buildcraft.core.BptPlayerIndex; import buildcraft.core.BptPlayerIndex;
import buildcraft.core.BptRootIndex; import buildcraft.core.BptRootIndex;
import buildcraft.core.CoreProxy; import buildcraft.core.ProxyCore;
import net.minecraft.src.ModLoader; import net.minecraft.src.ModLoader;
@ -14,11 +14,11 @@ public class ClientBuilderHook implements IBuilderHook {
@Override @Override
public void rootIndexInitialized(BptRootIndex rootBptIndex) throws IOException { public void rootIndexInitialized(BptRootIndex rootBptIndex) throws IOException {
if (!CoreProxy.isServerSide() && !CoreProxy.isClient(ModLoader.getMinecraftInstance().theWorld)) { if (ProxyCore.proxy.isRemote(ModLoader.getMinecraftInstance().theWorld)) {
// If we're on a SSP game, then pre-load the player list // If we're on a SSP game, then pre-load the player list
BptPlayerIndex playerIndex = new BptPlayerIndex(CoreProxy.playerName() + ".list", rootBptIndex); BptPlayerIndex playerIndex = new BptPlayerIndex(ProxyCore.proxy.playerName() + ".list", rootBptIndex);
BuildCraftBuilders.playerLibrary.put(CoreProxy.playerName(), playerIndex); BuildCraftBuilders.playerLibrary.put(ProxyCore.proxy.playerName(), playerIndex);
} }
} }

View file

@ -11,8 +11,8 @@ package buildcraft.builders;
import buildcraft.api.core.BuildCraftAPI; import buildcraft.api.core.BuildCraftAPI;
import buildcraft.api.core.IBox; import buildcraft.api.core.IBox;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.ProxyCore;
import net.minecraft.src.ItemStack; import net.minecraft.src.ItemStack;
import net.minecraft.src.TileEntity; import net.minecraft.src.TileEntity;
@ -64,7 +64,7 @@ public class FillerFlattener extends FillerPattern {
} }
if (lastX != Integer.MAX_VALUE && stackToPlace != null) { if (lastX != Integer.MAX_VALUE && stackToPlace != null) {
stackToPlace.getItem().tryPlaceIntoWorld(stackToPlace, CoreProxy.getBuildCraftPlayer(tile.worldObj), tile.worldObj, stackToPlace.getItem().tryPlaceIntoWorld(stackToPlace, ProxyCore.proxy.getBuildCraftPlayer(tile.worldObj), tile.worldObj,
lastX, lastY - 1, lastZ, 1, 0.0f, 0.0f, 0.0f); lastX, lastY - 1, lastZ, 1, 0.0f, 0.0f, 0.0f);
} }

View file

@ -14,7 +14,7 @@ import buildcraft.BuildCraftBuilders;
import buildcraft.api.core.BuildCraftAPI; import buildcraft.api.core.BuildCraftAPI;
import buildcraft.api.core.IBox; import buildcraft.api.core.IBox;
import buildcraft.api.filler.IFillerPattern; import buildcraft.api.filler.IFillerPattern;
import buildcraft.core.CoreProxy; import buildcraft.core.ProxyCore;
import net.minecraft.src.ItemStack; import net.minecraft.src.ItemStack;
import net.minecraft.src.TileEntity; import net.minecraft.src.TileEntity;
import net.minecraft.src.World; import net.minecraft.src.World;
@ -66,7 +66,7 @@ public abstract class FillerPattern implements IFillerPattern {
} }
if (found && stackToPlace != null) { if (found && stackToPlace != null) {
stackToPlace.getItem().tryPlaceIntoWorld(stackToPlace, CoreProxy.getBuildCraftPlayer(world), world, xSlot, ySlot - 1, stackToPlace.getItem().tryPlaceIntoWorld(stackToPlace, ProxyCore.proxy.getBuildCraftPlayer(world), world, xSlot, ySlot - 1,
zSlot, 1, 0.0f, 0.0f, 0.0f); zSlot, 1, 0.0f, 0.0f, 0.0f);
} }

View file

@ -18,7 +18,7 @@ import buildcraft.core.BptBase;
import buildcraft.core.BptBlueprint; import buildcraft.core.BptBlueprint;
import buildcraft.core.BptContext; import buildcraft.core.BptContext;
import buildcraft.core.BptTemplate; import buildcraft.core.BptTemplate;
import buildcraft.core.CoreProxy; import buildcraft.core.ProxyCore;
import buildcraft.core.TileBuildCraft; import buildcraft.core.TileBuildCraft;
import buildcraft.core.Utils; import buildcraft.core.Utils;
import buildcraft.core.network.PacketUpdate; import buildcraft.core.network.PacketUpdate;
@ -72,7 +72,7 @@ public class TileArchitect extends TileBuildCraft implements IInventory {
} }
} }
if (!CoreProxy.isClient(worldObj) && box.isInitialized()) { if (!ProxyCore.proxy.isClient(worldObj) && box.isInitialized()) {
box.createLasers(worldObj, LaserKind.Stripes); box.createLasers(worldObj, LaserKind.Stripes);
} }

View file

@ -28,12 +28,12 @@ import buildcraft.core.BptBuilderBase;
import buildcraft.core.BptBuilderBlueprint; import buildcraft.core.BptBuilderBlueprint;
import buildcraft.core.BptBuilderTemplate; import buildcraft.core.BptBuilderTemplate;
import buildcraft.core.BptContext; import buildcraft.core.BptContext;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.EntityLaser; import buildcraft.core.EntityLaser;
import buildcraft.core.EntityRobot; import buildcraft.core.EntityRobot;
import buildcraft.core.IBuilderInventory; import buildcraft.core.IBuilderInventory;
import buildcraft.core.IMachine; import buildcraft.core.IMachine;
import buildcraft.core.ProxyCore;
import buildcraft.core.SurroundingInventory; import buildcraft.core.SurroundingInventory;
import buildcraft.core.TileBuildCraft; import buildcraft.core.TileBuildCraft;
import buildcraft.core.Utils; import buildcraft.core.Utils;
@ -279,7 +279,7 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP
@Override @Override
public void doWork() { public void doWork() {
if (CoreProxy.isClient(worldObj)) { if (ProxyCore.proxy.isClient(worldObj)) {
return; return;
} }
@ -588,7 +588,7 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP
box.deleteLasers(); box.deleteLasers();
box.reset(); box.reset();
if (CoreProxy.isServerSide()) { if (ProxyCore.proxy.isServerSide(worldObj)) {
sendNetworkUpdate(); sendNetworkUpdate();
} }

View file

@ -23,8 +23,8 @@ import buildcraft.api.power.IPowerReceptor;
import buildcraft.api.power.PowerFramework; import buildcraft.api.power.PowerFramework;
import buildcraft.core.ActionMachineControl; import buildcraft.core.ActionMachineControl;
import buildcraft.core.Box; import buildcraft.core.Box;
import buildcraft.core.CoreProxy;
import buildcraft.core.IMachine; import buildcraft.core.IMachine;
import buildcraft.core.ProxyCore;
import buildcraft.core.StackUtil; import buildcraft.core.StackUtil;
import buildcraft.core.TileBuildCraft; import buildcraft.core.TileBuildCraft;
import buildcraft.core.Utils; import buildcraft.core.Utils;
@ -63,7 +63,7 @@ public class TileFiller extends TileBuildCraft implements ISpecialInventory, IPo
public void initialize() { public void initialize() {
super.initialize(); super.initialize();
if (!CoreProxy.isClient(worldObj)) { if (!ProxyCore.proxy.isClient(worldObj)) {
IAreaProvider a = Utils.getNearbyAreaProvider(worldObj, xCoord, yCoord, zCoord); IAreaProvider a = Utils.getNearbyAreaProvider(worldObj, xCoord, yCoord, zCoord);
if (a != null) { if (a != null) {
@ -73,7 +73,7 @@ public class TileFiller extends TileBuildCraft implements ISpecialInventory, IPo
((TileMarker) a).removeFromWorld(); ((TileMarker) a).removeFromWorld();
} }
if (!CoreProxy.isClient(worldObj) && box.isInitialized()) { if (!ProxyCore.proxy.isClient(worldObj) && box.isInitialized()) {
box.createLasers(worldObj, LaserKind.Stripes); box.createLasers(worldObj, LaserKind.Stripes);
} }
sendNetworkUpdate(); sendNetworkUpdate();
@ -102,7 +102,7 @@ public class TileFiller extends TileBuildCraft implements ISpecialInventory, IPo
@Override @Override
public void doWork() { public void doWork() {
if (CoreProxy.isClient(worldObj)) { if (ProxyCore.proxy.isClient(worldObj)) {
return; return;
} }
@ -156,7 +156,7 @@ public class TileFiller extends TileBuildCraft implements ISpecialInventory, IPo
} }
public void computeRecipe() { public void computeRecipe() {
if (CoreProxy.isClient(worldObj)) { if (ProxyCore.proxy.isClient(worldObj)) {
return; return;
} }
@ -185,7 +185,7 @@ public class TileFiller extends TileBuildCraft implements ISpecialInventory, IPo
currentPatternId = currentPattern.getId(); currentPatternId = currentPattern.getId();
} }
if (CoreProxy.isServerSide()) { if (ProxyCore.proxy.isServerSide(worldObj)) {
sendNetworkUpdate(); sendNetworkUpdate();
} }
} }

View file

@ -13,8 +13,8 @@ import buildcraft.BuildCraftBuilders;
import buildcraft.api.core.IAreaProvider; import buildcraft.api.core.IAreaProvider;
import buildcraft.api.core.LaserKind; import buildcraft.api.core.LaserKind;
import buildcraft.api.core.Position; import buildcraft.api.core.Position;
import buildcraft.core.CoreProxy;
import buildcraft.core.EntityBlock; import buildcraft.core.EntityBlock;
import buildcraft.core.ProxyCore;
import buildcraft.core.TileBuildCraft; import buildcraft.core.TileBuildCraft;
import buildcraft.core.Utils; import buildcraft.core.Utils;
import buildcraft.core.network.PacketUpdate; import buildcraft.core.network.PacketUpdate;
@ -93,7 +93,7 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider {
if (signals != null) { if (signals != null) {
for (EntityBlock b : signals) { for (EntityBlock b : signals) {
if (b != null) { if (b != null) {
CoreProxy.removeEntity(b); ProxyCore.proxy.removeEntity(b);
} }
} }
@ -124,7 +124,7 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider {
} }
} }
if (CoreProxy.isServerSide()) { if (ProxyCore.proxy.isServerSide(worldObj)) {
sendNetworkUpdate(); sendNetworkUpdate();
} }
} }
@ -153,7 +153,7 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider {
} }
public void tryConnection() { public void tryConnection() {
if (CoreProxy.isClient(worldObj)) { if (ProxyCore.proxy.isClient(worldObj)) {
return; return;
} }
@ -240,7 +240,7 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider {
if (lasers != null) { if (lasers != null) {
for (EntityBlock entity : lasers) { for (EntityBlock entity : lasers) {
if (entity != null) { if (entity != null) {
CoreProxy.removeEntity(entity); ProxyCore.proxy.removeEntity(entity);
} }
} }
} }
@ -394,7 +394,7 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider {
signals = null; signals = null;
if (CoreProxy.isServerSide() && markerOrigin != null && markerOrigin != this) { if (ProxyCore.proxy.isServerSide(worldObj) && markerOrigin != null && markerOrigin != this) {
markerOrigin.sendNetworkUpdate(); markerOrigin.sendNetworkUpdate();
} }
} }

View file

@ -6,9 +6,9 @@ import java.util.TreeSet;
import buildcraft.api.core.Position; import buildcraft.api.core.Position;
import buildcraft.core.BlockIndex; import buildcraft.core.BlockIndex;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.EntityLaser; import buildcraft.core.EntityLaser;
import buildcraft.core.ProxyCore;
import net.minecraft.src.NBTTagCompound; import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.TileEntity; import net.minecraft.src.TileEntity;
@ -55,7 +55,7 @@ public class TilePathMarker extends TileMarker {
public void createLaserAndConnect(TilePathMarker pathMarker) { public void createLaserAndConnect(TilePathMarker pathMarker) {
if (CoreProxy.isClient(worldObj)) if (ProxyCore.proxy.isClient(worldObj))
return; return;
EntityLaser laser = new EntityLaser(worldObj, new Position(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5), new Position(pathMarker.xCoord + 0.5, pathMarker.yCoord + 0.5, pathMarker.zCoord + 0.5)); EntityLaser laser = new EntityLaser(worldObj, new Position(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5), new Position(pathMarker.xCoord + 0.5, pathMarker.yCoord + 0.5, pathMarker.zCoord + 0.5));

View file

@ -218,7 +218,7 @@ public class Box implements IBox {
if (lasers != null) { if (lasers != null) {
for (EntityBlock b : lasers) for (EntityBlock b : lasers)
CoreProxy.removeEntity(b); ProxyCore.proxy.removeEntity(b);
lasers = null; lasers = null;
} }

View file

@ -21,7 +21,6 @@ import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import buildcraft.mod_BuildCraftCore; import buildcraft.mod_BuildCraftCore;
import buildcraft.core.CoreProxy;
import net.minecraft.src.ModLoader; import net.minecraft.src.ModLoader;
@ -105,7 +104,7 @@ public abstract class BptBase {
public File save() { public File save() {
try { try {
File baseDir = CoreProxy.getBuildCraftBase(); File baseDir = ProxyCore.proxy.getBuildCraftBase();
baseDir.mkdir(); baseDir.mkdir();

View file

@ -10,8 +10,6 @@ import java.io.InputStreamReader;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;
import java.util.TreeMap; import java.util.TreeMap;
import buildcraft.core.CoreProxy;
public class BptPlayerIndex { public class BptPlayerIndex {
@ -21,7 +19,7 @@ public class BptPlayerIndex {
private File file; private File file;
public BptPlayerIndex(String filename, BptRootIndex rootIndex) throws IOException { public BptPlayerIndex(String filename, BptRootIndex rootIndex) throws IOException {
baseDir = new File(CoreProxy.getBuildCraftBase(), "blueprints/"); baseDir = new File(ProxyCore.proxy.getBuildCraftBase(), "blueprints/");
file = new File(baseDir, filename); file = new File(baseDir, filename);
baseDir.mkdir(); baseDir.mkdir();

View file

@ -19,9 +19,6 @@ import java.io.InputStreamReader;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;
import java.util.TreeMap; import java.util.TreeMap;
//import buildcraft.BuildCraftBuilders;
import buildcraft.core.CoreProxy;
public class BptRootIndex { public class BptRootIndex {
@ -36,7 +33,7 @@ public class BptRootIndex {
public int maxBpt = 0; public int maxBpt = 0;
public BptRootIndex(String filename) throws IOException { public BptRootIndex(String filename) throws IOException {
baseDir = new File(CoreProxy.getBuildCraftBase(), "blueprints/"); baseDir = new File(ProxyCore.proxy.getBuildCraftBase(), "blueprints/");
file = new File(baseDir, filename); file = new File(baseDir, filename);
baseDir.mkdir(); baseDir.mkdir();

View file

@ -14,9 +14,6 @@ import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.util.Properties; import java.util.Properties;
import buildcraft.mod_BuildCraftCore;
import buildcraft.core.CoreProxy;
import net.minecraftforge.common.Configuration; import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.Property; import net.minecraftforge.common.Property;
@ -30,7 +27,7 @@ public class BuildCraftConfiguration extends Configuration {
} }
public void loadLegacyProperties() { public void loadLegacyProperties() {
File cfgfile = CoreProxy.getPropertyFile(); File cfgfile = ProxyCore.proxy.getPropertyFile();
Properties props = new Properties(); Properties props = new Properties();
try { try {

View file

@ -0,0 +1,89 @@
/**
* Copyright (c) SpaceToad, 2011
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.core;
import buildcraft.transport.render.TileEntityPickupFX;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityItem;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraft.src.ModLoader;
import net.minecraft.src.Packet;
import net.minecraft.src.StringTranslate;
import net.minecraft.src.TileEntity;
import net.minecraft.src.World;
import net.minecraft.src.WorldClient;
public class ClientProxyCore extends ProxyCore {
/* ENTITY HANDLING */
@Override
public void removeEntity(Entity entity) {
super.removeEntity(entity);
if (isRemote(entity.worldObj))
((WorldClient) entity.worldObj).removeEntityFromWorld(entity.entityId);
}
/* LOCALIZATION */
@Override
public String getCurrentLanguage() {
return StringTranslate.getInstance().getCurrentLanguage();
}
@Override
public void addName(Object obj, String s) {
ModLoader.addName(obj, s);
}
@Override
public void addLocalization(String s1, String string) {
ModLoader.addLocalization(s1, string);
}
@Override
public String getItemDisplayName(ItemStack stack){
if (Item.itemsList[stack.itemID] == null) return "";
return Item.itemsList[stack.itemID].getItemDisplayName(stack);
}
/* NETWORKING */
@Override
public void sendToServer(Packet packet) {
ModLoader.getMinecraftInstance().getSendQueue().addToSendQueue(packet);
}
/* BUILDCRAFT PLAYER */
@Override
public String playerName() {
return ModLoader.getMinecraftInstance().thePlayer.username;
}
private EntityPlayer createNewPlayer(World world) {
return new EntityPlayer(world) {
@Override public void sendChatToPlayer(String var1) {}
@Override public boolean canCommandSenderUseCommand(String var1) { return false; }
};
}
@Override
public EntityPlayer getBuildCraftPlayer(World world) {
if (ProxyCore.buildCraftPlayer == null) {
ProxyCore.buildCraftPlayer = createNewPlayer(world);
}
return ProxyCore.buildCraftPlayer;
}
@Override
public void obsidianPipePickup(World world, EntityItem item, TileEntity tile) {
ModLoader.getMinecraftInstance().effectRenderer.addEffect(new TileEntityPickupFX(world, item, tile));
}
}

View file

@ -90,7 +90,7 @@ public class EntityLaser extends Entity implements ISpawnHandler {
if (head == null || tail == null) if (head == null || tail == null)
return; return;
if (CoreProxy.isClient(worldObj)) { if (ProxyCore.proxy.isClient(worldObj)) {
updateData(); updateData();
} }

View file

@ -288,7 +288,7 @@ public class EntityPassiveItem implements IPipedItem {
*/ */
@Override @Override
public EntityItem toEntityItem(Orientations dir) { public EntityItem toEntityItem(Orientations dir) {
if (!CoreProxy.isClient(worldObj)) { if (!ProxyCore.proxy.isClient(worldObj)) {
if (getItemStack().stackSize <= 0) { if (getItemStack().stackSize <= 0) {
return null; return null;
} }

View file

@ -198,7 +198,7 @@ public class EntityRobot extends Entity implements ISpawnHandler {
BptSlot target = a.slot; BptSlot target = a.slot;
if (wait <= 0) { if (wait <= 0) {
if (!CoreProxy.isClient(worldObj)) { if (!ProxyCore.proxy.isClient(worldObj)) {
if (target.mode == Mode.ClearIfInvalid) { if (target.mode == Mode.ClearIfInvalid) {

View file

@ -0,0 +1,155 @@
/**
* Copyright (c) SpaceToad, 2011
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.core;
import java.io.File;
import java.util.Random;
import cpw.mods.fml.common.SidedProxy;
import buildcraft.core.network.BuildCraftPacket;
import net.minecraft.src.Block;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityItem;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.EntityPlayerMP;
import net.minecraft.src.IInventory;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraft.src.ModLoader;
import net.minecraft.src.Packet;
import net.minecraft.src.TileEntity;
import net.minecraft.src.World;
public class ProxyCore {
@SidedProxy(clientSide="builcraft.core.ClientProxyCore", serverSide="buildcraft.core.ProxyCore")
public static ProxyCore proxy;
/* SIMULATION */
public boolean isClient(World world) {
return isRemote(world);
}
public boolean isServerSide(World world) {
return !world.isRemote;
}
public boolean isRemote(World world) {
return world.isRemote;
}
public String getCurrentLanguage() {
return null;
}
/* ENTITY HANDLING */
public void removeEntity(Entity entity) {
entity.setDead();
}
/* LOCALIZATION */
public void addName(Object obj, String s) {}
public void addLocalization(String s1, String string) {}
public String getItemDisplayName(ItemStack newStack) { return ""; }
/* GFX */
public void obsidianPipePickup(World world, EntityItem item, TileEntity tile) {}
/* REGISTRATION */
public void registerBlock(Block block) {
Item.itemsList[block.blockID] = null;
Item.itemsList[block.blockID] = new ItemBlockBuildCraft(block.blockID - 256, block.getBlockName());
}
public void registerTileEntity(Class clas, String ident) {
ModLoader.registerTileEntity(clas, ident);
}
public void onCraftingPickup(World world, EntityPlayer player, ItemStack stack) {
stack.onCrafting(world, player, stack.stackSize);
}
public void addCraftingRecipe(ItemStack result, Object[] recipe) {
ModLoader.addRecipe(result, recipe);
}
public void addShapelessRecipe(ItemStack result, Object[] recipe) {
ModLoader.addShapelessRecipe(result, recipe);
}
public File getPropertyFile() {
return new File("BuildCraft.cfg");
}
public void sendToPlayers(Packet packet, World w, int x, int y, int z, int maxDistance) {
if (packet != null) {
for (int j = 0; j < w.playerEntities.size(); j++) {
EntityPlayerMP player = (EntityPlayerMP) w.playerEntities.get(j);
if (Math.abs(player.posX - x) <= maxDistance && Math.abs(player.posY - y) <= maxDistance
&& Math.abs(player.posZ - z) <= maxDistance)
player.serverForThisPlayer.sendPacketToPlayer(packet);
}
}
}
public void sendToPlayer(EntityPlayer entityplayer, BuildCraftPacket packet) {
EntityPlayerMP player = (EntityPlayerMP) entityplayer;
player.serverForThisPlayer.sendPacketToPlayer(packet.getPacket());
}
public void sendToServer(Packet packet) {}
public File getBuildCraftBase() {
return new File("buildcraft/");
}
public int addCustomTexture(String pathToTexture) {
return 0;
}
public void TakenFromCrafting(EntityPlayer thePlayer, ItemStack itemstack, IInventory craftMatrix) {
ModLoader.takenFromCrafting(thePlayer, itemstack, craftMatrix);
}
public Random createNewRandom(World world) {
return new Random(world.getSeed());
}
/* BUILDCRAFT PLAYER */
protected static EntityPlayer buildCraftPlayer;
public String playerName() { return ""; }
private EntityPlayer createNewPlayer(World world) {
return new EntityPlayer(world) {
@Override
public void sendChatToPlayer(String var1) {
}
@Override
public boolean canCommandSenderUseCommand(String var1) {
return false;
}
};
}
public EntityPlayer getBuildCraftPlayer(World world) {
if (ProxyCore.buildCraftPlayer == null) {
ProxyCore.buildCraftPlayer = createNewPlayer(world);
}
return ProxyCore.buildCraftPlayer;
}
}

View file

@ -12,9 +12,7 @@ package buildcraft.core;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import buildcraft.mod_BuildCraftCore;
import buildcraft.api.power.IPowerReceptor; import buildcraft.api.power.IPowerReceptor;
import buildcraft.core.CoreProxy;
import buildcraft.core.network.ISynchronizedTile; import buildcraft.core.network.ISynchronizedTile;
import buildcraft.core.network.PacketPayload; import buildcraft.core.network.PacketPayload;
import buildcraft.core.network.PacketTileUpdate; import buildcraft.core.network.PacketTileUpdate;

View file

@ -375,7 +375,7 @@ public class Utils {
public static void preDestroyBlock(World world, int i, int j, int k) { public static void preDestroyBlock(World world, int i, int j, int k) {
TileEntity tile = world.getBlockTileEntity(i, j, k); TileEntity tile = world.getBlockTileEntity(i, j, k);
if (tile instanceof IInventory && !CoreProxy.isClient(world)) if (tile instanceof IInventory && !ProxyCore.proxy.isClient(world))
if (!(tile instanceof IDropControlInventory) || ((IDropControlInventory) tile).doDrop()) if (!(tile instanceof IDropControlInventory) || ((IDropControlInventory) tile).doDrop())
dropItems(world, (IInventory) tile, i, j, k); dropItems(world, (IInventory) tile, i, j, k);

View file

@ -6,7 +6,7 @@ import java.io.InputStream;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.Properties; import java.util.Properties;
import buildcraft.core.CoreProxy; import buildcraft.core.ProxyCore;
/** /**
@ -98,6 +98,6 @@ public class Localization {
} }
private static String getCurrentLanguage() { private static String getCurrentLanguage() {
return CoreProxy.getCurrentLanguage(); return ProxyCore.proxy.getCurrentLanguage();
} }
} }

View file

@ -16,9 +16,9 @@ import buildcraft.BuildCraftCore;
import buildcraft.mod_BuildCraftEnergy; import buildcraft.mod_BuildCraftEnergy;
import buildcraft.api.core.Orientations; import buildcraft.api.core.Orientations;
import buildcraft.api.tools.IToolWrench; import buildcraft.api.tools.IToolWrench;
import buildcraft.core.CoreProxy;
import buildcraft.core.GuiIds; import buildcraft.core.GuiIds;
import buildcraft.core.IItemPipe; import buildcraft.core.IItemPipe;
import buildcraft.core.ProxyCore;
import net.minecraft.src.BlockContainer; import net.minecraft.src.BlockContainer;
import net.minecraft.src.EntityPlayer; import net.minecraft.src.EntityPlayer;
@ -91,12 +91,12 @@ public class BlockEngine extends BlockContainer {
return false; return false;
if (tile.engine instanceof EngineStone) { if (tile.engine instanceof EngineStone) {
if (!CoreProxy.isClient(tile.worldObj)) if (!ProxyCore.proxy.isClient(tile.worldObj))
entityplayer.openGui(mod_BuildCraftEnergy.instance, GuiIds.ENGINE_STONE, world, i, j, k); entityplayer.openGui(mod_BuildCraftEnergy.instance, GuiIds.ENGINE_STONE, world, i, j, k);
return true; return true;
} else if (tile.engine instanceof EngineIron) { } else if (tile.engine instanceof EngineIron) {
if (!CoreProxy.isClient(tile.worldObj)) if (!ProxyCore.proxy.isClient(tile.worldObj))
entityplayer.openGui(mod_BuildCraftEnergy.instance, GuiIds.ENGINE_IRON, world, i, j, k); entityplayer.openGui(mod_BuildCraftEnergy.instance, GuiIds.ENGINE_IRON, world, i, j, k);
return true; return true;
} }

View file

@ -11,7 +11,7 @@ package buildcraft.energy;
import buildcraft.api.core.Orientations; import buildcraft.api.core.Orientations;
import buildcraft.api.liquids.LiquidTank; import buildcraft.api.liquids.LiquidTank;
import buildcraft.core.CoreProxy; import buildcraft.core.ProxyCore;
import buildcraft.core.network.TileNetworkData; import buildcraft.core.network.TileNetworkData;
import buildcraft.energy.gui.ContainerEngine; import buildcraft.energy.gui.ContainerEngine;
import net.minecraft.src.ICrafting; import net.minecraft.src.ICrafting;
@ -58,7 +58,7 @@ public abstract class Engine {
} }
public final EnergyStage getEnergyStage() { public final EnergyStage getEnergyStage() {
if (!CoreProxy.isClient(tile.worldObj)) { if (!ProxyCore.proxy.isClient(tile.worldObj)) {
computeEnergyStage(); computeEnergyStage();
} }

View file

@ -9,16 +9,11 @@
package buildcraft.energy; package buildcraft.energy;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.Utils; import buildcraft.core.Utils;
import buildcraft.energy.gui.ContainerEngine; import buildcraft.energy.gui.ContainerEngine;
import cpw.mods.fml.common.FMLCommonHandler;
import net.minecraft.src.Block;
import net.minecraft.src.ICrafting; import net.minecraft.src.ICrafting;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack; import net.minecraft.src.ItemStack;
import net.minecraft.src.Material;
import net.minecraft.src.NBTTagCompound; import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.TileEntityFurnace; import net.minecraft.src.TileEntityFurnace;

View file

@ -13,7 +13,7 @@ import java.util.Random;
import buildcraft.BuildCraftCore; import buildcraft.BuildCraftCore;
import buildcraft.BuildCraftEnergy; import buildcraft.BuildCraftEnergy;
import buildcraft.core.CoreProxy; import buildcraft.core.ProxyCore;
import net.minecraft.src.BiomeGenBase; import net.minecraft.src.BiomeGenBase;
import net.minecraft.src.Block; import net.minecraft.src.Block;
@ -29,7 +29,7 @@ public class OilPopulate {
} }
if (rand == null) { if (rand == null) {
rand = CoreProxy.createNewRandom(world); rand = ProxyCore.proxy.createNewRandom(world);
} }
BiomeGenBase biomegenbase = world.getWorldChunkManager().getBiomeGenAt(x, z); BiomeGenBase biomegenbase = world.getWorldChunkManager().getBiomeGenAt(x, z);

View file

@ -17,8 +17,6 @@ import buildcraft.api.core.Orientations;
import buildcraft.api.core.Position; import buildcraft.api.core.Position;
import buildcraft.api.gates.IOverrideDefaultTriggers; import buildcraft.api.gates.IOverrideDefaultTriggers;
import buildcraft.api.gates.ITrigger; import buildcraft.api.gates.ITrigger;
import buildcraft.api.gates.Trigger;
import buildcraft.api.liquids.ILiquidTank;
import buildcraft.api.liquids.ITankContainer; import buildcraft.api.liquids.ITankContainer;
import buildcraft.api.liquids.LiquidStack; import buildcraft.api.liquids.LiquidStack;
import buildcraft.api.liquids.LiquidTank; import buildcraft.api.liquids.LiquidTank;
@ -27,8 +25,8 @@ import buildcraft.api.power.IPowerReceptor;
import buildcraft.api.power.PowerFramework; import buildcraft.api.power.PowerFramework;
import buildcraft.api.power.PowerProvider; import buildcraft.api.power.PowerProvider;
import buildcraft.api.transport.IPipeConnection; import buildcraft.api.transport.IPipeConnection;
import buildcraft.core.CoreProxy;
import buildcraft.core.IBuilderInventory; import buildcraft.core.IBuilderInventory;
import buildcraft.core.ProxyCore;
import buildcraft.core.TileBuildCraft; import buildcraft.core.TileBuildCraft;
import buildcraft.core.network.PacketUpdate; import buildcraft.core.network.PacketUpdate;
import buildcraft.core.network.TileNetworkData; import buildcraft.core.network.TileNetworkData;
@ -68,7 +66,7 @@ public class TileEngine extends TileBuildCraft implements IPowerReceptor, IInven
@Override @Override
public void initialize() { public void initialize() {
if (!CoreProxy.isClient(worldObj)) { if (!ProxyCore.proxy.isClient(worldObj)) {
if (engine == null) { if (engine == null) {
createEngineIfNeeded(); createEngineIfNeeded();
} }
@ -87,7 +85,7 @@ public class TileEngine extends TileBuildCraft implements IPowerReceptor, IInven
return; return;
} }
if (CoreProxy.isClient(worldObj)) { if (ProxyCore.proxy.isClient(worldObj)) {
if (progressPart != 0) { if (progressPart != 0) {
engine.progress += serverPistonSpeed; engine.progress += serverPistonSpeed;
@ -364,7 +362,7 @@ public class TileEngine extends TileBuildCraft implements IPowerReceptor, IInven
@Override @Override
public void doWork() { public void doWork() {
if (CoreProxy.isClient(worldObj)) { if (ProxyCore.proxy.isClient(worldObj)) {
return; return;
} }

View file

@ -13,9 +13,9 @@ import java.util.ArrayList;
import buildcraft.mod_BuildCraftFactory; import buildcraft.mod_BuildCraftFactory;
import buildcraft.core.BlockBuildCraft; import buildcraft.core.BlockBuildCraft;
import buildcraft.core.CoreProxy;
import buildcraft.core.GuiIds; import buildcraft.core.GuiIds;
import buildcraft.core.IItemPipe; import buildcraft.core.IItemPipe;
import buildcraft.core.ProxyCore;
import net.minecraft.src.EntityPlayer; import net.minecraft.src.EntityPlayer;
import net.minecraft.src.ItemStack; import net.minecraft.src.ItemStack;
@ -58,7 +58,7 @@ public class BlockAutoWorkbench extends BlockBuildCraft {
} }
} }
if (!CoreProxy.isClient(world)) if (!ProxyCore.proxy.isClient(world))
entityplayer.openGui(mod_BuildCraftFactory.instance, GuiIds.AUTO_CRAFTING_TABLE, world, i, j, k); entityplayer.openGui(mod_BuildCraftFactory.instance, GuiIds.AUTO_CRAFTING_TABLE, world, i, j, k);
return true; return true;

View file

@ -5,9 +5,9 @@ import java.util.ArrayList;
import buildcraft.BuildCraftCore; import buildcraft.BuildCraftCore;
import buildcraft.mod_BuildCraftFactory; import buildcraft.mod_BuildCraftFactory;
import buildcraft.core.BlockBuildCraft; import buildcraft.core.BlockBuildCraft;
import buildcraft.core.CoreProxy;
import buildcraft.core.GuiIds; import buildcraft.core.GuiIds;
import buildcraft.core.IItemPipe; import buildcraft.core.IItemPipe;
import buildcraft.core.ProxyCore;
import net.minecraft.src.EntityPlayer; import net.minecraft.src.EntityPlayer;
import net.minecraft.src.ItemStack; import net.minecraft.src.ItemStack;
@ -61,7 +61,7 @@ public class BlockHopper extends BlockBuildCraft {
} }
} }
if (!CoreProxy.isClient(world)) if (!ProxyCore.proxy.isClient(world))
entityplayer.openGui(mod_BuildCraftFactory.instance, GuiIds.HOPPER, world, x, y, z); entityplayer.openGui(mod_BuildCraftFactory.instance, GuiIds.HOPPER, world, x, y, z);
return true; return true;

View file

@ -16,8 +16,8 @@ import buildcraft.api.core.Orientations;
import buildcraft.api.core.Position; import buildcraft.api.core.Position;
import buildcraft.api.tools.IToolWrench; import buildcraft.api.tools.IToolWrench;
import buildcraft.core.Box; import buildcraft.core.Box;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.ProxyCore;
import buildcraft.core.Utils; import buildcraft.core.Utils;
import buildcraft.factory.BlockMachineRoot; import buildcraft.factory.BlockMachineRoot;
@ -129,7 +129,7 @@ public class BlockQuarry extends BlockMachineRoot {
@Override @Override
public void breakBlock(World world, int i, int j, int k, int par5, int par6) { public void breakBlock(World world, int i, int j, int k, int par5, int par6) {
if (CoreProxy.isRemote()){ if (ProxyCore.proxy.isRemote(world)){
return; return;
} }

View file

@ -18,8 +18,8 @@ import buildcraft.api.core.Position;
import buildcraft.api.liquids.LiquidManager; import buildcraft.api.liquids.LiquidManager;
import buildcraft.api.liquids.LiquidStack; import buildcraft.api.liquids.LiquidStack;
import buildcraft.api.tools.IToolWrench; import buildcraft.api.tools.IToolWrench;
import buildcraft.core.CoreProxy;
import buildcraft.core.GuiIds; import buildcraft.core.GuiIds;
import buildcraft.core.ProxyCore;
import buildcraft.core.Utils; import buildcraft.core.Utils;
import net.minecraft.src.BlockContainer; import net.minecraft.src.BlockContainer;
@ -118,7 +118,7 @@ public class BlockRefinery extends BlockContainer {
} }
} }
if (!CoreProxy.isClient(world)) if (!ProxyCore.proxy.isClient(world))
entityplayer.openGui(mod_BuildCraftFactory.instance, GuiIds.REFINERY, world, i, j, k); entityplayer.openGui(mod_BuildCraftFactory.instance, GuiIds.REFINERY, world, i, j, k);
return true; return true;

View file

@ -2,12 +2,9 @@ package buildcraft.factory;
import java.util.LinkedList; import java.util.LinkedList;
import buildcraft.mod_BuildCraftSilicon;
import buildcraft.api.core.Orientations; import buildcraft.api.core.Orientations;
import buildcraft.api.recipes.AssemblyRecipe; import buildcraft.api.recipes.AssemblyRecipe;
import buildcraft.api.transport.IPipeConnection; import buildcraft.api.transport.IPipeConnection;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps;
import buildcraft.core.IMachine; import buildcraft.core.IMachine;
import buildcraft.core.StackUtil; import buildcraft.core.StackUtil;
import buildcraft.core.Utils; import buildcraft.core.Utils;
@ -413,8 +410,9 @@ public class TileAssemblyTable extends TileEntity implements IMachine, IInventor
packet.posX = xCoord; packet.posX = xCoord;
packet.posY = yCoord; packet.posY = yCoord;
packet.posZ = zCoord; packet.posZ = zCoord;
CoreProxy.sendToPlayers(packet.getPacket(), worldObj, (int) player.posX, (int) player.posY, (int) player.posZ, // FIXME: This needs to be switched over to new synch system.
DefaultProps.NETWORK_UPDATE_RANGE, mod_BuildCraftSilicon.instance); //CoreProxy.sendToPlayers(packet.getPacket(), worldObj, (int) player.posX, (int) player.posY, (int) player.posZ,
// DefaultProps.NETWORK_UPDATE_RANGE, mod_BuildCraftSilicon.instance);
} }
} }

View file

@ -2,7 +2,7 @@ package buildcraft.factory;
import buildcraft.api.core.Orientations; import buildcraft.api.core.Orientations;
import buildcraft.api.inventory.ISpecialInventory; import buildcraft.api.inventory.ISpecialInventory;
import buildcraft.core.CoreProxy; import buildcraft.core.ProxyCore;
import buildcraft.core.TileBuildCraft; import buildcraft.core.TileBuildCraft;
import buildcraft.core.utils.InventoryUtil; import buildcraft.core.utils.InventoryUtil;
import buildcraft.core.utils.SidedInventoryAdapter; import buildcraft.core.utils.SidedInventoryAdapter;
@ -37,7 +37,7 @@ public class TileHopper extends TileBuildCraft implements IInventory {
@Override @Override
public void updateEntity() { public void updateEntity() {
super.updateEntity(); super.updateEntity();
if (CoreProxy.isClient(worldObj) || worldObj.getWorldTime() % 5 != 0) if (ProxyCore.proxy.isClient(worldObj) || worldObj.getWorldTime() % 5 != 0)
return; return;
int internalSlot = _internalInventory.getIdForFirstSlot(); int internalSlot = _internalInventory.getIdForFirstSlot();
if (internalSlot < 0) if (internalSlot < 0)

View file

@ -17,7 +17,6 @@ import buildcraft.api.core.Orientations;
import buildcraft.api.power.IPowerProvider; import buildcraft.api.power.IPowerProvider;
import buildcraft.api.power.IPowerReceptor; import buildcraft.api.power.IPowerReceptor;
import buildcraft.api.power.PowerFramework; import buildcraft.api.power.PowerFramework;
import buildcraft.api.power.PowerProvider;
import buildcraft.api.transport.IPipeConnection; import buildcraft.api.transport.IPipeConnection;
import buildcraft.core.IMachine; import buildcraft.core.IMachine;
import buildcraft.core.StackUtil; import buildcraft.core.StackUtil;

View file

@ -22,11 +22,10 @@ import buildcraft.api.liquids.LiquidStack;
import buildcraft.api.power.IPowerProvider; import buildcraft.api.power.IPowerProvider;
import buildcraft.api.power.IPowerReceptor; import buildcraft.api.power.IPowerReceptor;
import buildcraft.api.power.PowerFramework; import buildcraft.api.power.PowerFramework;
import buildcraft.api.power.PowerProvider;
import buildcraft.core.BlockIndex; import buildcraft.core.BlockIndex;
import buildcraft.core.CoreProxy;
import buildcraft.core.EntityBlock; import buildcraft.core.EntityBlock;
import buildcraft.core.IMachine; import buildcraft.core.IMachine;
import buildcraft.core.ProxyCore;
import buildcraft.core.Utils; import buildcraft.core.Utils;
import buildcraft.core.network.PacketUpdate; import buildcraft.core.network.PacketUpdate;
import buildcraft.core.network.TileNetworkData; import buildcraft.core.network.TileNetworkData;
@ -67,13 +66,13 @@ public class TilePump extends TileMachine implements IMachine, IPowerReceptor {
return; return;
} }
if (!CoreProxy.isClient(worldObj)) { if (!ProxyCore.proxy.isClient(worldObj)) {
if (tube.posY - aimY > 0.01) { if (tube.posY - aimY > 0.01) {
tubeY = tube.posY - 0.01; tubeY = tube.posY - 0.01;
setTubePosition(); setTubePosition();
if (CoreProxy.isServerSide()) { if (ProxyCore.proxy.isServerSide(worldObj)) {
sendNetworkUpdate(); sendNetworkUpdate();
} }
@ -98,7 +97,7 @@ public class TilePump extends TileMachine implements IMachine, IPowerReceptor {
internalLiquid = internalLiquid += BuildCraftAPI.BUCKET_VOLUME; internalLiquid = internalLiquid += BuildCraftAPI.BUCKET_VOLUME;
if (CoreProxy.isServerSide()) { if (ProxyCore.proxy.isServerSide(worldObj)) {
sendNetworkUpdate(); sendNetworkUpdate();
} }
} }
@ -161,7 +160,7 @@ public class TilePump extends TileMachine implements IMachine, IPowerReceptor {
worldObj.spawnEntityInWorld(tube); worldObj.spawnEntityInWorld(tube);
if (CoreProxy.isServerSide()) { if (ProxyCore.proxy.isServerSide(worldObj)) {
sendNetworkUpdate(); sendNetworkUpdate();
} }
} }
@ -352,7 +351,7 @@ public class TilePump extends TileMachine implements IMachine, IPowerReceptor {
@Override @Override
public void destroy() { public void destroy() {
if (tube != null) { if (tube != null) {
CoreProxy.removeEntity(tube); ProxyCore.proxy.removeEntity(tube);
tube = null; tube = null;
tubeY = Double.NaN; tubeY = Double.NaN;
aimY = 0; aimY = 0;

View file

@ -21,17 +21,16 @@ import buildcraft.api.core.Orientations;
import buildcraft.api.power.IPowerProvider; import buildcraft.api.power.IPowerProvider;
import buildcraft.api.power.IPowerReceptor; import buildcraft.api.power.IPowerReceptor;
import buildcraft.api.power.PowerFramework; import buildcraft.api.power.PowerFramework;
import buildcraft.api.power.PowerProvider;
import buildcraft.api.transport.IPipeConnection; import buildcraft.api.transport.IPipeConnection;
import buildcraft.core.Box; import buildcraft.core.Box;
import buildcraft.core.BptBlueprint; import buildcraft.core.BptBlueprint;
import buildcraft.core.BptBuilderBase; import buildcraft.core.BptBuilderBase;
import buildcraft.core.BptBuilderBlueprint; import buildcraft.core.BptBuilderBlueprint;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultAreaProvider; import buildcraft.core.DefaultAreaProvider;
import buildcraft.core.EntityRobot; import buildcraft.core.EntityRobot;
import buildcraft.core.IBuilderInventory; import buildcraft.core.IBuilderInventory;
import buildcraft.core.IMachine; import buildcraft.core.IMachine;
import buildcraft.core.ProxyCore;
import buildcraft.core.StackUtil; import buildcraft.core.StackUtil;
import buildcraft.core.Utils; import buildcraft.core.Utils;
import buildcraft.core.network.PacketUpdate; import buildcraft.core.network.PacketUpdate;
@ -83,7 +82,7 @@ public class TileQuarry extends TileMachine implements IArmListener, IMachine, I
public void createUtilsIfNeeded() { public void createUtilsIfNeeded() {
if (!box.isInitialized() && CoreProxy.isClient(worldObj)) { if (!box.isInitialized() && ProxyCore.proxy.isClient(worldObj)) {
return; return;
} }
@ -169,7 +168,7 @@ public class TileQuarry extends TileMachine implements IArmListener, IMachine, I
speed = arm.speed; speed = arm.speed;
} }
if (CoreProxy.isServerSide()) { if (ProxyCore.proxy.isServerSide(worldObj)) {
sendNetworkUpdate(); sendNetworkUpdate();
} }
@ -249,7 +248,7 @@ public class TileQuarry extends TileMachine implements IArmListener, IMachine, I
public boolean findTarget(boolean doSet) { public boolean findTarget(boolean doSet) {
if (CoreProxy.isClient(worldObj)) if (ProxyCore.proxy.isClient(worldObj))
return false; return false;
boolean[][] blockedColumns = new boolean[bluePrintBuilder.bluePrint.sizeX - 2][bluePrintBuilder.bluePrint.sizeZ - 2]; boolean[][] blockedColumns = new boolean[bluePrintBuilder.bluePrint.sizeX - 2][bluePrintBuilder.bluePrint.sizeZ - 2];
@ -378,7 +377,7 @@ public class TileQuarry extends TileMachine implements IArmListener, IMachine, I
public void positionReached(EntityMechanicalArm arm) { public void positionReached(EntityMechanicalArm arm) {
inProcess = false; inProcess = false;
if (CoreProxy.isClient(worldObj)) { if (ProxyCore.proxy.isClient(worldObj)) {
return; return;
} }
@ -416,7 +415,7 @@ public class TileQuarry extends TileMachine implements IArmListener, IMachine, I
continue; continue;
if (entity.item.stackSize <= 0) if (entity.item.stackSize <= 0)
continue; continue;
CoreProxy.removeEntity(entity); ProxyCore.proxy.removeEntity(entity);
mineStack(entity.item); mineStack(entity.item);
} }
} }
@ -610,7 +609,7 @@ public class TileQuarry extends TileMachine implements IArmListener, IMachine, I
public void initialize() { public void initialize() {
super.initialize(); super.initialize();
if (!CoreProxy.isClient(worldObj)) { if (!ProxyCore.proxy.isClient(worldObj)) {
createUtilsIfNeeded(); createUtilsIfNeeded();
} }

View file

@ -20,10 +20,9 @@ import buildcraft.api.liquids.LiquidTank;
import buildcraft.api.power.IPowerProvider; import buildcraft.api.power.IPowerProvider;
import buildcraft.api.power.IPowerReceptor; import buildcraft.api.power.IPowerReceptor;
import buildcraft.api.power.PowerFramework; import buildcraft.api.power.PowerFramework;
import buildcraft.api.power.PowerProvider;
import buildcraft.api.recipes.RefineryRecipe; import buildcraft.api.recipes.RefineryRecipe;
import buildcraft.core.CoreProxy;
import buildcraft.core.IMachine; import buildcraft.core.IMachine;
import buildcraft.core.ProxyCore;
import buildcraft.core.network.TileNetworkData; import buildcraft.core.network.TileNetworkData;
import net.minecraft.src.Container; import net.minecraft.src.Container;
import net.minecraft.src.EntityPlayer; import net.minecraft.src.EntityPlayer;
@ -166,9 +165,9 @@ public class TileRefinery extends TileMachine implements ITankContainer, IPowerR
@Override @Override
public void updateEntity() { public void updateEntity() {
if (CoreProxy.isClient(worldObj)) { if (ProxyCore.proxy.isClient(worldObj)) {
simpleAnimationIterate(); simpleAnimationIterate();
} else if (CoreProxy.isServerSide() && updateNetworkTime.markTimeIfDelay(worldObj, 2 * BuildCraftCore.updateFactor)) { } else if (ProxyCore.proxy.isServerSide(worldObj) && updateNetworkTime.markTimeIfDelay(worldObj, 2 * BuildCraftCore.updateFactor)) {
sendNetworkUpdate(); sendNetworkUpdate();
} }

View file

@ -16,7 +16,7 @@ import buildcraft.api.liquids.ILiquidTank;
import buildcraft.api.liquids.ITankContainer; import buildcraft.api.liquids.ITankContainer;
import buildcraft.api.liquids.LiquidStack; import buildcraft.api.liquids.LiquidStack;
import buildcraft.api.liquids.LiquidTank; import buildcraft.api.liquids.LiquidTank;
import buildcraft.core.CoreProxy; import buildcraft.core.ProxyCore;
import buildcraft.core.TileBuildCraft; import buildcraft.core.TileBuildCraft;
import buildcraft.core.network.PacketPayload; import buildcraft.core.network.PacketPayload;
import buildcraft.core.network.PacketUpdate; import buildcraft.core.network.PacketUpdate;
@ -34,12 +34,12 @@ public class TileTank extends TileBuildCraft implements ITankContainer
@Override @Override
public void updateEntity() public void updateEntity()
{ {
if(CoreProxy.isServerSide() && hasUpdate && tracker.markTimeIfDelay(worldObj, 2 * BuildCraftCore.updateFactor)) { if(ProxyCore.proxy.isServerSide(worldObj) && hasUpdate && tracker.markTimeIfDelay(worldObj, 2 * BuildCraftCore.updateFactor)) {
sendNetworkUpdate(); sendNetworkUpdate();
hasUpdate = false; hasUpdate = false;
} }
if(CoreProxy.isRemote()) { if(ProxyCore.proxy.isRemote(worldObj)) {
return; return;
} }

View file

@ -9,7 +9,7 @@
package buildcraft.factory.gui; package buildcraft.factory.gui;
import buildcraft.core.CoreProxy; import buildcraft.core.ProxyCore;
import buildcraft.core.gui.BuildCraftContainer; import buildcraft.core.gui.BuildCraftContainer;
import buildcraft.factory.TileAutoWorkbench; import buildcraft.factory.TileAutoWorkbench;
import net.minecraft.src.AchievementList; import net.minecraft.src.AchievementList;
@ -47,7 +47,7 @@ public class ContainerAutoWorkbench extends BuildCraftContainer {
@Override @Override
public void onPickupFromSlot(ItemStack itemstack) { public void onPickupFromSlot(ItemStack itemstack) {
CoreProxy.onCraftingPickup(thePlayer.worldObj, thePlayer, itemstack); ProxyCore.proxy.onCraftingPickup(thePlayer.worldObj, thePlayer, itemstack);
if (itemstack.itemID == Block.workbench.blockID) { if (itemstack.itemID == Block.workbench.blockID) {
thePlayer.addStat(AchievementList.buildWorkBench, 1); thePlayer.addStat(AchievementList.buildWorkBench, 1);
} else if (itemstack.itemID == Item.pickaxeWood.shiftedIndex) { } else if (itemstack.itemID == Item.pickaxeWood.shiftedIndex) {
@ -69,7 +69,7 @@ public class ContainerAutoWorkbench extends BuildCraftContainer {
} else if (itemstack.itemID == Block.bookShelf.blockID) { } else if (itemstack.itemID == Block.bookShelf.blockID) {
thePlayer.addStat(AchievementList.bookcase, 1); thePlayer.addStat(AchievementList.bookcase, 1);
} }
CoreProxy.TakenFromCrafting(thePlayer, itemstack, craftMatrix); ProxyCore.proxy.TakenFromCrafting(thePlayer, itemstack, craftMatrix);
// FIXME: Autocrafting table should post a forge event. // FIXME: Autocrafting table should post a forge event.
//ForgeHooks.onTakenFromCrafting(thePlayer, itemstack, craftMatrix); //ForgeHooks.onTakenFromCrafting(thePlayer, itemstack, craftMatrix);

View file

@ -8,7 +8,7 @@
*/ */
package buildcraft.factory.gui; package buildcraft.factory.gui;
import buildcraft.core.CoreProxy; import buildcraft.core.ProxyCore;
import buildcraft.core.gui.BuildCraftContainer; import buildcraft.core.gui.BuildCraftContainer;
import buildcraft.core.network.PacketIds; import buildcraft.core.network.PacketIds;
import buildcraft.core.network.PacketPayload; import buildcraft.core.network.PacketPayload;
@ -54,12 +54,12 @@ public class ContainerRefinery extends BuildCraftContainer {
refinery.setFilter(slot, liquidId); refinery.setFilter(slot, liquidId);
if (CoreProxy.isRemote()) { if (ProxyCore.proxy.isRemote(refinery.worldObj)) {
PacketPayload payload = new PacketPayload(3, 0, 0); PacketPayload payload = new PacketPayload(3, 0, 0);
payload.intPayload[0] = slot; payload.intPayload[0] = slot;
payload.intPayload[1] = liquidId; payload.intPayload[1] = liquidId;
payload.intPayload[2] = liquidMeta; payload.intPayload[2] = liquidMeta;
CoreProxy.sendToServer(new PacketUpdate(PacketIds.REFINERY_FILTER_SET, refinery.xCoord, refinery.yCoord, ProxyCore.proxy.sendToServer(new PacketUpdate(PacketIds.REFINERY_FILTER_SET, refinery.xCoord, refinery.yCoord,
refinery.zCoord, payload).getPacket()); refinery.zCoord, payload).getPacket());
} }
} }

View file

@ -3,9 +3,9 @@ package buildcraft.silicon;
import java.util.ArrayList; import java.util.ArrayList;
import buildcraft.mod_BuildCraftSilicon; import buildcraft.mod_BuildCraftSilicon;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.GuiIds; import buildcraft.core.GuiIds;
import buildcraft.core.ProxyCore;
import buildcraft.core.Utils; import buildcraft.core.Utils;
import buildcraft.factory.TileAssemblyTable; import buildcraft.factory.TileAssemblyTable;
@ -48,7 +48,7 @@ public class BlockAssemblyTable extends BlockContainer {
if (entityplayer.isSneaking()) if (entityplayer.isSneaking())
return false; return false;
if (!CoreProxy.isClient(world)) if (!ProxyCore.proxy.isClient(world))
entityplayer.openGui(mod_BuildCraftSilicon.instance, GuiIds.ASSEMBLY_TABLE, world, i, j, k); entityplayer.openGui(mod_BuildCraftSilicon.instance, GuiIds.ASSEMBLY_TABLE, world, i, j, k);
return true; return true;
} }

View file

@ -18,8 +18,8 @@ import buildcraft.api.power.IPowerProvider;
import buildcraft.api.power.IPowerReceptor; import buildcraft.api.power.IPowerReceptor;
import buildcraft.api.power.PowerFramework; import buildcraft.api.power.PowerFramework;
import buildcraft.core.BlockIndex; import buildcraft.core.BlockIndex;
import buildcraft.core.CoreProxy;
import buildcraft.core.EntityEnergyLaser; import buildcraft.core.EntityEnergyLaser;
import buildcraft.core.ProxyCore;
import buildcraft.core.TileBuildCraft; import buildcraft.core.TileBuildCraft;
import buildcraft.factory.TileAssemblyTable; import buildcraft.factory.TileAssemblyTable;
@ -164,7 +164,7 @@ public class TileLaser extends TileBuildCraft implements IPowerReceptor {
protected void createLaser() { protected void createLaser() {
if (CoreProxy.isServerSide()) if (ProxyCore.proxy.isServerSide(worldObj))
return; return;
laser = new EntityEnergyLaser(worldObj, new Position(xCoord, yCoord, zCoord), new Position(xCoord, yCoord, zCoord)); laser = new EntityEnergyLaser(worldObj, new Position(xCoord, yCoord, zCoord), new Position(xCoord, yCoord, zCoord));

View file

@ -18,8 +18,8 @@ import net.minecraft.src.ItemStack;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import buildcraft.api.recipes.AssemblyRecipe; import buildcraft.api.recipes.AssemblyRecipe;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.ProxyCore;
import buildcraft.core.gui.GuiAdvancedInterface; import buildcraft.core.gui.GuiAdvancedInterface;
import buildcraft.core.network.PacketCoordinates; import buildcraft.core.network.PacketCoordinates;
import buildcraft.core.network.PacketIds; import buildcraft.core.network.PacketIds;
@ -70,8 +70,8 @@ public class GuiAssemblyTable extends GuiAdvancedInterface {
updateRecipes(); updateRecipes();
// Request current selection from server // Request current selection from server
if(CoreProxy.isRemote()) if(ProxyCore.proxy.isRemote(assemblyTable.worldObj))
CoreProxy.sendToServer(new PacketCoordinates(PacketIds.SELECTION_ASSEMBLY_GET, assemblyTable.xCoord, ProxyCore.proxy.sendToServer(new PacketCoordinates(PacketIds.SELECTION_ASSEMBLY_GET, assemblyTable.xCoord,
assemblyTable.yCoord, assemblyTable.zCoord).getPacket()); assemblyTable.yCoord, assemblyTable.zCoord).getPacket());
} }
@ -152,7 +152,7 @@ public class GuiAssemblyTable extends GuiAdvancedInterface {
ContainerAssemblyTable container = (ContainerAssemblyTable) inventorySlots; ContainerAssemblyTable container = (ContainerAssemblyTable) inventorySlots;
if (CoreProxy.isRemote()) { if (ProxyCore.proxy.isRemote(assemblyTable.worldObj)) {
PacketPayload payload = TileAssemblyTable.selectionMessageWrapper.toPayload(container.x, container.y, PacketPayload payload = TileAssemblyTable.selectionMessageWrapper.toPayload(container.x, container.y,
container.z, message); container.z, message);
@ -161,7 +161,7 @@ public class GuiAssemblyTable extends GuiAdvancedInterface {
packet.posY = assemblyTable.yCoord; packet.posY = assemblyTable.yCoord;
packet.posZ = assemblyTable.zCoord; packet.posZ = assemblyTable.zCoord;
CoreProxy.sendToServer(packet.getPacket()); ProxyCore.proxy.sendToServer(packet.getPacket());
} }
} }

View file

@ -9,7 +9,6 @@
package buildcraft.transport; package buildcraft.transport;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
import java.util.TreeMap; import java.util.TreeMap;
@ -18,8 +17,8 @@ import buildcraft.BuildCraftTransport;
import buildcraft.api.tools.IToolWrench; import buildcraft.api.tools.IToolWrench;
import buildcraft.api.transport.IPipe; import buildcraft.api.transport.IPipe;
import buildcraft.core.BlockIndex; import buildcraft.core.BlockIndex;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.ProxyCore;
import buildcraft.core.Utils; import buildcraft.core.Utils;
import net.minecraft.src.AxisAlignedBB; import net.minecraft.src.AxisAlignedBB;
@ -217,7 +216,7 @@ public class BlockGenericPipe extends BlockContainer {
@Override @Override
public void dropBlockAsItemWithChance(World world, int i, int j, int k, int l, float f, int dmg) { public void dropBlockAsItemWithChance(World world, int i, int j, int k, int l, float f, int dmg) {
if (CoreProxy.isClient(world)) if (ProxyCore.proxy.isClient(world))
return; return;
int i1 = quantityDropped(world.rand); int i1 = quantityDropped(world.rand);
@ -362,7 +361,7 @@ public class BlockGenericPipe extends BlockContainer {
// Try to strip wires first, starting with yellow. // Try to strip wires first, starting with yellow.
for (IPipe.WireColor color : IPipe.WireColor.values()) for (IPipe.WireColor color : IPipe.WireColor.values())
if (pipe.wireSet[color.reverse().ordinal()]) { if (pipe.wireSet[color.reverse().ordinal()]) {
if (!CoreProxy.isRemote()) if (!ProxyCore.proxy.isRemote(pipe.worldObj))
dropWire(color.reverse(), pipe.worldObj, pipe.xCoord, pipe.yCoord, pipe.zCoord); dropWire(color.reverse(), pipe.worldObj, pipe.xCoord, pipe.yCoord, pipe.zCoord);
pipe.wireSet[color.reverse().ordinal()] = false; pipe.wireSet[color.reverse().ordinal()] = false;
//pipe.worldObj.markBlockNeedsUpdate(pipe.xCoord, pipe.yCoord, pipe.zCoord); //pipe.worldObj.markBlockNeedsUpdate(pipe.xCoord, pipe.yCoord, pipe.zCoord);
@ -372,7 +371,7 @@ public class BlockGenericPipe extends BlockContainer {
// Try to strip gate next // Try to strip gate next
if (pipe.hasGate()) { if (pipe.hasGate()) {
if (!CoreProxy.isRemote()) if (!ProxyCore.proxy.isRemote(pipe.worldObj))
pipe.gate.dropGate(pipe.worldObj, pipe.xCoord, pipe.yCoord, pipe.zCoord); pipe.gate.dropGate(pipe.worldObj, pipe.xCoord, pipe.yCoord, pipe.zCoord);
pipe.resetGate(); pipe.resetGate();
return true; return true;

View file

@ -13,7 +13,6 @@ import java.util.LinkedList;
import buildcraft.BuildCraftCore; import buildcraft.BuildCraftCore;
import buildcraft.BuildCraftTransport; import buildcraft.BuildCraftTransport;
import buildcraft.mod_BuildCraftTransport;
import buildcraft.api.blueprints.BlockSignature; import buildcraft.api.blueprints.BlockSignature;
import buildcraft.api.blueprints.BptBlock; import buildcraft.api.blueprints.BptBlock;
import buildcraft.api.blueprints.BptSlotInfo; import buildcraft.api.blueprints.BptSlotInfo;

View file

@ -3,10 +3,8 @@ package buildcraft.transport;
import java.util.LinkedList; import java.util.LinkedList;
import buildcraft.BuildCraftTransport; import buildcraft.BuildCraftTransport;
import buildcraft.api.gates.Action;
import buildcraft.api.gates.IAction; import buildcraft.api.gates.IAction;
import buildcraft.api.gates.ITrigger; import buildcraft.api.gates.ITrigger;
import buildcraft.api.gates.Trigger;
import buildcraft.core.network.IndexInPayload; import buildcraft.core.network.IndexInPayload;
import buildcraft.core.network.PacketPayload; import buildcraft.core.network.PacketPayload;

View file

@ -4,15 +4,13 @@ import java.util.LinkedList;
import buildcraft.BuildCraftTransport; import buildcraft.BuildCraftTransport;
import buildcraft.mod_BuildCraftTransport; import buildcraft.mod_BuildCraftTransport;
import buildcraft.api.gates.Action;
import buildcraft.api.gates.IAction; import buildcraft.api.gates.IAction;
import buildcraft.api.gates.ITrigger; import buildcraft.api.gates.ITrigger;
import buildcraft.api.gates.Trigger;
import buildcraft.api.power.IPowerReceptor; import buildcraft.api.power.IPowerReceptor;
import buildcraft.api.transport.IPipe; import buildcraft.api.transport.IPipe;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.GuiIds; import buildcraft.core.GuiIds;
import buildcraft.core.ProxyCore;
import buildcraft.core.Utils; import buildcraft.core.Utils;
import net.minecraft.src.EntityPlayer; import net.minecraft.src.EntityPlayer;
@ -64,7 +62,7 @@ public class GateVanilla extends Gate {
// GUI // GUI
@Override @Override
public void openGui(EntityPlayer player) { public void openGui(EntityPlayer player) {
if (!CoreProxy.isClient(player.worldObj)) if (!ProxyCore.proxy.isClient(player.worldObj))
player.openGui(mod_BuildCraftTransport.instance, GuiIds.GATES, pipe.worldObj, pipe.xCoord, pipe.yCoord, pipe.zCoord); player.openGui(mod_BuildCraftTransport.instance, GuiIds.GATES, pipe.worldObj, pipe.xCoord, pipe.yCoord, pipe.zCoord);
} }
@ -163,6 +161,7 @@ public class GateVanilla extends Gate {
gateDamage = 5; gateDamage = 5;
break; break;
case OR_4: case OR_4:
default:
gateDamage = 6; gateDamage = 6;
break; break;
} }

View file

@ -8,12 +8,11 @@ import java.util.ListIterator;
import cpw.mods.fml.common.Side; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
import buildcraft.BuildCraftCore;
import buildcraft.BuildCraftTransport; import buildcraft.BuildCraftTransport;
import buildcraft.api.core.Orientations; import buildcraft.api.core.Orientations;
import buildcraft.api.recipes.AssemblyRecipe; import buildcraft.api.recipes.AssemblyRecipe;
import buildcraft.core.CoreProxy;
import buildcraft.core.ItemBuildCraft; import buildcraft.core.ItemBuildCraft;
import buildcraft.core.ProxyCore;
import net.minecraft.src.Block; import net.minecraft.src.Block;
import net.minecraft.src.CreativeTabs; import net.minecraft.src.CreativeTabs;
@ -42,7 +41,7 @@ public class ItemFacade extends ItemBuildCraft {
int decodedMeta = ItemFacade.getMetaData(itemstack.getItemDamage()); int decodedMeta = ItemFacade.getMetaData(itemstack.getItemDamage());
ItemStack newStack = new ItemStack(decodedBlockId, 1, decodedMeta); ItemStack newStack = new ItemStack(decodedBlockId, 1, decodedMeta);
if (Item.itemsList[decodedBlockId] != null){ if (Item.itemsList[decodedBlockId] != null){
name += ": " + CoreProxy.getItemDisplayName(newStack); name += ": " + ProxyCore.proxy.getItemDisplayName(newStack);
} else { } else {
name += " < BROKEN >"; name += " < BROKEN >";
} }

View file

@ -14,10 +14,8 @@ import buildcraft.mod_BuildCraftTransport;
import buildcraft.api.core.Orientations; import buildcraft.api.core.Orientations;
import buildcraft.api.core.SafeTimeTracker; import buildcraft.api.core.SafeTimeTracker;
import buildcraft.api.inventory.ISpecialInventory; import buildcraft.api.inventory.ISpecialInventory;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps;
import buildcraft.core.GuiIds; import buildcraft.core.GuiIds;
import buildcraft.core.network.PacketIds; import buildcraft.core.ProxyCore;
import buildcraft.core.network.PacketNBT; import buildcraft.core.network.PacketNBT;
import buildcraft.core.utils.SimpleInventory; import buildcraft.core.utils.SimpleInventory;
import net.minecraft.src.Block; import net.minecraft.src.Block;
@ -43,7 +41,7 @@ public class PipeLogicDiamond extends PipeLogic implements ISpecialInventory {
if (Block.blocksList[entityplayer.getCurrentEquippedItem().itemID] instanceof BlockGenericPipe) if (Block.blocksList[entityplayer.getCurrentEquippedItem().itemID] instanceof BlockGenericPipe)
return false; return false;
if (!CoreProxy.isClient(container.worldObj)) if (!ProxyCore.proxy.isClient(container.worldObj))
entityplayer.openGui(mod_BuildCraftTransport.instance, GuiIds.PIPE_DIAMOND, container.worldObj, container.xCoord, entityplayer.openGui(mod_BuildCraftTransport.instance, GuiIds.PIPE_DIAMOND, container.worldObj, container.xCoord,
container.yCoord, container.zCoord); container.yCoord, container.zCoord);
@ -54,7 +52,7 @@ public class PipeLogicDiamond extends PipeLogic implements ISpecialInventory {
@Override @Override
public void updateEntity() { public void updateEntity() {
if (tracker.markTimeIfDelay(worldObj, 20 * BuildCraftCore.updateFactor)) if (tracker.markTimeIfDelay(worldObj, 20 * BuildCraftCore.updateFactor))
if (CoreProxy.isServerSide()) if (ProxyCore.proxy.isServerSide(container.worldObj))
sendFilterSet(); sendFilterSet();
} }
@ -96,7 +94,7 @@ public class PipeLogicDiamond extends PipeLogic implements ISpecialInventory {
public ItemStack decrStackSize(int i, int j) { public ItemStack decrStackSize(int i, int j) {
ItemStack stack = filters.decrStackSize(i, j); ItemStack stack = filters.decrStackSize(i, j);
if (CoreProxy.isServerSide()) if (ProxyCore.proxy.isServerSide(container.worldObj))
sendFilterSet(); sendFilterSet();
return stack; return stack;
@ -106,7 +104,7 @@ public class PipeLogicDiamond extends PipeLogic implements ISpecialInventory {
public void setInventorySlotContents(int i, ItemStack itemstack) { public void setInventorySlotContents(int i, ItemStack itemstack) {
filters.setInventorySlotContents(i, itemstack); filters.setInventorySlotContents(i, itemstack);
if (CoreProxy.isServerSide()) if (ProxyCore.proxy.isServerSide(container.worldObj))
sendFilterSet(); sendFilterSet();
} }
@ -115,7 +113,7 @@ public class PipeLogicDiamond extends PipeLogic implements ISpecialInventory {
public void sendFilterSet() { public void sendFilterSet() {
NBTTagCompound nbttagcompound = new NBTTagCompound(); NBTTagCompound nbttagcompound = new NBTTagCompound();
this.writeToNBT(nbttagcompound); this.writeToNBT(nbttagcompound);
PacketNBT packet = new PacketNBT(PacketIds.DIAMOND_PIPE_CONTENTS, nbttagcompound, xCoord, yCoord, zCoord); //PacketNBT packet = new PacketNBT(PacketIds.DIAMOND_PIPE_CONTENTS, nbttagcompound, xCoord, yCoord, zCoord);
//CoreProxy.sendToPlayers(packet.getPacket(), worldObj, xCoord, yCoord, zCoord, DefaultProps.NETWORK_UPDATE_RANGE, mod_BuildCraftTransport.instance); //CoreProxy.sendToPlayers(packet.getPacket(), worldObj, xCoord, yCoord, zCoord, DefaultProps.NETWORK_UPDATE_RANGE, mod_BuildCraftTransport.instance);
} }

View file

@ -13,18 +13,14 @@ import buildcraft.BuildCraftTransport;
import buildcraft.api.core.Orientations; import buildcraft.api.core.Orientations;
import buildcraft.api.liquids.ITankContainer; import buildcraft.api.liquids.ITankContainer;
import buildcraft.api.tools.IToolWrench; import buildcraft.api.tools.IToolWrench;
import buildcraft.api.transport.IPipe;
import buildcraft.api.transport.PipeManager; import buildcraft.api.transport.PipeManager;
import buildcraft.core.CoreProxy; import buildcraft.core.ProxyCore;
import buildcraft.core.Utils; import buildcraft.core.Utils;
import buildcraft.transport.pipes.PipeLiquidsVoid;
import buildcraft.transport.pipes.PipeLiquidsWood; import buildcraft.transport.pipes.PipeLiquidsWood;
import net.minecraft.src.Block;
import net.minecraft.src.EntityPlayer; import net.minecraft.src.EntityPlayer;
import net.minecraft.src.IInventory; import net.minecraft.src.IInventory;
import net.minecraft.src.Item; import net.minecraft.src.Item;
import net.minecraft.src.TileEntity; import net.minecraft.src.TileEntity;
import net.minecraft.src.World;
public class PipeLogicWood extends PipeLogic { public class PipeLogicWood extends PipeLogic {
@ -35,7 +31,6 @@ public class PipeLogicWood extends PipeLogic {
for (int i = meta + 1; i <= meta + 6; ++i) { for (int i = meta + 1; i <= meta + 6; ++i) {
Orientations o = Orientations.values()[i % 6]; Orientations o = Orientations.values()[i % 6];
Block block = Block.blocksList[container.getBlockId(o)];
TileEntity tile = container.getTile(o); TileEntity tile = container.getTile(o);
if (isInput(tile)) if (isInput(tile))
@ -87,7 +82,7 @@ public class PipeLogicWood extends PipeLogic {
public void initialize() { public void initialize() {
super.initialize(); super.initialize();
if (!CoreProxy.isClient(worldObj)) if (!ProxyCore.proxy.isClient(worldObj))
switchSourceIfNeeded(); switchSourceIfNeeded();
} }
@ -108,7 +103,7 @@ public class PipeLogicWood extends PipeLogic {
public void onNeighborBlockChange(int blockId) { public void onNeighborBlockChange(int blockId) {
super.onNeighborBlockChange(blockId); super.onNeighborBlockChange(blockId);
if (!CoreProxy.isClient(worldObj)) if (!ProxyCore.proxy.isClient(worldObj))
switchSourceIfNeeded(); switchSourceIfNeeded();
} }

View file

@ -9,7 +9,6 @@
package buildcraft.transport; package buildcraft.transport;
import java.awt.Dimension;
import java.util.HashSet; import java.util.HashSet;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.TreeMap; import java.util.TreeMap;
@ -18,17 +17,16 @@ import java.util.Vector;
import buildcraft.BuildCraftCore; import buildcraft.BuildCraftCore;
import buildcraft.BuildCraftTransport; import buildcraft.BuildCraftTransport;
import buildcraft.mod_BuildCraftTransport;
import buildcraft.api.core.Orientations; import buildcraft.api.core.Orientations;
import buildcraft.api.core.Position; import buildcraft.api.core.Position;
import buildcraft.api.gates.ITrigger; import buildcraft.api.gates.ITrigger;
import buildcraft.api.inventory.ISpecialInventory; import buildcraft.api.inventory.ISpecialInventory;
import buildcraft.api.transport.IPipeEntry; import buildcraft.api.transport.IPipeEntry;
import buildcraft.api.transport.IPipedItem; import buildcraft.api.transport.IPipedItem;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.EntityPassiveItem; import buildcraft.core.EntityPassiveItem;
import buildcraft.core.IMachine; import buildcraft.core.IMachine;
import buildcraft.core.ProxyCore;
import buildcraft.core.StackUtil; import buildcraft.core.StackUtil;
import buildcraft.core.Utils; import buildcraft.core.Utils;
import buildcraft.core.network.PacketIds; import buildcraft.core.network.PacketIds;
@ -36,13 +34,11 @@ import buildcraft.core.network.PacketPipeTransportContent;
import net.minecraft.server.MinecraftServer; import net.minecraft.server.MinecraftServer;
import net.minecraft.src.EntityItem; import net.minecraft.src.EntityItem;
import net.minecraft.src.EntityPlayerMP;
import net.minecraft.src.IInventory; import net.minecraft.src.IInventory;
import net.minecraft.src.ItemStack; import net.minecraft.src.ItemStack;
import net.minecraft.src.NBTTagCompound; import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.NBTTagList; import net.minecraft.src.NBTTagList;
import net.minecraft.src.Packet; import net.minecraft.src.Packet;
import net.minecraft.src.ServerConfigurationManager;
import net.minecraft.src.TileEntity; import net.minecraft.src.TileEntity;
public class PipeTransportItems extends PipeTransport { public class PipeTransportItems extends PipeTransport {
@ -260,7 +256,7 @@ public class PipeTransportItems extends PipeTransport {
} else if (tile instanceof IInventory) { } else if (tile instanceof IInventory) {
StackUtil utils = new StackUtil(data.item.getItemStack()); StackUtil utils = new StackUtil(data.item.getItemStack());
if (!CoreProxy.isClient(worldObj)) if (!ProxyCore.proxy.isClient(worldObj))
if (utils.checkAvailableSlot((IInventory) tile, true, data.orientation.reverse()) && utils.items.stackSize == 0) if (utils.checkAvailableSlot((IInventory) tile, true, data.orientation.reverse()) && utils.items.stackSize == 0)
data.item.remove(); data.item.remove();
else { else {
@ -363,7 +359,7 @@ public class PipeTransportItems extends PipeTransport {
else { else {
int i; int i;
if (CoreProxy.isClient(worldObj) || CoreProxy.isServerSide()) if (ProxyCore.proxy.isClient(worldObj) || ProxyCore.proxy.isServerSide(worldObj))
{ {
i = Math.abs(data.item.getEntityId() + xCoord + yCoord + zCoord + data.item.getDeterministicRandomization()) i = Math.abs(data.item.getEntityId() + xCoord + yCoord + zCoord + data.item.getDeterministicRandomization())
% listOfPossibleMovements.size(); % listOfPossibleMovements.size();

View file

@ -10,7 +10,6 @@
package buildcraft.transport; package buildcraft.transport;
import buildcraft.BuildCraftCore; import buildcraft.BuildCraftCore;
import buildcraft.mod_BuildCraftCore;
import buildcraft.api.core.BuildCraftAPI; import buildcraft.api.core.BuildCraftAPI;
import buildcraft.api.core.Orientations; import buildcraft.api.core.Orientations;
import buildcraft.api.core.SafeTimeTracker; import buildcraft.api.core.SafeTimeTracker;
@ -20,9 +19,8 @@ import buildcraft.api.liquids.ITankContainer;
import buildcraft.api.liquids.LiquidStack; import buildcraft.api.liquids.LiquidStack;
import buildcraft.api.liquids.LiquidTank; import buildcraft.api.liquids.LiquidTank;
import buildcraft.api.transport.IPipeEntry; import buildcraft.api.transport.IPipeEntry;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps;
import buildcraft.core.IMachine; import buildcraft.core.IMachine;
import buildcraft.core.ProxyCore;
import buildcraft.core.Utils; import buildcraft.core.Utils;
import buildcraft.transport.network.PacketLiquidUpdate; import buildcraft.transport.network.PacketLiquidUpdate;
import net.minecraft.src.NBTTagCompound; import net.minecraft.src.NBTTagCompound;
@ -179,7 +177,7 @@ public class PipeTransportLiquids extends PipeTransport implements ITankContaine
@Override @Override
public void updateEntity() { public void updateEntity() {
if (CoreProxy.isClient(worldObj)) if (ProxyCore.proxy.isClient(worldObj))
return; return;
moveLiquids(); moveLiquids();
@ -214,7 +212,7 @@ public class PipeTransportLiquids extends PipeTransport implements ITankContaine
} }
if (CoreProxy.isServerSide()) if (ProxyCore.proxy.isServerSide(worldObj))
if (tracker.markTimeIfDelay(worldObj, 1 * BuildCraftCore.updateFactor)){ if (tracker.markTimeIfDelay(worldObj, 1 * BuildCraftCore.updateFactor)){
PacketLiquidUpdate packet = new PacketLiquidUpdate(xCoord, yCoord, zCoord); PacketLiquidUpdate packet = new PacketLiquidUpdate(xCoord, yCoord, zCoord);

View file

@ -13,14 +13,12 @@ import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.TileEntity; import net.minecraft.src.TileEntity;
import buildcraft.BuildCraftCore; import buildcraft.BuildCraftCore;
import buildcraft.BuildCraftTransport; import buildcraft.BuildCraftTransport;
import buildcraft.mod_BuildCraftCore;
import buildcraft.api.core.Orientations; import buildcraft.api.core.Orientations;
import buildcraft.api.core.SafeTimeTracker; import buildcraft.api.core.SafeTimeTracker;
import buildcraft.api.gates.ITrigger; import buildcraft.api.gates.ITrigger;
import buildcraft.api.power.IPowerReceptor; import buildcraft.api.power.IPowerReceptor;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps;
import buildcraft.core.IMachine; import buildcraft.core.IMachine;
import buildcraft.core.ProxyCore;
import buildcraft.core.Utils; import buildcraft.core.Utils;
import buildcraft.transport.network.PacketPowerUpdate; import buildcraft.transport.network.PacketPowerUpdate;
@ -51,7 +49,7 @@ public class PipeTransportPower extends PipeTransport {
@Override @Override
public void updateEntity() { public void updateEntity() {
if (CoreProxy.isClient(worldObj)) if (ProxyCore.proxy.isClient(worldObj))
return; return;
step(); step();

View file

@ -6,7 +6,6 @@ import buildcraft.BuildCraftTransport;
import buildcraft.api.gates.IOverrideDefaultTriggers; import buildcraft.api.gates.IOverrideDefaultTriggers;
import buildcraft.api.gates.ITrigger; import buildcraft.api.gates.ITrigger;
import buildcraft.api.gates.ITriggerProvider; import buildcraft.api.gates.ITriggerProvider;
import buildcraft.api.gates.Trigger;
import buildcraft.api.transport.IPipe; import buildcraft.api.transport.IPipe;
import net.minecraft.src.Block; import net.minecraft.src.Block;

View file

@ -50,9 +50,9 @@ public class TriggerPipeContents extends Trigger implements ITriggerPipe {
case ContainsItems: case ContainsItems:
case ContainsLiquids: case ContainsLiquids:
return true; return true;
default:
return false;
} }
return false;
} }
@Override @Override

View file

@ -19,7 +19,7 @@ import buildcraft.api.gates.IAction;
import buildcraft.api.gates.ITrigger; import buildcraft.api.gates.ITrigger;
import buildcraft.api.gates.ITriggerParameter; import buildcraft.api.gates.ITriggerParameter;
import buildcraft.api.gates.TriggerParameter; import buildcraft.api.gates.TriggerParameter;
import buildcraft.core.CoreProxy; import buildcraft.core.ProxyCore;
import buildcraft.core.gui.BuildCraftContainer; import buildcraft.core.gui.BuildCraftContainer;
import buildcraft.core.network.PacketCoordinates; import buildcraft.core.network.PacketCoordinates;
import buildcraft.core.network.PacketIds; import buildcraft.core.network.PacketIds;
@ -60,7 +60,7 @@ public class ContainerGateInterface extends BuildCraftContainer {
// Do not attempt to create a list of potential actions and triggers on // Do not attempt to create a list of potential actions and triggers on
// the client. // the client.
if (!CoreProxy.isRemote()) { if (!ProxyCore.proxy.isRemote(pipe.worldObj)) {
_potentialActions.addAll(pipe.getActions()); _potentialActions.addAll(pipe.getActions());
_potentialTriggers.addAll(ActionManager.getPipeTriggers(pipe)); _potentialTriggers.addAll(ActionManager.getPipeTriggers(pipe));
@ -188,7 +188,7 @@ public class ContainerGateInterface extends BuildCraftContainer {
payload.intPayload[5] = pipe.triggerParameters[position].getItemStack().getItemDamage(); payload.intPayload[5] = pipe.triggerParameters[position].getItemStack().getItemDamage();
} }
CoreProxy.sendToServer(new PacketUpdate(PacketIds.GATE_SELECTION_CHANGE, pipe.xCoord, pipe.yCoord, pipe.zCoord, payload) ProxyCore.proxy.sendToServer(new PacketUpdate(PacketIds.GATE_SELECTION_CHANGE, pipe.xCoord, pipe.yCoord, pipe.zCoord, payload)
.getPacket()); .getPacket());
} }
@ -198,15 +198,15 @@ public class ContainerGateInterface extends BuildCraftContainer {
*/ */
public void synchronize() { public void synchronize() {
if (!isNetInitialized && CoreProxy.isRemote()) { if (!isNetInitialized && ProxyCore.proxy.isRemote(pipe.worldObj)) {
isNetInitialized = true; isNetInitialized = true;
CoreProxy.sendToServer(new PacketCoordinates(PacketIds.GATE_REQUEST_INIT, pipe.xCoord, pipe.yCoord, pipe.zCoord) ProxyCore.proxy.sendToServer(new PacketCoordinates(PacketIds.GATE_REQUEST_INIT, pipe.xCoord, pipe.yCoord, pipe.zCoord)
.getPacket()); .getPacket());
} }
if (!isSynchronized && CoreProxy.isRemote()) { if (!isSynchronized && ProxyCore.proxy.isRemote(pipe.worldObj)) {
isSynchronized = true; isSynchronized = true;
CoreProxy.sendToServer(new PacketCoordinates(PacketIds.GATE_REQUEST_SELECTION, pipe.xCoord, pipe.yCoord, pipe.zCoord) ProxyCore.proxy.sendToServer(new PacketCoordinates(PacketIds.GATE_REQUEST_SELECTION, pipe.xCoord, pipe.yCoord, pipe.zCoord)
.getPacket()); .getPacket());
} }
@ -271,7 +271,7 @@ public class ContainerGateInterface extends BuildCraftContainer {
PacketUpdate packet = new PacketUpdate(PacketIds.GATE_ACTIONS, pipe.xCoord, pipe.yCoord, pipe.zCoord, payload); PacketUpdate packet = new PacketUpdate(PacketIds.GATE_ACTIONS, pipe.xCoord, pipe.yCoord, pipe.zCoord, payload);
// Send to player // Send to player
CoreProxy.sendToPlayer(player, packet); ProxyCore.proxy.sendToPlayer(player, packet);
} }
/** /**
@ -292,7 +292,7 @@ public class ContainerGateInterface extends BuildCraftContainer {
PacketUpdate packet = new PacketUpdate(PacketIds.GATE_TRIGGERS, pipe.xCoord, pipe.yCoord, pipe.zCoord, payload); PacketUpdate packet = new PacketUpdate(PacketIds.GATE_TRIGGERS, pipe.xCoord, pipe.yCoord, pipe.zCoord, payload);
// Send to player // Send to player
CoreProxy.sendToPlayer(player, packet); ProxyCore.proxy.sendToPlayer(player, packet);
} }
/** /**
@ -344,7 +344,7 @@ public class ContainerGateInterface extends BuildCraftContainer {
payload.intPayload[5] = pipe.triggerParameters[position].getItemStack().getItemDamage(); payload.intPayload[5] = pipe.triggerParameters[position].getItemStack().getItemDamage();
} }
CoreProxy.sendToPlayer(player, new PacketUpdate(PacketIds.GATE_SELECTION, pipe.xCoord, pipe.yCoord, pipe.zCoord, ProxyCore.proxy.sendToPlayer(player, new PacketUpdate(PacketIds.GATE_SELECTION, pipe.xCoord, pipe.yCoord, pipe.zCoord,
payload)); payload));
} }
@ -374,13 +374,13 @@ public class ContainerGateInterface extends BuildCraftContainer {
public void setTrigger(int position, ITrigger trigger, boolean notify) { public void setTrigger(int position, ITrigger trigger, boolean notify) {
pipe.setTrigger(position, trigger); pipe.setTrigger(position, trigger);
if (CoreProxy.isRemote() && notify) if (ProxyCore.proxy.isRemote(pipe.worldObj) && notify)
sendSelectionChange(position); sendSelectionChange(position);
} }
public void setTriggerParameter(int position, ITriggerParameter parameter, boolean notify) { public void setTriggerParameter(int position, ITriggerParameter parameter, boolean notify) {
pipe.setTriggerParameter(position, parameter); pipe.setTriggerParameter(position, parameter);
if (CoreProxy.isRemote() && notify) if (ProxyCore.proxy.isRemote(pipe.worldObj) && notify)
sendSelectionChange(position); sendSelectionChange(position);
} }
@ -403,7 +403,7 @@ public class ContainerGateInterface extends BuildCraftContainer {
public void setAction(int position, IAction action, boolean notify) { public void setAction(int position, IAction action, boolean notify) {
pipe.setAction(position, action); pipe.setAction(position, action);
if (CoreProxy.isRemote() && notify) if (ProxyCore.proxy.isRemote(pipe.worldObj) && notify)
sendSelectionChange(position); sendSelectionChange(position);
} }

View file

@ -14,8 +14,8 @@ import net.minecraft.src.ItemStack;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.ProxyCore;
import buildcraft.core.gui.GuiAdvancedInterface; import buildcraft.core.gui.GuiAdvancedInterface;
import buildcraft.core.network.PacketIds; import buildcraft.core.network.PacketIds;
import buildcraft.core.network.PacketSlotChange; import buildcraft.core.network.PacketSlotChange;
@ -91,10 +91,10 @@ public class GuiDiamondPipe extends GuiAdvancedInterface {
filterInventory.setInventorySlotContents(position, newStack); filterInventory.setInventorySlotContents(position, newStack);
if (CoreProxy.isRemote()) { if (ProxyCore.proxy.isRemote(filterInventory.worldObj)) {
PacketSlotChange packet = new PacketSlotChange(PacketIds.DIAMOND_PIPE_SELECT, filterInventory.xCoord, PacketSlotChange packet = new PacketSlotChange(PacketIds.DIAMOND_PIPE_SELECT, filterInventory.xCoord,
filterInventory.yCoord, filterInventory.zCoord, position, newStack); filterInventory.yCoord, filterInventory.zCoord, position, newStack);
CoreProxy.sendToServer(packet.getPacket()); ProxyCore.proxy.sendToServer(packet.getPacket());
} }
} }
} }

View file

@ -16,11 +16,9 @@ import net.minecraft.src.ItemStack;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import buildcraft.api.gates.Action;
import buildcraft.api.gates.IAction; import buildcraft.api.gates.IAction;
import buildcraft.api.gates.ITrigger; import buildcraft.api.gates.ITrigger;
import buildcraft.api.gates.ITriggerParameter; import buildcraft.api.gates.ITriggerParameter;
import buildcraft.api.gates.Trigger;
import buildcraft.core.gui.GuiAdvancedInterface; import buildcraft.core.gui.GuiAdvancedInterface;
import buildcraft.core.utils.StringUtil; import buildcraft.core.utils.StringUtil;
import buildcraft.transport.Pipe; import buildcraft.transport.Pipe;

View file

@ -15,16 +15,14 @@ import buildcraft.api.core.Position;
import buildcraft.api.power.IPowerProvider; import buildcraft.api.power.IPowerProvider;
import buildcraft.api.power.IPowerReceptor; import buildcraft.api.power.IPowerReceptor;
import buildcraft.api.power.PowerFramework; import buildcraft.api.power.PowerFramework;
import buildcraft.api.power.PowerProvider;
import buildcraft.api.transport.IPipedItem; import buildcraft.api.transport.IPipedItem;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.EntityPassiveItem; import buildcraft.core.EntityPassiveItem;
import buildcraft.core.ProxyCore;
import buildcraft.core.Utils; import buildcraft.core.Utils;
import buildcraft.transport.Pipe; import buildcraft.transport.Pipe;
import buildcraft.transport.PipeLogicObsidian; import buildcraft.transport.PipeLogicObsidian;
import buildcraft.transport.PipeTransportItems; import buildcraft.transport.PipeTransportItems;
import buildcraft.transport.TransportProxy;
import net.minecraft.src.AxisAlignedBB; import net.minecraft.src.AxisAlignedBB;
import net.minecraft.src.Entity; import net.minecraft.src.Entity;
@ -104,6 +102,7 @@ public class PipeItemsObsidian extends Pipe implements IPowerReceptor {
p2.z += distance + 1; p2.z += distance + 1;
break; break;
case ZNeg: case ZNeg:
default:
p1.z -= (distance - 1); p1.z -= (distance - 1);
p2.z -= distance; p2.z -= distance;
break; break;
@ -127,6 +126,7 @@ public class PipeItemsObsidian extends Pipe implements IPowerReceptor {
break; break;
case ZPos: case ZPos:
case ZNeg: case ZNeg:
default:
p1.y += distance + 1; p1.y += distance + 1;
p2.y -= distance; p2.y -= distance;
p1.x += distance + 1; p1.x += distance + 1;
@ -202,7 +202,7 @@ public class PipeItemsObsidian extends Pipe implements IPowerReceptor {
} }
public void pullItemIntoPipe(Entity entity, int distance) { public void pullItemIntoPipe(Entity entity, int distance) {
if (CoreProxy.isClient(worldObj)) if (ProxyCore.proxy.isClient(worldObj))
return; return;
Orientations orientation = getOpenOrientation().reverse(); Orientations orientation = getOpenOrientation().reverse();
@ -217,13 +217,13 @@ public class PipeItemsObsidian extends Pipe implements IPowerReceptor {
if (entity instanceof EntityItem) { if (entity instanceof EntityItem) {
EntityItem item = (EntityItem) entity; EntityItem item = (EntityItem) entity;
TransportProxy.obsidianPipePickup(worldObj, item, this.container); ProxyCore.proxy.obsidianPipePickup(worldObj, item, this.container);
float energyUsed = powerProvider.useEnergy(distance, item.item.stackSize * distance, true); float energyUsed = powerProvider.useEnergy(distance, item.item.stackSize * distance, true);
if (distance == 0 || energyUsed / distance == item.item.stackSize) { if (distance == 0 || energyUsed / distance == item.item.stackSize) {
stack = item.item; stack = item.item;
CoreProxy.removeEntity(entity); ProxyCore.proxy.removeEntity(entity);
} else } else
stack = item.item.splitStack((int) (energyUsed / distance)); stack = item.item.splitStack((int) (energyUsed / distance));
@ -235,7 +235,7 @@ public class PipeItemsObsidian extends Pipe implements IPowerReceptor {
} else if (entity instanceof EntityArrow) { } else if (entity instanceof EntityArrow) {
powerProvider.useEnergy(distance, distance, true); powerProvider.useEnergy(distance, distance, true);
stack = new ItemStack(Item.arrow, 1); stack = new ItemStack(Item.arrow, 1);
CoreProxy.removeEntity(entity); ProxyCore.proxy.removeEntity(entity);
} }
IPipedItem passive = new EntityPassiveItem(worldObj, xCoord + 0.5, yCoord + Utils.getPipeFloorOf(stack), IPipedItem passive = new EntityPassiveItem(worldObj, xCoord + 0.5, yCoord + Utils.getPipeFloorOf(stack),

View file

@ -20,7 +20,6 @@ import buildcraft.api.power.IPowerReceptor;
import buildcraft.api.power.PowerFramework; import buildcraft.api.power.PowerFramework;
import buildcraft.api.power.PowerProvider; import buildcraft.api.power.PowerProvider;
import buildcraft.api.transport.IPipedItem; import buildcraft.api.transport.IPipedItem;
import buildcraft.core.CoreProxy;
import buildcraft.core.DefaultProps; import buildcraft.core.DefaultProps;
import buildcraft.core.EntityPassiveItem; import buildcraft.core.EntityPassiveItem;
import buildcraft.core.Utils; import buildcraft.core.Utils;