From f38c45d27bbccda65cba941887e4c6dbb303df10 Mon Sep 17 00:00:00 2001 From: Alkalus Date: Mon, 14 Aug 2017 11:42:15 +1000 Subject: % Tweaked Fish Catcher loot, enabling Iron and Gold to generate. If nuggets exist, you will get nuggets, else you will get ingots. > This is a drastic chance change, it's 1/100 to get 'resources' and it's then a 4/10 for Iron, 3/10 for Gold, 2/10 for Emerald and 1/10 for Diamond. --- .../tileentities/general/TileEntityFishTrap.java | 24 +++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'src/Java/gtPlusPlus/core') diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java index 176d65ceac..5e1bd73a51 100644 --- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java +++ b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java @@ -28,8 +28,8 @@ public class TileEntityFishTrap extends TileEntity implements ISidedInventory { public TileEntityFishTrap() { this.inventoryContents = new InventoryFishTrap();// number of slots - - // without product - // slot + // without product + // slot this.setTileLocation(); } @@ -147,9 +147,23 @@ public class TileEntityFishTrap extends TileEntity implements ISidedInventory { else if (lootWeight <= 99) { loot = ItemUtils.getSimpleStack(minecraftFish[MathUtils.randInt(0, minecraftFish.length - 1)], 1); } + else if (lootWeight == 100){ - if (MathUtils.randInt(0, 1) == 0){ - loot = ItemUtils.getSimpleStack(Items.emerald); + int rareLoot = MathUtils.randInt(1, 10); + if (rareLoot <= 4) { + loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("nuggetIron", 1); + if (loot == null){ + loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotIron", 1); + } + } + else if (rareLoot <= 7) { + loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("nuggetGold", 1); + if (loot == null){ + loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotGold", 1); + } + } + else if (rareLoot <= 9){ + loot = ItemUtils.getSimpleStack(Items.emerald); } else { loot = ItemUtils.getSimpleStack(Items.diamond); @@ -333,7 +347,7 @@ public class TileEntityFishTrap extends TileEntity implements ISidedInventory { accessibleSides[r]=r; } return accessibleSides; - + } @Override -- cgit From 8a3abd42c21677c2873771868beb09c1487bd448 Mon Sep 17 00:00:00 2001 From: Alkalus Date: Tue, 15 Aug 2017 13:48:36 +1000 Subject: $ Fixed an issue where the Fish Catcher would duplicate one of it's slots visually. $ Fixed Fish Catcher trying to give seaweed loot without Pam's Harvest Craft, it now gives dirt as a fallback. $ Fixed Fish Catcher not giving out all the various Minecraft fish. (Still needs work) --- .../core/container/Container_FishTrap.java | 127 ++++++++------------- src/Java/gtPlusPlus/core/slots/SlotNoInput.java | 4 +- .../tileentities/general/TileEntityFishTrap.java | 84 +++++++++++--- 3 files changed, 118 insertions(+), 97 deletions(-) (limited to 'src/Java/gtPlusPlus/core') diff --git a/src/Java/gtPlusPlus/core/container/Container_FishTrap.java b/src/Java/gtPlusPlus/core/container/Container_FishTrap.java index 46b9a0c523..34cfdf9bf3 100644 --- a/src/Java/gtPlusPlus/core/container/Container_FishTrap.java +++ b/src/Java/gtPlusPlus/core/container/Container_FishTrap.java @@ -21,14 +21,15 @@ public class Container_FishTrap extends Container { private final int posY; private final int posZ; - - public static int StorageSlotNumber = 15; //Number of slots in storage area - public static int InventorySlotNumber = 36; //Inventory Slots (Inventory and Hotbar) - public static int FullSlotNumber = InventorySlotNumber + StorageSlotNumber; //All slots + public static int StorageSlotNumber = 15; // Number of slots in storage area + public static int InventorySlotNumber = 36; // Inventory Slots (Inventory + // and Hotbar) + public static int FullSlotNumber = InventorySlotNumber + StorageSlotNumber; // All + // slots private final int[] slotStorage = new int[15]; - public Container_FishTrap(final InventoryPlayer inventory, final TileEntityFishTrap te){ + public Container_FishTrap(final InventoryPlayer inventory, final TileEntityFishTrap te) { this.tile_entity = te; this.inventoryChest = te.getInventory(); @@ -39,120 +40,87 @@ public class Container_FishTrap extends Container { this.posY = te.yCoord; this.posZ = te.zCoord; - int o=0; + int o = 0; - //Storage Side - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 5; ++var7) - { - //Utils.LOG_WARNING("Adding slots at var:"+(var7 + var6 * 4)+" x:"+(8 + var7 * 18)+" y:"+(7 + var6 * 18)); - this.addSlotToContainer(new SlotNoInput(this.inventoryChest, var7 + (var6 * 4), 36+ 8 + (var7 * 18), 8 + 7 + (var6 * 18))); + // Storage Side + for (var6 = 0; var6 < 3; var6++) { + for (var7 = 0; var7 < 5; var7++) { this.slotStorage[o] = o; - o++; + this.addSlotToContainer(new SlotNoInput(this.inventoryChest, o++, 44 + (var7 * 18), 15 + (var6 * 18))); } } - o=0; - - //Player Inventory - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 9; ++var7) - { + // Player Inventory + for (var6 = 0; var6 < 3; ++var6) { + for (var7 = 0; var7 < 9; ++var7) { this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); } } - //Player Hotbar - for (var6 = 0; var6 < 9; ++var6) - { + // Player Hotbar + for (var6 = 0; var6 < 9; ++var6) { this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); } } @Override - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer){ + public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, + final EntityPlayer aPlayer) { - if (!aPlayer.worldObj.isRemote){ - if ((aSlotIndex == 999) || (aSlotIndex == -999)){ - //Utils.LOG_WARNING("??? - "+aSlotIndex); + if (!aPlayer.worldObj.isRemote) { + if ((aSlotIndex == 999) || (aSlotIndex == -999)) { + // Utils.LOG_WARNING("??? - "+aSlotIndex); } } return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); } - - - - @Override - public void onContainerClosed(final EntityPlayer par1EntityPlayer){ + public void onContainerClosed(final EntityPlayer par1EntityPlayer) { super.onContainerClosed(par1EntityPlayer); } - @Override - public boolean canInteractWith(final EntityPlayer par1EntityPlayer){ - if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockFishTrap){ + public boolean canInteractWith(final EntityPlayer par1EntityPlayer) { + if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockFishTrap) { return false; } return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; } - @Override - public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) - { + public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) { ItemStack var3 = null; - final Slot var4 = (Slot)this.inventorySlots.get(par2); + final Slot var4 = (Slot) this.inventorySlots.get(par2); - if ((var4 != null) && var4.getHasStack()) - { + if ((var4 != null) && var4.getHasStack()) { final ItemStack var5 = var4.getStack(); var3 = var5.copy(); - /*if (par2 == 0) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, true)) - { - return null; - } - - var4.onSlotChange(var5, var3); - } - else if (par2 >= InOutputSlotNumber && par2 < InventoryOutSlotNumber) - { - if (!this.mergeItemStack(var5, InventoryOutSlotNumber, FullSlotNumber, false)) - { - return null; - } - } - else if (par2 >= InventoryOutSlotNumber && par2 < FullSlotNumber) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, InventoryOutSlotNumber, false)) - { - return null; - } - } - else if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, false)) - { - return null; - }*/ - - if (var5.stackSize == 0) - { - var4.putStack((ItemStack)null); - } - else - { + /* + * if (par2 == 0) { if (!this.mergeItemStack(var5, + * InOutputSlotNumber, FullSlotNumber, true)) { return null; } + * + * var4.onSlotChange(var5, var3); } else if (par2 >= + * InOutputSlotNumber && par2 < InventoryOutSlotNumber) { if + * (!this.mergeItemStack(var5, InventoryOutSlotNumber, + * FullSlotNumber, false)) { return null; } } else if (par2 >= + * InventoryOutSlotNumber && par2 < FullSlotNumber) { if + * (!this.mergeItemStack(var5, InOutputSlotNumber, + * InventoryOutSlotNumber, false)) { return null; } } else if + * (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, + * false)) { return null; } + */ + + if (var5.stackSize == 0) { + var4.putStack((ItemStack) null); + } else { var4.onSlotChanged(); } - if (var5.stackSize == var3.stackSize) - { + if (var5.stackSize == var3.stackSize) { return null; } @@ -162,11 +130,10 @@ public class Container_FishTrap extends Container { return var3; } - //Can merge Slot + // Can merge Slot @Override public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { return super.func_94530_a(p_94530_1_, p_94530_2_); } - } \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/slots/SlotNoInput.java b/src/Java/gtPlusPlus/core/slots/SlotNoInput.java index 3177c24868..db0630c4cd 100644 --- a/src/Java/gtPlusPlus/core/slots/SlotNoInput.java +++ b/src/Java/gtPlusPlus/core/slots/SlotNoInput.java @@ -6,8 +6,8 @@ import net.minecraft.item.ItemStack; public class SlotNoInput extends Slot{ - public SlotNoInput(final IInventory inventory, final int x, final int y, final int z) { - super(inventory, x, y, z); + public SlotNoInput(final IInventory inventory, final int index, final int x, final int y) { + super(inventory, index, x, y); } @Override diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java index 5e1bd73a51..c066a27b1f 100644 --- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java +++ b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java @@ -95,19 +95,64 @@ public class TileEntityFishTrap extends TileEntity implements ISidedInventory { int checkingSlot = 0; final ItemStack loot = this.generateLootForFishTrap(); try { + Utils.LOG_INFO("Trying to add "+loot.getDisplayName()+" | "+loot.getItemDamage()); for (final ItemStack contents : this.getInventory().getInventory()) { + if (contents == null) { + Utils.LOG_INFO("Adding Item To Empty Slot. "+(checkingSlot+1)); this.getInventory().setInventorySlotContents(checkingSlot, loot); this.markDirty(); return true; } + else if (contents.getItem() == loot.getItem() && contents.stackSize <= contents.getMaxStackSize() - 1) { if (contents.stackSize < contents.getMaxStackSize()) { - contents.stackSize++; - this.markDirty(); - return true; + if (contents.getHasSubtypes()){ + if (contents.getItemDamage() == loot.getItemDamage()){ + Utils.LOG_INFO("1-Trying to add one more "+loot.getDisplayName()+" to an existing stack of "+contents.getDisplayName()+" with a size of "+contents.stackSize); + contents.stackSize++; + this.markDirty(); + return true; + } + else { + Utils.LOG_INFO("2-Trying to add one more "+loot.getDisplayName()+" to an existing stack of "+contents.getDisplayName()+" with a size of "+contents.stackSize); + // + } + } + else { + Utils.LOG_INFO("3-Trying to add one more "+loot.getDisplayName()+" to an existing stack of "+contents.getDisplayName()+" with a size of "+contents.stackSize); + contents.stackSize++; + this.markDirty(); + return true; + } + } } + + /*if (ItemUtils.simpleMetaStack(loot.getItem(), loot.getItemDamage(), 1) == ItemUtils.simpleMetaStack(contents.getItem(), contents.getItemDamage(), 1)){ + Utils.LOG_INFO("Found Item With Existing Stack & Meta."); + if (contents.stackSize <= contents.getMaxStackSize() - 1){ + Utils.LOG_INFO("Existing stack is not max stack size."); + if (contents.stackSize < contents.getMaxStackSize()) { + Utils.LOG_INFO("Adding Item To partially filled Slot."); + contents.stackSize++; + this.markDirty(); + return true; + } + } + } + else if (contents.getItem() == loot.getItem() && contents.getItemDamage() != loot.getItemDamage()) { + Utils.LOG_INFO("Found Item With Existing Stack & Different Meta."); + if (contents.stackSize <= contents.getMaxStackSize() - 1){ + Utils.LOG_INFO("Existing stack is not max stack size."); + if (contents.stackSize < contents.getMaxStackSize()) { + Utils.LOG_INFO("Adding Item To partially filled Slot."); + contents.stackSize++; + this.markDirty(); + return true; + } + } + }*/ checkingSlot++; } } @@ -130,23 +175,27 @@ public class TileEntityFishTrap extends TileEntity implements ISidedInventory { else if (lootWeight <= 20) { loot = ItemUtils.getSimpleStack(Blocks.sand); } + // Junk Loot else if (lootWeight <= 30) { - loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken(seaweed, 1); + if (LoadedMods.PamsHarvestcraft) { + loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken(seaweed, 1); + } + else { + loot = ItemUtils.getSimpleStack(Blocks.dirt); + } } // Pam Fish - else if (lootWeight <= 60) { - if (LoadedMods.PamsHarvestcraft) { + else if (lootWeight <= 99) { + int lootSwitch = MathUtils.randInt(0, 1); + if (LoadedMods.PamsHarvestcraft && lootSwitch==0) { loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken( prefix + harvestcraftFish[MathUtils.randInt(0, harvestcraftFish.length - 1)] + suffix, 1); } else { - loot = ItemUtils.getSimpleStack(minecraftFish[MathUtils.randInt(0, minecraftFish.length - 1)], 1); + int fishID = MathUtils.randInt(0, minecraftFish.length - 1); + loot = minecraftFish[fishID]; } } - // Minecraft Fish - else if (lootWeight <= 99) { - loot = ItemUtils.getSimpleStack(minecraftFish[MathUtils.randInt(0, minecraftFish.length - 1)], 1); - } else if (lootWeight == 100){ int rareLoot = MathUtils.randInt(1, 10); @@ -172,6 +221,8 @@ public class TileEntityFishTrap extends TileEntity implements ISidedInventory { else { loot = ItemUtils.getSimpleStack(Blocks.diamond_ore); } + loot.stackSize=1; + Utils.LOG_INFO("Adding x"+loot.stackSize+" "+loot.getDisplayName()+"."); return loot; } @@ -230,7 +281,7 @@ public class TileEntityFishTrap extends TileEntity implements ISidedInventory { calculateTickrate = 2000; } else if (this.waterSides == 6) { - calculateTickrate = 900; + calculateTickrate = 100; } this.baseTickRate = calculateTickrate; } @@ -270,9 +321,12 @@ public class TileEntityFishTrap extends TileEntity implements ISidedInventory { "Crayfish", "Eel", "Frog", "Grouper", "Herring", "Jellyfish", "Mudfish", "Octopus", "Perch", "Scallop", "Shrimp", "Snail", "Snapper", "Tilapia", "Trout", "Tuna", "Turtle", "Walleye" }; - private static final ItemStack[] minecraftFish = { ItemUtils.getItemStack("minecraft:fish", 1), - ItemUtils.getItemStack("minecraft:fish:1", 1), ItemUtils.getItemStack("minecraft:fish:2", 1), - ItemUtils.getItemStack("minecraft:fish:3", 1) }; + private static final ItemStack[] minecraftFish = { + ItemUtils.simpleMetaStack(Items.fish, 0, 1).copy(), + ItemUtils.simpleMetaStack(Items.fish, 1, 1).copy(), + ItemUtils.simpleMetaStack(Items.fish, 2, 1).copy(), + ItemUtils.simpleMetaStack(Items.fish, 3, 1).copy() + }; public static void pamsHarvestCraftCompat() { for (int i = 0; i < harvestcraftFish.length; i++) { -- cgit From 045beffe67d1d63f9c7f03c763899f62b53d3ce4 Mon Sep 17 00:00:00 2001 From: Alkalus Date: Mon, 21 Aug 2017 10:36:36 +1000 Subject: % Did some things for GT style Oregen. --- .../core/material/gregtech/CustomGTMaterials.java | 58 +++++ .../util/gregtech/material/MaterialBuilder.java | 254 +++++++++++++++++++++ 2 files changed, 312 insertions(+) create mode 100644 src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java create mode 100644 src/Java/gtPlusPlus/core/util/gregtech/material/MaterialBuilder.java (limited to 'src/Java/gtPlusPlus/core') diff --git a/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java b/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java new file mode 100644 index 0000000000..ca7eb8fb61 --- /dev/null +++ b/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java @@ -0,0 +1,58 @@ +package gtPlusPlus.core.material.gregtech; + +import static gregtech.api.enums.Materials.*; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import gregtech.api.enums.Dyes; +import gregtech.api.enums.Element; +import gregtech.api.enums.Materials; +import gregtech.api.enums.TC_Aspects; +import gregtech.api.enums.TextureSet; +import gregtech.api.objects.MaterialStack; + +public class CustomGTMaterials { + + //public static Materials Fireclay = new MaterialBuilder(626, TextureSet.SET_ROUGH, "Fireclay").addDustItems().setRGB(173, 160, 155).setColor(Dyes.dyeBrown).setMaterialList(new MaterialStack(Brick, 1)).constructMaterial(); + + /**int aMetaItemSubID, + * TextureSet aIconSet, + * float aToolSpeed, + * int aDurability, + * int aToolQuality, + * boolean aUnificatable, + * String aName, String aDefaultLocalName, + * String aConfigSection, + * boolean aCustomOre, + * String aCustomID) { + + **/ + + public static Materials Zirconium = new Materials(1232, TextureSet.SET_METALLIC, 6.0F, 256, 2, 1|2|8|32|64|128, 200, 200, 200, 0, "Zirconium", "Zirconium", 0, 0, 1811, 0, false, false, 3, 1, 1, Dyes.dyeLightGray, Element.Zr, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 3))); + + + public static Materials Geikielite = materialBuilder(1234, TextureSet.SET_SHINY, new int[]{1,2,3}, "Geikielite", Dyes.dyeBlack, Arrays.asList(new MaterialStack(Titanium, 1), new MaterialStack(Magnesium, 1), new MaterialStack(Oxygen, 3))); + public static Materials Zirconolite = materialBuilder(1235, TextureSet.SET_METALLIC, new int[]{1,2,3}, "Zirconolite", Dyes.dyeBlack, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Zirconium, 1), new MaterialStack(Titanium, 2), new MaterialStack(Oxygen, 7))); + + + public final static Materials materialBuilder(int ID, TextureSet texture, int[] rgb, String materialName, Dyes dyeColour, List composition){ + return new Materials( + ID, + texture, + 1.0F, + 0, + 2, + 1 |8 , + rgb[0], rgb[1], rgb[2], 0, + materialName, materialName, + 0, 0, -1, 0, false, false, 3, 1, 1, + dyeColour, + 1, + composition + ); + } + + +} diff --git a/src/Java/gtPlusPlus/core/util/gregtech/material/MaterialBuilder.java b/src/Java/gtPlusPlus/core/util/gregtech/material/MaterialBuilder.java new file mode 100644 index 0000000000..e642258645 --- /dev/null +++ b/src/Java/gtPlusPlus/core/util/gregtech/material/MaterialBuilder.java @@ -0,0 +1,254 @@ +package gtPlusPlus.core.util.gregtech.material; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import gregtech.api.enums.Dyes; +import gregtech.api.enums.Materials; +import gregtech.api.enums.TC_Aspects; +import gregtech.api.enums.TextureSet; +import gregtech.api.objects.MaterialStack; + +public class MaterialBuilder { + public static final int DIESEL = 0, GAS = 1, THERMAL = 2, SEMIFLUID = 3, PLASMA = 4, MAGIC = 5; + + private int metaItemSubID; + private TextureSet iconSet; + private float toolSpeed = 1.0f; + private int durability = 0; + private int toolQuality = 0; + private int types = 0; + private int r = 255, g = 255, b = 255, a = 0; + private String name; + private String defaultLocalName; + private int fuelType = 0; + private int fuelPower = 0; + private int meltingPoint = 0; + private int blastFurnaceTemp = 0; + private boolean blastFurnaceRequired = false; + private boolean transparent = false; + private int oreValue = 1; + private int densityMultiplier = 1; + private int densityDivider = 1; + private Dyes color = Dyes._NULL; + private int extraData = 0; + private List materialList = new ArrayList(); + private List aspects = new ArrayList(); + private boolean canBeCracked = false; + private int liquidTemperature = 300; + private int gasTemperature = 300; + + public MaterialBuilder(int metaItemSubID, TextureSet iconSet, String defaultLocalName) { + this.metaItemSubID = metaItemSubID; + this.iconSet = iconSet; + this.name = defaultLocalName.replace(" ", "").replace("-", ""); + this.defaultLocalName = defaultLocalName; + } + + public Materials constructMaterial() { + return new Materials( + metaItemSubID, iconSet, toolSpeed, durability, toolQuality, types, r, g, b, a, name, defaultLocalName, fuelType, fuelPower, meltingPoint, blastFurnaceTemp, + blastFurnaceRequired, transparent, oreValue, densityMultiplier, densityDivider, color, extraData, materialList, aspects); + + } + + public MaterialBuilder setName(String name){ + this.name = name; + return this; + } + + public MaterialBuilder setTypes(int types){ + this.types = types; + return this; + } + + public MaterialBuilder addDustItems(){ + types = types | 1; + return this; + } + + public MaterialBuilder addMetalItems(){ + types = types | 2; + return this; + } + + public MaterialBuilder addGemItems(){ + types = types | 4; + return this; + } + + public MaterialBuilder addOreItems(){ + types = types | 8; + return this; + } + + public MaterialBuilder addCell(){ + types = types | 16; + return this; + } + + public MaterialBuilder addPlasma(){ + types = types | 32; + return this; + } + + public MaterialBuilder addToolHeadItems(){ + types = types | 64; + return this; + } + + public MaterialBuilder addGearItems(){ + types = types | 128; + return this; + } + + public MaterialBuilder addFluid(){ + return this; + } + + public MaterialBuilder addGas(){ + return this; + } + + + public MaterialBuilder setRGBA(int r, int g, int b, int a){ + this.r = r; + this.g = g; + this.b = b; + this.a = a; + return this; + } + + public MaterialBuilder setRGB(int r, int g, int b){ + this.r = r; + this.g = g; + this.b = b; + return this; + } + + public MaterialBuilder setTransparent(boolean transparent){ + this.transparent = transparent; + return this; + } + + public MaterialBuilder setColor(Dyes color){ + this.color = color; + return this; + } + + + public MaterialBuilder setToolSpeed(float toolSpeed) { + this.toolSpeed = toolSpeed; + return this; + } + + public MaterialBuilder setDurability(int durability) { + this.durability = durability; + return this; + } + + public MaterialBuilder setToolQuality(int toolQuality) { + this.toolQuality = toolQuality; + return this; + } + + + public MaterialBuilder setFuelType(int fuelType) { + this.fuelType = fuelType; + return this; + } + + public MaterialBuilder setFuelPower(int fuelPower) { + this.fuelPower = fuelPower; + return this; + } + + public MaterialBuilder setMeltingPoint(int meltingPoint) { + this.meltingPoint = meltingPoint; + return this; + } + + public MaterialBuilder setBlastFurnaceTemp(int blastFurnaceTemp) { + this.blastFurnaceTemp = blastFurnaceTemp; + return this; + } + + public MaterialBuilder setBlastFurnaceRequired(boolean blastFurnaceRequired) { + this.blastFurnaceRequired = blastFurnaceRequired; + return this; + } + + public MaterialBuilder setOreValue(int oreValue) { + this.oreValue = oreValue; + return this; + } + + public MaterialBuilder setDensityMultiplier(int densityMultiplier) { + this.densityMultiplier = densityMultiplier; + return this; + } + + public MaterialBuilder setDensityDivider(int densityDivider) { + this.densityDivider = densityDivider; + return this; + } + + public MaterialBuilder setExtraData(int extraData) { + this.extraData = extraData; + return this; + } + + public MaterialBuilder addElectrolyzerRecipe(){ + extraData = extraData | 1; + return this; + } + + public MaterialBuilder addCentrifugeRecipe(){ + extraData = extraData | 2; + return this; + } + + public MaterialBuilder setMaterialList(List materialList) { + this.materialList = materialList; + return this; + } + + public MaterialBuilder setMaterialList(MaterialStack ... materials) { + this.materialList = Arrays.asList(materials); + return this; + } + + public MaterialBuilder setAspects(List aspects) { + this.aspects = aspects; + return this; + } + + public int getLiquidTemperature() { + return liquidTemperature; + } + + public MaterialBuilder setLiquidTemperature(int liquidTemperature) { + this.liquidTemperature = liquidTemperature; + return this; + } + + public int getGasTemperature() { + return gasTemperature; + } + + public MaterialBuilder setGasTemperature(int gasTemperature) { + this.gasTemperature = gasTemperature; + return this; + } + + public boolean canBeCracked() { + return canBeCracked; + } + + public MaterialBuilder setCanBeCracked(boolean canBeCracked) { + this.canBeCracked = canBeCracked; + return this; + } + +} \ No newline at end of file -- cgit From 4a73cba607d396ec7bd81bbbc65e3acc48e6100f Mon Sep 17 00:00:00 2001 From: Alkalus Date: Wed, 23 Aug 2017 07:42:13 +1000 Subject: % More work on Internal GT Material Adder. --- .../core/material/gregtech/CustomGTMaterials.java | 41 +++++++++++++++++++--- 1 file changed, 36 insertions(+), 5 deletions(-) (limited to 'src/Java/gtPlusPlus/core') diff --git a/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java b/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java index ca7eb8fb61..2e1882ae57 100644 --- a/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java +++ b/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java @@ -10,7 +10,9 @@ import gregtech.api.enums.Dyes; import gregtech.api.enums.Element; import gregtech.api.enums.Materials; import gregtech.api.enums.TC_Aspects; +import gregtech.api.enums.TC_Aspects.TC_AspectStack; import gregtech.api.enums.TextureSet; +import gregtech.api.interfaces.IMaterialHandler; import gregtech.api.objects.MaterialStack; public class CustomGTMaterials { @@ -30,15 +32,19 @@ public class CustomGTMaterials { **/ - public static Materials Zirconium = new Materials(1232, TextureSet.SET_METALLIC, 6.0F, 256, 2, 1|2|8|32|64|128, 200, 200, 200, 0, "Zirconium", "Zirconium", 0, 0, 1811, 0, false, false, 3, 1, 1, Dyes.dyeLightGray, Element.Zr, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 3))); - + public static List Custom_GT_Materials = new ArrayList(); + public static Materials Zirconium = materialBuilder_Element(1232, TextureSet.SET_METALLIC, 6.0F, 256, 2, 1|2|8|32|64|128, 200, 200, 200, 0, "Zirconium", "Zirconium", 0, 0, 1811, 0, false, false, 3, 1, 1, Dyes.dyeLightGray, Element.Zr, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 3))); public static Materials Geikielite = materialBuilder(1234, TextureSet.SET_SHINY, new int[]{1,2,3}, "Geikielite", Dyes.dyeBlack, Arrays.asList(new MaterialStack(Titanium, 1), new MaterialStack(Magnesium, 1), new MaterialStack(Oxygen, 3))); public static Materials Zirconolite = materialBuilder(1235, TextureSet.SET_METALLIC, new int[]{1,2,3}, "Zirconolite", Dyes.dyeBlack, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Zirconium, 1), new MaterialStack(Titanium, 2), new MaterialStack(Oxygen, 7))); + private final static boolean registerMaterial(Materials r){ + Custom_GT_Materials.add(r); + return true; + } - public final static Materials materialBuilder(int ID, TextureSet texture, int[] rgb, String materialName, Dyes dyeColour, List composition){ - return new Materials( + public final static Materials materialBuilder(int ID, TextureSet texture, int[] rgb, String materialName, Dyes dyeColour, List composition){ + Materials newMat = new Materials( ID, texture, 1.0F, @@ -51,7 +57,32 @@ public class CustomGTMaterials { dyeColour, 1, composition - ); + ); + registerMaterial(newMat); + return newMat; + } + + public final static Materials materialBuilder_Element( + int ID, TextureSet texture, + float a, int b, int c, + int d, int r2, int g2, int b2, int a2, + String materialName, String e, + int f, int g, int h, int i, + boolean j, boolean k, + int l, int m, int n, + Dyes dyeColour, Element o, + List aspects){ + Materials newMat = new Materials( + ID, texture, + a, b, c, + d, r2, g2, b2, a2, + materialName, e, + f, g, h, i, j, k, l, m, n, + dyeColour, o, + aspects + ); + registerMaterial(newMat); + return newMat; } -- cgit From e870a5924f1715a7ccac4242b10eb415dde4b483 Mon Sep 17 00:00:00 2001 From: Alkalus Date: Wed, 23 Aug 2017 08:00:23 +1000 Subject: % Time to start working on the Thorium Reactor again. + Added material logging. --- src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Java/gtPlusPlus/core') diff --git a/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java b/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java index 2e1882ae57..1d8927e87a 100644 --- a/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java +++ b/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java @@ -14,6 +14,7 @@ import gregtech.api.enums.TC_Aspects.TC_AspectStack; import gregtech.api.enums.TextureSet; import gregtech.api.interfaces.IMaterialHandler; import gregtech.api.objects.MaterialStack; +import gtPlusPlus.core.util.Utils; public class CustomGTMaterials { @@ -40,6 +41,7 @@ public class CustomGTMaterials { private final static boolean registerMaterial(Materials r){ Custom_GT_Materials.add(r); + Utils.LOG_INFO("Registered new Gregtech material - "+r.mName); return true; } -- cgit From 98a0ca6df251d7fc1070b1ffb6fa43da950f4280 Mon Sep 17 00:00:00 2001 From: Alkalus Date: Wed, 23 Aug 2017 08:39:36 +1000 Subject: % More Reactor Work. $ None of my items give the radiation de-buff when in creative any more. --- src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Java/gtPlusPlus/core') diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java index 4731581d83..35f1942040 100644 --- a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java +++ b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java @@ -187,7 +187,11 @@ public class BaseItemComponent extends Item{ @Override public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { if (this.componentMaterial != null){ - EntityUtils.applyRadiationDamageToEntity(this.componentMaterial.vRadiationLevel, world, entityHolding); + if (entityHolding instanceof EntityPlayer){ + if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ + EntityUtils.applyRadiationDamageToEntity(this.componentMaterial.vRadiationLevel, world, entityHolding); + } + } } } -- cgit From a39d264c0d3014fea0f73d20618093268420faaa Mon Sep 17 00:00:00 2001 From: Alkalus Date: Wed, 23 Aug 2017 15:24:35 +1000 Subject: + Added LFTR block recipes. + Added LFTR Control Circuit. $ Changed Material logging. Fixes #126. --- src/Java/gtPlusPlus/core/item/ModItems.java | 6 ++ src/Java/gtPlusPlus/core/item/base/CoreItem.java | 20 +++++++ src/Java/gtPlusPlus/core/material/Material.java | 64 +++++++++++----------- .../core/material/gregtech/CustomGTMaterials.java | 6 +- .../core/recipe/RECIPES_MachineComponents.java | 16 ++---- .../gtPlusPlus/core/recipe/RECIPES_Machines.java | 57 +++++++++++++++---- src/Java/gtPlusPlus/core/recipe/common/CI.java | 10 ++++ src/Java/gtPlusPlus/core/util/Utils.java | 4 +- 8 files changed, 127 insertions(+), 56 deletions(-) (limited to 'src/Java/gtPlusPlus/core') diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java index 3a242ea10b..fbfb8ed1fa 100644 --- a/src/Java/gtPlusPlus/core/item/ModItems.java +++ b/src/Java/gtPlusPlus/core/item/ModItems.java @@ -217,6 +217,8 @@ public final class ModItems { public static Item itemCoalCoke; + public static CoreItem itemCircuitLFTR; + @@ -480,6 +482,10 @@ public final class ModItems { dustLi2BeF4 = ItemUtils.generateSpecialUseDusts("Li2BeF4", "Li2BeF4 Fuel Compound", Utils.rgbtoHexValue(255, 255, 255))[0]; //https://en.wikipedia.org/wiki/FLiBe fluidFLiBeSalt = FluidUtils.generateFluid("Li2BeF4", "Li2BeF4", 7430, new short[]{255, 255, 255, 100}); + //LFTR Control Circuit + itemCircuitLFTR = new CoreItem("itemCircuitLFTR", ""+EnumChatFormatting.GREEN+"Thorium Reactor Control Circuit", AddToCreativeTab.tabMisc, 1, 0, "Helps your LFTR not explode", EnumRarity.epic, EnumChatFormatting.GREEN, false, null); + + //Zirconium //Cinter Pellet. itemZirconiumChlorideCinterPellet = new CoreItem("itemZirconiumPellet", "Zirconium Pellet ["+StringUtils.subscript("ZrCl4")+"]", tabMisc).setTextureName(CORE.MODID + ":itemShard"); diff --git a/src/Java/gtPlusPlus/core/item/base/CoreItem.java b/src/Java/gtPlusPlus/core/item/base/CoreItem.java index 62fc5c0160..951d2050f5 100644 --- a/src/Java/gtPlusPlus/core/item/base/CoreItem.java +++ b/src/Java/gtPlusPlus/core/item/base/CoreItem.java @@ -132,6 +132,26 @@ public class CoreItem extends Item GameRegistry.registerItem(this, unlocalizedName); } + //6 + /* + * Name, Tab, Stack, Dmg, Description, Rarity, Text Colour, Effect + */ + public CoreItem(final String unlocalizedName, final String displayName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String description, final EnumRarity regRarity, final EnumChatFormatting colour, final boolean Effect, final ItemStack OverrideItem) + { + this.setUnlocalizedName(unlocalizedName); + this.itemName = displayName; + this.setTextureName(CORE.MODID + ":" + unlocalizedName); + this.setCreativeTab(creativeTab); + this.setMaxStackSize(stackSize); + this.setMaxDamage(maxDmg); + this.rarity = regRarity; + this.itemDescription = description; + this.descColour = colour; + this.hasEffect = Effect; + this.turnsInto = OverrideItem; + GameRegistry.registerItem(this, unlocalizedName); + } + @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java index c7d50c55b2..d4d306d5af 100644 --- a/src/Java/gtPlusPlus/core/material/Material.java +++ b/src/Java/gtPlusPlus/core/material/Material.java @@ -228,11 +228,11 @@ public class Material { this.vChemicalFormula = this.getToolTip(chemicalSymbol, OrePrefixes.dust.mMaterialAmount / M, true); } else if (!this.vChemicalSymbol.equals("")){ - Utils.LOG_MACHINE_INFO("materialInput is null, using a valid chemical symbol."); + Utils.LOG_WARNING("materialInput is null, using a valid chemical symbol."); this.vChemicalFormula = this.vChemicalSymbol; } else{ - Utils.LOG_MACHINE_INFO("MaterialInput == null && chemicalSymbol probably equals nothing"); + Utils.LOG_WARNING("MaterialInput == null && chemicalSymbol probably equals nothing"); this.vChemicalFormula = "??"; } @@ -268,13 +268,13 @@ public class Material { } } - Utils.LOG_MACHINE_INFO("Creating a Material instance for "+materialName); - Utils.LOG_MACHINE_INFO("Formula: "+this.vChemicalFormula + " Smallest Stack: "+this.smallestStackSizeWhenProcessing+" Smallest Ratio:"+ratio); - Utils.LOG_MACHINE_INFO("Protons: "+this.vProtons); - Utils.LOG_MACHINE_INFO("Neutrons: "+this.vNeutrons); - Utils.LOG_MACHINE_INFO("Mass: "+this.vMass+"/units"); - Utils.LOG_MACHINE_INFO("Melting Point: "+this.meltingPointC+"C."); - Utils.LOG_MACHINE_INFO("Boiling Point: "+this.boilingPointC+"C."); + Utils.LOG_WARNING("Creating a Material instance for "+materialName); + Utils.LOG_WARNING("Formula: "+this.vChemicalFormula + " Smallest Stack: "+this.smallestStackSizeWhenProcessing+" Smallest Ratio:"+ratio); + Utils.LOG_WARNING("Protons: "+this.vProtons); + Utils.LOG_WARNING("Neutrons: "+this.vNeutrons); + Utils.LOG_WARNING("Mass: "+this.vMass+"/units"); + Utils.LOG_WARNING("Melting Point: "+this.meltingPointC+"C."); + Utils.LOG_WARNING("Boiling Point: "+this.boilingPointC+"C."); } public final String getLocalizedName(){ @@ -428,21 +428,21 @@ public class Material { if (!this.vMaterialInput.isEmpty()){ final ItemStack[] temp = new ItemStack[this.vMaterialInput.size()]; for (int i=0;i tempInput){ if (tempInput != null){ if (!tempInput.isEmpty()){ - Utils.LOG_MACHINE_INFO("length: "+tempInput.size()); - Utils.LOG_MACHINE_INFO("(inputs != null): "+(tempInput != null)); - //Utils.LOG_MACHINE_INFO("length: "+inputs.length); + Utils.LOG_WARNING("length: "+tempInput.size()); + Utils.LOG_WARNING("(inputs != null): "+(tempInput != null)); + //Utils.LOG_WARNING("length: "+inputs.length); final long[] tempRatio = new long[tempInput.size()]; for (int x=0;x0 ? this.vMaterialInput.size() : 1); - Utils.LOG_MACHINE_INFO("Dividing "+meltingPoint+" / "+divisor+" to get average melting point."); + Utils.LOG_WARNING("Dividing "+meltingPoint+" / "+divisor+" to get average melting point."); meltingPoint = (meltingPoint/divisor); return meltingPoint; } diff --git a/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java b/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java index 1d8927e87a..2b9cec5ff1 100644 --- a/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java +++ b/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java @@ -39,9 +39,13 @@ public class CustomGTMaterials { public static Materials Geikielite = materialBuilder(1234, TextureSet.SET_SHINY, new int[]{1,2,3}, "Geikielite", Dyes.dyeBlack, Arrays.asList(new MaterialStack(Titanium, 1), new MaterialStack(Magnesium, 1), new MaterialStack(Oxygen, 3))); public static Materials Zirconolite = materialBuilder(1235, TextureSet.SET_METALLIC, new int[]{1,2,3}, "Zirconolite", Dyes.dyeBlack, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Zirconium, 1), new MaterialStack(Titanium, 2), new MaterialStack(Oxygen, 7))); + public static final void run(){ + Utils.LOG_INFO("Trying to initialise custom materials."); + } + private final static boolean registerMaterial(Materials r){ Custom_GT_Materials.add(r); - Utils.LOG_INFO("Registered new Gregtech material - "+r.mName); + Utils.LOG_INFO("[Custom] Registered new Gregtech material - "+r.mName); return true; } diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java index c6d03b345b..fb3aa64564 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java @@ -93,10 +93,6 @@ public class RECIPES_MachineComponents { public static String smallGearTier9 = "gearGtSmallOsmium"; public static String smallGearTier10 = "gearGtSmallNeutronium"; - //Crafting Tools - public static String craftingToolWrench = "craftingToolWrench"; - public static String craftingToolScrewdriver = "craftingToolScrewdriver"; - public static final void RECIPES_LOAD(){ Utils.LOG_INFO("Loading Recipes for the Various Circuits and Machine components."); if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ @@ -135,22 +131,22 @@ public class RECIPES_MachineComponents { //Electric Pump RecipeUtils.addShapedGregtechRecipe( cableTier7, rotorTier7, itemRubberRing, - craftingToolScrewdriver, pipeTier7, craftingToolWrench, + CI.craftingToolScrewdriver, pipeTier7, CI.craftingToolWrench, itemRubberRing, CI.electricMotor_LuV, cableTier7, CI.electricPump_LuV); RecipeUtils.addShapedGregtechRecipe( cableTier8, rotorTier8, itemRubberRing, - craftingToolScrewdriver, pipeTier8, craftingToolWrench, + CI.craftingToolScrewdriver, pipeTier8, CI.craftingToolWrench, itemRubberRing, CI.electricMotor_ZPM, cableTier8, CI.electricPump_ZPM); RecipeUtils.addShapedGregtechRecipe( cableTier9, rotorTier9, itemRubberRing, - craftingToolScrewdriver, pipeTier9, craftingToolWrench, + CI.craftingToolScrewdriver, pipeTier9, CI.craftingToolWrench, itemRubberRing, CI.electricMotor_UV, cableTier9, CI.electricPump_UV); RecipeUtils.addShapedGregtechRecipe( cableTier10, rotorTier10, itemRubberRing, - craftingToolScrewdriver, pipeTier10, craftingToolWrench, + CI.craftingToolScrewdriver, pipeTier10, CI.craftingToolWrench, itemRubberRing, CI.electricMotor_MAX, cableTier10, CI.electricPump_MAX); @@ -301,7 +297,7 @@ public class RECIPES_MachineComponents { RecipeUtils.addShapedGregtechRecipe( cableTier0, rotorTier0, itemRubberRing, - craftingToolScrewdriver, pipeTier0, craftingToolWrench, + CI.craftingToolScrewdriver, pipeTier0, CI.craftingToolWrench, itemRubberRing, CI.electricMotor_ULV, cableTier0, CI.electricPump_ULV); @@ -350,7 +346,7 @@ public class RECIPES_MachineComponents { CI.electricMotor_MAX); RecipeUtils.addShapedGregtechRecipe( cableTier10, rotorTier10, itemRubberRing, - craftingToolScrewdriver, pipeTier10, craftingToolWrench, + CI.craftingToolScrewdriver, pipeTier10, CI.craftingToolWrench, itemRubberRing, CI.electricMotor_MAX, cableTier10, CI.electricPump_MAX); RecipeUtils.addShapedGregtechRecipe( diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java index effff15171..1818666e63 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -74,8 +74,13 @@ public class RECIPES_Machines { //Thermal Boiler public static ItemStack RECIPE_ThermalBoilerController; public static ItemStack RECIPE_ThermalBoilerCasing; - - + + //Thorium Reactor + public static ItemStack RECIPE_LFTRController; + public static ItemStack RECIPE_LFTROuterCasing; + public static ItemStack RECIPE_LFTRInnerCasing; + + //Buffer Cores public static ItemStack RECIPE_BufferCore_ULV = ItemUtils.getItemStack("miscutils:item.itemBufferCore1", 1); public static ItemStack RECIPE_BufferCore_LV = ItemUtils.getItemStack("miscutils:item.itemBufferCore2", 1); @@ -222,7 +227,7 @@ public class RECIPES_Machines { private static void runModRecipes(){ if (LoadedMods.Gregtech){ - + //Computer Cube RecipeUtils.addShapedGregtechRecipe( CI.getDataOrb(),ItemList.Cover_Screen.get(1),"circuitMaster", @@ -756,7 +761,7 @@ public class RECIPES_Machines { "plateTitanium",CI.machineHull_EV,"plateTitanium", RECIPE_TesseractTerminal); } - + if (CORE.configSwitches.enableMachine_SimpleWasher){ ItemStack plateWrought = ItemUtils.getItemStackOfAmountFromOreDict("plateWroughtIron", 1); ItemStack washerPipe; @@ -773,7 +778,7 @@ public class RECIPES_Machines { plateWrought, CI.machineCasing_ULV, plateWrought, GregtechItemList.SimpleDustWasher.get(1)); } - + if (CORE.configSwitches.enableMachine_Pollution){ RecipeUtils.addShapedGregtechRecipe( "plateCarbon", "plateCarbon", "plateCarbon", @@ -781,39 +786,67 @@ public class RECIPES_Machines { "plateCarbon", "plateCarbon", "plateCarbon", ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1)); } - + if (CORE.configSwitches.enableMachine_ThermalBoiler){ RECIPE_ThermalBoilerController = GregtechItemList.GT4_Thermal_Boiler.get(1); RECIPE_ThermalBoilerCasing = GregtechItemList.Casing_ThermalContainment.get(4); ItemStack centrifugeHV = ItemList.Machine_HV_Centrifuge.get(1); - + RecipeUtils.addShapedGregtechRecipe( "craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator", "gearTitanium", "circuitElite", "gearTitanium", "craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator", RECIPE_ThermalBoilerController); - + RecipeUtils.addShapedGregtechRecipe( "craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator", "gearTungstenSteel", "circuitElite", "gearTungstenSteel", "craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator", RECIPE_ThermalBoilerController); - + RecipeUtils.addShapedGregtechRecipe( "plateStainlessSteel", "plateStainlessSteel", "plateStainlessSteel", "circuitAdvanced", CI.machineCasing_HV, "circuitAdvanced", "plateStainlessSteel", "plateStainlessSteel", "plateStainlessSteel", RECIPE_ThermalBoilerCasing); - + //Lava Filter Recipe GT_Values.RA.addAssemblerRecipe(ItemUtils.getItemStackWithMeta(LoadedMods.IndustrialCraft2, "IC2:itemPartCarbonMesh", "RawCarbonMesh", 0, 8), GT_Values.NI, ItemUtils.getSimpleStack(ModItems.itemLavaFilter), 80*20, 16); } - + if (CORE.configSwitches.enableMultiblock_LiquidFluorideThoriumReactor){ - } + //Thorium Reactor + RECIPE_LFTRController = GregtechItemList.ThoriumReactor.get(1); + RECIPE_LFTRInnerCasing = GregtechItemList.Casing_Reactor_II.get(1); //Zeron + RECIPE_LFTROuterCasing = GregtechItemList.Casing_Reactor_I.get(1); //Hastelloy + + ItemStack controlCircuit = ItemUtils.getSimpleStack(ModItems.itemCircuitLFTR); + RecipeUtils.addShapedGregtechRecipe( + controlCircuit, "cableGt12NaquadahAlloy", controlCircuit, + "plateDoubleHastelloyN", ItemList.Cover_Screen.get(1), "plateDoubleHastelloyN", + "plateThorium232", CI.machineCasing_UV, "plateThorium232", + RECIPE_LFTRController); + RecipeUtils.addShapedGregtechRecipe( + "plateDoubleZeron100", CI.craftingToolScrewdriver, "plateDoubleZeron100", + "gearTalonite", CI.fieldGenerator_ULV, "gearTalonite", + "plateDoubleZeron100", CI.craftingToolHammer_Hard, "plateDoubleZeron100", + RECIPE_LFTRInnerCasing); + ItemStack IC2HeatPlate = ItemUtils.getCorrectStacktype("IC2:ic2.reactorPlatingHeat", 1); + RecipeUtils.addShapedGregtechRecipe( + "plateDoubleHastelloyN", IC2HeatPlate, "plateDoubleHastelloyN", + IC2HeatPlate, "frameGtHastelloyC276", IC2HeatPlate, + "plateDoubleHastelloyN", IC2HeatPlate, "plateDoubleHastelloyN", + RECIPE_LFTROuterCasing); + + //LFTR Control Circuit + ItemStack circuitT5 = ItemList.Circuit_Master.get(1); + GT_Values.RA.addAssemblerRecipe(circuitT5, CI.fieldGenerator_MV, controlCircuit, 240*20, 240); + + } + } Utils.LOG_INFO("Done loading recipes for the Various machine blocks."); } } \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/recipe/common/CI.java b/src/Java/gtPlusPlus/core/recipe/common/CI.java index 37f9dca0e6..46f7f6e0e9 100644 --- a/src/Java/gtPlusPlus/core/recipe/common/CI.java +++ b/src/Java/gtPlusPlus/core/recipe/common/CI.java @@ -143,6 +143,16 @@ public class CI { public static String[] component_Plate; public static String[] component_Rod; public static String[] component_Ingot; + + //Crafting Tools + public static String craftingToolWrench = "craftingToolWrench"; + public static String craftingToolHammer_Hard = "craftingToolHardHammer"; + public static String craftingToolHammer_Soft = "craftingToolSoftHammer"; + public static String craftingToolScrewdriver = "craftingToolScrewdriver"; + public static String craftingToolFile = "craftingToolFile"; + public static String craftingToolKnife = "craftingToolKnife"; + public static String craftingToolCrowbar = "craftingToolCrowbar"; + public static String craftingToolWireCutter = "craftingToolWirecutter"; public static void Init(){ diff --git a/src/Java/gtPlusPlus/core/util/Utils.java b/src/Java/gtPlusPlus/core/util/Utils.java index 471fcadb62..0653420e5b 100644 --- a/src/Java/gtPlusPlus/core/util/Utils.java +++ b/src/Java/gtPlusPlus/core/util/Utils.java @@ -22,6 +22,7 @@ import gtPlusPlus.core.proxy.ClientProxy; import gtPlusPlus.core.util.fluid.FluidUtils; import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; import ic2.core.Ic2Items; import ic2.core.init.InternalName; import ic2.core.item.resources.ItemCell; @@ -179,7 +180,8 @@ public class Utils { //Non-Dev Comments public static void LOG_MACHINE_INFO(final String s){ if (CORE.configSwitches.MACHINE_INFO || ClientProxy.playerName.toLowerCase().contains("draknyte1")){ - modLogger.info("Machine Info: "+s); + String name1 = gtPlusPlus.core.util.reflect.ReflectionUtils.getMethodName(2); + modLogger.info("Machine Info: "+s+" | "+name1); } } -- cgit From f38f753e2f20dc0748313a9f5b287b15951d6106 Mon Sep 17 00:00:00 2001 From: Alkalus Date: Wed, 23 Aug 2017 15:45:10 +1000 Subject: + Added recipes for Pollution Cleaners/Detector. % Tweaked LFTR related recipes. --- .../core/material/gregtech/CustomGTMaterials.java | 2 +- .../gtPlusPlus/core/recipe/RECIPES_Machines.java | 80 ++++++++++++++++++++-- 2 files changed, 76 insertions(+), 6 deletions(-) (limited to 'src/Java/gtPlusPlus/core') diff --git a/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java b/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java index 2b9cec5ff1..96a4b34d98 100644 --- a/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java +++ b/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java @@ -40,7 +40,7 @@ public class CustomGTMaterials { public static Materials Zirconolite = materialBuilder(1235, TextureSet.SET_METALLIC, new int[]{1,2,3}, "Zirconolite", Dyes.dyeBlack, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Zirconium, 1), new MaterialStack(Titanium, 2), new MaterialStack(Oxygen, 7))); public static final void run(){ - Utils.LOG_INFO("Trying to initialise custom materials."); + Utils.LOG_INFO("[Custom] Trying to initialise custom materials."); } private final static boolean registerMaterial(Materials r){ diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java index 1818666e63..eb58ba3928 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -785,6 +785,76 @@ public class RECIPES_Machines { "dustCarbon", "dustCarbon", "dustCarbon", "plateCarbon", "plateCarbon", "plateCarbon", ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1)); + + //Pollution Detector + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[1], CI.sensor_MV, CI.component_Plate[1], + CI.component_Plate[2], CI.electricMotor_ULV, CI.component_Plate[2], + CI.getTieredCircuit(1), CI.machineHull_LV, CI.getTieredCircuit(0), + GregtechItemList.Pollution_Detector.get(1)); + + //ULV + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[0], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1), CI.component_Plate[0], + CI.component_Plate[0], CI.electricMotor_ULV, CI.component_Plate[0], + CI.getTieredCircuit(0), CI.machineHull_ULV, CI.getTieredCircuit(0), + GregtechItemList.Pollution_Cleaner_ULV.get(1)); + //LV + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[1], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1), CI.component_Plate[1], + CI.component_Plate[1], CI.electricMotor_LV, CI.component_Plate[1], + CI.getTieredCircuit(1), CI.machineHull_LV, CI.getTieredCircuit(1), + GregtechItemList.Pollution_Cleaner_LV.get(1)); + //MV + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[2], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1), CI.component_Plate[2], + CI.component_Plate[2], CI.electricMotor_MV, CI.component_Plate[2], + CI.getTieredCircuit(2), CI.machineHull_MV, CI.getTieredCircuit(2), + GregtechItemList.Pollution_Cleaner_MV.get(1)); + //HV + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[3], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1), CI.component_Plate[3], + CI.component_Plate[3], CI.electricMotor_HV, CI.component_Plate[3], + CI.getTieredCircuit(3), CI.machineHull_HV, CI.getTieredCircuit(3), + GregtechItemList.Pollution_Cleaner_HV.get(1)); + //EV + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[4], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1), CI.component_Plate[4], + CI.component_Plate[4], CI.electricMotor_EV, CI.component_Plate[4], + CI.getTieredCircuit(4), CI.machineHull_EV, CI.getTieredCircuit(4), + GregtechItemList.Pollution_Cleaner_EV.get(1)); + //IV + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[5], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 1, 1), CI.component_Plate[5], + CI.component_Plate[5], CI.electricMotor_IV, CI.component_Plate[5], + CI.getTieredCircuit(5), CI.machineHull_IV, CI.getTieredCircuit(5), + GregtechItemList.Pollution_Cleaner_IV.get(1)); + //LuV + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[6], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 1, 1), CI.component_Plate[6], + CI.component_Plate[6], CI.electricMotor_LuV, CI.component_Plate[6], + CI.getTieredCircuit(6), CI.machineHull_LuV, CI.getTieredCircuit(6), + GregtechItemList.Pollution_Cleaner_LuV.get(1)); + //ZPM + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[7], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 1, 1), CI.component_Plate[7], + CI.component_Plate[7], CI.electricMotor_ZPM, CI.component_Plate[7], + CI.getTieredCircuit(7), CI.machineHull_ZPM, CI.getTieredCircuit(7), + GregtechItemList.Pollution_Cleaner_ZPM.get(1)); + //UV + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[8], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 1, 1), CI.component_Plate[8], + CI.component_Plate[8], CI.electricMotor_UV, CI.component_Plate[8], + CI.getTieredCircuit(8), CI.machineHull_UV, CI.getTieredCircuit(8), + GregtechItemList.Pollution_Cleaner_UV.get(1)); + //MAX + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[9], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 1, 1), CI.component_Plate[9], + CI.component_Plate[9], CI.electricMotor_MAX, CI.component_Plate[9], + CI.getTieredCircuit(9), CI.machineHull_MAX, CI.getTieredCircuit(9), + GregtechItemList.Pollution_Cleaner_MAX.get(1)); + + } if (CORE.configSwitches.enableMachine_ThermalBoiler){ @@ -825,7 +895,7 @@ public class RECIPES_Machines { RecipeUtils.addShapedGregtechRecipe( controlCircuit, "cableGt12NaquadahAlloy", controlCircuit, "plateDoubleHastelloyN", ItemList.Cover_Screen.get(1), "plateDoubleHastelloyN", - "plateThorium232", CI.machineCasing_UV, "plateThorium232", + "plateThorium232", CI.machineHull_UV, "plateThorium232", RECIPE_LFTRController); RecipeUtils.addShapedGregtechRecipe( @@ -834,17 +904,17 @@ public class RECIPES_Machines { "plateDoubleZeron100", CI.craftingToolHammer_Hard, "plateDoubleZeron100", RECIPE_LFTRInnerCasing); - ItemStack IC2HeatPlate = ItemUtils.getCorrectStacktype("IC2:ic2.reactorPlatingHeat", 1); + ItemStack IC2HeatPlate = ItemUtils.getItemStackWithMeta(LoadedMods.IndustrialCraft2, "IC2:itemreactorPlatingHeat", "ReactorHeatPlating", 0, 1); RecipeUtils.addShapedGregtechRecipe( "plateDoubleHastelloyN", IC2HeatPlate, "plateDoubleHastelloyN", IC2HeatPlate, "frameGtHastelloyC276", IC2HeatPlate, "plateDoubleHastelloyN", IC2HeatPlate, "plateDoubleHastelloyN", RECIPE_LFTROuterCasing); - + //LFTR Control Circuit ItemStack circuitT5 = ItemList.Circuit_Master.get(1); - GT_Values.RA.addAssemblerRecipe(circuitT5, CI.fieldGenerator_MV, controlCircuit, 240*20, 240); - + GT_Values.RA.addAssemblerRecipe(circuitT5, CI.fieldGenerator_MV, controlCircuit, 240*20, 500); + } } Utils.LOG_INFO("Done loading recipes for the Various machine blocks."); -- cgit From 434912367696b7a07ba988daac5c5d6e7036425d Mon Sep 17 00:00:00 2001 From: Alkalus Date: Wed, 23 Aug 2017 16:05:21 +1000 Subject: % Tweaked LFTR circuit tooltip colour. $ Fixed LFTR Texture colouring issue. --- src/Java/gtPlusPlus/core/item/ModItems.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Java/gtPlusPlus/core') diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java index fbfb8ed1fa..ec32b0bb9f 100644 --- a/src/Java/gtPlusPlus/core/item/ModItems.java +++ b/src/Java/gtPlusPlus/core/item/ModItems.java @@ -483,7 +483,7 @@ public final class ModItems { fluidFLiBeSalt = FluidUtils.generateFluid("Li2BeF4", "Li2BeF4", 7430, new short[]{255, 255, 255, 100}); //LFTR Control Circuit - itemCircuitLFTR = new CoreItem("itemCircuitLFTR", ""+EnumChatFormatting.GREEN+"Thorium Reactor Control Circuit", AddToCreativeTab.tabMisc, 1, 0, "Helps your LFTR not explode", EnumRarity.epic, EnumChatFormatting.GREEN, false, null); + itemCircuitLFTR = new CoreItem("itemCircuitLFTR", ""+EnumChatFormatting.GREEN+"Thorium Reactor Control Circuit", AddToCreativeTab.tabMisc, 1, 0, "Helps your LFTR not explode", EnumRarity.epic, EnumChatFormatting.DARK_GREEN, false, null); //Zirconium -- cgit