Redo Commit
This commit is contained in:
commit
09b2c0cbd7
42 changed files with 93 additions and 2546 deletions
|
@ -12,6 +12,7 @@ import net.minecraft.potion.Potion;
|
|||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
@ -931,9 +932,9 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
|||
|
||||
public void sendChatInfoToPlayer(EntityPlayer player)
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText(String.format(StatCollector.translateToLocal("message.altar.currentessence"), this.fluid.amount)));
|
||||
player.addChatMessage(new ChatComponentText(String.format(StatCollector.translateToLocal("message.altar.currenttier"), UpgradedAltars.isAltarValid(worldObj, xCoord, yCoord, zCoord))));
|
||||
player.addChatMessage(new ChatComponentText(String.format(StatCollector.translateToLocal("message.altar.capacity"), this.getCapacity())));
|
||||
player.addChatMessage(new ChatComponentTranslation(String.format("message.altar.currentessence"), this.fluid.amount));
|
||||
player.addChatMessage(new ChatComponentTranslation(String.format("message.altar.currenttier"), UpgradedAltars.isAltarValid(worldObj, xCoord, yCoord, zCoord)));
|
||||
player.addChatMessage(new ChatComponentTranslation(String.format("message.altar.capacity"), this.getCapacity()));
|
||||
}
|
||||
|
||||
public void sendMoreChatInfoToPlayer(EntityPlayer player)
|
||||
|
@ -944,9 +945,9 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
|||
player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.altar.progress") + " " + progress + "LP/" + liquidRequired * stackSize + "LP"));
|
||||
player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.altar.consumptionrate") + " " + (int) (consumptionRate * (1 + consumptionMultiplier)) + "LP/t"));
|
||||
}
|
||||
player.addChatMessage(new ChatComponentText(String.format(StatCollector.translateToLocal("message.altar.currentessence"), this.fluid.amount)));
|
||||
player.addChatMessage(new ChatComponentText(String.format(StatCollector.translateToLocal("message.altar.inputtank"), this.fluidInput.amount)));
|
||||
player.addChatMessage(new ChatComponentText(String.format(StatCollector.translateToLocal("message.altar.outputtank"), this.fluidOutput.amount)));
|
||||
player.addChatMessage(new ChatComponentTranslation(String.format("message.altar.currentessence"), this.fluid.amount));
|
||||
player.addChatMessage(new ChatComponentTranslation(String.format("message.altar.inputtank"), this.fluidInput.amount));
|
||||
player.addChatMessage(new ChatComponentTranslation(String.format("message.altar.outputtank"), this.fluidOutput.amount));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,8 +13,7 @@ import net.minecraft.network.Packet;
|
|||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
|
@ -220,7 +219,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone
|
|||
|
||||
if (testRitual.equals(""))
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.masterstone.nothinghappened")));
|
||||
player.addChatMessage(new ChatComponentTranslation("message.masterstone.nothinghappened"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -228,7 +227,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone
|
|||
RitualActivatedEvent event = new RitualActivatedEvent(this, crystalOwner, testRitual, player, activationCrystal, crystalLevel);
|
||||
if(MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Event.Result.DENY)
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.masterstone.somethingstoppedyou")));
|
||||
player.addChatMessage(new ChatComponentTranslation("message.masterstone.somethingstoppedyou"));
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -241,7 +240,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone
|
|||
|
||||
if (!testLevel)
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.masterstone.crystalvibrates")));
|
||||
player.addChatMessage(new ChatComponentTranslation("message.masterstone.crystalvibrates"));
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -250,7 +249,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone
|
|||
|
||||
if (currentEssence < Rituals.getCostForActivation(testRitual))
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.masterstone.youfeelapull")));
|
||||
player.addChatMessage(new ChatComponentTranslation("message.masterstone.youfeelapull"));
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -259,7 +258,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone
|
|||
{
|
||||
if (!Rituals.startRitual(this, testRitual, player))
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.masterstone.ritualresistyou")));
|
||||
player.addChatMessage(new ChatComponentTranslation("message.masterstone.ritualresistyou"));
|
||||
|
||||
return;
|
||||
} else
|
||||
|
@ -268,7 +267,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone
|
|||
|
||||
if(drain > 0)
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.masterstone.energyflows")));
|
||||
player.addChatMessage(new ChatComponentTranslation("message.masterstone.energyflows"));
|
||||
|
||||
for (int i = 0; i < 12; i++)
|
||||
{
|
||||
|
@ -276,7 +275,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone
|
|||
}
|
||||
}else
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.masterstone.somethingstoppedyou")));
|
||||
player.addChatMessage(new ChatComponentTranslation("message.masterstone.somethingstoppedyou"));
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,17 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.tileEntity.gui;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.holding.ContainerHolding;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.holding.GuiHolding;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.holding.InventoryHolding;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.book.classes.guide.GuiCategories;
|
||||
import WayofTime.alchemicalWizardry.book.classes.guide.GuiEntry;
|
||||
import WayofTime.alchemicalWizardry.book.classes.guide.GuiIndex;
|
||||
import WayofTime.alchemicalWizardry.book.compact.Category;
|
||||
import WayofTime.alchemicalWizardry.book.registries.EntryRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.holding.ContainerHolding;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.holding.GuiHolding;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.holding.InventoryHolding;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerTeleposer;
|
||||
|
@ -82,28 +77,7 @@ public class GuiHandler implements IGuiHandler
|
|||
break;
|
||||
|
||||
case 2:
|
||||
|
||||
if(held.hasTagCompound() && held.getTagCompound().getString("CATEGORY") != null){
|
||||
if(held.hasTagCompound() && held.getTagCompound().getString("KEY") != null && held.getTagCompound().getString("KEY") != "0"){
|
||||
String cate = held.getTagCompound().getString("CATEGORY");
|
||||
String key = held.getTagCompound().getString("KEY");
|
||||
int page = held.getTagCompound().getInteger("PAGE");
|
||||
if(EntryRegistry.categoryMap.containsKey(cate)){
|
||||
Category category = EntryRegistry.categoryMap.get(cate);
|
||||
return new GuiEntry(key, player, category, page);
|
||||
}else{
|
||||
return new GuiCategories(player);
|
||||
}
|
||||
}else if(held.hasTagCompound() && held.getTagCompound().getString("CATEGORY") != null){
|
||||
String cate = held.getTagCompound().getString("CATEGORY");
|
||||
int page = held.getTagCompound().getInteger("PAGE");
|
||||
if(EntryRegistry.categoryMap.containsKey(cate)){
|
||||
Category category = EntryRegistry.categoryMap.get(cate);
|
||||
return new GuiIndex(category, player, page);
|
||||
}
|
||||
}
|
||||
}
|
||||
return new GuiCategories(player);
|
||||
|
||||
|
||||
case 3:
|
||||
return new GuiHolding(player, new InventoryHolding(player.getHeldItem()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue