extend power number hiding to iron power pipes and creative engines
This commit is contained in:
parent
464ac75428
commit
3be7ce1189
3 changed files with 30 additions and 4 deletions
|
@ -29,6 +29,14 @@ chat.gateCopier.warning.load=§6Warning: Gate triggers/actions might be missing!
|
|||
chat.gateCopier.warning.slots=§6Warning: Target has less slots!
|
||||
chat.gateCopier.warning.triggerParameters=§6Warning: Target has less trigger parameters!
|
||||
chat.pipe.power.iron.mode=Switched to %d RF/t limit
|
||||
chat.pipe.power.iron.mode.numberless=Switched to %s limit
|
||||
chat.pipe.power.iron.level.20=Very Low
|
||||
chat.pipe.power.iron.level.40=Low
|
||||
chat.pipe.power.iron.level.80=Medium-Low
|
||||
chat.pipe.power.iron.level.160=Medium
|
||||
chat.pipe.power.iron.level.320=High
|
||||
chat.pipe.power.iron.level.640=Very High
|
||||
chat.pipe.power.iron.level.1280=Full Capacity
|
||||
|
||||
color.black=Black
|
||||
color.blue=Blue
|
||||
|
|
|
@ -18,6 +18,7 @@ import net.minecraft.util.ResourceLocation;
|
|||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
import buildcraft.core.PowerMode;
|
||||
import buildcraft.core.utils.StringUtils;
|
||||
|
@ -54,7 +55,15 @@ public class TileEngineCreative extends TileEngine {
|
|||
powerMode = powerMode.getNext();
|
||||
energy = 0;
|
||||
|
||||
player.addChatMessage(new ChatComponentText(String.format(StringUtils.localize("chat.pipe.power.iron.mode"), powerMode.maxPower)));
|
||||
if (BuildCraftCore.hidePowerNumbers) {
|
||||
player.addChatMessage(new ChatComponentText(String.format(
|
||||
StringUtils.localize("chat.pipe.power.iron.mode.numberless"),
|
||||
StringUtils.localize("chat.pipe.power.iron.level." + powerMode.maxPower))));
|
||||
} else {
|
||||
player.addChatMessage(new ChatComponentText(String.format(
|
||||
StringUtils.localize("chat.pipe.power.iron.mode"),
|
||||
powerMode.maxPower)));
|
||||
}
|
||||
|
||||
sendNetworkUpdate();
|
||||
|
||||
|
|
|
@ -14,12 +14,15 @@ import java.util.LinkedList;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.BuildCraftEnergy;
|
||||
import buildcraft.BuildCraftTransport;
|
||||
import buildcraft.api.core.IIconProvider;
|
||||
import buildcraft.api.statements.IActionInternal;
|
||||
|
@ -57,9 +60,15 @@ public class PipePowerIron extends Pipe<PipeTransportPower> {
|
|||
setMode(getMode().getNext());
|
||||
}
|
||||
if (getWorld().isRemote) {
|
||||
player.addChatMessage(new ChatComponentText(String.format(
|
||||
StringUtils.localize("chat.pipe.power.iron.mode"),
|
||||
getMode().maxPower)));
|
||||
if (BuildCraftCore.hidePowerNumbers) {
|
||||
player.addChatMessage(new ChatComponentText(String.format(
|
||||
StringUtils.localize("chat.pipe.power.iron.mode.numberless"),
|
||||
StringUtils.localize("chat.pipe.power.iron.level." + getMode().maxPower))));
|
||||
} else {
|
||||
player.addChatMessage(new ChatComponentText(String.format(
|
||||
StringUtils.localize("chat.pipe.power.iron.mode"),
|
||||
getMode().maxPower)));
|
||||
}
|
||||
}
|
||||
|
||||
((IToolWrench) equipped).wrenchUsed(player, container.xCoord, container.yCoord, container.zCoord);
|
||||
|
|
Loading…
Reference in a new issue