mirror of
https://github.com/GTNewHorizons/Gadomancy.git
synced 2026-11-20 03:59:56 +00:00
-Updated language file (ty to redcreeper)
-Added arcane packager gui
This commit is contained in:
1 parent
a31da1adef
commit
a8b51c78b6
5 files changed
+38
-12
No files matched your search
@@ -1,9 +1,12 @@
|
||||
package makeo.gadomancy.client.gui;
|
||||
|
||||
import makeo.gadomancy.common.containers.ContainerArcanePackager;
|
||||
import makeo.gadomancy.common.utils.SimpleResourceLocation;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
@@ -14,13 +17,19 @@ import net.minecraft.inventory.IInventory;
|
||||
* Created by makeo @ 14.11.2015 01:17
|
||||
*/
|
||||
public class ArcanePackagerGui extends GuiContainer {
|
||||
private static final ResourceLocation BACKGROUND = new SimpleResourceLocation("gui/gui_packager.png");
|
||||
|
||||
public ArcanePackagerGui(InventoryPlayer playerInv, IInventory inventory) {
|
||||
super(new ContainerArcanePackager(playerInv, inventory));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float mouseX, int mouseZ, int par3) {
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(BACKGROUND);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
int l = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,6 +16,8 @@ import net.minecraft.world.World;
|
||||
import thaumcraft.common.items.ItemLootBag;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -71,14 +73,18 @@ public class ItemArcanePackage extends ItemLootBag {
|
||||
}
|
||||
|
||||
public void setContents(ItemStack stack, List<ItemStack> items) {
|
||||
NBTTagList stackList = new NBTTagList();
|
||||
items = new ArrayList<ItemStack>(items);
|
||||
|
||||
for (ItemStack item : items) {
|
||||
if (stack != null) {
|
||||
NBTTagCompound nbtStack = new NBTTagCompound();
|
||||
item.writeToNBT(nbtStack);
|
||||
stackList.appendTag(nbtStack);
|
||||
Collections.sort(items, new Comparator<ItemStack>() {
|
||||
@Override
|
||||
public int compare(ItemStack i1, ItemStack i2) {
|
||||
return i1.writeToNBT(new NBTTagCompound()).hashCode() - i2.writeToNBT(new NBTTagCompound()).hashCode();
|
||||
}
|
||||
});
|
||||
|
||||
NBTTagList stackList = new NBTTagList();
|
||||
for (ItemStack item : items) {
|
||||
stackList.appendTag(item.writeToNBT(new NBTTagCompound()));
|
||||
}
|
||||
NBTHelper.getData(stack).setTag("items", stackList);
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@ public class RegisteredRecipes {
|
||||
public static IArcaneRecipe recipeArcaneDropper;
|
||||
public static IArcaneRecipe recipeRemoteJar;
|
||||
public static IArcaneRecipe recipeAncientPedestal;
|
||||
public static IArcaneRecipe recipeBlockProtector;
|
||||
|
||||
public static void init() {
|
||||
AdditionalGolemType typeSilverwood = RegisteredGolemStuff.typeSilverwood;
|
||||
@@ -132,6 +133,10 @@ public class RegisteredRecipes {
|
||||
|
||||
recipesFamilar = createFamilarRecipes();
|
||||
recipesFamiliarAugmentation = createFamiliarAugmentationRecipes();
|
||||
|
||||
recipeBlockProtector = ThaumcraftApi.addArcaneCraftingRecipe("TODO", new ItemStack(RegisteredBlocks.blockStoneMachine, 1, 2),
|
||||
new AspectList().add(Aspect.ORDER, 120).add(Aspect.EARTH, 120),
|
||||
"WNW", "PJP", "GRG", 'W', new ItemStack(Items.potionitem, 1, 8232), 'V', new ItemStack(Items.potionitem, 1, 8264), 'N', new ItemStack(ConfigItems.itemResource, 1, 1), 'P', new ItemStack(ConfigBlocks.blockTube), 'J', new ItemStack(ConfigBlocks.blockJar), 'G', new ItemStack(ConfigBlocks.blockWoodenDevice, 1, 6), 'R', new ItemStack(Items.redstone));
|
||||
}
|
||||
|
||||
private static InfusionRecipe[][] createFamiliarAugmentationRecipes() {
|
||||
|
||||
Reference in new issue
Block a user