mirror of
https://github.com/GTNewHorizons/Gadomancy.git
synced 2026-11-24 22:04:22 +00:00
-fixed rending bug in arcane packager gui
-Added redstone support for arcane packager -Added recipes for cleaning the aura core
This commit is contained in:
1 parent
411ed3658e
commit
e18f26f483
5 files changed
+54
-8
No files matched your search
@@ -49,6 +49,8 @@ public class ArcanePackagerGui extends GuiContainer {
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
this.mc.renderEngine.bindTexture(TEXTURE);
|
||||
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
|
||||
if(tile.progress > 0) {
|
||||
drawTexturedModalRect(89, 67, 210, 0, tile.progress, 9);
|
||||
}
|
||||
|
||||
@@ -205,6 +205,11 @@ public class BlockStoneMachine extends Block {
|
||||
dropBlockAsItem(world, x, y, z, metadata, 0);
|
||||
world.setBlockToAir(x, y, z);
|
||||
}
|
||||
} else if(metadata == 4) {
|
||||
if(!world.isRemote) {
|
||||
TileArcanePackager tile = (TileArcanePackager) world.getTileEntity(x, y, z);
|
||||
tile.updateRedstone(world.isBlockIndirectlyGettingPowered(x, y, z));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ public class TileArcanePackager extends TileJarFillable implements IInventory, I
|
||||
public boolean autoStart = false;
|
||||
public boolean useEssentia = false;
|
||||
public boolean disguise = false;
|
||||
private Boolean redstoneState = null;
|
||||
|
||||
private int count = 0;
|
||||
|
||||
@@ -46,6 +47,8 @@ public class TileArcanePackager extends TileJarFillable implements IInventory, I
|
||||
public void readFromNBT(NBTTagCompound compound) {
|
||||
super.readFromNBT(compound);
|
||||
|
||||
redstoneState = compound.getBoolean("");
|
||||
|
||||
contents = new ItemStack[getSizeInventory()];
|
||||
NBTTagList list = compound.getTagList("Items", 10);
|
||||
|
||||
@@ -83,6 +86,10 @@ public class TileArcanePackager extends TileJarFillable implements IInventory, I
|
||||
progress++;
|
||||
}
|
||||
} else {
|
||||
if (redstoneState == null) {
|
||||
redstoneState = worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
if (progress >= 47) {
|
||||
doPack();
|
||||
progress = -1;
|
||||
@@ -101,6 +108,16 @@ public class TileArcanePackager extends TileJarFillable implements IInventory, I
|
||||
}
|
||||
}
|
||||
|
||||
public void updateRedstone(boolean state) {
|
||||
if(redstoneState != null && state && !redstoneState) {
|
||||
if (canPack()) {
|
||||
progress = 0;
|
||||
markForUpdate();
|
||||
}
|
||||
}
|
||||
redstoneState = state;
|
||||
}
|
||||
|
||||
private boolean canPack() {
|
||||
if (getStackInSlot(11) != null) {
|
||||
return false;
|
||||
@@ -137,13 +154,6 @@ public class TileArcanePackager extends TileJarFillable implements IInventory, I
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean startPack() {
|
||||
if (canPack()) {
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void doPack() {
|
||||
if (canPack()) {
|
||||
List<ItemStack> contents = new ArrayList<ItemStack>();
|
||||
|
||||
@@ -143,6 +143,10 @@ public class ItemAuraCore extends Item {
|
||||
this.unused = unused;
|
||||
}
|
||||
|
||||
public boolean isUnused() {
|
||||
return unused;
|
||||
}
|
||||
|
||||
public boolean isAspect() {
|
||||
return aspect != null;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
package makeo.gadomancy.common.registration;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import makeo.gadomancy.api.golems.AdditionalGolemType;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.crafting.InfusionUpgradeRecipe;
|
||||
import makeo.gadomancy.common.crafting.RecipeStickyJar;
|
||||
import makeo.gadomancy.common.data.ModConfig;
|
||||
import makeo.gadomancy.common.items.ItemAuraCore;
|
||||
import makeo.gadomancy.common.items.baubles.ItemFamiliar;
|
||||
import makeo.gadomancy.common.research.SimpleResearchItem;
|
||||
import makeo.gadomancy.common.utils.NBTHelper;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
@@ -68,6 +72,10 @@ public class RegisteredRecipes {
|
||||
public static CrucibleRecipe recipeAncientStonePedestal = null;
|
||||
public static IArcaneRecipe recipeAncientStone = null;
|
||||
|
||||
public static CrucibleRecipe[] recipesWashAuraCore;
|
||||
public static IRecipe[] recipesUndoAuraCore;
|
||||
|
||||
|
||||
public static void init() {
|
||||
AdditionalGolemType typeSilverwood = RegisteredGolemStuff.typeSilverwood;
|
||||
recipeGolemSilverwood = ThaumcraftApi.addInfusionCraftingRecipe(SimpleResearchItem.getFullName("GOLEMSILVERWOOD"),
|
||||
@@ -157,12 +165,29 @@ public class RegisteredRecipes {
|
||||
"SSS", "SES", "SSS", 'S', new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 6), 'E', new ItemStack(ConfigItems.itemEldritchObject));
|
||||
recipeAncientStonePedestal = ThaumcraftApi.addCrucibleRecipe(Gadomancy.MODID.toUpperCase() + ".ANCIENT_STONES", new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 15), new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 7), new AspectList().add(Aspect.ELDRITCH, 8).add(Aspect.EXCHANGE, 8).add(Aspect.ENTROPY, 12));
|
||||
}
|
||||
|
||||
ItemAuraCore.AuraCoreType[] auraCoreTypes = ItemAuraCore.AuraCoreType.values();
|
||||
recipesWashAuraCore = new CrucibleRecipe[auraCoreTypes.length - 1];
|
||||
List<IRecipe> recipesUndoAuraCore = new ArrayList<IRecipe>();
|
||||
|
||||
for(int i = 1; i < auraCoreTypes.length; i++) {
|
||||
recipesWashAuraCore[i-1] = ThaumcraftApi.addCrucibleRecipe(SimpleResearchItem.getFullName("GOLEMCOREBREAK"), new ItemStack(RegisteredItems.itemAuraCore), new ItemStack(RegisteredItems.itemAuraCore, 1, i), new AspectList().add(Aspect.MAGIC, 3).add(Aspect.WATER, 2).add(Aspect.HEAL, 4));
|
||||
|
||||
if(auraCoreTypes[i].isUnused()) {
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(RegisteredItems.itemAuraCore), new ItemStack(RegisteredItems.itemAuraCore, 1, i));
|
||||
|
||||
List list = CraftingManager.getInstance().getRecipeList();
|
||||
recipesUndoAuraCore.add((IRecipe)list.get(list.size() - 1));
|
||||
}
|
||||
}
|
||||
|
||||
RegisteredRecipes.recipesUndoAuraCore = recipesUndoAuraCore.toArray(new IRecipe[recipesUndoAuraCore.size()]);
|
||||
}
|
||||
|
||||
private static InfusionRecipe[][] createFamiliarAugmentationRecipes() {
|
||||
InfusionRecipe[][] recipes = new InfusionRecipe[5][];
|
||||
ItemWispEssence wispEssence = (ItemWispEssence) ConfigItems.itemWispEssence;
|
||||
ItemFamiliar familiar = (ItemFamiliar) RegisteredItems.itemFamiliar;
|
||||
ItemFamiliar familiar = RegisteredItems.itemFamiliar;
|
||||
|
||||
List<Aspect> aspects = new ArrayList<Aspect>(Aspect.aspects.values());
|
||||
InfusionRecipe[] upgradeArrayStr1 = new InfusionRecipe[aspects.size()];
|
||||
|
||||
Reference in new issue
Block a user