commit
cd9cd11134
10 changed files with 100 additions and 94 deletions
|
@ -32,7 +32,7 @@ public class GuiAutoCrafting extends GuiBuildCraft {
|
|||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer() {
|
||||
String title = StringUtil.localize("tile.autoWorkBenchBlock");
|
||||
String title = StringUtil.localize("tile.autoWorkbenchBlock");
|
||||
fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040);
|
||||
fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, (ySize - 96) + 2, 0x404040);
|
||||
}
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
package net.minecraft.src.buildcraft.core;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.src.AxisAlignedBB;
|
||||
import net.minecraft.src.Block;
|
||||
import net.minecraft.src.EntityItem;
|
||||
import net.minecraft.src.EntityPlayer;
|
||||
|
@ -55,9 +53,13 @@ public class CoreProxy {
|
|||
public static void sendToPlayers(Packet packet, World w, int x, int y,
|
||||
int z, int maxDistance, NetworkMod mod) {
|
||||
if (packet != null) {
|
||||
List<EntityPlayerMP> players = w.getEntitiesWithinAABB(EntityPlayerMP.class, AxisAlignedBB.getBoundingBoxFromPool(x - maxDistance, y - maxDistance, z - maxDistance, x + maxDistance, y + maxDistance, z + maxDistance));
|
||||
for (EntityPlayerMP player: players) {
|
||||
player.playerNetServerHandler.sendPacket(packet);
|
||||
for (int j = 0; j < w.playerEntities.size(); j++) {
|
||||
EntityPlayerMP player = (EntityPlayerMP)w.playerEntities.get(j);
|
||||
|
||||
if (Math.abs(player.posX - x) <= maxDistance
|
||||
&& Math.abs(player.posY - y) <= maxDistance
|
||||
&& Math.abs(player.posZ - z) <= maxDistance)
|
||||
player.playerNetServerHandler.sendPacket(packet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ item.PipeItemsStripes=Gestreiftes Rohr
|
|||
item.PipeStructureCobblestone=Strukturrohr
|
||||
tile.miningWellBlock=Minenschacht
|
||||
tile.plainPipeBlock=Minenrohr
|
||||
tile.autoWorkBenchBlock=Automatische Werkbank
|
||||
tile.autoWorkbenchBlock=Automatische Werkbank
|
||||
tile.machineBlock=Steinbruch
|
||||
tile.markerBlock=Markstein
|
||||
tile.fillerBlock=F\u00fcller
|
||||
|
|
|
@ -61,7 +61,7 @@ item.PipeItemsStripes=Stripes Transport Pipe
|
|||
item.PipeStructureCobblestone=Cobblestone Structure Pipe
|
||||
tile.miningWellBlock=Mining Well
|
||||
tile.plainPipeBlock=Mining Pipe
|
||||
tile.autoWorkBenchBlock=Autocrafting Table
|
||||
tile.autoWorkbenchBlock=Autocrafting Table
|
||||
tile.machineBlock=Quarry
|
||||
tile.markerBlock=Land Mark
|
||||
tile.fillerBlock=Filler
|
||||
|
|
|
@ -62,7 +62,7 @@ item.PipeItemsStripes=\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u04
|
|||
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.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
|
||||
|
|
|
@ -5,66 +5,66 @@ gui.building.resources=Byggmaterial
|
|||
gui.del=Radera
|
||||
gui.filling.resources=Fyllningsmaterial
|
||||
gui.inventory=Inventarie
|
||||
gui.lock=Lås
|
||||
gui.needed=Behövd
|
||||
gui.unlock=Lås upp
|
||||
item.bucketFuel=Bränslehink
|
||||
gui.lock=L\u00c3\u00a5s
|
||||
gui.needed=Beh\u00c3\u00b6vd
|
||||
gui.unlock=L\u00c3\u00a5s upp
|
||||
item.bucketFuel=Br\u00c3\u00a4nslehink
|
||||
item.bucketOil=Olje Hink
|
||||
item.woodenGearItem=Träkugghjul
|
||||
item.woodenGearItem=Tr\u00c3\u00a4kugghjul
|
||||
item.stoneGearItem=Stenkugghjul
|
||||
item.ironGearItem=Järnkugghjul
|
||||
item.ironGearItem=J\u00c3\u00a4rnkugghjul
|
||||
item.goldGearItem=Guldkugghjul
|
||||
item.diamondGearItem=Diamantkugghjul
|
||||
item.templateItem=Mall
|
||||
item.wrenchItem=Skiftnyckel
|
||||
item.fuel=Bränsle
|
||||
item.pipeWaterproof=Rörvattentätning
|
||||
item.fuel=Br\u00c3\u00a4nsle
|
||||
item.pipeWaterproof=R\u00c3\u00b6rvattent\u00c3\u00a4tning
|
||||
item.pipeGate.0=Grind
|
||||
item.pipeGate.1=Järn OCH Grind
|
||||
item.pipeGate.2=Järn ELLER Grind
|
||||
item.pipeGate.1=J\u00c3\u00a4rn OCH Grind
|
||||
item.pipeGate.2=J\u00c3\u00a4rn ELLER Grind
|
||||
item.pipeGate.3=Guld OCH Grind
|
||||
item.pipeGate.4=Guld ELLER Grind
|
||||
item.pipeGate.5=Diamant OCH Grind
|
||||
item.pipeGate.6=Diamant ELLER Grind
|
||||
item.pipeGateAutarchic.0=Primär Grind
|
||||
item.pipeGateAutarchic.1=Primär Järn OCH Grind
|
||||
item.pipeGateAutarchic.2=Primär Järn ELLER Grind
|
||||
item.pipeGateAutarchic.3=Primär Guld OCH Grind
|
||||
item.pipeGateAutarchic.4=Primär Guld ELLER Grind
|
||||
item.pipeGateAutarchic.5=Primär Diamant OCH Grind
|
||||
item.pipeGateAutarchic.6=Primär Diamant ELLER Grind
|
||||
item.redPipeWire=Röd Rörledning
|
||||
item.bluePipeWire=Blå Rörledning
|
||||
item.greenPipeWire=Grön Rörledning
|
||||
item.yellowPipeWire=Gul Rörledning
|
||||
item.redstoneChipset.0=Rödsten Chipset
|
||||
item.redstoneChipset.1=Rödsten Järn Chipset
|
||||
item.redstoneChipset.2=Rödsten Guld Chipset
|
||||
item.redstoneChipset.3=Rödsten Diamant Chipset
|
||||
item.pipeGateAutarchic.0=Prim\u00c3\u00a4r Grind
|
||||
item.pipeGateAutarchic.1=Prim\u00c3\u00a4r J\u00c3\u00a4rn OCH Grind
|
||||
item.pipeGateAutarchic.2=Prim\u00c3\u00a4r J\u00c3\u00a4rn ELLER Grind
|
||||
item.pipeGateAutarchic.3=Prim\u00c3\u00a4r Guld OCH Grind
|
||||
item.pipeGateAutarchic.4=Prim\u00c3\u00a4r Guld ELLER Grind
|
||||
item.pipeGateAutarchic.5=Prim\u00c3\u00a4r Diamant OCH Grind
|
||||
item.pipeGateAutarchic.6=Prim\u00c3\u00a4r Diamant ELLER Grind
|
||||
item.redPipeWire=R\u00c3\u00b6d R\u00c3\u00b6rledning
|
||||
item.bluePipeWire=Bl\u00c3\u00a5 R\u00c3\u00b6rledning
|
||||
item.greenPipeWire=Gr\u00c3\u00b6n R\u00c3\u00b6rledning
|
||||
item.yellowPipeWire=Gul R\u00c3\u00b6rledning
|
||||
item.redstoneChipset.0=R\u00c3\u00b6dsten Chipset
|
||||
item.redstoneChipset.1=R\u00c3\u00b6dsten J\u00c3\u00a4rn Chipset
|
||||
item.redstoneChipset.2=R\u00c3\u00b6dsten Guld Chipset
|
||||
item.redstoneChipset.3=R\u00c3\u00b6dsten Diamant Chipset
|
||||
item.redstoneChipset.4=Pulserande Chipset
|
||||
item.blueprintItem=Ritning
|
||||
item.PipeItemsWood=Trä Transport Rör
|
||||
item.PipeItemsCobblestone=Kullersten Transport Rör
|
||||
item.PipeItemsStone=Sten Transport Rör
|
||||
item.PipeItemsIron=Järn Transport Rör
|
||||
item.PipeItemsGold=Guld Transport Rör
|
||||
item.PipeItemsDiamond=Diamant Transport Rör
|
||||
item.PipeItemsObsidian=Obsidian Transport Rör
|
||||
item.PipeLiquidsWood=Vattentätt Trä Rör
|
||||
item.PipeLiquidsCobblestone=Vattentätt Kullerstens Rör
|
||||
item.PipeLiquidsStone=Vattentätt Sten Rör
|
||||
item.PipeLiquidsIron=Vattentätt Järn Rör
|
||||
item.PipeLiquidsGold=Vattentätt Guld Rör
|
||||
item.PipePowerWood=Konduktivt Trä Rör
|
||||
item.PipePowerStone=Konduktivt Sten Rör
|
||||
item.PipePowerGold=Konduktivt Guld Rör
|
||||
item.PipeItemsStripes=Randigt Transport Rör
|
||||
item.PipeStructureCobblestone=Kullerstens Struktur Rör
|
||||
item.PipeItemsWood=Tr\u00c3\u00a4 Transport R\u00c3\u00b6r
|
||||
item.PipeItemsCobblestone=Kullersten Transport R\u00c3\u00b6r
|
||||
item.PipeItemsStone=Sten Transport R\u00c3\u00b6r
|
||||
item.PipeItemsIron=J\u00c3\u00a4rn Transport R\u00c3\u00b6r
|
||||
item.PipeItemsGold=Guld Transport R\u00c3\u00b6r
|
||||
item.PipeItemsDiamond=Diamant Transport R\u00c3\u00b6r
|
||||
item.PipeItemsObsidian=Obsidian Transport R\u00c3\u00b6r
|
||||
item.PipeLiquidsWood=Vattent\u00c3\u00a4tt Tr\u00c3\u00a4 R\u00c3\u00b6r
|
||||
item.PipeLiquidsCobblestone=Vattent\u00c3\u00a4tt Kullerstens R\u00c3\u00b6r
|
||||
item.PipeLiquidsStone=Vattent\u00c3\u00a4tt Sten R\u00c3\u00b6r
|
||||
item.PipeLiquidsIron=Vattent\u00c3\u00a4tt J\u00c3\u00a4rn R\u00c3\u00b6r
|
||||
item.PipeLiquidsGold=Vattent\u00c3\u00a4tt Guld R\u00c3\u00b6r
|
||||
item.PipePowerWood=Konduktivt Tr\u00c3\u00a4 R\u00c3\u00b6r
|
||||
item.PipePowerStone=Konduktivt Sten R\u00c3\u00b6r
|
||||
item.PipePowerGold=Konduktivt Guld R\u00c3\u00b6r
|
||||
item.PipeItemsStripes=Randigt Transport R\u00c3\u00b6r
|
||||
item.PipeStructureCobblestone=Kullerstens Struktur R\u00c3\u00b6r
|
||||
tile.miningWellBlock=Gruv Borr
|
||||
tile.plainPipeBlock=Gruv Rör
|
||||
tile.autoWorkBenchBlock=Automatiskt Arbetsbänk
|
||||
tile.plainPipeBlock=Gruv R\u00c3\u00b6r
|
||||
tile.autoWorkbenchBlock=Automatiskt Arbetsb\u00c3\u00a4nk
|
||||
tile.machineBlock=Stenbrott
|
||||
tile.markerBlock=Land Märke
|
||||
tile.markerBlock=Land M\u00c3\u00a4rke
|
||||
tile.fillerBlock=Fyllare
|
||||
tile.builderBlock=Byggare
|
||||
tile.architectBlock=Architektbord
|
||||
|
@ -73,10 +73,10 @@ tile.tankBlock=Tank
|
|||
tile.refineryBlock=Raffinaderi
|
||||
tile.libraryBlock=Ritnings Bibliotek
|
||||
tile.laserBlock=Laser
|
||||
tile.assemblyTableBlock=Monterings Bänk
|
||||
tile.pathMarkerBlock=Väg Markör
|
||||
tile.assemblyTableBlock=Monterings B\u00c3\u00a4nk
|
||||
tile.pathMarkerBlock=V\u00c3\u00a4g Mark\u00c3\u00b6r
|
||||
tile.blockHopper=Hopper
|
||||
tile.pumpBlock=Pump
|
||||
tile.engineWood=Rödsten Motor
|
||||
tile.engineStone=Ång Motor
|
||||
tile.engineIron=Förbrännings Motor
|
||||
tile.engineWood=R\u00c3\u00b6dsten Motor
|
||||
tile.engineStone=\u00c3\u0085ng Motor
|
||||
tile.engineIron=F\u00c3\u00b6rbr\u00c3\u00a4nnings Motor
|
|
@ -198,7 +198,7 @@ public class BuildCraftCore {
|
|||
try {
|
||||
PowerFramework.currentFramework = (PowerFramework) Class
|
||||
.forName(prefix + "buildcraft.energy.PneumaticPowerFramework")
|
||||
.getConstructor(null).newInstance(null);
|
||||
.getConstructor().newInstance();
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -209,8 +209,8 @@ public class BuildCraftCore {
|
|||
className = className.replace("net.minecraft.src.", "");
|
||||
|
||||
PowerFramework.currentFramework = (PowerFramework) Class
|
||||
.forName(prefix + className).getConstructor(null)
|
||||
.newInstance(null);
|
||||
.forName(prefix + className).getConstructor()
|
||||
.newInstance();
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
PowerFramework.currentFramework = new RedstonePowerFramework();
|
||||
|
|
|
@ -73,6 +73,9 @@ public class TileFiller extends TileBuildCraft implements ISpecialInventory, IPo
|
|||
((TileMarker) a).removeFromWorld();
|
||||
}
|
||||
|
||||
if (!APIProxy.isClient(worldObj) && box.isInitialized()) {
|
||||
box.createLasers(worldObj, LaserKind.Stripes);
|
||||
}
|
||||
sendNetworkUpdate();
|
||||
}
|
||||
}
|
||||
|
@ -84,10 +87,6 @@ public class TileFiller extends TileBuildCraft implements ISpecialInventory, IPo
|
|||
public void updateEntity () {
|
||||
super.updateEntity();
|
||||
|
||||
if (box.isInitialized()) {
|
||||
box.createLasers(worldObj, LaserKind.Stripes);
|
||||
}
|
||||
|
||||
if (done) {
|
||||
if (lastMode == Mode.Loop) {
|
||||
done = false;
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
/**
|
||||
/**
|
||||
* Copyright (c) SpaceToad, 2011
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* BuildCraft is distributed under the terms of the Minecraft Mod Public
|
||||
*
|
||||
* 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.factory;
|
||||
|
||||
import net.minecraft.src.EntityPlayer;
|
||||
|
@ -22,22 +21,23 @@ import net.minecraft.src.buildcraft.core.network.PacketPayload;
|
|||
import net.minecraft.src.buildcraft.core.network.PacketUpdate;
|
||||
|
||||
public class ContainerRefinery extends BuildCraftContainer {
|
||||
|
||||
|
||||
TileRefinery refinery;
|
||||
|
||||
|
||||
public ContainerRefinery(InventoryPlayer inventory, TileRefinery refinery) {
|
||||
super (3);
|
||||
super(3);
|
||||
|
||||
for (int l = 0; l < 3; l++) {
|
||||
for (int k1 = 0; k1 < 9; k1++) {
|
||||
addSlot(new Slot(inventory, k1 + l * 9 + 9, 8 + k1 * 18,
|
||||
123 + l * 18));
|
||||
123 + l * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (int i1 = 0; i1 < 9; i1++)
|
||||
for (int i1 = 0; i1 < 9; i1++) {
|
||||
addSlot(new Slot(inventory, i1, 8 + i1 * 18, 181));
|
||||
|
||||
}
|
||||
|
||||
this.refinery = refinery;
|
||||
}
|
||||
|
||||
|
@ -45,27 +45,29 @@ public class ContainerRefinery extends BuildCraftContainer {
|
|||
public boolean canInteractWith(EntityPlayer entityplayer) {
|
||||
return refinery.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
|
||||
|
||||
/* SETTING AND GETTING FILTERS */
|
||||
/**
|
||||
* @param slot
|
||||
* @param liquidId
|
||||
* @param liquidMeta (for future use)
|
||||
* @ param liquidId
|
||||
param liquidMeta (for future use)
|
||||
*/
|
||||
public void setFilter(int slot, int liquidId, int liquidMeta) {
|
||||
|
||||
|
||||
refinery.setFilter(slot, liquidId);
|
||||
|
||||
PacketPayload payload = new PacketPayload(3, 0, 0);
|
||||
payload.intPayload[0] = slot;
|
||||
payload.intPayload[1] = liquidId;
|
||||
payload.intPayload[2] = liquidMeta;
|
||||
CoreProxy.sendToServer(new PacketUpdate(PacketIds.REFINERY_FILTER_SET, refinery.xCoord, refinery.yCoord, refinery.zCoord, payload).getPacket());
|
||||
|
||||
if (APIProxy.isRemote()) {
|
||||
PacketPayload payload = new PacketPayload(3, 0, 0);
|
||||
payload.intPayload[0] = slot;
|
||||
payload.intPayload[1] = liquidId;
|
||||
payload.intPayload[2] = liquidMeta;
|
||||
CoreProxy.sendToServer(new PacketUpdate(PacketIds.REFINERY_FILTER_SET, refinery.xCoord, refinery.yCoord, refinery.zCoord, payload).getPacket());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public ItemStack getFilter(int slot) {
|
||||
int liquidId = refinery.getFilter(slot);
|
||||
if(liquidId > 0)
|
||||
if (liquidId > 0)
|
||||
return new ItemStack(liquidId, 0, 0);
|
||||
else
|
||||
return null;
|
||||
|
@ -79,9 +81,9 @@ public class ContainerRefinery extends BuildCraftContainer {
|
|||
|
||||
@Override
|
||||
public void updateCraftingResults() {
|
||||
super.updateCraftingResults();
|
||||
for(int i = 0; i < crafters.size(); i++)
|
||||
refinery.sendGUINetworkData(this, (ICrafting)crafters.get(i));
|
||||
}
|
||||
|
||||
super.updateCraftingResults();
|
||||
for (int i = 0; i < crafters.size(); i++) {
|
||||
refinery.sendGUINetworkData(this, (ICrafting) crafters.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,7 +81,10 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor,
|
|||
public void readFromNBT(NBTTagCompound nbttagcompound) {
|
||||
super.readFromNBT(nbttagcompound);
|
||||
|
||||
pipe = BlockGenericPipe.createPipe(nbttagcompound.getInteger("pipeId"));
|
||||
int key = nbttagcompound.getInteger("pipeId");
|
||||
if (key > 0) {
|
||||
pipe = BlockGenericPipe.createPipe(key);
|
||||
}
|
||||
|
||||
if (pipe != null) {
|
||||
pipe.setTile(this);
|
||||
|
|
Loading…
Reference in a new issue