Merge branch 'master' into TransportSecure
This commit is contained in:
commit
e3ce7e9063
24
build.bat
24
build.bat
|
@ -4,16 +4,16 @@ rmdir /S /Q ..\src
|
|||
mkdir ..\src
|
||||
xcopy /Y /E ..\src_work\* ..\src\
|
||||
|
||||
xcopy /Y /E buildcraft_client\src\net\* ..\src\minecraft\net
|
||||
xcopy /Y /E buildcraft_server\src\net\* ..\src\minecraft_server\net
|
||||
xcopy /Y /E buildcraft_client\net\* ..\src\minecraft\net\
|
||||
xcopy /Y /E buildcraft_server\net\* ..\src\minecraft_server\net\
|
||||
|
||||
xcopy /Y /E common\net\* ..\src\minecraft\net
|
||||
xcopy /Y /E common\net\* ..\src\minecraft_server\net
|
||||
xcopy /Y /E common\net\* ..\src\minecraft\net\
|
||||
xcopy /Y /E common\net\* ..\src\minecraft_server\net\
|
||||
|
||||
xcopy /Y /E ..\forge\forge_client\src\net\* ..\src\minecraft\net
|
||||
xcopy /Y /E ..\forge\forge_client\src\net\* ..\src\minecraft\net\
|
||||
|
||||
xcopy /Y /E ..\forge\forge_common\net\* ..\src\minecraft\net
|
||||
xcopy /Y /E ..\forge\forge_common\net\* ..\src\minecraft_server\net
|
||||
xcopy /Y /E ..\forge\forge_common\net\* ..\src\minecraft\net\
|
||||
xcopy /Y /E ..\forge\forge_common\net\* ..\src\minecraft_server\net\
|
||||
|
||||
cd ..
|
||||
cmd /C recompile.bat
|
||||
|
@ -25,8 +25,8 @@ mkdir ..\bin\minecraft\net\minecraft\src\buildcraft\transport\gui
|
|||
mkdir ..\bin\minecraft\net\minecraft\src\buildcraft\builders\gui
|
||||
mkdir ..\bin\minecraft\net\minecraft\src\buildcraft\energy\gui
|
||||
|
||||
xcopy /Y /E common\net\minecraft\src\buildcraft\core\gui\*.png ..\bin\minecraft\net\minecraft\src\buildcraft\core\gui
|
||||
xcopy /Y /E common\net\minecraft\src\buildcraft\factory\gui\*.png ..\bin\minecraft\net\minecraft\src\buildcraft\factory\gui
|
||||
xcopy /Y /E common\net\minecraft\src\buildcraft\transport\gui\*.png ..\bin\minecraft\net\minecraft\src\buildcraft\transport\gui
|
||||
xcopy /Y /E common\net\minecraft\src\buildcraft\builders\gui\*.png ..\bin\minecraft\net\minecraft\src\buildcraft\builders\gui
|
||||
xcopy /Y /E common\net\minecraft\src\buildcraft\energy\gui\*.png ..\bin\minecraft\net\minecraft\src\buildcraft\energy\gui
|
||||
xcopy /Y /E common\net\minecraft\src\buildcraft\core\gui\*.png ..\bin\minecraft\net\minecraft\src\buildcraft\core\gui\
|
||||
xcopy /Y /E common\net\minecraft\src\buildcraft\factory\gui\*.png ..\bin\minecraft\net\minecraft\src\buildcraft\factory\gui\
|
||||
xcopy /Y /E common\net\minecraft\src\buildcraft\transport\gui\*.png ..\bin\minecraft\net\minecraft\src\buildcraft\transport\gui\
|
||||
xcopy /Y /E common\net\minecraft\src\buildcraft\builders\gui\*.png ..\bin\minecraft\net\minecraft\src\buildcraft\builders\gui\
|
||||
xcopy /Y /E common\net\minecraft\src\buildcraft\energy\gui\*.png ..\bin\minecraft\net\minecraft\src\buildcraft\energy\gui\
|
||||
|
|
|
@ -16,10 +16,12 @@ import net.minecraft.src.GuiContainer;
|
|||
import net.minecraft.src.ModLoader;
|
||||
import net.minecraft.src.buildcraft.core.BptBase;
|
||||
import net.minecraft.src.buildcraft.core.BptPlayerIndex;
|
||||
import net.minecraft.src.buildcraft.core.GuiBuildCraft;
|
||||
import net.minecraft.src.forestry.core.utils.StringUtil;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GuiBlueprintLibrary extends GuiContainer {
|
||||
public class GuiBlueprintLibrary extends GuiBuildCraft {
|
||||
|
||||
EntityPlayer player;
|
||||
TileBlueprintLibrary library;
|
||||
|
@ -64,21 +66,22 @@ public class GuiBlueprintLibrary extends GuiContainer {
|
|||
controlList.add(nextPageButton);
|
||||
|
||||
// if (library.owner.equals(player.username)) {
|
||||
deleteButton = new GuiButton(2, j + 100, k + 114, 25, 20, "Del");
|
||||
deleteButton = new GuiButton(2, j + 100, k + 114, 25, 20, StringUtil.localize("gui.del"));
|
||||
controlList.add(deleteButton);
|
||||
|
||||
lockButton = new GuiButton(3, j + 127, k + 114, 40, 20, "Lock");
|
||||
lockButton = new GuiButton(3, j + 127, k + 114, 40, 20, StringUtil.localize("gui.lock"));
|
||||
controlList.add(lockButton);
|
||||
|
||||
if (library.locked)
|
||||
lockButton.displayString = "Unlock";
|
||||
else lockButton.displayString = "Lock";
|
||||
lockButton.displayString = StringUtil.localize("gui.unlock");
|
||||
else lockButton.displayString = StringUtil.localize("gui.lock");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer() {
|
||||
// fontRenderer.drawString(library.owner + "'s Library", 6, 6, 0x404040);
|
||||
fontRenderer.drawString("Blueprint Library", 6, 6, 0x404040);
|
||||
String title = StringUtil.localize("tile.libraryBlock");
|
||||
fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040);
|
||||
|
||||
int c = 0;
|
||||
for (BptBase bpt : container.contents) {
|
||||
|
@ -165,9 +168,9 @@ public class GuiBlueprintLibrary extends GuiContainer {
|
|||
library.locked = !library.locked;
|
||||
|
||||
if (library.locked)
|
||||
lockButton.displayString = "Unlock";
|
||||
lockButton.displayString = StringUtil.localize("gui.unlock");
|
||||
else
|
||||
lockButton.displayString = "Lock";
|
||||
lockButton.displayString = StringUtil.localize("gui.lock");
|
||||
} else if (deleteButton != null && deleteButton.mousePressed(ModLoader.getMinecraftInstance(), i, j))
|
||||
if (library.selected != null) {
|
||||
index.deleteBluePrint (library.selected.file.getName());
|
||||
|
|
|
@ -14,6 +14,7 @@ import java.util.Collection;
|
|||
import net.minecraft.src.IInventory;
|
||||
import net.minecraft.src.ItemStack;
|
||||
import net.minecraft.src.buildcraft.core.GuiAdvancedInterface;
|
||||
import net.minecraft.src.forestry.core.utils.StringUtil;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
@ -40,12 +41,13 @@ public class GuiBuilder extends GuiAdvancedInterface {
|
|||
protected void drawGuiContainerForegroundLayer() {
|
||||
super.drawGuiContainerForegroundLayer ();
|
||||
|
||||
fontRenderer.drawString("Builder", 73, 12, 0x404040);
|
||||
fontRenderer.drawString("Building Resources", 8, 60, 0x404040);
|
||||
fontRenderer.drawString("Inventory", 8, ySize - 97, 0x404040);
|
||||
String title = StringUtil.localize("tile.builderBlock");
|
||||
fontRenderer.drawString(title, getCenteredOffset(title), 12, 0x404040);
|
||||
fontRenderer.drawString(StringUtil.localize("gui.building.resources"), 8, 60, 0x404040);
|
||||
fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, ySize - 97, 0x404040);
|
||||
|
||||
if (builder.isBuildingBlueprint())
|
||||
fontRenderer.drawString("Needed", 185, 7, 0x404040);
|
||||
fontRenderer.drawString(StringUtil.localize("gui.needed"), 185, 7, 0x404040);
|
||||
|
||||
drawForegroundSelection();
|
||||
}
|
||||
|
|
|
@ -11,10 +11,12 @@ package net.minecraft.src.buildcraft.builders;
|
|||
|
||||
import net.minecraft.src.GuiContainer;
|
||||
import net.minecraft.src.IInventory;
|
||||
import net.minecraft.src.buildcraft.core.GuiBuildCraft;
|
||||
import net.minecraft.src.forestry.core.utils.StringUtil;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GuiFiller extends GuiContainer {
|
||||
public class GuiFiller extends GuiBuildCraft {
|
||||
|
||||
IInventory playerInventory;
|
||||
TileFiller filler;
|
||||
|
@ -29,9 +31,10 @@ public class GuiFiller extends GuiContainer {
|
|||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer() {
|
||||
fontRenderer.drawString("Filler", 75, 6, 0x404040);
|
||||
fontRenderer.drawString("Filling Resources", 8, 74, 0x404040);
|
||||
fontRenderer.drawString("Inventory", 8, 142, 0x404040);
|
||||
String title = StringUtil.localize("tile.fillerBlock");
|
||||
fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040);
|
||||
fontRenderer.drawString(StringUtil.localize("gui.filling.resources"), 8, 74, 0x404040);
|
||||
fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, 142, 0x404040);
|
||||
|
||||
if(filler.currentPattern != null)
|
||||
drawForegroundSelection(filler.currentPattern.getName());
|
||||
|
|
|
@ -14,10 +14,12 @@ import java.util.Date;
|
|||
import net.minecraft.src.BuildCraftBuilders;
|
||||
import net.minecraft.src.GuiContainer;
|
||||
import net.minecraft.src.IInventory;
|
||||
import net.minecraft.src.buildcraft.core.GuiBuildCraft;
|
||||
import net.minecraft.src.forestry.core.utils.StringUtil;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GuiTemplate extends GuiContainer {
|
||||
public class GuiTemplate extends GuiBuildCraft {
|
||||
|
||||
IInventory playerInventory;
|
||||
TileArchitect template;
|
||||
|
@ -34,8 +36,8 @@ public class GuiTemplate extends GuiContainer {
|
|||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer() {
|
||||
fontRenderer.drawString(template.getInvName(), 8, 6, 0x404040);
|
||||
fontRenderer.drawString("Inventory", 8, ySize - 152, 0x404040);
|
||||
fontRenderer.drawString(template.getInvName(), getCenteredOffset(template.getInvName()), 6, 0x404040);
|
||||
fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, ySize - 152, 0x404040);
|
||||
|
||||
if (editMode && ((new Date ()).getTime() / 100) % 8 >= 4)
|
||||
fontRenderer.drawString(template.name + "|", 51, 62, 0x404040);
|
||||
|
|
|
@ -19,11 +19,13 @@ import net.minecraft.src.EntityItem;
|
|||
import net.minecraft.src.EntityPlayer;
|
||||
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.ModTextureStatic;
|
||||
import net.minecraft.src.Packet;
|
||||
import net.minecraft.src.RenderEngine;
|
||||
import net.minecraft.src.StringTranslate;
|
||||
import net.minecraft.src.World;
|
||||
import net.minecraft.src.buildcraft.core.network.BuildCraftPacket;
|
||||
import net.minecraft.src.forge.MinecraftForgeClient;
|
||||
|
@ -44,15 +46,16 @@ 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, @SuppressWarnings("rawtypes") Class clas) {
|
||||
ModLoader.registerBlock(block, clas);
|
||||
}
|
||||
public static void registerBlock(Block block) {
|
||||
ModLoader.registerBlock(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);
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.src.RenderHelper;
|
|||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public abstract class GuiAdvancedInterface extends GuiContainer {
|
||||
public abstract class GuiAdvancedInterface extends GuiBuildCraft {
|
||||
|
||||
public abstract class AdvancedSlot {
|
||||
final public int x, y;
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package net.minecraft.src.buildcraft.core;
|
||||
|
||||
import net.minecraft.src.Container;
|
||||
import net.minecraft.src.GuiContainer;
|
||||
|
||||
public abstract class GuiBuildCraft extends GuiContainer {
|
||||
|
||||
public GuiBuildCraft(Container par1Container) {
|
||||
super(par1Container);
|
||||
}
|
||||
|
||||
protected int getCenteredOffset(String string) {
|
||||
return getCenteredOffset(string, xSize);
|
||||
}
|
||||
protected int getCenteredOffset(String string, int xWidth) {
|
||||
return (xWidth - fontRenderer.getStringWidth(string)) / 2;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -13,12 +13,14 @@ import net.minecraft.src.Block;
|
|||
import net.minecraft.src.GuiContainer;
|
||||
import net.minecraft.src.InventoryPlayer;
|
||||
import net.minecraft.src.Item;
|
||||
import net.minecraft.src.buildcraft.core.GuiBuildCraft;
|
||||
import net.minecraft.src.forestry.core.utils.StringUtil;
|
||||
import net.minecraft.src.forge.ITextureProvider;
|
||||
import net.minecraft.src.forge.MinecraftForgeClient;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GuiCombustionEngine extends GuiContainer {
|
||||
public class GuiCombustionEngine extends GuiBuildCraft {
|
||||
|
||||
private TileEngine tileEngine;
|
||||
|
||||
|
@ -31,8 +33,9 @@ public class GuiCombustionEngine extends GuiContainer {
|
|||
@Override
|
||||
protected void drawGuiContainerForegroundLayer()
|
||||
{
|
||||
fontRenderer.drawString("Combustion Engine", 50, 6, 0x404040);
|
||||
fontRenderer.drawString("Inventory", 8, (ySize - 96) + 2, 0x404040);
|
||||
String title = StringUtil.localize("tile.engineIron");
|
||||
fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040);
|
||||
fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, (ySize - 96) + 2, 0x404040);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -11,10 +11,12 @@ package net.minecraft.src.buildcraft.energy;
|
|||
|
||||
import net.minecraft.src.GuiContainer;
|
||||
import net.minecraft.src.InventoryPlayer;
|
||||
import net.minecraft.src.buildcraft.core.GuiBuildCraft;
|
||||
import net.minecraft.src.forestry.core.utils.StringUtil;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GuiSteamEngine extends GuiContainer {
|
||||
public class GuiSteamEngine extends GuiBuildCraft {
|
||||
|
||||
private TileEngine tileEngine;
|
||||
|
||||
|
@ -25,8 +27,9 @@ public class GuiSteamEngine extends GuiContainer {
|
|||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer() {
|
||||
fontRenderer.drawString("Steam Engine", 60, 6, 0x404040);
|
||||
fontRenderer.drawString("Inventory", 8, (ySize - 96) + 2, 0x404040);
|
||||
String title = StringUtil.localize("tile.engineStone");
|
||||
fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040);
|
||||
fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, (ySize - 96) + 2, 0x404040);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,10 +12,12 @@ package net.minecraft.src.buildcraft.factory;
|
|||
import net.minecraft.src.GuiContainer;
|
||||
import net.minecraft.src.InventoryPlayer;
|
||||
import net.minecraft.src.World;
|
||||
import net.minecraft.src.buildcraft.core.GuiBuildCraft;
|
||||
import net.minecraft.src.forestry.core.utils.StringUtil;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GuiAutoCrafting extends GuiContainer {
|
||||
public class GuiAutoCrafting extends GuiBuildCraft {
|
||||
|
||||
public GuiAutoCrafting(InventoryPlayer inventoryplayer, World world,
|
||||
TileAutoWorkbench tile) {
|
||||
|
@ -30,8 +32,9 @@ public class GuiAutoCrafting extends GuiContainer {
|
|||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer() {
|
||||
fontRenderer.drawString("Crafting", 28, 6, 0x404040);
|
||||
fontRenderer.drawString("Inventory", 8, (ySize - 96) + 2, 0x404040);
|
||||
String title = StringUtil.localize("tile.tile.autoWorkBenchBlock");
|
||||
fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040);
|
||||
fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, (ySize - 96) + 2, 0x404040);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -14,6 +14,7 @@ import net.minecraft.src.ItemStack;
|
|||
import net.minecraft.src.buildcraft.api.BuildCraftAPI;
|
||||
import net.minecraft.src.buildcraft.api.RefineryRecipe;
|
||||
import net.minecraft.src.buildcraft.core.GuiAdvancedInterface;
|
||||
import net.minecraft.src.forestry.core.utils.StringUtil;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
@ -39,10 +40,11 @@ public class GuiRefinery extends GuiAdvancedInterface {
|
|||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer() {
|
||||
fontRenderer.drawString("Refinery Setup", 28, 6, 0x404040);
|
||||
String title = StringUtil.localize("tile.refineryBlock");
|
||||
fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040);
|
||||
fontRenderer.drawString("->", 63, 59, 0x404040);
|
||||
fontRenderer.drawString("<-", 106, 59, 0x404040);
|
||||
fontRenderer.drawString("Inventory", 8, (ySize - 96) + 2, 0x404040);
|
||||
fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, (ySize - 96) + 2, 0x404040);
|
||||
|
||||
drawForegroundSelection ();
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ import java.util.LinkedList;
|
|||
|
||||
import net.minecraft.src.IInventory;
|
||||
import net.minecraft.src.ItemStack;
|
||||
import net.minecraft.src.buildcraft.api.APIProxy;
|
||||
import net.minecraft.src.buildcraft.core.AssemblyRecipe;
|
||||
import net.minecraft.src.buildcraft.core.CoreProxy;
|
||||
import net.minecraft.src.buildcraft.core.GuiAdvancedInterface;
|
||||
|
@ -22,6 +23,7 @@ import net.minecraft.src.buildcraft.core.network.PacketPayload;
|
|||
import net.minecraft.src.buildcraft.core.network.PacketUpdate;
|
||||
import net.minecraft.src.buildcraft.factory.TileAssemblyTable;
|
||||
import net.minecraft.src.buildcraft.factory.TileAssemblyTable.SelectionMessage;
|
||||
import net.minecraft.src.forestry.core.utils.StringUtil;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
@ -83,9 +85,9 @@ public class GuiAssemblyTable extends GuiAdvancedInterface {
|
|||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer() {
|
||||
fontRenderer.drawString("Assembly Table", 60, 15, 0x404040);
|
||||
fontRenderer.drawString("Inventory", 8, ySize - 97,
|
||||
0x404040);
|
||||
String title = StringUtil.localize("tile.assemblyTableBlock");
|
||||
fontRenderer.drawString(title, getCenteredOffset(title), 15, 0x404040);
|
||||
fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, ySize - 97, 0x404040);
|
||||
|
||||
drawForegroundSelection();
|
||||
}
|
||||
|
@ -148,15 +150,16 @@ public class GuiAssemblyTable extends GuiAdvancedInterface {
|
|||
|
||||
ContainerAssemblyTable container = (ContainerAssemblyTable)inventorySlots;
|
||||
|
||||
PacketPayload payload = TileAssemblyTable.selectionMessageWrapper
|
||||
.toPayload(container.x, container.y,
|
||||
container.z, message);
|
||||
if(APIProxy.isRemote()) {
|
||||
PacketPayload payload = TileAssemblyTable.selectionMessageWrapper.toPayload(container.x, container.y,container.z, message);
|
||||
|
||||
PacketUpdate packet = new PacketUpdate(PacketIds.SELECTION_ASSEMBLY, payload);
|
||||
packet.posX = container.x;
|
||||
packet.posY = container.y;
|
||||
packet.posZ = container.z;
|
||||
CoreProxy.sendToServer(packet.getPacket());
|
||||
PacketUpdate packet = new PacketUpdate(PacketIds.SELECTION_ASSEMBLY, payload);
|
||||
packet.posX = container.x;
|
||||
packet.posY = container.y;
|
||||
packet.posZ = container.z;
|
||||
|
||||
CoreProxy.sendToServer(packet.getPacket());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ import net.minecraft.src.buildcraft.core.GuiAdvancedInterface;
|
|||
import net.minecraft.src.buildcraft.core.network.PacketIds;
|
||||
import net.minecraft.src.buildcraft.core.network.PacketSlotChange;
|
||||
import net.minecraft.src.buildcraft.transport.PipeLogicDiamond.PacketStack;
|
||||
import net.minecraft.src.forestry.core.utils.StringUtil;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
@ -47,9 +48,8 @@ public class GuiDiamondPipe extends GuiAdvancedInterface {
|
|||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer() {
|
||||
fontRenderer.drawString(filterInventory.getInvName(), 8, 6, 0x404040);
|
||||
fontRenderer.drawString("Inventory", 8, ySize - 97,
|
||||
0x404040);
|
||||
fontRenderer.drawString(filterInventory.getInvName(), getCenteredOffset(filterInventory.getInvName()), 6, 0x404040);
|
||||
fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, ySize - 97, 0x404040);
|
||||
|
||||
drawForegroundSelection ();
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ import net.minecraft.src.buildcraft.api.Trigger;
|
|||
import net.minecraft.src.buildcraft.api.TriggerParameter;
|
||||
import net.minecraft.src.buildcraft.core.GuiAdvancedInterface;
|
||||
import net.minecraft.src.buildcraft.transport.Gate.GateKind;
|
||||
import net.minecraft.src.forestry.core.utils.StringUtil;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
@ -212,13 +213,8 @@ public class GuiGateInterface extends GuiAdvancedInterface {
|
|||
protected void drawGuiContainerForegroundLayer() {
|
||||
String name = _container.getGateName();
|
||||
|
||||
if(name == "Gate")
|
||||
fontRenderer.drawString("Gate", 75, 15, 0x404040);
|
||||
else
|
||||
fontRenderer.drawString(name, 60, 15, 0x404040);
|
||||
|
||||
fontRenderer.drawString("Inventory", 8, ySize - 97,
|
||||
0x404040);
|
||||
fontRenderer.drawString(name, getCenteredOffset(name), 15, 0x404040);
|
||||
fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, ySize - 97, 0x404040);
|
||||
|
||||
drawForegroundSelection ();
|
||||
}
|
||||
|
|
|
@ -17,9 +17,11 @@ 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.StringTranslate;
|
||||
import net.minecraft.src.World;
|
||||
import net.minecraft.src.buildcraft.core.network.BuildCraftPacket;
|
||||
import net.minecraft.src.forge.DimensionManager;
|
||||
|
@ -27,13 +29,13 @@ import net.minecraft.src.forge.NetworkMod;
|
|||
|
||||
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, Class clas) {
|
||||
ModLoader.registerBlock(block, clas);
|
||||
}
|
||||
public static void registerBlock(Block block) {
|
||||
ModLoader.registerBlock(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);
|
||||
|
|
82
common/lang/buildcraft/de_DE.properties
Normal file
82
common/lang/buildcraft/de_DE.properties
Normal file
|
@ -0,0 +1,82 @@
|
|||
# de_DE
|
||||
# Translated by SirSengir
|
||||
|
||||
gui.building.resources=Baumaterial
|
||||
gui.del=Ent
|
||||
gui.filling.resources=F\u00fcllmaterial
|
||||
gui.inventory=Inventar
|
||||
gui.lock=Sperren
|
||||
gui.needed=Ben\u00f6tigt
|
||||
gui.unlock=\u00d6ffnen
|
||||
item.bucketFuel=Eimer Benzin
|
||||
item.bucketOil=Eimer \u00d6l
|
||||
item.woodenGearItem=Holzzahnrad
|
||||
item.stoneGearItem=Steinzahnrad
|
||||
item.ironGearItem=Eisenzahnrad
|
||||
item.goldGearItem=Goldzahnrad
|
||||
item.diamondGearItem=Diamantzahnrad
|
||||
item.templateItem=Plan
|
||||
item.wrenchItem=Schraubenschl\u00fcssel
|
||||
item.fuel=Benzin
|
||||
item.pipeWaterproof=Dichtmaterial
|
||||
item.pipeGate.0=Gate
|
||||
item.pipeGate.1=Eisernes AND Gate
|
||||
item.pipeGate.2=Eisernes OR Gate
|
||||
item.pipeGate.3=Goldenes AND Gate
|
||||
item.pipeGate.4=Goldenes OR Gate
|
||||
item.pipeGate.5=Diamantenes AND Gate
|
||||
item.pipeGate.6=Diamantenes OR Gate
|
||||
item.pipeGateAutarchic.0=Autarkes Gate
|
||||
item.pipeGateAutarchic.1=Autarkes Eisernes AND Gate
|
||||
item.pipeGateAutarchic.2=Autarkes Eisernes OR Gate
|
||||
item.pipeGateAutarchic.3=Autarkes Goldenes AND Gate
|
||||
item.pipeGateAutarchic.4=Autarkes Goldenes OR Gate
|
||||
item.pipeGateAutarchic.5=Autarkes Diamantenes AND Gate
|
||||
item.pipeGateAutarchic.6=Autarkes Diamantenes OR Gate
|
||||
item.redPipeWire=Rotes Rohrkabel
|
||||
item.bluePipeWire=Blaues Rohrkabel
|
||||
item.greenPipeWire=Gr\u00fcnes Rohrkabel
|
||||
item.yellowPipeWire=Gelbes Rohrkabel
|
||||
item.redstoneChipset.0=Redstone Chipsatz
|
||||
item.redstoneChipset.1=Eiserner Redstone Chipsatz
|
||||
item.redstoneChipset.2=Goldener Redstone Chipsatz
|
||||
item.redstoneChipset.3=Diamantener Redstone Chipsatz
|
||||
item.redstoneChipset.4=Pulsierender Chipsatz
|
||||
item.blueprintItem=Blaupause
|
||||
item.PipeItemsWood=Transportrohr (Holz)
|
||||
item.PipeItemsCobblestone=Transportrohr (Pflasterstein)
|
||||
item.PipeItemsStone=Transportrohr (Stein)
|
||||
item.PipeItemsIron=Transportrohr (Eisen)
|
||||
item.PipeItemsGold=Transportrohr (Gold)
|
||||
item.PipeItemsDiamond=Transportrohr (Diamant)
|
||||
item.PipeItemsObsidian=Transportrohr (Obsidian)
|
||||
item.PipeLiquidsWood=Rohrleitung (Holz)
|
||||
item.PipeLiquidsCobblestone=Rohrleitung (Pflasterstein)
|
||||
item.PipeLiquidsStone=Rohrleitung (Stein)
|
||||
item.PipeLiquidsIron=Rohrleitung (Eisen)
|
||||
item.PipeLiquidsGold=Rohrleitung (Gold)
|
||||
item.PipePowerWood=Energieleitung (Holz)
|
||||
item.PipePowerStone=Energieleitung (Stein)
|
||||
item.PipePowerGold=Energieleitung (Gold)
|
||||
item.PipeItemsStripes=Gestreiftes Rohr
|
||||
item.PipeStructureCobblestone=Strukturrohr
|
||||
tile.miningWellBlock=Minenschacht
|
||||
tile.plainPipeBlock=Minenrohr
|
||||
tile.autoWorkBenchBlock=Automatische Werkbank
|
||||
tile.machineBlock=Steinbruch
|
||||
tile.markerBlock=Markstein
|
||||
tile.fillerBlock=F\u00fcller
|
||||
tile.builderBlock=Konstrukteur
|
||||
tile.architectBlock=Architektentisch
|
||||
tile.frameBlock=Rahmen
|
||||
tile.tankBlock=Tank
|
||||
tile.refineryBlock=Raffinerie
|
||||
tile.libraryBlock=Blaupausen-Bibliothek
|
||||
tile.laserBlock=Laser
|
||||
tile.assemblyTableBlock=Montagebank
|
||||
tile.pathMarkerBlock=Wegmarkierung
|
||||
tile.blockHopper=Trichter
|
||||
tile.pumpBlock=Pumpe
|
||||
tile.engineWood=Redstone-Motor
|
||||
tile.engineStone=Dampfmotor
|
||||
tile.engineIron=Verbrennungsmotor
|
81
common/lang/buildcraft/en_US.properties
Normal file
81
common/lang/buildcraft/en_US.properties
Normal file
|
@ -0,0 +1,81 @@
|
|||
# Master language file
|
||||
|
||||
gui.building.resources=Building Resources
|
||||
gui.del=Del
|
||||
gui.filling.resources=Filling Resources
|
||||
gui.inventory=Inventory
|
||||
gui.lock=Lock
|
||||
gui.needed=Needed
|
||||
gui.unlock=Unlock
|
||||
item.bucketFuel=Fuel Bucket
|
||||
item.bucketOil=Oil Bucket
|
||||
item.woodenGearItem=Wood Gear
|
||||
item.stoneGearItem=Stone Gear
|
||||
item.ironGearItem=Iron Gear
|
||||
item.goldGearItem=Gold Gear
|
||||
item.diamondGearItem=Diamond Gear
|
||||
item.templateItem=Template
|
||||
item.wrenchItem=Wrench
|
||||
item.fuel=Fuel
|
||||
item.pipeWaterproof=Pipe Waterproof
|
||||
item.pipeGate.0=Gate
|
||||
item.pipeGate.1=Iron AND Gate
|
||||
item.pipeGate.2=Iron OR Gate
|
||||
item.pipeGate.3=Gold AND Gate
|
||||
item.pipeGate.4=Gold OR Gate
|
||||
item.pipeGate.5=Diamond AND Gate
|
||||
item.pipeGate.6=Diamond OR Gate
|
||||
item.pipeGateAutarchic.0=Autarchic Gate
|
||||
item.pipeGateAutarchic.1=Autarchic Iron AND Gate
|
||||
item.pipeGateAutarchic.2=Autarchic Iron OR Gate
|
||||
item.pipeGateAutarchic.3=Autarchic Gold AND Gate
|
||||
item.pipeGateAutarchic.4=Autarchic Gold OR Gate
|
||||
item.pipeGateAutarchic.5=Autarchic Diamond AND Gate
|
||||
item.pipeGateAutarchic.6=Autarchic Diamond OR Gate
|
||||
item.redPipeWire=Red Pipe Wire
|
||||
item.bluePipeWire=Blue Pipe Wire
|
||||
item.greenPipeWire=Green Pipe Wire
|
||||
item.yellowPipeWire=Yellow Pipe Wire
|
||||
item.redstoneChipset.0=Redstone Chipset
|
||||
item.redstoneChipset.1=Redstone Iron Chipset
|
||||
item.redstoneChipset.2=Redstone Golden Chipset
|
||||
item.redstoneChipset.3=Redstone Diamond Chipset
|
||||
item.redstoneChipset.4=Pulsating Chipset
|
||||
item.blueprintItem=Blueprint
|
||||
item.PipeItemsWood=Wooden Transport Pipe
|
||||
item.PipeItemsCobblestone=Cobblestone Transport Pipe
|
||||
item.PipeItemsStone=Stone Transport Pipe
|
||||
item.PipeItemsIron=Iron Transport Pipe
|
||||
item.PipeItemsGold=Golden Transport Pipe
|
||||
item.PipeItemsDiamond=Diamond Transport Pipe
|
||||
item.PipeItemsObsidian=Obsidian Transport Pipe
|
||||
item.PipeLiquidsWood=Wooden Waterproof Pipe
|
||||
item.PipeLiquidsCobblestone=Cobblestone Waterproof Pipe
|
||||
item.PipeLiquidsStone=Stone Waterproof Pipe
|
||||
item.PipeLiquidsIron=Iron Waterproof Pipe
|
||||
item.PipeLiquidsGold=Golden Waterproof Pipe
|
||||
item.PipePowerWood=Wooden Conductive Pipe
|
||||
item.PipePowerStone=Stone Conductive Pipe
|
||||
item.PipePowerGold=Golden Conductive Pipe
|
||||
item.PipeItemsStripes=Stripes Transport Pipe
|
||||
item.PipeStructureCobblestone=Cobblestone Structure Pipe
|
||||
tile.miningWellBlock=Mining Well
|
||||
tile.plainPipeBlock=Mining Pipe
|
||||
tile.autoWorkBenchBlock=Autocrafting Table
|
||||
tile.machineBlock=Quarry
|
||||
tile.markerBlock=Land Mark
|
||||
tile.fillerBlock=Filler
|
||||
tile.builderBlock=Builder
|
||||
tile.architectBlock=Architect Table
|
||||
tile.frameBlock=Frame
|
||||
tile.tankBlock=Tank
|
||||
tile.refineryBlock=Refinery
|
||||
tile.libraryBlock=Blueprint Library
|
||||
tile.laserBlock=Laser
|
||||
tile.assemblyTableBlock=Assembly Table
|
||||
tile.pathMarkerBlock=Path Marker
|
||||
tile.blockHopper=Hopper
|
||||
tile.pumpBlock=Pump
|
||||
tile.engineWood=Redstone Engine
|
||||
tile.engineStone=Steam Engine
|
||||
tile.engineIron=Combustion Engine
|
82
common/lang/buildcraft/ru_RU.properties
Normal file
82
common/lang/buildcraft/ru_RU.properties
Normal file
|
@ -0,0 +1,82 @@
|
|||
# ru_RU
|
||||
# Translation provided by mistaqur
|
||||
|
||||
gui.building.resources=\u0420\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0439\u043a\u0438
|
||||
gui.del=\u0423\u0434\u0430\u043b.
|
||||
gui.filling.resources=\u0420\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f
|
||||
gui.inventory=\u0418\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u044c
|
||||
gui.lock=\u0411\u043b\u043e\u043a\u0438\u0440.
|
||||
gui.needed=\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f
|
||||
gui.unlock=\u0420\u0430\u0437\u0431\u043b\u043e\u043a.
|
||||
item.bucketFuel=\u0412\u0435\u0434\u0440\u043e \u0441 \u0442\u043e\u043f\u043b\u0438\u0432\u043e\u043c
|
||||
item.bucketOil=\u0412\u0435\u0434\u0440\u043e \u0441 \u043d\u0435\u0444\u0442\u044c\u044e
|
||||
item.woodenGearItem=\u0414\u0435\u0440\u0435\u0432\u044f\u043d\u043d\u0430\u044f \u0448\u0435\u0441\u0442\u0435\u0440\u0435\u043d\u043a\u0430
|
||||
item.stoneGearItem=\u041a\u0430\u043c\u0435\u043d\u043d\u0430\u044f \u0448\u0435\u0441\u0442\u0435\u0440\u0435\u043d\u043a\u0430
|
||||
item.ironGearItem=\u0416\u0435\u043b\u0435\u0437\u043d\u0430\u044f \u0448\u0435\u0441\u0442\u0435\u0440\u0435\u043d\u043a\u0430
|
||||
item.goldGearItem=\u0417\u043e\u043b\u043e\u0442\u0430\u044f \u0448\u0435\u0441\u0442\u0435\u0440\u0435\u043d\u043a\u0430
|
||||
item.diamondGearItem=\u0410\u043b\u043c\u0430\u0437\u043d\u0430\u044f \u0448\u0435\u0441\u0442\u0435\u0440\u0435\u043d\u043a\u0430
|
||||
item.templateItem=\u0428\u0430\u0431\u043b\u043e\u043d
|
||||
item.wrenchItem=\u0413\u0430\u0435\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447
|
||||
item.fuel=\u0422\u043e\u043f\u043b\u0438\u0432\u043e
|
||||
item.pipeWaterproof=\u0423\u043f\u043b\u043e\u0442\u043d\u0438\u0442\u0435\u043b\u044c \u0434\u043b\u044f \u0442\u0440\u0443\u0431
|
||||
item.pipeGate.0=Gate
|
||||
item.pipeGate.1=Iron AND Gate
|
||||
item.pipeGate.2=Iron OR Gate
|
||||
item.pipeGate.3=Gold AND Gate
|
||||
item.pipeGate.4=Gold OR Gate
|
||||
item.pipeGate.5=Diamond AND Gate
|
||||
item.pipeGate.6=Diamond OR Gate
|
||||
item.pipeGateAutarchic.0=Autarchic Gate
|
||||
item.pipeGateAutarchic.1=Autarchic Iron AND Gate
|
||||
item.pipeGateAutarchic.2=Autarchic Iron OR Gate
|
||||
item.pipeGateAutarchic.3=Autarchic Gold AND Gate
|
||||
item.pipeGateAutarchic.4=Autarchic Gold OR Gate
|
||||
item.pipeGateAutarchic.5=Autarchic Diamond AND Gate
|
||||
item.pipeGateAutarchic.6=Autarchic Diamond OR Gate
|
||||
item.redPipeWire=\u041a\u0440\u0430\u0441\u043d\u044b\u0439 \u043f\u0440\u043e\u0432\u043e\u0434
|
||||
item.bluePipeWire=\u0421\u0438\u043d\u0438\u0439 \u043f\u0440\u043e\u0432\u043e\u0434
|
||||
item.greenPipeWire=\u0417\u0435\u043b\u0435\u043d\u044b\u0439 \u043f\u0440\u043e\u0432\u043e\u0434
|
||||
item.yellowPipeWire=\u0416\u0435\u043b\u0442\u044b\u0439 \u043f\u0440\u043e\u0432\u043e\u0434
|
||||
item.redstoneChipset.0=\u041c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u0430
|
||||
item.redstoneChipset.1=\u0416\u0435\u043b\u0435\u0437\u043d\u0430\u044f \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u0430
|
||||
item.redstoneChipset.2=\u0417\u043e\u043b\u043e\u0442\u0430\u044f \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u0430
|
||||
item.redstoneChipset.3=\u0410\u043b\u043c\u0430\u0437\u043d\u0430\u044f \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u0430
|
||||
item.redstoneChipset.4=\u041f\u0443\u043b\u044c\u0441\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u0430
|
||||
item.blueprintItem=\u0421\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442
|
||||
item.PipeItemsWood=\u0414\u0435\u0440\u0435\u0432\u044f\u043d\u043d\u0430\u044f \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u0430\u044f \u0442\u0440\u0443\u0431\u0430
|
||||
item.PipeItemsCobblestone=\u0422\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u0430\u044f \u0442\u0440\u0443\u0431\u0430 \u0438\u0437 \u0431\u0443\u043b\u044b\u0436\u043d\u0438\u043a\u0430
|
||||
item.PipeItemsStone=\u041a\u0430\u043c\u0435\u043d\u043d\u0430\u044f \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u0430\u044f \u0442\u0440\u0443\u0431\u0430
|
||||
item.PipeItemsIron=\u0416\u0435\u043b\u0435\u0437\u043d\u0430\u044f \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u0430\u044f \u0442\u0440\u0443\u0431\u0430
|
||||
item.PipeItemsGold=\u0417\u043e\u043b\u043e\u0442\u0430\u044f \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u0430\u044f \u0442\u0440\u0443\u0431\u0430
|
||||
item.PipeItemsDiamond=\u0410\u043b\u043c\u0430\u0437\u043d\u0430\u044f \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u0430\u044f \u0442\u0440\u0443\u0431\u0430
|
||||
item.PipeItemsObsidian=\u041e\u0431\u0441\u0438\u0434\u0438\u0430\u043d\u043e\u0432\u0430\u044f \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u0430\u044f \u0442\u0440\u0443\u0431\u0430
|
||||
item.PipeLiquidsWood=\u0414\u0435\u0440\u0435\u0432\u044f\u043d\u043d\u0430\u044f \u0432\u043e\u0434\u043e\u043d\u0435\u043f\u0440\u043e\u043d\u0438\u0446\u0430\u0435\u043c\u0430\u044f \u0442\u0440\u0443\u0431\u0430
|
||||
item.PipeLiquidsCobblestone=\u0412\u043e\u0434\u043e\u043d\u0435\u043f\u0440\u043e\u043d\u0438\u0446\u0430\u0435\u043c\u0430\u044f \u0442\u0440\u0443\u0431\u0430 \u0438\u0437 \u0431\u0443\u043b\u044b\u0436\u043d\u0438\u043a\u0430
|
||||
item.PipeLiquidsStone=\u041a\u0430\u043c\u0435\u043d\u043d\u0430\u044f \u0432\u043e\u0434\u043e\u043d\u0435\u043f\u0440\u043e\u043d\u0438\u0446\u0430\u0435\u043c\u0430\u044f \u0442\u0440\u0443\u0431\u0430
|
||||
item.PipeLiquidsIron=\u0416\u0435\u043b\u0435\u0437\u043d\u0430\u044f \u0432\u043e\u0434\u043e\u043d\u0435\u043f\u0440\u043e\u043d\u0438\u0446\u0430\u0435\u043c\u0430\u044f \u0442\u0440\u0443\u0431\u0430
|
||||
item.PipeLiquidsGold=\u0417\u043e\u043b\u043e\u0442\u0430\u044f \u0432\u043e\u0434\u043e\u043d\u0435\u043f\u0440\u043e\u043d\u0438\u0446\u0430\u0435\u043c\u0430\u044f \u0442\u0440\u0443\u0431\u0430
|
||||
item.PipePowerWood=\u0414\u0435\u0440\u0435\u0432\u044f\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0449\u0430\u044f \u0442\u0440\u0443\u0431\u0430
|
||||
item.PipePowerStone=\u041a\u0430\u043c\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0449\u0430\u044f \u0442\u0440\u0443\u0431\u0430
|
||||
item.PipePowerGold=\u0417\u043e\u043b\u043e\u0442\u0430\u044f \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0449\u0430\u044f \u0442\u0440\u0443\u0431\u0430
|
||||
item.PipeItemsStripes=\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u0430\u044f \u0442\u0440\u0443\u0431\u0430
|
||||
item.PipeStructureCobblestone=\u0417\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u0430\u044f \u0442\u0440\u0443\u0431\u0430
|
||||
tile.miningWellBlock=\u0411\u0443\u0440\u043e\u0432\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430
|
||||
tile.plainPipeBlock=\u0428\u0430\u0445\u0442\u0435\u0440\u0441\u043a\u0430\u044f \u0442\u0440\u0443\u0431\u0430
|
||||
tile.autoWorkbenchBlock=\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u0435\u0440\u0441\u0442\u0430\u043a
|
||||
tile.machineBlock=\u041a\u0430\u0440\u044c\u0435\u0440
|
||||
tile.markerBlock=\u041c\u0435\u0442\u043a\u0430
|
||||
tile.pumpBlock=\u041f\u043e\u043c\u043f\u0430
|
||||
tile.fillerBlock=\u0417\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c
|
||||
tile.builderBlock=\u0421\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c
|
||||
tile.architectBlock=\u0421\u0442\u043e\u043b \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440\u0430
|
||||
tile.frameBlock=\u0420\u0430\u043c\u043a\u0430
|
||||
tile.tankBlock=\u0426\u0438\u0441\u0442\u0435\u0440\u043d\u0430
|
||||
tile.refineryBlock=\u041f\u0435\u0440\u0435\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0437\u0430\u0432\u043e\u0434
|
||||
tile.libraryBlock=\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432
|
||||
tile.laserBlock=\u041b\u0430\u0437\u0435\u0440
|
||||
tile.assemblyTableBlock=\u0421\u0431\u043e\u0440\u043e\u0447\u043d\u044b\u0439 \u0441\u0442\u043e\u043b
|
||||
tile.pathMarkerBlock=\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u043c\u0435\u0442\u043a\u0430
|
||||
tile.blockHopper=\u0412\u043e\u0440\u043e\u043d\u043a\u0430
|
||||
tile.engineWood=\u0420\u0435\u0434\u0441\u0442\u043e\u0443\u043d-\u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044c
|
||||
tile.engineStone=\u041f\u0430\u0440\u043e\u0432\u043e\u0439 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044c
|
||||
tile.engineIron=\u0414\u0412\u0421
|
|
@ -139,28 +139,28 @@ public class BuildCraftBuilders {
|
|||
CoreProxy.addName(blueprintItem, "Blueprint");
|
||||
|
||||
markerBlock = new BlockMarker(Integer.parseInt(markerId.value));
|
||||
CoreProxy.registerBlock(markerBlock);
|
||||
CoreProxy.addName(markerBlock.setBlockName("markerBlock"), "Land Mark");
|
||||
CoreProxy.registerBlock(markerBlock.setBlockName("markerBlock"));
|
||||
CoreProxy.addName(markerBlock, "Land Mark");
|
||||
|
||||
pathMarkerBlock = new BlockPathMarker(Integer.parseInt(pathMarkerId.value));
|
||||
CoreProxy.registerBlock(pathMarkerBlock);
|
||||
CoreProxy.addName(pathMarkerBlock.setBlockName("pathMarkerBlock"), "Path Mark");
|
||||
CoreProxy.registerBlock(pathMarkerBlock.setBlockName("pathMarkerBlock"));
|
||||
CoreProxy.addName(pathMarkerBlock, "Path Mark");
|
||||
|
||||
fillerBlock = new BlockFiller(Integer.parseInt(fillerId.value));
|
||||
CoreProxy.registerBlock(fillerBlock);
|
||||
CoreProxy.addName(fillerBlock.setBlockName("fillerBlock"), "Filler");
|
||||
CoreProxy.registerBlock(fillerBlock.setBlockName("fillerBlock"));
|
||||
CoreProxy.addName(fillerBlock, "Filler");
|
||||
|
||||
builderBlock = new BlockBuilder(Integer.parseInt(builderId.value));
|
||||
CoreProxy.registerBlock(builderBlock);
|
||||
CoreProxy.addName(builderBlock.setBlockName("builderBlock"), "Builder");
|
||||
CoreProxy.registerBlock(builderBlock.setBlockName("builderBlock"));
|
||||
CoreProxy.addName(builderBlock, "Builder");
|
||||
|
||||
architectBlock = new BlockArchitect(Integer.parseInt(architectId.value));
|
||||
CoreProxy.registerBlock(architectBlock);
|
||||
CoreProxy.addName(architectBlock.setBlockName("architectBlock"), "Architect Table");
|
||||
CoreProxy.registerBlock(architectBlock.setBlockName("architectBlock"));
|
||||
CoreProxy.addName(architectBlock, "Architect Table");
|
||||
|
||||
libraryBlock = new BlockBlueprintLibrary(Integer.parseInt(libraryId.value));
|
||||
CoreProxy.registerBlock(libraryBlock);
|
||||
CoreProxy.addName(libraryBlock.setBlockName("libraryBlock"), "Blueprint Library");
|
||||
CoreProxy.registerBlock(libraryBlock.setBlockName("libraryBlock"));
|
||||
CoreProxy.addName(libraryBlock, "Blueprint Library");
|
||||
|
||||
CoreProxy.registerTileEntity(TileMarker.class, "Marker");
|
||||
CoreProxy.registerTileEntity(TileFiller.class, "Filler");
|
||||
|
|
|
@ -30,7 +30,7 @@ import net.minecraft.src.buildcraft.core.DefaultProps;
|
|||
import net.minecraft.src.buildcraft.core.DefaultTriggerProvider;
|
||||
import net.minecraft.src.buildcraft.core.EntityLaser;
|
||||
import net.minecraft.src.buildcraft.core.EntityRobot;
|
||||
import net.minecraft.src.buildcraft.core.ItemBuildCraftTexture;
|
||||
import net.minecraft.src.buildcraft.core.ItemBuildCraft;
|
||||
import net.minecraft.src.buildcraft.core.ItemWrench;
|
||||
import net.minecraft.src.buildcraft.core.RedstonePowerFramework;
|
||||
import net.minecraft.src.buildcraft.core.TriggerInventory;
|
||||
|
@ -305,27 +305,27 @@ public class BuildCraftCore {
|
|||
|
||||
gearsInitialized = true;
|
||||
|
||||
woodenGearItem = (new ItemBuildCraftTexture(Integer.parseInt(woodenGearId.value)))
|
||||
woodenGearItem = (new ItemBuildCraft(Integer.parseInt(woodenGearId.value)))
|
||||
.setIconIndex(1 * 16 + 0)
|
||||
.setItemName("woodenGearItem");
|
||||
CoreProxy.addName(woodenGearItem, "Wooden Gear");
|
||||
|
||||
stoneGearItem = (new ItemBuildCraftTexture(Integer.parseInt(stoneGearId.value)))
|
||||
stoneGearItem = (new ItemBuildCraft(Integer.parseInt(stoneGearId.value)))
|
||||
.setIconIndex(1 * 16 + 1)
|
||||
.setItemName("stoneGearItem");
|
||||
CoreProxy.addName(stoneGearItem, "Stone Gear");
|
||||
|
||||
ironGearItem = (new ItemBuildCraftTexture(Integer.parseInt(ironGearId.value)))
|
||||
ironGearItem = (new ItemBuildCraft(Integer.parseInt(ironGearId.value)))
|
||||
.setIconIndex(1 * 16 + 2)
|
||||
.setItemName("ironGearItem");
|
||||
CoreProxy.addName(ironGearItem, "Iron Gear");
|
||||
|
||||
goldGearItem = (new ItemBuildCraftTexture(Integer.parseInt(goldenGearId.value)))
|
||||
goldGearItem = (new ItemBuildCraft(Integer.parseInt(goldenGearId.value)))
|
||||
.setIconIndex(1 * 16 + 3)
|
||||
.setItemName("goldGearItem");
|
||||
CoreProxy.addName(goldGearItem, "Gold Gear");
|
||||
|
||||
diamondGearItem = (new ItemBuildCraftTexture(Integer.parseInt(diamondGearId.value)))
|
||||
diamondGearItem = (new ItemBuildCraft(Integer.parseInt(diamondGearId.value)))
|
||||
.setIconIndex(1 * 16 + 4)
|
||||
.setItemName("diamondGearItem");
|
||||
CoreProxy.addName(diamondGearItem, "Diamond Gear");
|
||||
|
|
|
@ -19,7 +19,7 @@ import net.minecraft.src.buildcraft.api.Trigger;
|
|||
import net.minecraft.src.buildcraft.core.BlockIndex;
|
||||
import net.minecraft.src.buildcraft.core.CoreProxy;
|
||||
import net.minecraft.src.buildcraft.core.DefaultProps;
|
||||
import net.minecraft.src.buildcraft.core.ItemBuildCraftTexture;
|
||||
import net.minecraft.src.buildcraft.core.ItemBuildCraft;
|
||||
import net.minecraft.src.buildcraft.energy.BlockEngine;
|
||||
import net.minecraft.src.buildcraft.energy.BlockOilFlowing;
|
||||
import net.minecraft.src.buildcraft.energy.BlockOilStill;
|
||||
|
@ -28,7 +28,6 @@ import net.minecraft.src.buildcraft.energy.Engine.EnergyStage;
|
|||
import net.minecraft.src.buildcraft.energy.GuiHandler;
|
||||
import net.minecraft.src.buildcraft.energy.ItemBucketOil;
|
||||
import net.minecraft.src.buildcraft.energy.ItemEngine;
|
||||
import net.minecraft.src.buildcraft.energy.ItemFuel;
|
||||
import net.minecraft.src.buildcraft.energy.OilBucketHandler;
|
||||
import net.minecraft.src.buildcraft.energy.OilPopulate;
|
||||
import net.minecraft.src.buildcraft.energy.TriggerEngineHeat;
|
||||
|
@ -94,7 +93,6 @@ public class BuildCraftEnergy {
|
|||
BuildCraftCore.mainConfiguration.save();
|
||||
|
||||
engineBlock = new BlockEngine(Integer.parseInt(engineId.value));
|
||||
CoreProxy.registerBlock(engineBlock);
|
||||
|
||||
Item.itemsList[engineBlock.blockID] = null;
|
||||
Item.itemsList[engineBlock.blockID] = (new ItemEngine(
|
||||
|
@ -125,10 +123,10 @@ public class BuildCraftEnergy {
|
|||
.setItemName("bucketOil").setContainerItem(Item.bucketEmpty);
|
||||
CoreProxy.addName(bucketOil, "Oil Bucket");
|
||||
|
||||
fuel = new ItemFuel (Integer.parseInt(itemFuelId.value)).setItemName("fuel");
|
||||
fuel = new ItemBuildCraft(Integer.parseInt(itemFuelId.value)).setItemName("fuel");
|
||||
CoreProxy.addName(fuel, "Fuel");
|
||||
|
||||
bucketFuel = new ItemBuildCraftTexture(Integer.parseInt(bucketFuelId.value))
|
||||
bucketFuel = new ItemBuildCraft(Integer.parseInt(bucketFuelId.value))
|
||||
.setIconIndex(0 * 16 + 3).setItemName("bucketFuel")
|
||||
.setMaxStackSize(1).setContainerItem(Item.bucketEmpty);
|
||||
CoreProxy.addName(bucketFuel, "Fuel Bucket");
|
||||
|
|
|
@ -113,53 +113,44 @@ public class BuildCraftFactory {
|
|||
MinecraftForge.registerCustomBucketHandler(new TankBucketHandler());
|
||||
|
||||
miningWellBlock = new BlockMiningWell(Integer.parseInt(minigWellId.value));
|
||||
CoreProxy.registerBlock(miningWellBlock);
|
||||
CoreProxy.addName(miningWellBlock.setBlockName("miningWellBlock"), "Mining Well");
|
||||
CoreProxy.registerBlock(miningWellBlock.setBlockName("miningWellBlock"));
|
||||
CoreProxy.addName(miningWellBlock, "Mining Well");
|
||||
|
||||
plainPipeBlock = new BlockPlainPipe(Integer.parseInt(plainPipeId.value));
|
||||
CoreProxy.registerBlock(plainPipeBlock);
|
||||
CoreProxy.addName(plainPipeBlock.setBlockName("plainPipeBlock"), "Mining Pipe");
|
||||
CoreProxy.registerBlock(plainPipeBlock.setBlockName("plainPipeBlock"));
|
||||
CoreProxy.addName(plainPipeBlock, "Mining Pipe");
|
||||
|
||||
autoWorkbenchBlock = new BlockAutoWorkbench(
|
||||
Integer.parseInt(autoWorkbenchId.value));
|
||||
CoreProxy.registerBlock(autoWorkbenchBlock);
|
||||
CoreProxy.addName(autoWorkbenchBlock.setBlockName("autoWorkbenchBlock"),
|
||||
"Automatic Crafting Table");
|
||||
CoreProxy.registerBlock(autoWorkbenchBlock.setBlockName("autoWorkbenchBlock"));
|
||||
CoreProxy.addName(autoWorkbenchBlock, "Automatic Crafting Table");
|
||||
|
||||
frameBlock = new BlockFrame(Integer.parseInt(frameId.value));
|
||||
CoreProxy.registerBlock(frameBlock);
|
||||
CoreProxy.addName(frameBlock.setBlockName("frameBlock"), "Frame");
|
||||
CoreProxy.registerBlock(frameBlock.setBlockName("frameBlock"));
|
||||
CoreProxy.addName(frameBlock, "Frame");
|
||||
|
||||
quarryBlock = new BlockQuarry(Integer.parseInt(quarryId.value));
|
||||
CoreProxy.registerBlock(quarryBlock);
|
||||
|
||||
CoreProxy.addName(quarryBlock.setBlockName("machineBlock"),
|
||||
"Quarry");
|
||||
CoreProxy.registerBlock(quarryBlock.setBlockName("machineBlock"));
|
||||
CoreProxy.addName(quarryBlock, "Quarry");
|
||||
|
||||
tankBlock = new BlockTank(Integer.parseInt(tankId.value));
|
||||
CoreProxy.addName(tankBlock.setBlockName("tankBlock"),
|
||||
"Tank");
|
||||
CoreProxy.registerBlock(tankBlock);
|
||||
CoreProxy.registerBlock(tankBlock.setBlockName("tankBlock"));
|
||||
CoreProxy.addName(tankBlock, "Tank");
|
||||
|
||||
pumpBlock = new BlockPump(Integer.parseInt(pumpId.value));
|
||||
CoreProxy.addName(pumpBlock.setBlockName("pumpBlock"),
|
||||
"Pump");
|
||||
CoreProxy.registerBlock(pumpBlock);
|
||||
CoreProxy.registerBlock(pumpBlock.setBlockName("pumpBlock"));
|
||||
CoreProxy.addName(pumpBlock,"Pump");
|
||||
|
||||
refineryBlock = new BlockRefinery(Integer.parseInt(refineryId.value));
|
||||
CoreProxy.addName(refineryBlock.setBlockName("refineryBlock"),
|
||||
"Refinery");
|
||||
CoreProxy.registerBlock(refineryBlock);
|
||||
CoreProxy.registerBlock(refineryBlock.setBlockName("refineryBlock"));
|
||||
CoreProxy.addName(refineryBlock, "Refinery");
|
||||
|
||||
hopperDisabled = Boolean.parseBoolean(hopperDisable.value);
|
||||
if (!hopperDisabled){
|
||||
hopperBlock = new BlockHopper(Integer.parseInt(hopperId.value));
|
||||
CoreProxy.addName(hopperBlock.setBlockName("blockHopper"),
|
||||
"Hopper");
|
||||
CoreProxy.registerBlock(hopperBlock);
|
||||
}
|
||||
|
||||
|
||||
CoreProxy.registerBlock(hopperBlock.setBlockName("blockHopper"));
|
||||
CoreProxy.addName(hopperBlock, "Hopper");
|
||||
}
|
||||
|
||||
CoreProxy.registerTileEntity(TileQuarry.class, "Machine");
|
||||
CoreProxy.registerTileEntity(TileMiningWell.class, "MiningWell");
|
||||
|
|
|
@ -57,13 +57,11 @@ public class BuildCraftSilicon {
|
|||
BuildCraftCore.mainConfiguration.save();
|
||||
|
||||
laserBlock = new BlockLaser (Integer.parseInt(laserId.value));
|
||||
CoreProxy.addName(laserBlock.setBlockName("laserBlock"),
|
||||
"Laser");
|
||||
CoreProxy.addName(laserBlock.setBlockName("laserBlock"), "Laser");
|
||||
CoreProxy.registerBlock(laserBlock);
|
||||
|
||||
assemblyTableBlock = new BlockAssemblyTable (Integer.parseInt(assemblyTableId.value));
|
||||
CoreProxy.addName(assemblyTableBlock.setBlockName("assemblyTableBlock"),
|
||||
"Assembly Table");
|
||||
CoreProxy.addName(assemblyTableBlock.setBlockName("assemblyTableBlock"), "Assembly Table");
|
||||
CoreProxy.registerBlock(assemblyTableBlock);
|
||||
|
||||
redstoneChipset = new ItemRedstoneChipset(DefaultProps.REDSTONE_CHIPSET);
|
||||
|
|
|
@ -17,7 +17,7 @@ import net.minecraft.src.buildcraft.api.Trigger;
|
|||
import net.minecraft.src.buildcraft.core.AssemblyRecipe;
|
||||
import net.minecraft.src.buildcraft.core.CoreProxy;
|
||||
import net.minecraft.src.buildcraft.core.DefaultProps;
|
||||
import net.minecraft.src.buildcraft.core.ItemBuildCraftTexture;
|
||||
import net.minecraft.src.buildcraft.core.ItemBuildCraft;
|
||||
import net.minecraft.src.buildcraft.transport.ActionEnergyPulser;
|
||||
import net.minecraft.src.buildcraft.transport.ActionSignalOutput;
|
||||
import net.minecraft.src.buildcraft.transport.BlockGenericPipe;
|
||||
|
@ -190,7 +190,7 @@ public class BuildCraftTransport {
|
|||
|
||||
BuildCraftCore.mainConfiguration.save();
|
||||
|
||||
pipeWaterproof = new ItemBuildCraftTexture (DefaultProps.PIPE_WATERPROOF_ID).setIconIndex(2 * 16 + 1);
|
||||
pipeWaterproof = new ItemBuildCraft (DefaultProps.PIPE_WATERPROOF_ID).setIconIndex(2 * 16 + 1);
|
||||
pipeWaterproof.setItemName("pipeWaterproof");
|
||||
CoreProxy.addName(pipeWaterproof, "Pipe Waterproof");
|
||||
genericPipeBlock = new BlockGenericPipe(Integer.parseInt(genericPipeId.value));
|
||||
|
@ -247,7 +247,7 @@ public class BuildCraftTransport {
|
|||
for (int j = 0; j < 6; ++j)
|
||||
diamondTextures [j] = 1 * 16 + 6 + j;
|
||||
|
||||
redPipeWire = new ItemBuildCraftTexture(DefaultProps.RED_PIPE_WIRE).setIconIndex(4 * 16 + 0);
|
||||
redPipeWire = new ItemBuildCraft(DefaultProps.RED_PIPE_WIRE).setIconIndex(4 * 16 + 0);
|
||||
redPipeWire.setItemName("redPipeWire");
|
||||
CoreProxy.addName(redPipeWire, "Red Pipe Wire");
|
||||
BuildCraftCore.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] {
|
||||
|
@ -256,7 +256,7 @@ public class BuildCraftTransport {
|
|||
new ItemStack(Item.ingotIron, 1) }, 500, new ItemStack(
|
||||
redPipeWire, 8)));
|
||||
|
||||
bluePipeWire = new ItemBuildCraftTexture(DefaultProps.BLUE_PIPE_WIRE).setIconIndex(4 * 16 + 1);
|
||||
bluePipeWire = new ItemBuildCraft(DefaultProps.BLUE_PIPE_WIRE).setIconIndex(4 * 16 + 1);
|
||||
bluePipeWire.setItemName("bluePipeWire");
|
||||
CoreProxy.addName(bluePipeWire, "Blue Pipe Wire");
|
||||
BuildCraftCore.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] {
|
||||
|
@ -265,7 +265,7 @@ public class BuildCraftTransport {
|
|||
new ItemStack(Item.ingotIron, 1) }, 500, new ItemStack(
|
||||
bluePipeWire, 8)));
|
||||
|
||||
greenPipeWire = new ItemBuildCraftTexture(DefaultProps.GREEN_PIPE_WIRE).setIconIndex(4 * 16 + 2);
|
||||
greenPipeWire = new ItemBuildCraft(DefaultProps.GREEN_PIPE_WIRE).setIconIndex(4 * 16 + 2);
|
||||
greenPipeWire.setItemName("greenPipeWire");
|
||||
CoreProxy.addName(greenPipeWire, "Green Pipe Wire");
|
||||
BuildCraftCore.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] {
|
||||
|
@ -274,7 +274,7 @@ public class BuildCraftTransport {
|
|||
new ItemStack(Item.ingotIron, 1) }, 500, new ItemStack(
|
||||
greenPipeWire, 8)));
|
||||
|
||||
yellowPipeWire = new ItemBuildCraftTexture(DefaultProps.YELLOW_PIPE_WIRE).setIconIndex(4 * 16 + 3);
|
||||
yellowPipeWire = new ItemBuildCraft(DefaultProps.YELLOW_PIPE_WIRE).setIconIndex(4 * 16 + 3);
|
||||
yellowPipeWire.setItemName("yellowPipeWire");
|
||||
CoreProxy.addName(yellowPipeWire, "Yellow Pipe Wire");
|
||||
BuildCraftCore.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[] {
|
||||
|
|
|
@ -18,15 +18,15 @@ import net.minecraft.src.Item;
|
|||
import net.minecraft.src.ItemStack;
|
||||
import net.minecraft.src.World;
|
||||
import net.minecraft.src.buildcraft.core.BptBase;
|
||||
import net.minecraft.src.buildcraft.core.ItemBuildCraft;
|
||||
import net.minecraft.src.forge.ITextureProvider;
|
||||
|
||||
public abstract class ItemBptBase extends Item implements ITextureProvider {
|
||||
public abstract class ItemBptBase extends ItemBuildCraft {
|
||||
|
||||
public ItemBptBase(int i) {
|
||||
super(i);
|
||||
|
||||
maxStackSize = 1;
|
||||
|
||||
maxStackSize = 1;
|
||||
iconIndex = 5 * 16 + 0;
|
||||
}
|
||||
|
||||
|
@ -47,10 +47,5 @@ public abstract class ItemBptBase extends Item implements ITextureProvider {
|
|||
@Override
|
||||
public void onUpdate(ItemStack itemstack, World world, Entity entity, int i, boolean flag) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureFile() {
|
||||
return BuildCraftCore.customBuildCraftSprites;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
package net.minecraft.src.buildcraft.core;
|
||||
|
||||
import net.minecraft.src.ItemBlock;
|
||||
import net.minecraft.src.ItemStack;
|
||||
import net.minecraft.src.buildcraft.core.utils.StringUtil;
|
||||
|
||||
public class ItemBlockBuildCraft extends ItemBlock {
|
||||
|
||||
protected String name;
|
||||
|
||||
public ItemBlockBuildCraft(int id, String name) {
|
||||
super(id);
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int i) {
|
||||
return i;
|
||||
}
|
||||
|
||||
//@Override Client side only
|
||||
public String getItemDisplayName(ItemStack itemstack) {
|
||||
return StringUtil.localize(getItemNameIS(itemstack));
|
||||
}
|
||||
|
||||
}
|
|
@ -11,14 +11,21 @@ package net.minecraft.src.buildcraft.core;
|
|||
|
||||
import net.minecraft.src.BuildCraftCore;
|
||||
import net.minecraft.src.Item;
|
||||
import net.minecraft.src.ItemStack;
|
||||
import net.minecraft.src.buildcraft.core.utils.StringUtil;
|
||||
import net.minecraft.src.forge.ITextureProvider;
|
||||
|
||||
public class ItemBuildCraftTexture extends Item implements ITextureProvider {
|
||||
public class ItemBuildCraft extends Item implements ITextureProvider {
|
||||
|
||||
public ItemBuildCraftTexture(int i) {
|
||||
public ItemBuildCraft(int i) {
|
||||
super(i);
|
||||
}
|
||||
|
||||
//@Override Client side only
|
||||
public String getItemDisplayName(ItemStack itemstack) {
|
||||
return StringUtil.localize(getItemNameIS(itemstack));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureFile() {
|
||||
return BuildCraftCore.customBuildCraftSprites;
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
|
||||
import net.minecraft.src.ItemStack;
|
||||
|
||||
public class ItemRedstoneChipset extends ItemBuildCraftTexture {
|
||||
public class ItemRedstoneChipset extends ItemBuildCraft {
|
||||
|
||||
public ItemRedstoneChipset(int i) {
|
||||
super(i);
|
||||
|
|
|
@ -3,7 +3,7 @@ package net.minecraft.src.buildcraft.core;
|
|||
import net.minecraft.src.EntityPlayer;
|
||||
import net.minecraft.src.buildcraft.api.tools.IToolWrench;
|
||||
|
||||
public class ItemWrench extends ItemBuildCraftTexture implements IToolWrench{
|
||||
public class ItemWrench extends ItemBuildCraft implements IToolWrench{
|
||||
|
||||
public ItemWrench(int i) {
|
||||
super(i);
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
package net.minecraft.src.buildcraft.core.utils;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import net.minecraft.src.buildcraft.core.CoreProxy;
|
||||
|
||||
/**
|
||||
* Simple mod localization class.
|
||||
*
|
||||
* @author Jimeo Wan
|
||||
* @license Public domain
|
||||
*/
|
||||
public class Localization {
|
||||
|
||||
public static Localization instance = new Localization();
|
||||
|
||||
private static final String DEFAULT_LANGUAGE = "en_US";
|
||||
|
||||
private String loadedLanguage = null;
|
||||
private Properties defaultMappings = new Properties();
|
||||
private Properties mappings = new Properties();
|
||||
|
||||
/**
|
||||
* Loads the mod's localization files. All language files must be stored in
|
||||
* "[modname]/lang/", in .properties files. (ex: for the mod 'invtweaks',
|
||||
* the french translation is in: "invtweaks/lang/fr_FR.properties")
|
||||
*
|
||||
* @param modName The mod name
|
||||
*/
|
||||
public Localization() {
|
||||
load(getCurrentLanguage());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a string for the given key, in the currently active translation.
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
public synchronized String get(String key) {
|
||||
String currentLanguage = getCurrentLanguage();
|
||||
if (!currentLanguage.equals(loadedLanguage))
|
||||
load(currentLanguage);
|
||||
|
||||
return mappings.getProperty(key, defaultMappings.getProperty(key, key));
|
||||
}
|
||||
|
||||
private void load(String newLanguage) {
|
||||
defaultMappings.clear();
|
||||
mappings.clear();
|
||||
try {
|
||||
InputStream langStream = Localization.class.getResourceAsStream(
|
||||
"/lang/buildcraft/" + newLanguage + ".properties");
|
||||
InputStream defaultLangStream = Localization.class.getResourceAsStream(
|
||||
"/lang/buildcraft/" + DEFAULT_LANGUAGE + ".properties");
|
||||
mappings.load((langStream == null) ? defaultLangStream : langStream);
|
||||
defaultMappings.load(defaultLangStream);
|
||||
|
||||
if (langStream != null) {
|
||||
langStream.close();
|
||||
}
|
||||
defaultLangStream.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
loadedLanguage = newLanguage;
|
||||
}
|
||||
|
||||
private static String getCurrentLanguage() {
|
||||
return CoreProxy.getCurrentLanguage();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package net.minecraft.src.buildcraft.core.utils;
|
||||
|
||||
public class StringUtil {
|
||||
public static String localize(String key) {
|
||||
return Localization.instance.get(key);
|
||||
}
|
||||
}
|
|
@ -11,6 +11,8 @@ package net.minecraft.src.buildcraft.energy;
|
|||
|
||||
import net.minecraft.src.BuildCraftEnergy;
|
||||
import net.minecraft.src.ItemBucket;
|
||||
import net.minecraft.src.ItemStack;
|
||||
import net.minecraft.src.buildcraft.core.utils.StringUtil;
|
||||
import net.minecraft.src.forge.ITextureProvider;
|
||||
|
||||
public class ItemBucketOil extends ItemBucket implements ITextureProvider {
|
||||
|
@ -20,6 +22,11 @@ public class ItemBucketOil extends ItemBucket implements ITextureProvider {
|
|||
iconIndex = 0 * 16 + 1;
|
||||
}
|
||||
|
||||
//@Override Client side only
|
||||
public String getItemDisplayName(ItemStack itemstack) {
|
||||
return StringUtil.localize(getItemNameIS(itemstack));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureFile() {
|
||||
return "/net/minecraft/src/buildcraft/core/gui/item_textures.png";
|
||||
|
|
|
@ -11,26 +11,17 @@ package net.minecraft.src.buildcraft.energy;
|
|||
|
||||
import net.minecraft.src.ItemBlock;
|
||||
import net.minecraft.src.ItemStack;
|
||||
import net.minecraft.src.buildcraft.core.ItemBlockBuildCraft;
|
||||
|
||||
public class ItemEngine extends ItemBlock
|
||||
public class ItemEngine extends ItemBlockBuildCraft
|
||||
{
|
||||
|
||||
public ItemEngine(int i)
|
||||
{
|
||||
super(i);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int i)
|
||||
{
|
||||
return i;
|
||||
public ItemEngine(int i) {
|
||||
super(i, "engine");
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "all" })
|
||||
public String getItemNameIS(ItemStack itemstack)
|
||||
{
|
||||
public String getItemNameIS(ItemStack itemstack) {
|
||||
if (itemstack.getItemDamage() == 0) {
|
||||
return "tile.engineWood";
|
||||
} else if (itemstack.getItemDamage() == 1) {
|
||||
|
|
|
@ -1,28 +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 net.minecraft.src.buildcraft.energy;
|
||||
|
||||
import net.minecraft.src.BuildCraftCore;
|
||||
import net.minecraft.src.Item;
|
||||
import net.minecraft.src.forge.ITextureProvider;
|
||||
|
||||
public class ItemFuel extends Item implements ITextureProvider {
|
||||
|
||||
public ItemFuel(int i) {
|
||||
super(i);
|
||||
iconIndex = 16 * 3 + 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureFile() {
|
||||
return BuildCraftCore.customBuildCraftSprites;
|
||||
}
|
||||
|
||||
}
|
|
@ -3,9 +3,9 @@ package net.minecraft.src.buildcraft.transport;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.src.ItemStack;
|
||||
import net.minecraft.src.buildcraft.core.ItemBuildCraftTexture;
|
||||
import net.minecraft.src.buildcraft.core.ItemBuildCraft;
|
||||
|
||||
public class ItemGate extends ItemBuildCraftTexture {
|
||||
public class ItemGate extends ItemBuildCraft {
|
||||
|
||||
private int series;
|
||||
|
||||
|
|
|
@ -17,9 +17,10 @@ import net.minecraft.src.Item;
|
|||
import net.minecraft.src.ItemStack;
|
||||
import net.minecraft.src.World;
|
||||
import net.minecraft.src.buildcraft.core.IItemPipe;
|
||||
import net.minecraft.src.buildcraft.core.ItemBuildCraft;
|
||||
import net.minecraft.src.forge.ITextureProvider;
|
||||
|
||||
public class ItemPipe extends Item implements ITextureProvider, IItemPipe {
|
||||
public class ItemPipe extends ItemBuildCraft implements IItemPipe {
|
||||
|
||||
Pipe dummyPipe;
|
||||
|
||||
|
|
Loading…
Reference in a new issue