Lowercase all the tooltip strings
This commit is contained in:
parent
574056203d
commit
a628adfde8
77 changed files with 225 additions and 225 deletions
|
@ -41,27 +41,24 @@ public class TileDemonCrucible extends TileInventory implements ITickable, IDemo
|
|||
{
|
||||
//TODO: Fill the contained gem if it is there.
|
||||
ItemStack stack = this.getStackInSlot(0);
|
||||
if (stack != null)
|
||||
if (stack.getItem() instanceof IDemonWillGem)
|
||||
{
|
||||
if (stack.getItem() instanceof IDemonWillGem)
|
||||
IDemonWillGem gemItem = (IDemonWillGem) stack.getItem();
|
||||
for (EnumDemonWillType type : EnumDemonWillType.values())
|
||||
{
|
||||
IDemonWillGem gemItem = (IDemonWillGem) stack.getItem();
|
||||
for (EnumDemonWillType type : EnumDemonWillType.values())
|
||||
if (willMap.containsKey(type))
|
||||
{
|
||||
if (willMap.containsKey(type))
|
||||
double current = willMap.get(type);
|
||||
double fillAmount = Math.min(gemDrainRate, current);
|
||||
if (fillAmount > 0)
|
||||
{
|
||||
double current = willMap.get(type);
|
||||
double fillAmount = Math.min(gemDrainRate, current);
|
||||
if (fillAmount > 0)
|
||||
fillAmount = gemItem.fillWill(type, stack, fillAmount, true);
|
||||
if (willMap.get(type) - fillAmount <= 0)
|
||||
{
|
||||
fillAmount = gemItem.fillWill(type, stack, fillAmount, true);
|
||||
if (willMap.get(type) - fillAmount <= 0)
|
||||
{
|
||||
willMap.remove(type);
|
||||
} else
|
||||
{
|
||||
willMap.put(type, willMap.get(type) - fillAmount);
|
||||
}
|
||||
willMap.remove(type);
|
||||
} else
|
||||
{
|
||||
willMap.put(type, willMap.get(type) - fillAmount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
|
@ -21,13 +22,13 @@ import WayofTime.bloodmagic.util.helper.TextHelper;
|
|||
public class TileInventory extends TileBase implements IInventory
|
||||
{
|
||||
protected int[] syncedSlots = new int[0];
|
||||
protected ItemStack[] inventory;
|
||||
protected NonNullList<ItemStack> inventory;
|
||||
private int size;
|
||||
private String name;
|
||||
|
||||
public TileInventory(int size, String name)
|
||||
{
|
||||
this.inventory = new ItemStack[size];
|
||||
this.inventory = NonNullList.withSize(size, ItemStack.EMPTY);
|
||||
this.size = size;
|
||||
this.name = name;
|
||||
initializeItemHandlers();
|
||||
|
@ -50,7 +51,7 @@ public class TileInventory extends TileBase implements IInventory
|
|||
{
|
||||
super.deserialize(tagCompound);
|
||||
NBTTagList tags = tagCompound.getTagList("Items", 10);
|
||||
inventory = new ItemStack[getSizeInventory()];
|
||||
inventory = NonNullList.withSize(size, ItemStack.EMPTY);
|
||||
|
||||
for (int i = 0; i < tags.tagCount(); i++)
|
||||
{
|
||||
|
@ -59,9 +60,9 @@ public class TileInventory extends TileBase implements IInventory
|
|||
NBTTagCompound data = tags.getCompoundTagAt(i);
|
||||
byte j = data.getByte("Slot");
|
||||
|
||||
if (j >= 0 && j < inventory.length)
|
||||
if (j >= 0 && j < inventory.size())
|
||||
{
|
||||
inventory[j] = new ItemStack(data);
|
||||
inventory.set(i, new ItemStack(data));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -73,13 +74,13 @@ public class TileInventory extends TileBase implements IInventory
|
|||
super.serialize(tagCompound);
|
||||
NBTTagList tags = new NBTTagList();
|
||||
|
||||
for (int i = 0; i < inventory.length; i++)
|
||||
for (int i = 0; i < inventory.size(); i++)
|
||||
{
|
||||
if ((!inventory[i].isEmpty()) && !isSyncedSlot(i))
|
||||
if ((!inventory.get(i).isEmpty()) && !isSyncedSlot(i))
|
||||
{
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setByte("Slot", (byte) i);
|
||||
inventory[i].writeToNBT(data);
|
||||
inventory.get(i).writeToNBT(data);
|
||||
tags.appendTag(data);
|
||||
}
|
||||
}
|
||||
|
@ -104,52 +105,49 @@ public class TileInventory extends TileBase implements IInventory
|
|||
@Override
|
||||
public ItemStack getStackInSlot(int index)
|
||||
{
|
||||
return inventory[index];
|
||||
return inventory.get(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int index, int count)
|
||||
{
|
||||
if (inventory[index] != null)
|
||||
if (!getStackInSlot(index).isEmpty())
|
||||
{
|
||||
if (!getWorld().isRemote)
|
||||
getWorld().notifyBlockUpdate(getPos(), getWorld().getBlockState(getPos()), getWorld().getBlockState(getPos()), 3);
|
||||
|
||||
if (inventory[index].getCount() <= count)
|
||||
if (getStackInSlot(index).getCount() <= count)
|
||||
{
|
||||
ItemStack itemStack = inventory[index];
|
||||
inventory[index] = null;
|
||||
ItemStack itemStack = inventory.get(index);
|
||||
inventory.set(index, ItemStack.EMPTY);
|
||||
markDirty();
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
ItemStack itemStack = inventory[index].splitStack(count);
|
||||
if (inventory[index].getCount() == 0)
|
||||
inventory[index] = null;
|
||||
|
||||
ItemStack itemStack = inventory.get(index).splitStack(count);
|
||||
markDirty();
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack removeStackFromSlot(int slot)
|
||||
{
|
||||
if (inventory[slot] != null)
|
||||
if (!inventory.get(slot).isEmpty())
|
||||
{
|
||||
ItemStack itemStack = inventory[slot];
|
||||
setInventorySlotContents(slot, null);
|
||||
ItemStack itemStack = inventory.get(slot);
|
||||
setInventorySlotContents(slot, ItemStack.EMPTY);
|
||||
return itemStack;
|
||||
}
|
||||
return null;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int slot, ItemStack stack)
|
||||
{
|
||||
inventory[slot] = stack;
|
||||
inventory.set(slot, stack);
|
||||
if (!stack.isEmpty() && stack.getCount() > getInventoryStackLimit())
|
||||
stack.setCount(getInventoryStackLimit());
|
||||
markDirty();
|
||||
|
@ -202,7 +200,7 @@ public class TileInventory extends TileBase implements IInventory
|
|||
@Override
|
||||
public void clear()
|
||||
{
|
||||
this.inventory = new ItemStack[size];
|
||||
this.inventory = NonNullList.withSize(size, ItemStack.EMPTY);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -224,7 +222,7 @@ public class TileInventory extends TileBase implements IInventory
|
|||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return TextHelper.localize("tile.BloodMagic." + name + ".name");
|
||||
return TextHelper.localize("tile.bloodmagic." + name + ".name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -155,7 +155,7 @@ public class TileMasterRitualStone extends TileTicking implements IMasterRitualS
|
|||
|
||||
if (!isRedstoned() && network.getCurrentEssence() < ritual.getActivationCost() && !activator.capabilities.isCreativeMode)
|
||||
{
|
||||
ChatUtil.sendNoSpamUnloc(activator, "chat.BloodMagic.ritual.weak");
|
||||
ChatUtil.sendNoSpamUnloc(activator, "chat.bloodmagic.ritual.weak");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,7 @@ public class TileMasterRitualStone extends TileTicking implements IMasterRitualS
|
|||
|
||||
if (MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Event.Result.DENY)
|
||||
{
|
||||
ChatUtil.sendNoSpamUnloc(activator, "chat.BloodMagic.ritual.prevent");
|
||||
ChatUtil.sendNoSpamUnloc(activator, "chat.bloodmagic.ritual.prevent");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -175,7 +175,7 @@ public class TileMasterRitualStone extends TileTicking implements IMasterRitualS
|
|||
if (!isRedstoned() && !activator.capabilities.isCreativeMode)
|
||||
network.syphon(ritual.getActivationCost());
|
||||
|
||||
ChatUtil.sendNoSpamUnloc(activator, "chat.BloodMagic.ritual.activate");
|
||||
ChatUtil.sendNoSpamUnloc(activator, "chat.bloodmagic.ritual.activate");
|
||||
|
||||
this.active = true;
|
||||
this.owner = crystalOwner;
|
||||
|
@ -192,7 +192,7 @@ public class TileMasterRitualStone extends TileTicking implements IMasterRitualS
|
|||
}
|
||||
} else
|
||||
{
|
||||
ChatUtil.sendNoSpamUnloc(activator, "chat.BloodMagic.ritual.notValid");
|
||||
ChatUtil.sendNoSpamUnloc(activator, "chat.bloodmagic.ritual.notValid");
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -351,7 +351,7 @@ public class TileMasterRitualStone extends TileTicking implements IMasterRitualS
|
|||
ChatUtil.sendNoSpam(player, this.currentRitual.getErrorForBlockRangeOnFail(player, range, this, offset1, offset2));
|
||||
} else
|
||||
{
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("ritual.BloodMagic.blockRange.success"));
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("ritual.bloodmagic.blockRange.success"));
|
||||
}
|
||||
|
||||
return allowed;
|
||||
|
@ -359,7 +359,7 @@ public class TileMasterRitualStone extends TileTicking implements IMasterRitualS
|
|||
|
||||
if (player != null)
|
||||
{
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("ritual.BloodMagic.blockRange.inactive"));
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("ritual.bloodmagic.blockRange.inactive"));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -387,13 +387,13 @@ public class TileMasterRitualStone extends TileTicking implements IMasterRitualS
|
|||
|
||||
for (int i = 0; i < typeList.size(); i++)
|
||||
{
|
||||
translations[i] = new TextComponentTranslation("tooltip.BloodMagic.currentBaseType." + typeList.get(i).name.toLowerCase());
|
||||
translations[i] = new TextComponentTranslation("tooltip.bloodmagic.currentBaseType." + typeList.get(i).name.toLowerCase());
|
||||
}
|
||||
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("ritual.BloodMagic.willConfig.set", new TextComponentTranslation(constructedString, translations)));
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("ritual.bloodmagic.willConfig.set", new TextComponentTranslation(constructedString, translations)));
|
||||
} else
|
||||
{
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("ritual.BloodMagic.willConfig.void"));
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("ritual.bloodmagic.willConfig.void"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ public class TileMimic extends TileInventory implements ITickable
|
|||
{
|
||||
setInventorySlotContents(1, heldItem.copy());
|
||||
world.notifyBlockUpdate(pos, state, state, 3);
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.potionSet"));
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.bloodmagic.mimic.potionSet"));
|
||||
}
|
||||
return true;
|
||||
} else if (heldItem.getItem() == ModItems.POTION_FLASK)
|
||||
|
@ -129,7 +129,7 @@ public class TileMimic extends TileInventory implements ITickable
|
|||
{
|
||||
setInventorySlotContents(1, null);
|
||||
world.notifyBlockUpdate(pos, state, state, 3);
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.potionRemove"));
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.bloodmagic.mimic.potionRemove"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -174,11 +174,11 @@ public class TileMimic extends TileInventory implements ITickable
|
|||
if (player.isSneaking())
|
||||
{
|
||||
playerCheckRadius = Math.max(playerCheckRadius - 1, 0);
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.detectRadius.down", playerCheckRadius));
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.bloodmagic.mimic.detectRadius.down", playerCheckRadius));
|
||||
} else
|
||||
{
|
||||
playerCheckRadius++;
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.detectRadius.up", playerCheckRadius));
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.bloodmagic.mimic.detectRadius.up", playerCheckRadius));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -200,11 +200,11 @@ public class TileMimic extends TileInventory implements ITickable
|
|||
if (player.isSneaking())
|
||||
{
|
||||
potionSpawnRadius = Math.max(potionSpawnRadius - 1, 0);
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.potionSpawnRadius.down", potionSpawnRadius));
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.bloodmagic.mimic.potionSpawnRadius.down", potionSpawnRadius));
|
||||
} else
|
||||
{
|
||||
potionSpawnRadius++;
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.potionSpawnRadius.up", potionSpawnRadius));
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.bloodmagic.mimic.potionSpawnRadius.up", potionSpawnRadius));
|
||||
}
|
||||
break;
|
||||
case NORTH: //When the block is clicked on the NORTH or SOUTH side, detectRadius is edited.
|
||||
|
@ -212,11 +212,11 @@ public class TileMimic extends TileInventory implements ITickable
|
|||
if (player.isSneaking())
|
||||
{
|
||||
playerCheckRadius = Math.max(playerCheckRadius - 1, 0);
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.detectRadius.down", playerCheckRadius));
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.bloodmagic.mimic.detectRadius.down", playerCheckRadius));
|
||||
} else
|
||||
{
|
||||
playerCheckRadius++;
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.detectRadius.up", playerCheckRadius));
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.bloodmagic.mimic.detectRadius.up", playerCheckRadius));
|
||||
}
|
||||
break;
|
||||
case UP: //When the block is clicked on the UP or DOWN side, potionSpawnInterval is edited.
|
||||
|
@ -224,11 +224,11 @@ public class TileMimic extends TileInventory implements ITickable
|
|||
if (player.isSneaking())
|
||||
{
|
||||
potionSpawnInterval = Math.max(potionSpawnInterval - 1, 1);
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.potionInterval.down", potionSpawnInterval));
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.bloodmagic.mimic.potionInterval.down", potionSpawnInterval));
|
||||
} else
|
||||
{
|
||||
potionSpawnInterval++;
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.BloodMagic.mimic.potionInterval.up", potionSpawnInterval));
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation("chat.bloodmagic.mimic.potionInterval.up", potionSpawnInterval));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.util.EnumFacing;
|
|||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.item.inventory.ItemInventory;
|
||||
import WayofTime.bloodmagic.util.GhostItemHelper;
|
||||
import net.minecraft.util.NonNullList;
|
||||
|
||||
public class TileFilteredRoutingNode extends TileRoutingNode implements ISidedInventory
|
||||
{
|
||||
|
@ -60,7 +61,7 @@ public class TileFilteredRoutingNode extends TileRoutingNode implements ISidedIn
|
|||
if (!tag.getBoolean("updated"))
|
||||
{
|
||||
NBTTagList tags = tag.getTagList("Items", 10);
|
||||
inventory = new ItemStack[getSizeInventory()];
|
||||
inventory = NonNullList.withSize(getSizeInventory(), ItemStack.EMPTY);
|
||||
for (int i = 0; i < tags.tagCount(); i++)
|
||||
{
|
||||
if (!isSyncedSlot(i))
|
||||
|
@ -70,10 +71,10 @@ public class TileFilteredRoutingNode extends TileRoutingNode implements ISidedIn
|
|||
|
||||
if (j == 0)
|
||||
{
|
||||
inventory[currentActiveSlot] = new ItemStack(data);
|
||||
} else if (j >= 1 && j < inventory.length + 1)
|
||||
inventory.set(i, new ItemStack(data));
|
||||
} else if (j >= 1 && j < inventory.size() + 1)
|
||||
{
|
||||
inventory[j - 1] = new ItemStack(data);
|
||||
inventory.set(j - 1, new ItemStack(data));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue