Minor lang key change for laser gun
This commit is contained in:
parent
19700874d6
commit
738a673bef
2 changed files with 8 additions and 4 deletions
|
@ -53,9 +53,13 @@ public class ItemMiningLaser extends ItemEnergyTool
|
||||||
/** Used to track energy used while the player uses the laser rather then direct editing the nbt */
|
/** Used to track energy used while the player uses the laser rather then direct editing the nbt */
|
||||||
HashMap<EntityPlayer, Long> energyUsedMap = new HashMap<EntityPlayer, Long>();
|
HashMap<EntityPlayer, Long> energyUsedMap = new HashMap<EntityPlayer, Long>();
|
||||||
|
|
||||||
|
public static final int MODE_REMOVE = 0, MODE_SMELT = 1, MODE_DAMAGE = 2;
|
||||||
|
|
||||||
public ItemMiningLaser(int id)
|
public ItemMiningLaser(int id)
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
|
hasModes = true;
|
||||||
|
toolModes = new String[] { "laser.toolmode.remove", "laser.toolmode.smelt", "laser.toolmode.damage" };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -125,13 +129,13 @@ public class ItemMiningLaser extends ItemEnergyTool
|
||||||
if (b != null && b.getBlockHardness(player.worldObj, hit.blockX, hit.blockY, hit.blockZ) > -1)
|
if (b != null && b.getBlockHardness(player.worldObj, hit.blockX, hit.blockY, hit.blockZ) > -1)
|
||||||
{
|
{
|
||||||
time = lastHit.right() + 1;
|
time = lastHit.right() + 1;
|
||||||
if (time >= breakTime)
|
if (time >= breakTime && this.getMode(stack) == MODE_REMOVE)
|
||||||
{
|
{
|
||||||
LaserEvent.onBlockMinedByLaser(player.worldObj, player, new Vector3(hit));
|
LaserEvent.onBlockMinedByLaser(player.worldObj, player, new Vector3(hit));
|
||||||
mined = true;
|
mined = true;
|
||||||
miningMap.remove(player);
|
miningMap.remove(player);
|
||||||
}
|
}
|
||||||
else
|
else if(this.getMode(stack) == MODE_REMOVE || this.getMode(stack) == MODE_SMELT)
|
||||||
{
|
{
|
||||||
//TODO get the actual hit side from the angle of the ray trace
|
//TODO get the actual hit side from the angle of the ray trace
|
||||||
LaserEvent.onLaserHitBlock(player.worldObj, player, new Vector3(hit), ForgeDirection.UP);
|
LaserEvent.onLaserHitBlock(player.worldObj, player, new Vector3(hit), ForgeDirection.UP);
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class ItemTool extends Item
|
||||||
String modeKey = toolModes[getMode(itemStack)];
|
String modeKey = toolModes[getMode(itemStack)];
|
||||||
if (!world.isRemote && modeKey != null && !modeKey.isEmpty())
|
if (!world.isRemote && modeKey != null && !modeKey.isEmpty())
|
||||||
{
|
{
|
||||||
player.addChatMessage(LanguageUtility.getLocal("tool.mode.set") + LanguageUtility.getLocal(modeKey));
|
player.addChatMessage(LanguageUtility.getLocal("tool.mode.set") + " " + LanguageUtility.getLocal(modeKey));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue