Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/am2/common/blocks/BlockOcculus.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public boolean onBlockActivated(World worldIn, BlockPos pos,
float hitZ) {
if (playerIn.isSneaking())
return false;
if (EntityExtension.For(playerIn).getCurrentLevel() == 0 && !Minecraft.getMinecraft().thePlayer.isCreative()) {
if (EntityExtension.For(playerIn).getCurrentLevel() == 0 && !playerIn.isCreative()) {
if (worldIn.isRemote)
Minecraft.getMinecraft().thePlayer.addChatMessage(new TextComponentString("Mythical forces prevent you from using this device!"));
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,8 @@ else if (bookstack.getTagCompound().getBoolean("spellFinalized")) //don't overwr

LinkedHashMap<String, Integer> materialsList = new LinkedHashMap<String, Integer>();

materialsList.put(ItemDefs.blankRune.getItemStackDisplayName(new ItemStack(ItemDefs.blankRune)), 1);
materialsList.put("Blank rune", 1); // TODO: localize
//materialsList.put(ItemDefs.blankRune.getItemStackDisplayName(new ItemStack(ItemDefs.blankRune)), 1);

ArrayList<ItemStack> componentRecipeList = new ArrayList<ItemStack>();
ArrayList<AbstractSpellPart> allRecipeItems = new ArrayList<AbstractSpellPart>();
Expand Down Expand Up @@ -712,14 +713,17 @@ else if (bookstack.getTagCompound().getBoolean("spellFinalized")) //don't overwr
int qty = 1;
ItemStack recipeStack = null;
if (o instanceof ItemStack){
materialkey = ((ItemStack)o).getDisplayName();
materialkey = ((ItemStack)o).getUnlocalizedName(); // TODO: localize
//materialkey = ((ItemStack)o).getDisplayName();
recipeStack = (ItemStack)o;
}else if (o instanceof Item){
recipeStack = new ItemStack((Item)o);
materialkey = ((Item)o).getItemStackDisplayName(new ItemStack((Item)o));
materialkey = ((Item)o).getUnlocalizedName(new ItemStack((Item)o)); // TODO: localize
//materialkey = ((Item)o).getItemStackDisplayName(new ItemStack((Item)o));
}else if (o instanceof Block){
recipeStack = new ItemStack((Block)o);
materialkey = ((Block)o).getLocalizedName();
materialkey = ((Block)o).getUnlocalizedName();
//materialkey = ((Block)o).getLocalizedName();
}else if (o instanceof String){
if (((String)o).startsWith("E:")){
int[] ids = RecipeUtils.ParseEssenceIDs((String)o);
Expand Down Expand Up @@ -766,7 +770,8 @@ else if (bookstack.getTagCompound().getBoolean("spellFinalized")) //don't overwr
}
}

materialsList.put(ItemDefs.spellParchment.getItemStackDisplayName(new ItemStack(ItemDefs.spellParchment)), 1);
materialsList.put("Spell parchment", 1);
//materialsList.put(ItemDefs.spellParchment.getItemStackDisplayName(new ItemStack(ItemDefs.spellParchment)), 1);

StringBuilder sb = new StringBuilder();
int sgCount = 0;
Expand Down Expand Up @@ -817,7 +822,8 @@ else if (bookstack.getTagCompound().getBoolean("spellFinalized")) //don't overwr
sorted.putAll(affinityData);
for (Affinity aff : sorted.keySet()){
float pct = (float)sorted.get(aff) / (float)cpCount * 100f;
sb.append(String.format("%s: %.2f%%", aff.getLocalizedName(), pct));
sb.append(String.format("%s: %.2f%%", aff.getUnlocalisedName(), pct)); // TODO: lozalize
//sb.append(String.format("%s: %.2f%%", aff.getLocalizedName(), pct));
sb.append("\n");
}
pages.addAll(Story.splitStoryPartIntoPages(sb.toString()));
Expand Down Expand Up @@ -862,7 +868,8 @@ private int[] SpellPartListToStringBuilder(Iterator<AbstractSpellPart> it, Strin
ArrayList<Integer> outputCombo = new ArrayList<Integer>();
while (it.hasNext()){
AbstractSpellPart part = it.next();
String displayName = SpellRegistry.getSkillFromPart(part).getName();
// TODO: localize
String displayName = SpellRegistry.getSkillFromPart(part).getID();

if (prefix != null){
sb.append(prefix + displayName + "\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import am2.common.blocks.tileentity.TileEntityInscriptionTable;
import am2.common.defs.ItemDefs;
import am2.common.items.ItemSpellBase;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.inventory.Slot;
Expand Down Expand Up @@ -55,7 +54,8 @@ public void onSlotChanged(){
public void putStack(ItemStack stack){
if (stack != null && stack.getItem() == Items.WRITABLE_BOOK){
stack.setItem(Items.WRITTEN_BOOK);
stack.setStackDisplayName(I18n.format("am2.tooltip.unfinishedSpellRecipe"));
// TODO: localize (am2.tooltip.unfinishedSpellRecipe)
stack.setStackDisplayName("Unfinished Spell Recipe");
}
super.putStack(stack);
}
Expand Down