Hey working on a super cool new Admin Panel to make it way easier to set EE3 related values/settings on items. Woo!
|
@ -129,6 +129,21 @@ public class EquivalentExchange3
|
|||
AbilityRegistry.getInstance().save();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void handleMissingMappingEvent(FMLMissingMappingsEvent event)
|
||||
{
|
||||
for (FMLMissingMappingsEvent.MissingMapping mapping : event.get())
|
||||
{
|
||||
if (mapping.type == GameRegistry.Type.ITEM)
|
||||
{
|
||||
if (mapping.name.equals("EE3:alchemicalTome"))
|
||||
{
|
||||
mapping.remap(ModItems.alchenomicon);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public EnergyValueRegistry getEnergyValueRegistry()
|
||||
{
|
||||
return EnergyValueRegistry.getInstance();
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
package com.pahimar.ee3.client.gui.element;
|
||||
|
||||
import com.pahimar.repackage.cofh.lib.gui.GuiBase;
|
||||
import com.pahimar.repackage.cofh.lib.gui.element.ElementButton;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class ElementCheckBox extends ElementButton
|
||||
{
|
||||
private boolean isChecked;
|
||||
|
||||
public ElementCheckBox(GuiBase gui, int posX, int posY, String name, int sheetX, int sheetY, int hoverX, int hoverY, int disabledX, int disabledY, int sizeX, int sizeY, int texW, int texH, ResourceLocation texture)
|
||||
{
|
||||
super(gui, posX, posY, name, sheetX, sheetY, hoverX, hoverY, disabledX, disabledY, sizeX, sizeY, texW, texH, texture);
|
||||
this.isChecked = false;
|
||||
|
||||
// TODO Standardize size and textures - should only ever need to know gui, name, and positioning
|
||||
}
|
||||
|
||||
public boolean isChecked()
|
||||
{
|
||||
return isChecked;
|
||||
}
|
||||
|
||||
public ElementCheckBox check()
|
||||
{
|
||||
return setIsChecked(true);
|
||||
}
|
||||
|
||||
public ElementCheckBox unCheck()
|
||||
{
|
||||
return setIsChecked(false);
|
||||
}
|
||||
|
||||
public ElementCheckBox setIsChecked(boolean isChecked)
|
||||
{
|
||||
this.isChecked = isChecked;
|
||||
return this;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
package com.pahimar.ee3.client.gui.inventory;
|
||||
|
||||
import com.pahimar.ee3.inventory.ContainerAdminPanel;
|
||||
import com.pahimar.ee3.network.PacketHandler;
|
||||
import com.pahimar.ee3.network.message.MessageGuiElementClicked;
|
||||
import com.pahimar.ee3.reference.Textures;
|
||||
import com.pahimar.repackage.cofh.lib.gui.GuiBase;
|
||||
import com.pahimar.repackage.cofh.lib.gui.GuiColor;
|
||||
import com.pahimar.repackage.cofh.lib.gui.element.ElementButton;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiAdminPanel extends GuiBase
|
||||
{
|
||||
|
||||
private ElementButton learnableButton;
|
||||
private ElementButton recoverableButton;
|
||||
|
||||
public GuiAdminPanel(InventoryPlayer inventoryPlayer)
|
||||
{
|
||||
super(new ContainerAdminPanel(inventoryPlayer), Textures.Gui.ADMIN_PANEL);
|
||||
xSize = 175;
|
||||
ySize = 176;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
learnableButton = new ElementButton(this, 65, 22, "learnable", 0, 0, 0, 20, 0, 40, 100, 20, 100, 60, Textures.Gui.Elements.BUTTON);
|
||||
recoverableButton = new ElementButton(this, 65, 48, "recoverable", 0, 0, 0, 20, 0, 40, 100, 20, 100, 60, Textures.Gui.Elements.BUTTON);
|
||||
addElement(learnableButton);
|
||||
addElement(recoverableButton);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int x, int y)
|
||||
{
|
||||
super.drawGuiContainerForegroundLayer(x, y);
|
||||
|
||||
if (learnableButton.intersectsWith(mouseX, mouseY))
|
||||
{
|
||||
fontRendererObj.drawSplitString("Not Learnable", 81, 28, 100, new GuiColor(255, 255, 255).getColor());
|
||||
}
|
||||
else
|
||||
{
|
||||
fontRendererObj.drawSplitString("Learnable", 90, 28, 100, new GuiColor(255, 255, 255).getColor());
|
||||
}
|
||||
|
||||
fontRendererObj.drawSplitString("Recoverable", 85, 54, 100, new GuiColor(255, 255, 255).getColor());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTicks, int x, int y)
|
||||
{
|
||||
mouseX = x - guiLeft;
|
||||
mouseY = y - guiTop;
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
bindTexture(texture);
|
||||
drawSizedTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize, 256f, 256f);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(guiLeft, guiTop, 0.0F);
|
||||
drawElements(partialTicks, false);
|
||||
drawTabs(partialTicks, false);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateElementInformation()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleElementButtonClick(String buttonName, int mouseButton)
|
||||
{
|
||||
PacketHandler.INSTANCE.sendToServer(new MessageGuiElementClicked(buttonName, mouseButton));
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
package com.pahimar.ee3.client.gui.inventory;
|
||||
|
||||
import com.pahimar.ee3.client.gui.element.ElementSearchField;
|
||||
import com.pahimar.ee3.inventory.ContainerAlchemicalTome;
|
||||
import com.pahimar.ee3.inventory.ContainerAlchenomicon;
|
||||
import com.pahimar.ee3.network.PacketHandler;
|
||||
import com.pahimar.ee3.network.message.MessageGuiElementClicked;
|
||||
import com.pahimar.ee3.reference.Messages;
|
||||
|
@ -19,15 +19,15 @@ import net.minecraft.util.StatCollector;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiAlchemicalTome extends GuiBase
|
||||
public class GuiAlchenomicon extends GuiBase
|
||||
{
|
||||
private ElementButton prevPageButton;
|
||||
private ElementButton nextPageButton;
|
||||
private ElementTextField searchTextField;
|
||||
|
||||
public GuiAlchemicalTome(InventoryPlayer inventoryPlayer, ItemStack itemStack)
|
||||
public GuiAlchenomicon(InventoryPlayer inventoryPlayer, ItemStack itemStack)
|
||||
{
|
||||
super(new ContainerAlchemicalTome(inventoryPlayer.player, itemStack), Textures.Gui.ALCHEMICAL_TOME);
|
||||
super(new ContainerAlchenomicon(inventoryPlayer.player, itemStack), Textures.Gui.ALCHENOMICON);
|
||||
xSize = 256;
|
||||
ySize = 226;
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ public class GuiAlchemicalTome extends GuiBase
|
|||
protected void drawGuiContainerForegroundLayer(int x, int y)
|
||||
{
|
||||
super.drawGuiContainerForegroundLayer(x, y);
|
||||
int pageOffset = ((ContainerAlchemicalTome) this.inventorySlots).getPageOffset();
|
||||
int pageOffset = ((ContainerAlchenomicon) this.inventorySlots).getPageOffset();
|
||||
|
||||
if (this.inventorySlots.getSlot(0).getHasStack())
|
||||
{
|
||||
|
@ -64,7 +64,7 @@ public class GuiAlchemicalTome extends GuiBase
|
|||
}
|
||||
else
|
||||
{
|
||||
if (((ContainerAlchemicalTome) this.inventorySlots).getKnownTransmutationsCount() == 0)
|
||||
if (((ContainerAlchenomicon) this.inventorySlots).getKnownTransmutationsCount() == 0)
|
||||
{
|
||||
fontRendererObj.drawSplitString(StatCollector.translateToLocal(Messages.Gui.NO_KNOWN_TRANSMUTATIONS), 142, 20, 100, new GuiColor(50, 50, 50).getColor());
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ public class GuiAlchemicalTome extends GuiBase
|
|||
@Override
|
||||
protected void updateElementInformation()
|
||||
{
|
||||
if (((ContainerAlchemicalTome) this.inventorySlots).getPageOffset() == 0)
|
||||
if (((ContainerAlchenomicon) this.inventorySlots).getPageOffset() == 0)
|
||||
{
|
||||
prevPageButton.setDisabled();
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ public class GuiAlchemicalTome extends GuiBase
|
|||
prevPageButton.setEnabled(true);
|
||||
}
|
||||
|
||||
if (((ContainerAlchemicalTome) this.inventorySlots).getPageOffset() == ((ContainerAlchemicalTome) this.inventorySlots).getMaxPageOffset())
|
||||
if (((ContainerAlchenomicon) this.inventorySlots).getPageOffset() == ((ContainerAlchenomicon) this.inventorySlots).getMaxPageOffset())
|
||||
{
|
||||
nextPageButton.setDisabled();
|
||||
}
|
|
@ -4,7 +4,7 @@ import com.pahimar.ee3.api.exchange.EnergyValue;
|
|||
import com.pahimar.ee3.api.exchange.EnergyValueRegistryProxy;
|
||||
import com.pahimar.ee3.api.knowledge.TransmutationKnowledgeRegistryProxy;
|
||||
import com.pahimar.ee3.exchange.WrappedStack;
|
||||
import com.pahimar.ee3.inventory.ContainerAlchemicalTome;
|
||||
import com.pahimar.ee3.inventory.ContainerAlchenomicon;
|
||||
import com.pahimar.ee3.inventory.ContainerResearchStation;
|
||||
import com.pahimar.ee3.inventory.ContainerTransmutationTablet;
|
||||
import com.pahimar.ee3.reference.Messages;
|
||||
|
@ -38,7 +38,7 @@ public class ItemTooltipEventHandler
|
|||
@SubscribeEvent
|
||||
public void handleItemTooltipEvent(ItemTooltipEvent event)
|
||||
{
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || (event.entityPlayer != null && (event.entityPlayer.openContainer instanceof ContainerAlchemicalTome || event.entityPlayer.openContainer instanceof ContainerTransmutationTablet)))
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || (event.entityPlayer != null && (event.entityPlayer.openContainer instanceof ContainerAlchenomicon || event.entityPlayer.openContainer instanceof ContainerTransmutationTablet)))
|
||||
{
|
||||
WrappedStack wrappedItemStack = WrappedStack.wrap(event.itemStack);
|
||||
EnergyValue energyValue = EnergyValueRegistryProxy.getEnergyValue(wrappedItemStack);
|
||||
|
|
|
@ -64,12 +64,12 @@ public class TileEntityRendererResearchStation extends TileEntitySpecialRenderer
|
|||
*/
|
||||
GL11.glPushMatrix();
|
||||
|
||||
ItemStack tome = tileEntityResearchStation.getStackInSlot(TileEntityResearchStation.TOME_SLOT_INVENTORY_INDEX);
|
||||
if (Minecraft.getMinecraft().gameSettings.fancyGraphics && tome != null)
|
||||
ItemStack alchenomicon = tileEntityResearchStation.getStackInSlot(TileEntityResearchStation.ALCHENOMICON_SLOT_INVENTORY_INDEX);
|
||||
if (Minecraft.getMinecraft().gameSettings.fancyGraphics && alchenomicon != null)
|
||||
{
|
||||
EntityItem ghostEntityItem = new EntityItem(tileEntityResearchStation.getWorldObj());
|
||||
ghostEntityItem.hoverStart = 0.0F;
|
||||
ghostEntityItem.setEntityItemStack(tome);
|
||||
ghostEntityItem.setEntityItemStack(alchenomicon);
|
||||
|
||||
GL11.glTranslated(x + 0.6F, y + 1.015625F, z + 0.35F);
|
||||
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
|
|
38
src/main/java/com/pahimar/ee3/command/CommandAdmin.java
Normal file
|
@ -0,0 +1,38 @@
|
|||
package com.pahimar.ee3.command;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.reference.GUIs;
|
||||
import com.pahimar.ee3.reference.Messages;
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
public class CommandAdmin extends CommandEE
|
||||
{
|
||||
|
||||
@Override
|
||||
public String getCommandName()
|
||||
{
|
||||
return Names.Commands.ADMIN_PANEL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRequiredPermissionLevel()
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandUsage(ICommandSender commandSender)
|
||||
{
|
||||
return Messages.Commands.ADMIN_USAGE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processCommand(ICommandSender commandSender, String[] args)
|
||||
{
|
||||
EntityPlayer entityPlayer = (EntityPlayer) commandSender;
|
||||
|
||||
entityPlayer.openGui(EquivalentExchange3.instance, GUIs.ADMIN_PANEL.ordinal(), entityPlayer.worldObj, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ);
|
||||
}
|
||||
}
|
|
@ -82,6 +82,7 @@ public class CommandEE extends CommandBase
|
|||
modCommands.add(new CommandSetItemNotRecoverable());
|
||||
modCommands.add(new CommandRunTest());
|
||||
modCommands.add(new CommandDebug());
|
||||
modCommands.add(new CommandAdmin());
|
||||
|
||||
for (CommandBase commandBase : modCommands)
|
||||
{
|
||||
|
|
|
@ -19,8 +19,5 @@ public class CraftingHandler
|
|||
if (event.crafting.getItem() instanceof IOwnable) {
|
||||
ItemHelper.setOwner(event.crafting, event.player);
|
||||
}
|
||||
|
||||
// TODO Conversion of deprecated alchemical dusts to shards of minium with appropriate energy values
|
||||
// https://github.com/pahimar/Equivalent-Exchange-3/issues/1020
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,9 +27,9 @@ public class GuiHandler implements IGuiHandler
|
|||
{
|
||||
return new ContainerAlchemicalBag(entityPlayer, new InventoryAlchemicalBag(entityPlayer.getHeldItem()));
|
||||
}
|
||||
else if (id == GUIs.ALCHEMICAL_TOME.ordinal())
|
||||
else if (id == GUIs.ALCHENOMICON.ordinal())
|
||||
{
|
||||
return new ContainerAlchemicalTome(entityPlayer, entityPlayer.getHeldItem());
|
||||
return new ContainerAlchenomicon(entityPlayer, entityPlayer.getHeldItem());
|
||||
}
|
||||
else if (id == GUIs.CALCINATOR.ordinal())
|
||||
{
|
||||
|
@ -65,6 +65,10 @@ public class GuiHandler implements IGuiHandler
|
|||
{
|
||||
return new ContainerSymbolSelection();
|
||||
}
|
||||
else if (id == GUIs.ADMIN_PANEL.ordinal())
|
||||
{
|
||||
return new ContainerAdminPanel(entityPlayer.inventory);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
@ -86,9 +90,9 @@ public class GuiHandler implements IGuiHandler
|
|||
{
|
||||
return new GuiAlchemicalBag(entityPlayer, new InventoryAlchemicalBag(entityPlayer.getHeldItem()));
|
||||
}
|
||||
else if (id == GUIs.ALCHEMICAL_TOME.ordinal())
|
||||
else if (id == GUIs.ALCHENOMICON.ordinal())
|
||||
{
|
||||
return new GuiAlchemicalTome(entityPlayer.inventory, entityPlayer.getHeldItem());
|
||||
return new GuiAlchenomicon(entityPlayer.inventory, entityPlayer.getHeldItem());
|
||||
}
|
||||
else if (id == GUIs.CALCINATOR.ordinal())
|
||||
{
|
||||
|
@ -124,6 +128,10 @@ public class GuiHandler implements IGuiHandler
|
|||
{
|
||||
return new GuiSymbolSelection();
|
||||
}
|
||||
else if (id == GUIs.ADMIN_PANEL.ordinal())
|
||||
{
|
||||
return new GuiAdminPanel(entityPlayer.inventory);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ public class ModItems
|
|||
public static final ItemEE alchemicalUpgrade = new ItemAlchemicalInventoryUpgrade();
|
||||
public static final ItemEE chalk = new ItemChalk();
|
||||
public static final ItemEE diviningRod = new ItemDiviningRod();
|
||||
public static final ItemEE alchemicalTome = new ItemAlchemicalTome();
|
||||
public static final ItemEE alchenomicon = new ItemAlchenomicon();
|
||||
public static final ItemEE matter = new ItemMatter();
|
||||
public static final ItemEE gem = new ItemGem();
|
||||
public static final ItemEE lootBall = new ItemLootBall();
|
||||
|
@ -49,7 +49,7 @@ public class ModItems
|
|||
GameRegistry.registerItem(chalk, Names.Items.CHALK);
|
||||
GameRegistry.registerItem(alchemicalUpgrade, Names.Items.ALCHEMICAL_UPGRADE);
|
||||
GameRegistry.registerItem(diviningRod, Names.Items.DIVINING_ROD);
|
||||
GameRegistry.registerItem(alchemicalTome, Names.Items.ALCHEMICAL_TOME);
|
||||
GameRegistry.registerItem(alchenomicon, Names.Items.ALCHENOMICON, Names.Items.ALCHEMICAL_TOME);
|
||||
GameRegistry.registerItem(matter, Names.Items.MATTER);
|
||||
GameRegistry.registerItem(gem, Names.Items.GEM);
|
||||
GameRegistry.registerItem(lootBall, Names.Items.LOOT_BALL);
|
||||
|
|
|
@ -18,9 +18,6 @@ public class Recipes
|
|||
|
||||
private static void initModRecipes()
|
||||
{
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.shardMinium, 1, 0), new ItemStack(ModItems.alchemicalDust, 1, 1));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.shardMinium, 1, 0), new ItemStack(ModItems.alchemicalDust, 1, 2));
|
||||
|
||||
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.alchemicalFuelBlock, 1, 0), "fff", "fff", "fff", 'f', new ItemStack(ModItems.alchemicalFuel, 1, 0));
|
||||
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.alchemicalFuelBlock, 1, 1), "fff", "fff", "fff", 'f', new ItemStack(ModItems.alchemicalFuel, 1, 1));
|
||||
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.alchemicalFuelBlock, 1, 2), "fff", "fff", "fff", 'f', new ItemStack(ModItems.alchemicalFuel, 1, 2));
|
||||
|
@ -88,8 +85,8 @@ public class Recipes
|
|||
// Minium Stone
|
||||
AludelRecipeManager.getInstance().addRecipe(new ItemStack(ModItems.stoneMinium), new ItemStack(ModItems.stoneInert), new ItemStack(ModItems.alchemicalDust, 8, 3));
|
||||
|
||||
// Tome of Alchemical Knowledge
|
||||
AludelRecipeManager.getInstance().addRecipe(new ItemStack(ModItems.alchemicalTome), new ItemStack(Items.book), new ItemStack(ModItems.alchemicalDust, 1, 3));
|
||||
// Alchenomicon
|
||||
AludelRecipeManager.getInstance().addRecipe(new ItemStack(ModItems.alchenomicon), new ItemStack(Items.book), new ItemStack(ModItems.alchemicalDust, 1, 3));
|
||||
|
||||
// Alchemical bags
|
||||
AludelRecipeManager.getInstance().addRecipe(new ItemStack(ModItems.alchemicalBag, 1, 0), new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.alchemicalDust, 8, 1));
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
package com.pahimar.ee3.inventory;
|
||||
|
||||
import com.pahimar.ee3.inventory.element.IElementButtonHandler;
|
||||
import com.pahimar.ee3.inventory.element.IElementTextFieldHandler;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
public class ContainerAdminPanel extends ContainerEE implements IElementButtonHandler, IElementTextFieldHandler
|
||||
{
|
||||
|
||||
public ContainerAdminPanel(InventoryPlayer inventoryPlayer)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityPlayer)
|
||||
{
|
||||
// TODO Check if the player is Admin
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleElementButtonClick(String elementName, int mouseButton)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleElementTextFieldUpdate(String elementName, String updatedText)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@ package com.pahimar.ee3.inventory;
|
|||
|
||||
import com.pahimar.ee3.inventory.element.IElementButtonHandler;
|
||||
import com.pahimar.ee3.inventory.element.IElementTextFieldHandler;
|
||||
import com.pahimar.ee3.item.ItemAlchemicalTome;
|
||||
import com.pahimar.ee3.item.ItemAlchenomicon;
|
||||
import com.pahimar.ee3.knowledge.TransmutationKnowledgeRegistry;
|
||||
import com.pahimar.ee3.reference.Comparators;
|
||||
import com.pahimar.ee3.util.FilterUtils;
|
||||
|
@ -19,9 +19,9 @@ import java.util.List;
|
|||
import java.util.TreeSet;
|
||||
import java.util.UUID;
|
||||
|
||||
public class ContainerAlchemicalTome extends ContainerEE implements IElementButtonHandler, IElementTextFieldHandler
|
||||
public class ContainerAlchenomicon extends ContainerEE implements IElementButtonHandler, IElementTextFieldHandler
|
||||
{
|
||||
private final InventoryAlchemicalTome inventoryAlchemicalTome;
|
||||
private final InventoryAlchenomicon inventoryAlchenomicon;
|
||||
private int pageOffset, maxPageOffset;
|
||||
private String searchTerm;
|
||||
private boolean requiresUpdate = false;
|
||||
|
@ -29,17 +29,17 @@ public class ContainerAlchemicalTome extends ContainerEE implements IElementButt
|
|||
private final static int MAX_ROW_INDEX = 8;
|
||||
private final static int MAX_COLUMN_INDEX = 5;
|
||||
|
||||
public ContainerAlchemicalTome(EntityPlayer entityPlayer, ItemStack itemStack)
|
||||
public ContainerAlchenomicon(EntityPlayer entityPlayer, ItemStack itemStack)
|
||||
{
|
||||
TreeSet<ItemStack> knownTransmutations = new TreeSet<ItemStack>(Comparators.displayNameComparator);
|
||||
|
||||
if (itemStack.getItem() instanceof ItemAlchemicalTome && ItemHelper.hasOwnerUUID(itemStack))
|
||||
if (itemStack.getItem() instanceof ItemAlchenomicon && ItemHelper.hasOwnerUUID(itemStack))
|
||||
{
|
||||
UUID ownerUUID = ItemHelper.getOwnerUUID(itemStack);
|
||||
knownTransmutations.addAll(TransmutationKnowledgeRegistry.getInstance().getPlayersKnownTransmutations(ownerUUID));
|
||||
}
|
||||
|
||||
inventoryAlchemicalTome = new InventoryAlchemicalTome(knownTransmutations);
|
||||
inventoryAlchenomicon = new InventoryAlchenomicon(knownTransmutations);
|
||||
pageOffset = 0;
|
||||
maxPageOffset = knownTransmutations.size() / 80;
|
||||
|
||||
|
@ -48,7 +48,7 @@ public class ContainerAlchemicalTome extends ContainerEE implements IElementButt
|
|||
{
|
||||
for (int columnIndex = 0; columnIndex < MAX_COLUMN_INDEX; ++columnIndex)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(inventoryAlchemicalTome, i, 18 + columnIndex * 20, 18 + rowIndex * 19)
|
||||
this.addSlotToContainer(new Slot(inventoryAlchenomicon, i, 18 + columnIndex * 20, 18 + rowIndex * 19)
|
||||
{
|
||||
@Override
|
||||
public boolean canTakeStack(EntityPlayer player)
|
||||
|
@ -72,7 +72,7 @@ public class ContainerAlchemicalTome extends ContainerEE implements IElementButt
|
|||
{
|
||||
for (int columnIndex = 0; columnIndex < MAX_COLUMN_INDEX; ++columnIndex)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(inventoryAlchemicalTome, i, 140 + columnIndex * 20, 18 + rowIndex * 19)
|
||||
this.addSlotToContainer(new Slot(inventoryAlchenomicon, i, 140 + columnIndex * 20, 18 + rowIndex * 19)
|
||||
{
|
||||
@Override
|
||||
public boolean canTakeStack(EntityPlayer player)
|
||||
|
@ -139,12 +139,12 @@ public class ContainerAlchemicalTome extends ContainerEE implements IElementButt
|
|||
|
||||
public int getInventorySize()
|
||||
{
|
||||
return inventoryAlchemicalTome.getSizeInventory();
|
||||
return inventoryAlchenomicon.getSizeInventory();
|
||||
}
|
||||
|
||||
public int getKnownTransmutationsCount()
|
||||
{
|
||||
return inventoryAlchemicalTome.getKnownTransmutations().size();
|
||||
return inventoryAlchenomicon.getKnownTransmutations().size();
|
||||
}
|
||||
|
||||
public int getPageOffset()
|
||||
|
@ -188,7 +188,7 @@ public class ContainerAlchemicalTome extends ContainerEE implements IElementButt
|
|||
this.requiresUpdate = true;
|
||||
boolean shouldUpdateInventory = false;
|
||||
ItemStack[] newInventory = new ItemStack[80];
|
||||
List<ItemStack> filteredList = new ArrayList(FilterUtils.filterByNameContains(inventoryAlchemicalTome.getKnownTransmutations(), searchTerm, Comparators.displayNameComparator));
|
||||
List<ItemStack> filteredList = new ArrayList(FilterUtils.filterByNameContains(inventoryAlchenomicon.getKnownTransmutations(), searchTerm, Comparators.displayNameComparator));
|
||||
|
||||
maxPageOffset = filteredList.size() / 80;
|
||||
if (pageOffset > maxPageOffset)
|
||||
|
@ -224,8 +224,8 @@ public class ContainerAlchemicalTome extends ContainerEE implements IElementButt
|
|||
{
|
||||
for (int i = 0; i < 80; i++)
|
||||
{
|
||||
inventoryAlchemicalTome.setInventorySlotContents(i, newInventory[i]);
|
||||
inventoryAlchemicalTome.markDirty();
|
||||
inventoryAlchenomicon.setInventorySlotContents(i, newInventory[i]);
|
||||
inventoryAlchenomicon.markDirty();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
package com.pahimar.ee3.inventory;
|
||||
|
||||
import com.pahimar.ee3.item.ItemAlchemicalTome;
|
||||
import com.pahimar.ee3.item.ItemAlchenomicon;
|
||||
import com.pahimar.ee3.knowledge.AbilityRegistry;
|
||||
import com.pahimar.ee3.tileentity.TileEntityResearchStation;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
@ -36,7 +36,7 @@ public class ContainerResearchStation extends ContainerEE
|
|||
}
|
||||
});
|
||||
|
||||
this.addSlotToContainer(new Slot(tileEntityResearchStation, TileEntityResearchStation.TOME_SLOT_INVENTORY_INDEX, 161, 84)
|
||||
this.addSlotToContainer(new Slot(tileEntityResearchStation, TileEntityResearchStation.ALCHENOMICON_SLOT_INVENTORY_INDEX, 161, 84)
|
||||
{
|
||||
@Override
|
||||
public int getSlotStackLimit()
|
||||
|
@ -47,7 +47,7 @@ public class ContainerResearchStation extends ContainerEE
|
|||
@Override
|
||||
public boolean isItemValid(ItemStack itemStack)
|
||||
{
|
||||
return itemStack.getItem() instanceof ItemAlchemicalTome;
|
||||
return itemStack.getItem() instanceof ItemAlchenomicon;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -170,16 +170,16 @@ public class ContainerResearchStation extends ContainerEE
|
|||
* be merged into the fuel slot, try to put it in the input
|
||||
* slot.
|
||||
*/
|
||||
if (slotItemStack.getItem() instanceof ItemAlchemicalTome)
|
||||
if (slotItemStack.getItem() instanceof ItemAlchenomicon)
|
||||
{
|
||||
if (!this.mergeItemStack(slotItemStack, TileEntityResearchStation.TOME_SLOT_INVENTORY_INDEX, TileEntityResearchStation.INVENTORY_SIZE, false))
|
||||
if (!this.mergeItemStack(slotItemStack, TileEntityResearchStation.ALCHENOMICON_SLOT_INVENTORY_INDEX, TileEntityResearchStation.INVENTORY_SIZE, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!this.mergeItemStack(slotItemStack, TileEntityResearchStation.ITEM_SLOT_INVENTORY_INDEX, TileEntityResearchStation.TOME_SLOT_INVENTORY_INDEX, false))
|
||||
if (!this.mergeItemStack(slotItemStack, TileEntityResearchStation.ITEM_SLOT_INVENTORY_INDEX, TileEntityResearchStation.ALCHENOMICON_SLOT_INVENTORY_INDEX, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.pahimar.ee3.exchange.EnergyValueRegistry;
|
|||
import com.pahimar.ee3.inventory.element.IElementButtonHandler;
|
||||
import com.pahimar.ee3.inventory.element.IElementSliderHandler;
|
||||
import com.pahimar.ee3.inventory.element.IElementTextFieldHandler;
|
||||
import com.pahimar.ee3.item.ItemAlchemicalTome;
|
||||
import com.pahimar.ee3.item.ItemAlchenomicon;
|
||||
import com.pahimar.ee3.item.ItemMiniumStone;
|
||||
import com.pahimar.ee3.item.ItemPhilosophersStone;
|
||||
import com.pahimar.ee3.knowledge.AbilityRegistry;
|
||||
|
@ -45,10 +45,10 @@ public class ContainerTransmutationTablet extends ContainerEE implements IElemen
|
|||
this.tileEntityTransmutationTablet = tileEntityTransmutationTablet;
|
||||
|
||||
TreeSet<ItemStack> knownTransmutations = new TreeSet<ItemStack>(Comparators.displayNameComparator);
|
||||
if (tileEntityTransmutationTablet.getStackInSlot(TileEntityTransmutationTablet.ALCHEMICAL_TOME_INDEX) != null)
|
||||
if (tileEntityTransmutationTablet.getStackInSlot(TileEntityTransmutationTablet.ALCHENOMICON_INDEX) != null)
|
||||
{
|
||||
ItemStack itemStack = tileEntityTransmutationTablet.getStackInSlot(TileEntityTransmutationTablet.ALCHEMICAL_TOME_INDEX);
|
||||
if (itemStack.getItem() instanceof ItemAlchemicalTome && ItemHelper.hasOwnerUUID(itemStack))
|
||||
ItemStack itemStack = tileEntityTransmutationTablet.getStackInSlot(TileEntityTransmutationTablet.ALCHENOMICON_INDEX);
|
||||
if (itemStack.getItem() instanceof ItemAlchenomicon && ItemHelper.hasOwnerUUID(itemStack))
|
||||
{
|
||||
knownTransmutations.addAll(TransmutationKnowledgeRegistry.getInstance().getPlayersKnownTransmutations(ItemHelper.getOwnerUUID(itemStack)));
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ public class ContainerTransmutationTablet extends ContainerEE implements IElemen
|
|||
return itemStack.getItem() instanceof ItemMiniumStone || itemStack.getItem() instanceof ItemPhilosophersStone;
|
||||
}
|
||||
});
|
||||
this.addSlotToContainer(new SlotAlchemicalTome(this, tileEntityTransmutationTablet, TileEntityTransmutationTablet.ALCHEMICAL_TOME_INDEX, 152, 15));
|
||||
this.addSlotToContainer(new SlotAlchenomicon(this, tileEntityTransmutationTablet, TileEntityTransmutationTablet.ALCHENOMICON_INDEX, 152, 15));
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
|
@ -292,9 +292,9 @@ public class ContainerTransmutationTablet extends ContainerEE implements IElemen
|
|||
}
|
||||
else
|
||||
{
|
||||
if (slotItemStack.getItem() instanceof ItemAlchemicalTome)
|
||||
if (slotItemStack.getItem() instanceof ItemAlchenomicon)
|
||||
{
|
||||
if (!this.mergeItemStack(slotItemStack, TileEntityTransmutationTablet.ALCHEMICAL_TOME_INDEX, TileEntityTransmutationTablet.INVENTORY_SIZE, false))
|
||||
if (!this.mergeItemStack(slotItemStack, TileEntityTransmutationTablet.ALCHENOMICON_INDEX, TileEntityTransmutationTablet.INVENTORY_SIZE, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -470,13 +470,13 @@ public class ContainerTransmutationTablet extends ContainerEE implements IElemen
|
|||
}
|
||||
return super.slotClick(slot, button, flag, player);
|
||||
}
|
||||
|
||||
private class SlotAlchemicalTome extends Slot
|
||||
|
||||
private class SlotAlchenomicon extends Slot
|
||||
{
|
||||
private ContainerTransmutationTablet containerTransmutationTablet;
|
||||
private TileEntityTransmutationTablet tileEntityTransmutationTablet;
|
||||
|
||||
public SlotAlchemicalTome(ContainerTransmutationTablet containerTransmutationTablet, IInventory iInventory, int slotIndex, int x, int y)
|
||||
public SlotAlchenomicon(ContainerTransmutationTablet containerTransmutationTablet, IInventory iInventory, int slotIndex, int x, int y)
|
||||
{
|
||||
super(iInventory, slotIndex, x, y);
|
||||
this.containerTransmutationTablet = containerTransmutationTablet;
|
||||
|
@ -492,7 +492,7 @@ public class ContainerTransmutationTablet extends ContainerEE implements IElemen
|
|||
@Override
|
||||
public boolean isItemValid(ItemStack itemStack)
|
||||
{
|
||||
return itemStack.getItem() instanceof ItemAlchemicalTome;
|
||||
return itemStack.getItem() instanceof ItemAlchenomicon;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -503,7 +503,7 @@ public class ContainerTransmutationTablet extends ContainerEE implements IElemen
|
|||
this.containerTransmutationTablet.inventoryTransmutationTablet = new InventoryTransmutationTablet();
|
||||
this.containerTransmutationTablet.updateInventory();
|
||||
|
||||
if (!this.tileEntityTransmutationTablet.getWorldObj().isRemote && itemStack != null && itemStack.getItem() instanceof ItemAlchemicalTome && ItemHelper.hasOwnerUUID(itemStack))
|
||||
if (!this.tileEntityTransmutationTablet.getWorldObj().isRemote && itemStack != null && itemStack.getItem() instanceof ItemAlchenomicon && ItemHelper.hasOwnerUUID(itemStack))
|
||||
{
|
||||
PacketHandler.INSTANCE.sendToAllAround(new MessageTransmutationKnowledgeUpdate(this.containerTransmutationTablet.tileEntityTransmutationTablet, null), new NetworkRegistry.TargetPoint(this.tileEntityTransmutationTablet.getWorldObj().provider.dimensionId, (double) this.tileEntityTransmutationTablet.xCoord, (double) this.tileEntityTransmutationTablet.yCoord, (double) this.tileEntityTransmutationTablet.zCoord, 5d));
|
||||
}
|
||||
|
@ -514,7 +514,7 @@ public class ContainerTransmutationTablet extends ContainerEE implements IElemen
|
|||
{
|
||||
super.putStack(itemStack);
|
||||
|
||||
if (!this.tileEntityTransmutationTablet.getWorldObj().isRemote && itemStack != null && itemStack.getItem() instanceof ItemAlchemicalTome && ItemHelper.hasOwnerUUID(itemStack))
|
||||
if (!this.tileEntityTransmutationTablet.getWorldObj().isRemote && itemStack != null && itemStack.getItem() instanceof ItemAlchenomicon && ItemHelper.hasOwnerUUID(itemStack))
|
||||
{
|
||||
Set<ItemStack> knownTransmutations = TransmutationKnowledgeRegistry.getInstance().getPlayersKnownTransmutations(ItemHelper.getOwnerUUID(itemStack));
|
||||
this.containerTransmutationTablet.inventoryTransmutationTablet = new InventoryTransmutationTablet(knownTransmutations);
|
||||
|
|
|
@ -9,12 +9,12 @@ import net.minecraft.item.ItemStack;
|
|||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
public class InventoryAlchemicalTome implements IInventory
|
||||
public class InventoryAlchenomicon implements IInventory
|
||||
{
|
||||
private ItemStack[] inventory;
|
||||
private Set<ItemStack> knownTransmutations;
|
||||
|
||||
public InventoryAlchemicalTome(Set<ItemStack> knownTransmutations)
|
||||
public InventoryAlchenomicon(Set<ItemStack> knownTransmutations)
|
||||
{
|
||||
inventory = new ItemStack[80];
|
||||
if (knownTransmutations != null)
|
||||
|
@ -95,7 +95,7 @@ public class InventoryAlchemicalTome implements IInventory
|
|||
@Override
|
||||
public String getInventoryName()
|
||||
{
|
||||
return Names.Containers.ALCHEMICAL_TOME;
|
||||
return Names.Containers.ALCHENOMICON;
|
||||
}
|
||||
|
||||
@Override
|
|
@ -15,12 +15,12 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemAlchemicalTome extends ItemEE implements IOwnable, IEnergyValueProvider
|
||||
public class ItemAlchenomicon extends ItemEE implements IOwnable, IEnergyValueProvider
|
||||
{
|
||||
public ItemAlchemicalTome()
|
||||
public ItemAlchenomicon()
|
||||
{
|
||||
super();
|
||||
this.setUnlocalizedName(Names.Items.ALCHEMICAL_TOME);
|
||||
this.setUnlocalizedName(Names.Items.ALCHENOMICON);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -41,7 +41,7 @@ public class ItemAlchemicalTome extends ItemEE implements IOwnable, IEnergyValue
|
|||
}
|
||||
else
|
||||
{
|
||||
entityPlayer.openGui(EquivalentExchange3.instance, GUIs.ALCHEMICAL_TOME.ordinal(), entityPlayer.worldObj, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ);
|
||||
entityPlayer.openGui(EquivalentExchange3.instance, GUIs.ALCHENOMICON.ordinal(), entityPlayer.worldObj, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,6 +51,6 @@ public class ItemAlchemicalTome extends ItemEE implements IOwnable, IEnergyValue
|
|||
@Override
|
||||
public EnergyValue getEnergyValue(ItemStack itemStack)
|
||||
{
|
||||
return EnergyValueRegistryProxy.getEnergyValue(ModItems.alchemicalTome, true);
|
||||
return EnergyValueRegistryProxy.getEnergyValue(ModItems.alchenomicon, true);
|
||||
}
|
||||
}
|
|
@ -16,9 +16,12 @@ public class ItemMiniumShard extends ItemEE implements IEnergyValueProvider
|
|||
|
||||
@Override
|
||||
public EnergyValue getEnergyValue(ItemStack itemStack) {
|
||||
if (itemStack != null && itemStack.hasTagCompound() && itemStack.getTagCompound().hasKey("energyValue")) {
|
||||
if (Float.compare(itemStack.getTagCompound().getFloat("energyValue"), 0) > 0)
|
||||
return new EnergyValue(itemStack.getTagCompound().getFloat("energyValue"));
|
||||
if (itemStack != null && itemStack.hasTagCompound() && itemStack.getTagCompound().hasKey(Names.NBT.ENERGY_VALUE))
|
||||
{
|
||||
if (Float.compare(itemStack.getTagCompound().getFloat(Names.NBT.ENERGY_VALUE), 0) > 0)
|
||||
{
|
||||
return new EnergyValue(itemStack.getTagCompound().getFloat(Names.NBT.ENERGY_VALUE));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import net.minecraft.tileentity.TileEntity;
|
|||
public class MessageTileEntityResearchStation implements IMessage, IMessageHandler<MessageTileEntityResearchStation, IMessage>
|
||||
{
|
||||
public int x, y, z;
|
||||
public ItemStack tomeItemStack;
|
||||
public ItemStack alchenomiconItemStack;
|
||||
|
||||
public MessageTileEntityResearchStation()
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ public class MessageTileEntityResearchStation implements IMessage, IMessageHandl
|
|||
this.x = tileEntityResearchStation.xCoord;
|
||||
this.y = tileEntityResearchStation.yCoord;
|
||||
this.z = tileEntityResearchStation.zCoord;
|
||||
this.tomeItemStack = tileEntityResearchStation.getStackInSlot(TileEntityResearchStation.TOME_SLOT_INVENTORY_INDEX);
|
||||
this.alchenomiconItemStack = tileEntityResearchStation.getStackInSlot(TileEntityResearchStation.ALCHENOMICON_SLOT_INVENTORY_INDEX);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -33,7 +33,7 @@ public class MessageTileEntityResearchStation implements IMessage, IMessageHandl
|
|||
this.x = buf.readInt();
|
||||
this.y = buf.readInt();
|
||||
this.z = buf.readInt();
|
||||
tomeItemStack = ByteBufUtils.readItemStack(buf);
|
||||
alchenomiconItemStack = ByteBufUtils.readItemStack(buf);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -42,7 +42,7 @@ public class MessageTileEntityResearchStation implements IMessage, IMessageHandl
|
|||
buf.writeInt(x);
|
||||
buf.writeInt(y);
|
||||
buf.writeInt(z);
|
||||
ByteBufUtils.writeItemStack(buf, tomeItemStack);
|
||||
ByteBufUtils.writeItemStack(buf, alchenomiconItemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -52,7 +52,7 @@ public class MessageTileEntityResearchStation implements IMessage, IMessageHandl
|
|||
|
||||
if (tileEntity instanceof TileEntityResearchStation)
|
||||
{
|
||||
((TileEntityResearchStation) tileEntity).setInventorySlotContents(TileEntityResearchStation.TOME_SLOT_INVENTORY_INDEX, message.tomeItemStack);
|
||||
((TileEntityResearchStation) tileEntity).setInventorySlotContents(TileEntityResearchStation.ALCHENOMICON_SLOT_INVENTORY_INDEX, message.alchenomiconItemStack);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -61,6 +61,6 @@ public class MessageTileEntityResearchStation implements IMessage, IMessageHandl
|
|||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return String.format("MessageTileEntityResearchStation - x:%s, y:%s, z:%s, tome:%s", x, y, z, tomeItemStack.toString());
|
||||
return String.format("MessageTileEntityResearchStation - x:%s, y:%s, z:%s, tome:%s", x, y, z, alchenomiconItemStack.toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,9 @@ public enum GUIs
|
|||
GLASS_BELL,
|
||||
RESEARCH_STATION,
|
||||
AUGMENTATION_TABLE,
|
||||
ALCHEMICAL_TOME,
|
||||
ALCHENOMICON,
|
||||
TRANSMUTATION_TABLET,
|
||||
SYMBOL_SELECTION,
|
||||
TRANSMUTATION_ARRAY
|
||||
TRANSMUTATION_ARRAY,
|
||||
ADMIN_PANEL
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ public final class Messages {
|
|||
|
||||
private static final String GUI_PREFIX = "container.ee3:";
|
||||
|
||||
public static final String NO_KNOWN_TRANSMUTATIONS = GUI_PREFIX + "alchemicalTome.noTransmutationsKnown";
|
||||
public static final String NO_KNOWN_TRANSMUTATIONS = GUI_PREFIX + "alchenomicon.noTransmutationsKnown";
|
||||
}
|
||||
|
||||
public static final class Tooltips {
|
||||
|
@ -104,6 +104,8 @@ public final class Messages {
|
|||
public static final String RUN_TEST_USAGE = COMMAND_PREFIX + Names.Commands.RUN_TEST + ".usage";
|
||||
public static final String RUN_TESTS_SUCCESS = COMMAND_PREFIX + Names.Commands.RUN_TEST + ".success";
|
||||
public static final String RUN_TESTS_NOT_FOUND = COMMAND_PREFIX + Names.Commands.RUN_TEST + ".notfound";
|
||||
|
||||
public static final String ADMIN_USAGE = COMMAND_PREFIX + Names.Commands.ADMIN_PANEL + ".usage";
|
||||
}
|
||||
|
||||
public static final class Configuration {
|
||||
|
|
|
@ -38,6 +38,7 @@ public class Names
|
|||
public static final String ALCHEMICAL_UPGRADE = "alchemicalUpgrade";
|
||||
public static final String[] ALCHEMICAL_UPGRADE_SUBTYPES = {"verdant", "azure", "minium"};
|
||||
public static final String DIVINING_ROD = "diviningRod";
|
||||
public static final String ALCHENOMICON = "alchenomicon";
|
||||
public static final String ALCHEMICAL_TOME = "alchemicalTome";
|
||||
public static final String MATTER = "matter";
|
||||
public static final String[] MATTER_SUBTYPES = {"Proto", "Dark", "Corporeal", "Kinetic", "Temporal", "Essentia", "Amorphous", "Void", "Omni"};
|
||||
|
@ -106,6 +107,7 @@ public class Names
|
|||
public static final String OWNER = "owner";
|
||||
public static final String OWNER_UUID_MOST_SIG = "ownerUUIDMostSig";
|
||||
public static final String OWNER_UUID_LEAST_SIG = "ownerUUIDLeastSig";
|
||||
public static final String ENERGY_VALUE = "energyValue";
|
||||
}
|
||||
|
||||
public static final class Containers
|
||||
|
@ -119,7 +121,7 @@ public class Names
|
|||
public static final String RESEARCH_STATION = "container.ee3:" + Blocks.RESEARCH_STATION;
|
||||
public static final String GLASS_BELL = "container.ee3:" + Blocks.GLASS_BELL;
|
||||
public static final String AUGMENTATION_TABLE = "container.ee3:" + Blocks.AUGMENTATION_TABLE;
|
||||
public static final String ALCHEMICAL_TOME = "container.ee3:" + Items.ALCHEMICAL_TOME;
|
||||
public static final String ALCHENOMICON = "container.ee3:" + Items.ALCHENOMICON;
|
||||
public static final String TRANSMUTATION_TABLET = "container.ee3:" + Blocks.TRANSMUTATION_TABLET;
|
||||
}
|
||||
|
||||
|
@ -156,6 +158,7 @@ public class Names
|
|||
public static final String SET_ITEM_NOT_RECOVERABLE = "set-item-not-recoverable";
|
||||
public static final String RUN_TEST = "run-tests";
|
||||
public static final String DEBUG = "debug";
|
||||
public static final String ADMIN_PANEL = "admin";
|
||||
}
|
||||
|
||||
public static final class AlchemyArrays
|
||||
|
|
|
@ -44,11 +44,12 @@ public final class Textures
|
|||
public static final ResourceLocation RESEARCH_STATION_GYLPH_2 = ResourceLocationHelper.getResourceLocation(GUI_TEXTURE_LOCATION + "researchStation_Glyph2.png");
|
||||
public static final ResourceLocation AUGMENTATION_TABLE = ResourceLocationHelper.getResourceLocation(GUI_TEXTURE_LOCATION + "augmentationTable.png");
|
||||
public static final ResourceLocation PORTABLE_CRAFTING = new ResourceLocation("textures/gui/container/crafting_table.png");
|
||||
public static final ResourceLocation ALCHEMICAL_TOME = ResourceLocationHelper.getResourceLocation(GUI_TEXTURE_LOCATION + "alchemicalTome.png");
|
||||
public static final ResourceLocation ALCHENOMICON = ResourceLocationHelper.getResourceLocation(GUI_TEXTURE_LOCATION + "alchenomicon.png");
|
||||
public static final ResourceLocation TRANSMUTATION_ARRAY_1 = ResourceLocationHelper.getResourceLocation(GUI_TEXTURE_LOCATION + "transmutationArray_1.png");
|
||||
public static final ResourceLocation TRANSMUTATION_ARRAY_3 = ResourceLocationHelper.getResourceLocation(GUI_TEXTURE_LOCATION + "transmutationArray_3.png");
|
||||
public static final ResourceLocation TRANSMUTATION_ARRAY_5 = ResourceLocationHelper.getResourceLocation(GUI_TEXTURE_LOCATION + "transmutationArray_5.png");
|
||||
public static final ResourceLocation TRANSMUTATION_TABLET = ResourceLocationHelper.getResourceLocation(GUI_TEXTURE_LOCATION + "transmutationTablet.png");
|
||||
public static final ResourceLocation ADMIN_PANEL = ResourceLocationHelper.getResourceLocation(GUI_TEXTURE_LOCATION + "adminPanel.png");
|
||||
|
||||
public static final class Elements
|
||||
{
|
||||
|
@ -62,6 +63,7 @@ public final class Textures
|
|||
public static final ResourceLocation BUTTON_HOVER = ResourceLocationHelper.getResourceLocation(ELEMENT_TEXTURE_LOCATION + "buttonHover.png");
|
||||
public static final ResourceLocation BUTTON_SORT_OPTION = ResourceLocationHelper.getResourceLocation(ELEMENT_TEXTURE_LOCATION + "buttonSortOption.png");
|
||||
public static final ResourceLocation BUTTON_SORT_ORDER = ResourceLocationHelper.getResourceLocation(ELEMENT_TEXTURE_LOCATION + "buttonSortOrder.png");
|
||||
public static final ResourceLocation BUTTON = ResourceLocationHelper.getResourceLocation(ELEMENT_TEXTURE_LOCATION + "button.png");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public class TileEntityResearchStation extends TileEntityEE implements IInventor
|
|||
{
|
||||
public static final int INVENTORY_SIZE = 2;
|
||||
public static final int ITEM_SLOT_INVENTORY_INDEX = 0;
|
||||
public static final int TOME_SLOT_INVENTORY_INDEX = 1;
|
||||
public static final int ALCHENOMICON_SLOT_INVENTORY_INDEX = 1;
|
||||
|
||||
public int itemLearnTime;
|
||||
public boolean isItemKnown;
|
||||
|
@ -210,10 +210,10 @@ public class TileEntityResearchStation extends TileEntityEE implements IInventor
|
|||
|
||||
private boolean canLearnItemStack()
|
||||
{
|
||||
ItemStack alchemicalTome = inventory[TOME_SLOT_INVENTORY_INDEX];
|
||||
UUID playerUUID = ItemHelper.getOwnerUUID(alchemicalTome);
|
||||
ItemStack alchenomicon = inventory[ALCHENOMICON_SLOT_INVENTORY_INDEX];
|
||||
UUID playerUUID = ItemHelper.getOwnerUUID(alchenomicon);
|
||||
|
||||
if (alchemicalTome != null && playerUUID != null)
|
||||
if (alchenomicon != null && playerUUID != null)
|
||||
{
|
||||
return TransmutationKnowledgeRegistryProxy.canPlayerLearn(playerUUID, inventory[ITEM_SLOT_INVENTORY_INDEX]);
|
||||
}
|
||||
|
@ -223,10 +223,10 @@ public class TileEntityResearchStation extends TileEntityEE implements IInventor
|
|||
|
||||
private boolean isItemStackKnown()
|
||||
{
|
||||
ItemStack alchemicalTome = inventory[TOME_SLOT_INVENTORY_INDEX];
|
||||
UUID playerUUID = ItemHelper.getOwnerUUID(alchemicalTome);
|
||||
ItemStack alchenomicon = inventory[ALCHENOMICON_SLOT_INVENTORY_INDEX];
|
||||
UUID playerUUID = ItemHelper.getOwnerUUID(alchenomicon);
|
||||
|
||||
if (alchemicalTome != null && playerUUID != null)
|
||||
if (alchenomicon != null && playerUUID != null)
|
||||
{
|
||||
return TransmutationKnowledgeRegistryProxy.doesPlayerKnow(playerUUID, inventory[ITEM_SLOT_INVENTORY_INDEX]);
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ public class TileEntityResearchStation extends TileEntityEE implements IInventor
|
|||
{
|
||||
if (this.canLearnItemStack())
|
||||
{
|
||||
TransmutationKnowledgeRegistryProxy.teachPlayer(ItemHelper.getOwnerUUID(inventory[TOME_SLOT_INVENTORY_INDEX]), inventory[ITEM_SLOT_INVENTORY_INDEX]);
|
||||
TransmutationKnowledgeRegistryProxy.teachPlayer(ItemHelper.getOwnerUUID(inventory[ALCHENOMICON_SLOT_INVENTORY_INDEX]), inventory[ITEM_SLOT_INVENTORY_INDEX]);
|
||||
|
||||
this.inventory[ITEM_SLOT_INVENTORY_INDEX].stackSize--;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import com.pahimar.ee3.api.exchange.EnergyValue;
|
|||
import com.pahimar.ee3.api.exchange.EnergyValueRegistryProxy;
|
||||
import com.pahimar.ee3.block.BlockAshInfusedStoneSlab;
|
||||
import com.pahimar.ee3.exchange.EnergyValueRegistry;
|
||||
import com.pahimar.ee3.item.ItemAlchemicalTome;
|
||||
import com.pahimar.ee3.item.ItemAlchenomicon;
|
||||
import com.pahimar.ee3.item.ItemMiniumStone;
|
||||
import com.pahimar.ee3.item.ItemPhilosophersStone;
|
||||
import com.pahimar.ee3.knowledge.AbilityRegistry;
|
||||
|
@ -34,7 +34,7 @@ public class TileEntityTransmutationTablet extends TileEntityEE implements ISide
|
|||
public static final int ITEM_INPUT_7 = 6;
|
||||
public static final int ITEM_INPUT_8 = 7;
|
||||
public static final int STONE_INDEX = 8;
|
||||
public static final int ALCHEMICAL_TOME_INDEX = 9;
|
||||
public static final int ALCHENOMICON_INDEX = 9;
|
||||
|
||||
private EnergyValue storedEnergyValue;
|
||||
private EnergyValue availableEnergyValue;
|
||||
|
@ -322,7 +322,7 @@ public class TileEntityTransmutationTablet extends TileEntityEE implements ISide
|
|||
{
|
||||
return true;
|
||||
}
|
||||
else if (slotIndex == ALCHEMICAL_TOME_INDEX && itemStack.getItem() instanceof ItemAlchemicalTome)
|
||||
else if (slotIndex == ALCHENOMICON_INDEX && itemStack.getItem() instanceof ItemAlchenomicon)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ item.ee3:stonePhilosophers.name=Philosopher's Stone [WIP]
|
|||
item.ee3:alchemicalUpgrade.verdant.name=Verdant Upgrade [WIP]
|
||||
item.ee3:alchemicalUpgrade.azure.name=Azure Upgrade [WIP]
|
||||
item.ee3:alchemicalUpgrade.minium.name=Minium Upgrade [WIP]
|
||||
item.ee3:alchemicalTome.name=Alchenomicon
|
||||
item.ee3:alchenomicon.name=Alchenomicon
|
||||
item.ee3:matterProto.name=Proto Matter [WIP]
|
||||
item.ee3:matterDark.name=Dark Matter [WIP]
|
||||
item.ee3:matterOmni.name=Omni Matter [WIP]
|
||||
|
@ -114,8 +114,8 @@ container.ee3:calcinator=Calcinator
|
|||
container.ee3:glassBell=Glass Bell
|
||||
container.ee3:researchStation=Research Station
|
||||
container.ee3:augmentationTable=Augmentation Table [WIP]
|
||||
container.ee3:alchemicalTome=Alchenomicon
|
||||
container.ee3:alchemicalTome.noTransmutationsKnown=No known transmutations
|
||||
container.ee3:alchenomicon=Alchenomicon
|
||||
container.ee3:alchenomicon.noTransmutationsKnown=No known transmutations
|
||||
container.ee3:transmutationAlchemyArray=Transmutation Square [WIP]
|
||||
|
||||
# NEI
|
||||
|
@ -167,6 +167,7 @@ commands.ee3.set-item-not-recoverable.success=%s set %s as not being able to hav
|
|||
commands.ee3.run-tests.usage=/ee3 run-tests <file-name>
|
||||
commands.ee3.run-tests.success=Executed test file '%s', check server log for results
|
||||
commands.ee3.run-tests.notfound=Test file '%s' was not found!
|
||||
commands.ee3.admin.usage=/ee3 admin
|
||||
|
||||
# Tooltips
|
||||
tooltip.ee3:belongsTo=Belongs to %s
|
||||
|
|
BIN
src/main/resources/assets/ee3/textures/gui/adminPanel.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
BIN
src/main/resources/assets/ee3/textures/gui/elements/button.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 8 KiB After Width: | Height: | Size: 8 KiB |
After Width: | Height: | Size: 19 KiB |
BIN
src/main/resources/assets/ee3/textures/items/mercurialEye.png
Normal file
After Width: | Height: | Size: 18 KiB |