Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Part 2 of Cable Rebalance #1076

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
// Add your dependencies here

dependencies {
api("com.github.GTNewHorizons:GT5-Unofficial:5.09.50.65:dev")
api("com.github.GTNewHorizons:GT5-Unofficial:5.09.50.59:dev")
api("com.github.GTNewHorizons:Yamcl:0.6.0:dev")
api("com.github.GTNewHorizons:Baubles:1.0.4:dev")

implementation("com.github.GTNewHorizons:GTNHLib:0.5.20:dev")
implementation("com.github.GTNewHorizons:GTNHLib:0.5.19:dev")

compileOnly("com.github.GTNewHorizons:AkashicTome:1.1.8:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Avaritia:1.54:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:twilightforest:2.6.35:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:twilightforest:2.6.34:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:GTNH-Intergalactic:1.4.24:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Mantle:0.4.2:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:TinkersConstruct:1.12.13-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:TinkersConstruct:1.12.12-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:WitcheryExtras:1.2.3:dev") { transitive = false }
compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") { transitive = false }
compileOnly rfg.deobf("curse.maven:witchery-69673:2234410")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void registerBlockIcons(IIconRegister aIconRegister) {}
public IIcon getIcon(int aSide, int aMeta) {
switch (aMeta) {
case 0:
return Textures.BlockIcons.MACHINE_CASING_TURBINE_STEEL.getIcon();
return Textures.BlockIcons.MACHINE_CASING_TURBINE.getIcon();
case 1:
return Textures.BlockIcons.MACHINE_CASING_PIPE_STEEL.getIcon();
case 2:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import gregtech.api.gui.modularui.GTUITextures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.CoverableTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.MTEBasicMachine;
import gregtech.api.objects.GTRenderedTexture;
Expand Down Expand Up @@ -59,21 +58,18 @@ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
@Override
public int checkRecipe() {
if (getInputAt(0) == null) return 0;

ItemStack output = getInputAt(0).copy();
NBTTagCompound nbt = output.getTagCompound();
boolean removeName = false, removeDye = false, removeDisassembly = false, removeColor = false,
removeRepair = false, removeSpray = false;

if (nbt != null) {
int circuitSetting = 0;
ItemStack circuit = getInputAt(1);
if (circuit != null && circuit.getItem() instanceof ItemIntegratedCircuit) {
int circuitSetting = 0;
if (circuit != null && circuit.getItem() instanceof ItemIntegratedCircuit)
circuitSetting = circuit.getItemDamage();
}
boolean removeName = false;
boolean removeDisassembly = false;
boolean removeColor = false;
boolean removeRepair = false;
boolean removeDye = false;
boolean removeSpray = false;
boolean removeCovers = false;

switch (circuitSetting) {
case 1:
removeName = true;
Expand All @@ -93,8 +89,6 @@ public int checkRecipe() {
case 6:
removeSpray = true;
break;
case 24:
removeCovers = true;
default:
removeName = true;
removeDisassembly = true;
Expand All @@ -109,35 +103,23 @@ public int checkRecipe() {
nbt.removeTag("display");
}
}
if (removeDisassembly) removeTag(nbt, "GT.CraftingComponents");
if (removeColor) removeTag(nbt, "color");
if (removeRepair) removeTag(nbt, "RepairCost");
if (removeDisassembly && nbt.hasKey("GT.CraftingComponents")) {
nbt.removeTag("GT.CraftingComponents");
}
if (removeColor && nbt.hasKey("color")) {
nbt.removeTag("color");
}
if (removeRepair && nbt.hasKey("RepairCost")) {
nbt.removeTag("RepairCost");
}
if (removeDye && nbt.hasKey("display")) {
nbt.getCompoundTag("display").removeTag("color");
if (nbt.getCompoundTag("display").hasNoTags()) {
nbt.removeTag("display");
}
}
if (removeSpray) removeTag(nbt, "mColor");
removeTag(nbt, "mTargetStackSize"); // MTEBuffer
removeTag(nbt, "mOutputFluid"); // MTEDigitalTankBase
removeTag(nbt, "mVoidOverflow"); // MTEDigitalTankBase & MTEQuantumChest
removeTag(nbt, "mVoidFluidFull"); // MTEDigitalTankBase
removeTag(nbt, "mLockFluid"); // MTEDigitalTankBase
removeTag(nbt, "lockedFluidName"); // MTEDigitalTankBase
removeTag(nbt, "mAllowInputFromOutputSide"); // MTEDigitalTankBase
removeTag(nbt, "mItemsPerSide"); // MTEItemDistributor
removeTag(nbt, "radiusConfig"); // MTEMiner & MTEPump
removeTag(nbt, "mDisallowRetract"); // MTEPump
removeTag(nbt, "mStrongRedstone"); // BaseMetaTileEntity
if (removeCovers) { // BaseMetaTileEntity
removeTag(nbt, "mMuffler");
removeTag(nbt, "mLockUpgrade");
removeTag(nbt, "mCoverSides");
removeTag(nbt, "gt.covers");
for (String key : CoverableTileEntity.COVER_DATA_NBT_KEYS) {
removeTag(nbt, key);
}
if (removeSpray && nbt.hasKey("mColor")) {
nbt.removeTag("mColor");
}
if (nbt.hasNoTags()) {
output.setTagCompound(null);
Expand All @@ -153,16 +135,10 @@ public int checkRecipe() {
return 0;
}

private static void removeTag(NBTTagCompound nbt, String key) {
if (nbt.hasKey(key)) {
nbt.removeTag(key);
}
}

@Override
public String[] getDescription() {
List<String> description = new ArrayList<>();
description.add("Removes various NBT tags as well as covers.");
description.add("Removes various NBT tags.");
description.add(" ");
description.add(UNDERLINE + "First Slot" + RESET);
description.add("The item you want to strip of NBT");
Expand All @@ -174,12 +150,9 @@ public String[] getDescription() {
description.add(BOLD + "Circuit 4:" + RESET + " Remove Anvil repair tag");
description.add(BOLD + "Circuit 5:" + RESET + " Remove Dye from Leather armor");
description.add(BOLD + "Circuit 6:" + RESET + " Remove Spray color from GT items");
description.add(
BOLD + "Circuit 24:"
+ RESET
+ " Remove everything including covers. Be careful you won't recover the covers!");
description.add(" ");
description.add(BOLD + "No Circuit:" + RESET + " Remove everything except covers");
description.add(BOLD + "No Circuit:" + RESET + " Remove all of the above");

return description.toArray(new String[0]);
}

Expand Down
10 changes: 10 additions & 0 deletions src/main/java/com/dreammaster/scripts/ScriptEnderIO.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@ public void loadRecipes() {
.fluidInputs(Materials.EnergeticAlloy.getMolten(144L)).duration(10 * SECONDS).eut(TierEU.RECIPE_HV)
.addTo(assemblerRecipes);

// ME Ultra Dense Conduit
GTValues.RA.stdBuilder()
.itemInputs(
getModItem(EnderIO.ID, "itemMEConduit", 16, 1),
GTOreDictUnificator.get(OrePrefixes.circuit, Materials.EV, 1L),
circuit2)
.itemOutputs(getModItem(EnderIO.ID, "itemMEConduit", 4, 2))
.fluidInputs(Materials.VibrantAlloy.getMolten(144L)).duration(10 * SECONDS).eut(960)
.addTo(assemblerRecipes);

ExtremeCraftingManager.getInstance().addExtremeShapedOreRecipe(
createItemStack(
EnderIO.ID,
Expand Down