Localization support, de_DE localization.
This commit is contained in:
parent
a3b727aa9e
commit
d4681e4cef
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
74
common/lang/buildcraft/de_DE.properties
Normal file
74
common/lang/buildcraft/de_DE.properties
Normal file
|
@ -0,0 +1,74 @@
|
|||
# de_DE
|
||||
# Translated by SirSengir
|
||||
|
||||
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.engineWood=Redstone-Motor
|
||||
tile.engineStone=Dampfmotor
|
||||
tile.engineIron=Verbrennungsmotor
|
73
common/lang/buildcraft/en_US.properties
Normal file
73
common/lang/buildcraft/en_US.properties
Normal file
|
@ -0,0 +1,73 @@
|
|||
# Master language file
|
||||
|
||||
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.engineWood=Redstone Engine
|
||||
tile.engineStone=Steam Engine
|
||||
tile.engineIron=Combustion Engine
|
|
@ -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;
|
||||
|
@ -187,7 +187,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));
|
||||
|
@ -242,7 +242,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[] {
|
||||
|
@ -251,7 +251,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[] {
|
||||
|
@ -260,7 +260,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[] {
|
||||
|
@ -269,7 +269,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