Merge branch 'master' of github.com:SirSengir/BuildCraft
This commit is contained in:
commit
9e7e30bcfc
4 changed files with 49 additions and 25 deletions
|
@ -8,8 +8,8 @@ gui.inventory=Inventar
|
||||||
gui.lock=Sperren
|
gui.lock=Sperren
|
||||||
gui.needed=Ben\u00f6tigt
|
gui.needed=Ben\u00f6tigt
|
||||||
gui.unlock=\u00d6ffnen
|
gui.unlock=\u00d6ffnen
|
||||||
item.bucketFuel=Eimer Benzin
|
item.bucketFuel=Benzineimer
|
||||||
item.bucketOil=Eimer \u00d6l
|
item.bucketOil=\u00d6l Eimer
|
||||||
item.woodenGearItem=Holzzahnrad
|
item.woodenGearItem=Holzzahnrad
|
||||||
item.stoneGearItem=Steinzahnrad
|
item.stoneGearItem=Steinzahnrad
|
||||||
item.ironGearItem=Eisenzahnrad
|
item.ironGearItem=Eisenzahnrad
|
||||||
|
@ -43,28 +43,28 @@ item.redstoneChipset.2=Goldener Redstone Chipsatz
|
||||||
item.redstoneChipset.3=Diamantener Redstone Chipsatz
|
item.redstoneChipset.3=Diamantener Redstone Chipsatz
|
||||||
item.redstoneChipset.4=Pulsierender Chipsatz
|
item.redstoneChipset.4=Pulsierender Chipsatz
|
||||||
item.blueprintItem=Blaupause
|
item.blueprintItem=Blaupause
|
||||||
item.PipeItemsWood=Transportrohr (Holz)
|
item.PipeItemsWood=H\u00d6lzernes Transportrohr
|
||||||
item.PipeItemsCobblestone=Transportrohr (Pflasterstein)
|
item.PipeItemsCobblestone=Pflasterstein Transportrohr
|
||||||
item.PipeItemsStone=Transportrohr (Stein)
|
item.PipeItemsStone=Steineres Transportrohr
|
||||||
item.PipeItemsIron=Transportrohr (Eisen)
|
item.PipeItemsIron=Eisernes Transportrohr
|
||||||
item.PipeItemsGold=Transportrohr (Gold)
|
item.PipeItemsGold=Goldenes Transportrohr
|
||||||
item.PipeItemsDiamond=Transportrohr (Diamant)
|
item.PipeItemsDiamond=Diamantenes Transportrohr
|
||||||
item.PipeItemsObsidian=Transportrohr (Obsidian)
|
item.PipeItemsObsidian=Obsidian Transportrohr
|
||||||
item.PipeLiquidsWood=Rohrleitung (Holz)
|
item.PipeLiquidsWood=H\u00d6lzerne Rohrleitung
|
||||||
item.PipeLiquidsCobblestone=Rohrleitung (Pflasterstein)
|
item.PipeLiquidsCobblestone=Pflasterstein Rohrleitung
|
||||||
item.PipeLiquidsStone=Rohrleitung (Stein)
|
item.PipeLiquidsStone=Steinere Rohrleitung
|
||||||
item.PipeLiquidsIron=Rohrleitung (Eisen)
|
item.PipeLiquidsIron=Eiserne Rohrleitung
|
||||||
item.PipeLiquidsGold=Rohrleitung (Gold)
|
item.PipeLiquidsGold=Goldene Rohrleitung
|
||||||
item.PipePowerWood=Energieleitung (Holz)
|
item.PipePowerWood=H\u00d6lzerne Energieleitung
|
||||||
item.PipePowerStone=Energieleitung (Stein)
|
item.PipePowerStone=Steinere Energieleitung
|
||||||
item.PipePowerGold=Energieleitung (Gold)
|
item.PipePowerGold=Goldene Energieleitung
|
||||||
item.PipeItemsStripes=Gestreiftes Rohr
|
item.PipeItemsStripes=Gestreiftes Rohr
|
||||||
item.PipeStructureCobblestone=Strukturrohr
|
item.PipeStructureCobblestone=Strukturrohr
|
||||||
tile.miningWellBlock=Minenschacht
|
tile.miningWellBlock=Minenschacht
|
||||||
tile.plainPipeBlock=Minenrohr
|
tile.plainPipeBlock=Minenrohr
|
||||||
tile.autoWorkbenchBlock=Automatische Werkbank
|
tile.autoWorkbenchBlock=Automatische Werkbank
|
||||||
tile.machineBlock=Steinbruch
|
tile.machineBlock=Steinbruch
|
||||||
tile.markerBlock=Markstein
|
tile.markerBlock=Markierungsstein
|
||||||
tile.fillerBlock=F\u00fcller
|
tile.fillerBlock=F\u00fcller
|
||||||
tile.builderBlock=Konstrukteur
|
tile.builderBlock=Konstrukteur
|
||||||
tile.architectBlock=Architektentisch
|
tile.architectBlock=Architektentisch
|
||||||
|
|
|
@ -393,6 +393,18 @@ public abstract class Pipe implements IPipe, IDropControlInventory {
|
||||||
public boolean hasGate() {
|
public boolean hasGate() {
|
||||||
return gate != null;
|
return gate != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void updateNeighbors(boolean needSelf) {
|
||||||
|
if (needSelf) {
|
||||||
|
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, BuildCraftTransport.genericPipeBlock.blockID);
|
||||||
|
}
|
||||||
|
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord - 1, zCoord, BuildCraftTransport.genericPipeBlock.blockID);
|
||||||
|
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord + 1, zCoord, BuildCraftTransport.genericPipeBlock.blockID);
|
||||||
|
worldObj.notifyBlocksOfNeighborChange(xCoord - 1, yCoord, zCoord, BuildCraftTransport.genericPipeBlock.blockID);
|
||||||
|
worldObj.notifyBlocksOfNeighborChange(xCoord + 1, yCoord, zCoord, BuildCraftTransport.genericPipeBlock.blockID);
|
||||||
|
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord - 1, BuildCraftTransport.genericPipeBlock.blockID);
|
||||||
|
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord + 1, BuildCraftTransport.genericPipeBlock.blockID);
|
||||||
|
}
|
||||||
|
|
||||||
public void onBlockRemoval() {
|
public void onBlockRemoval() {
|
||||||
if (wireSet[IPipe.WireColor.Red.ordinal()])
|
if (wireSet[IPipe.WireColor.Red.ordinal()])
|
||||||
|
@ -415,6 +427,10 @@ public abstract class Pipe implements IPipe, IDropControlInventory {
|
||||||
container.dropFacade(direction);
|
container.dropFacade(direction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (broadcastRedstone) {
|
||||||
|
updateNeighbors(false); // self will update due to block id changing
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTrigger(int position, ITrigger trigger) {
|
public void setTrigger(int position, ITrigger trigger) {
|
||||||
|
@ -474,10 +490,12 @@ public abstract class Pipe implements IPipe, IDropControlInventory {
|
||||||
triggerParameters = new ITriggerParameter[triggerParameters.length];
|
triggerParameters = new ITriggerParameter[triggerParameters.length];
|
||||||
activatedActions = new Action[activatedActions.length];
|
activatedActions = new Action[activatedActions.length];
|
||||||
broadcastSignal = new boolean[] { false, false, false, false };
|
broadcastSignal = new boolean[] { false, false, false, false };
|
||||||
|
if (broadcastRedstone) {
|
||||||
|
updateNeighbors(true);
|
||||||
|
}
|
||||||
broadcastRedstone = false;
|
broadcastRedstone = false;
|
||||||
//worldObj.markBlockNeedsUpdate(xCoord, yCoord, zCoord);
|
//worldObj.markBlockNeedsUpdate(xCoord, yCoord, zCoord);
|
||||||
container.scheduleRenderUpdate();
|
container.scheduleRenderUpdate();
|
||||||
//worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, BuildCraftTransport.genericPipeBlock.blockID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resolveActions() {
|
private void resolveActions() {
|
||||||
|
@ -534,8 +552,7 @@ public abstract class Pipe implements IPipe, IDropControlInventory {
|
||||||
|
|
||||||
if (oldBroadcastRedstone != broadcastRedstone) {
|
if (oldBroadcastRedstone != broadcastRedstone) {
|
||||||
container.scheduleRenderUpdate();
|
container.scheduleRenderUpdate();
|
||||||
//worldObj.markBlockNeedsUpdate(xCoord, yCoord, zCoord);
|
updateNeighbors(true);
|
||||||
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, BuildCraftTransport.genericPipeBlock.blockID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < oldBroadcastSignal.length; ++i)
|
for (int i = 0; i < oldBroadcastSignal.length; ++i)
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class PipeItemsGold extends Pipe implements IPipeTransportItemsHook {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getTextureIndex(Orientations direction) {
|
public int getTextureIndex(Orientations direction) {
|
||||||
if (worldObj != null && worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord))
|
if (broadcastRedstone || worldObj != null && worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord))
|
||||||
return 1 * 16 + 14;
|
return 1 * 16 + 14;
|
||||||
else
|
else
|
||||||
return 1 * 16 + 4;
|
return 1 * 16 + 4;
|
||||||
|
@ -66,7 +66,7 @@ public class PipeItemsGold extends Pipe implements IPipeTransportItemsHook {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void entityEntered(IPipedItem item, Orientations orientation) {
|
public void entityEntered(IPipedItem item, Orientations orientation) {
|
||||||
if (worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord))
|
if (broadcastRedstone || worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord))
|
||||||
item.setSpeed(Utils.pipeNormalSpeed * 20F);
|
item.setSpeed(Utils.pipeNormalSpeed * 20F);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,8 +127,15 @@ public class PipeItemsWood extends Pipe implements IPowerReceptor {
|
||||||
public ItemStack[] checkExtract(IInventory inventory, boolean doRemove, Orientations from) {
|
public ItemStack[] checkExtract(IInventory inventory, boolean doRemove, Orientations from) {
|
||||||
|
|
||||||
/// ISPECIALINVENTORY
|
/// ISPECIALINVENTORY
|
||||||
if (inventory instanceof ISpecialInventory)
|
if (inventory instanceof ISpecialInventory) {
|
||||||
return ((ISpecialInventory) inventory).extractItem(doRemove, from, 1);
|
ItemStack[] stacks = ((ISpecialInventory) inventory).extractItem(doRemove, from, (int)powerProvider.getEnergyStored());
|
||||||
|
if (stacks != null && doRemove) {
|
||||||
|
for (ItemStack stack : stacks) {
|
||||||
|
powerProvider.useEnergy(stack.stackSize, stack.stackSize, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return stacks;
|
||||||
|
}
|
||||||
|
|
||||||
if (inventory instanceof ISidedInventory) {
|
if (inventory instanceof ISidedInventory) {
|
||||||
ISidedInventory sidedInv = (ISidedInventory) inventory;
|
ISidedInventory sidedInv = (ISidedInventory) inventory;
|
||||||
|
|
Loading…
Reference in a new issue