- Added more packager stuff and deactivated it...

- Added skyblock arcane stone recipe
This commit is contained in:
makeo committed 2015-11-15 21:03:32 +01:00
1 parent d61df6bb96
commit 0716fa8b8e
7 files changed
+109 -19

No files matched your search

@@ -1,5 +1,6 @@
package makeo.gadomancy.client.gui;
import makeo.gadomancy.common.blocks.tiles.TileArcanePackager;
import makeo.gadomancy.common.containers.ContainerArcanePackager;
import makeo.gadomancy.common.utils.SimpleResourceLocation;
import net.minecraft.client.gui.inventory.GuiContainer;
@@ -17,23 +18,49 @@ import org.lwjgl.opengl.GL11;
* Created by makeo @ 14.11.2015 01:17
*/
public class ArcanePackagerGui extends GuiContainer {
private static final ResourceLocation BACKGROUND = new SimpleResourceLocation("gui/gui_packager.png");
private static final ResourceLocation TEXTURE = new SimpleResourceLocation("gui/gui_packager.png");
private final TileArcanePackager tile;
public ArcanePackagerGui(InventoryPlayer playerInv, IInventory inventory) {
super(new ContainerArcanePackager(playerInv, inventory));
this.tile = (TileArcanePackager) inventory;
this.ySize = 234;
this.xSize = 190;
}
@Override
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
GL11.glEnable(GL11.GL_BLEND);
int baseX = this.guiLeft;
int baseY = this.guiTop;
drawTexturedModalRect(baseX + 89, baseY + 67, 210, 0, tile.progress, 9);
if(tile.autoStart) {
drawTexturedModalRect(baseX + 89, baseY + 67, 210, 0, 8, 8);
}
GL11.glDisable(GL11.GL_BLEND);
}
@Override
protected void drawGuiContainerBackgroundLayer(float mouseX, int mouseZ, int par3) {
this.mc.renderEngine.bindTexture(TEXTURE);
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);
GL11.glEnable(GL11.GL_BLEND);
int var5 = (this.width - this.xSize) / 2;
int var6 = (this.height - this.ySize) / 2;
drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
GL11.glDisable(GL11.GL_BLEND);
}
@Override
protected void mouseClicked(int x, int y, int button) {
super.mouseClicked(x, y, button);
}
}
@@ -1,6 +1,7 @@
package makeo.gadomancy.common.blocks;
import makeo.gadomancy.common.Gadomancy;
import makeo.gadomancy.common.blocks.tiles.TileArcanePackager;
import makeo.gadomancy.common.blocks.tiles.TileBlockProtector;
import makeo.gadomancy.common.blocks.tiles.TileManipulationFocus;
import makeo.gadomancy.common.blocks.tiles.TileManipulatorPillar;
@@ -84,7 +85,7 @@ public class BlockStoneMachine extends Block {
@Override
public boolean hasTileEntity(int metadata) {
return metadata == 15 || metadata == 0 || metadata == 1 || metadata == 2 || metadata == 3;
return metadata == 15 || metadata == 0 || metadata == 1 || metadata == 2 || metadata == 3;// || metadata == 4;
}
@Override
@@ -93,6 +94,7 @@ public class BlockStoneMachine extends Block {
list.add(new ItemStack(item, 1, 1));
list.add(new ItemStack(item, 1, 2));
list.add(new ItemStack(item, 1, 3));
//list.add(new ItemStack(item, 1, 4));
}
@Override
@@ -117,7 +119,9 @@ public class BlockStoneMachine extends Block {
return new TileBlockProtector();
} else if (metadata == 3) {
return new TileManipulationFocus();
}
}/* else if(metadata == 4) {
return new TileArcanePackager();
}*/
return null;
}
@@ -180,6 +184,16 @@ public class BlockStoneMachine extends Block {
}
}
@Override
public int getLightValue(IBlockAccess world, int x, int y, int z) {
int metadata = world.getBlockMetadata(x, y, z);
if(metadata == 2) {
TileBlockProtector protector = (TileBlockProtector) world.getTileEntity(x, y, z);
return protector.getCurrentRange();
}
return super.getLightValue(world, x, y, z);
}
@Override
public boolean hasComparatorInputOverride() {
return true;
@@ -205,7 +219,10 @@ public class BlockStoneMachine extends Block {
}
} else if (metadata == 1) {
return ConfigBlocks.blockStoneDevice.onBlockActivated(world, x, y, z, player, side, hitX, hitY, hitZ);
}
} /*else if(metadata == 4) {
player.openGui(Gadomancy.instance, 2, world, x, y, z);
return true;
}*/
return super.onBlockActivated(world, x, y, z, player, side, hitX, hitY, hitZ);
}
@@ -3,6 +3,7 @@ package makeo.gadomancy.common.blocks.tiles;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
/**
@@ -13,8 +14,14 @@ import net.minecraft.item.ItemStack;
* <p/>
* Created by makeo @ 14.11.2015 12:22
*/
public class TileArcanePackager extends SynchronizedTileEntity implements IInventory {
private ItemStack[] contents = new ItemStack[10];
public class TileArcanePackager extends SynchronizedTileEntity implements IInventory, ISidedInventory {
private ItemStack[] contents = new ItemStack[12];
//0 - 46
public int progress = 20;
public boolean autoStart = false;
public boolean useEssentia = false;
@Override
public int getSizeInventory() {
@@ -95,13 +102,28 @@ public class TileArcanePackager extends SynchronizedTileEntity implements IInven
@Override
public boolean isItemValidForSlot(int slot, ItemStack stack) {
if(slot == 0) {
return stack.getItem() == Items.string;
} else if(slot == 1) {
if(slot == 9) {
return stack.getItem() == Items.leather;
} else if(slot == 2) {
} else if(slot == 10) {
return stack.getItem() == Items.string;
} else if(slot == 11) {
return false;
}
return true;
}
@Override
public int[] getAccessibleSlotsFromSide(int side) {
return new int[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
}
@Override
public boolean canInsertItem(int slot, ItemStack stack, int side) {
return true;
}
@Override
public boolean canExtractItem(int slot, ItemStack stack, int side) {
return true;
}
}
@@ -22,18 +22,27 @@ public class ContainerArcanePackager extends Container {
this.playerInv = playerInv;
this.packagerInv = packagerInv;
addSlotToContainer(new FilteredSlot(packagerInv, 0, 80, 32));
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
addSlotToContainer(new Slot(packagerInv, j + i * 3, 16 + 18 * j, 42 + i * 23));
}
}
addSlotToContainer(new FilteredSlot(packagerInv, 9, 95, 33));
addSlotToContainer(new FilteredSlot(packagerInv, 10, 113, 33));
addSlotToContainer(new FilteredSlot(packagerInv, 11, 160, 64));
bindPlayerInventory();
}
protected void bindPlayerInventory() {
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 9; j++) {
addSlotToContainer(new Slot(this.playerInv, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
addSlotToContainer(new Slot(this.playerInv, j + i * 9 + 9, 16 + j * 18, 151 + i * 18));
}
}
for (int i = 0; i < 9; i++) {
addSlotToContainer(new Slot(this.playerInv, i, 8 + i * 18, 142));
addSlotToContainer(new Slot(this.playerInv, i, 16 + i * 18, 209));
}
}
@@ -21,6 +21,9 @@ public class ModConfig {
public static boolean doLightCalculations;
public static int maxMazeCount = -1;
//Skyblock stuff
public static boolean ancientStoneRecipes;
private ModConfig() {}
public static void init(File file) {
@@ -38,5 +41,7 @@ public class ModConfig {
dimOuterId = config.getInt("dimOuterId", "dimension", -73, Integer.MIN_VALUE, Integer.MAX_VALUE, "Dimension Id for the eldrich mazes accessed via Node Manipulator");
doLightCalculations = config.getBoolean("calculateEldritchLight", "dimension", true, "TRUE = Calculating Light values for the Gadomancy-Eldritch Mazes; FALSE = No calculation, but some Light Bugs - Calculating the Light takes ~2 seconds -> Can be measured when trying to enter the eldritch mazed via Gadomancy Eldritch portal.");
maxMazeCount = config.getInt("maxMazeCount", "dimension", -1, -1, Integer.MAX_VALUE, "Defines how many Eldritch mazes may exist at the same time using the Gadomancy Eldritch ritual. (-1 = infinite) Note that 1 maze = 1 player; Once the player finishes the maze, the maze closes itself and teleports the player out.");
ancientStoneRecipes = config.getBoolean("ancientStoneRecipes", "skyblock", false, "TRUE = Adds recipes for Ancient Stone and Ancient Stone Pedestal (This may be usefull for severs and skyblock packs to craft the Node Manipulator and get more primodial pearls)");
}
}
@@ -4,6 +4,7 @@ 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.baubles.ItemFamiliar;
import makeo.gadomancy.common.research.SimpleResearchItem;
import makeo.gadomancy.common.utils.NBTHelper;
@@ -13,6 +14,7 @@ import net.minecraft.item.ItemStack;
import thaumcraft.api.ThaumcraftApi;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.crafting.CrucibleRecipe;
import thaumcraft.api.crafting.IArcaneRecipe;
import thaumcraft.api.crafting.InfusionRecipe;
import thaumcraft.api.crafting.ShapedArcaneRecipe;
@@ -61,6 +63,9 @@ public class RegisteredRecipes {
public static IArcaneRecipe recipeAncientPedestal;
public static IArcaneRecipe recipeBlockProtector;
public static CrucibleRecipe recipeAncientStonePedestal = null;
public static IArcaneRecipe recipeAncientStone = null;
public static void init() {
AdditionalGolemType typeSilverwood = RegisteredGolemStuff.typeSilverwood;
recipeGolemSilverwood = ThaumcraftApi.addInfusionCraftingRecipe(SimpleResearchItem.getFullName("GOLEMSILVERWOOD"),
@@ -75,7 +80,6 @@ public class RegisteredRecipes {
recipeStickyJar = new RecipeStickyJar();
ThaumcraftApi.getCraftingRecipes().add(recipeStickyJar);
//GameRegistry.addRecipe(recipeStickyJar);
recipeArcaneDropper = ThaumcraftApi.addArcaneCraftingRecipe(SimpleResearchItem.getFullName("ARCANEDROPPER"), new ItemStack(RegisteredBlocks.blockArcaneDropper), new AspectList().add(Aspect.ORDER, 14).add(Aspect.AIR, 14).add(Aspect.EARTH, 10),
"SDS", "BAB", "SSS", 'S', new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 6), 'D', new ItemStack(Blocks.dropper), 'A', new ItemStack(ConfigBlocks.blockMetalDevice, 1, 9), 'B', new ItemStack(ConfigBlocks.blockWoodenDevice));
@@ -137,6 +141,12 @@ public class RegisteredRecipes {
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));
if(ModConfig.ancientStoneRecipes) {
recipeAncientStone = ThaumcraftApi.addArcaneCraftingRecipe("TODO", new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 11), new AspectList().add(Aspect.ENTROPY, 16).add(Aspect.EARTH, 8),
"SSS", "SES", "SSS", 'S', new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 6), 'E', new ItemStack(ConfigItems.itemEldritchObject));
recipeAncientStonePedestal = ThaumcraftApi.addCrucibleRecipe("TODO", 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));
}
}
private static InfusionRecipe[][] createFamiliarAugmentationRecipes() {