Compare commits

...
10 Commits
Author SHA1 Message Date
DreamMasterXXL 023ce67a09 bump version 2021-10-16 21:40:36 +02:00
Martin Robertz b895140eaa Merge pull request #24 from greesyB/master
Stack ignis solar multipliers
2021-10-15 16:18:00 +02:00
greesyB f5010bcdf9 stack ignis solar multipliers 2021-10-14 14:01:07 -05:00
Martin Robertz fca0feb92a Merge pull request #23 from GTNewHorizons/fix-dupe
change the blacklist into whitelist.
2021-08-17 16:30:20 +02:00
GlodBlock ba203f4a57 use lower camel name style 2021-08-17 16:30:48 +08:00
GlodBlock f1c08b6f5f small changes to variable name 2021-08-17 10:43:34 +08:00
GlodBlock 49652c32e5 enable the config 2021-08-15 10:07:12 +08:00
GlodBlock 2a98bb16ff add config for whitelist 2021-08-15 10:05:54 +08:00
GlodBlock 301cdce23c remove unused imports 2021-08-10 22:54:40 +08:00
GlodBlock 708b3bcae1 change the blacklist into whitelist. 2021-08-10 22:50:47 +08:00
4 changed files with 25 additions and 24 deletions

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
package_group=emt
mc_version=1.7.10
forge_version=10.13.4.1614
mod_version=1.2.8.3
mod_version=1.2.8.4
mod_name=ElectroMagicTools
@@ -2,13 +2,9 @@ package emt.tile;
import emt.init.EMTBlocks;
import emt.util.EMTConfigHandler;
import ic2.api.item.IC2Items;
import ic2.api.tile.IWrenchable;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.nbt.NBTTagCompound;
@@ -118,7 +114,7 @@ public class TileEntityEtherealMacerator extends TileEntityEMT implements ISided
}
public void updateEntity() {
if (this.canSmelt() && isOverLimit(1) == false && isOverLimit(2) == false && isOP() == false) {
if (this.canSmelt() && !isOverLimit(1) && !isOverLimit(2) && isAllowed()) {
++this.cookTime;
this.isOn = true;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
@@ -226,18 +222,17 @@ public class TileEntityEtherealMacerator extends TileEntityEMT implements ISided
}
}
public boolean isOP() {
final int cobblestoneId = OreDictionary.getOreID("blockCobble");
public boolean isAllowed() {
if (OreDictionary.getOreID(this.slots[0]) == cobblestoneId || this.slots[0].getItem() == Item.getItemFromBlock(Blocks.sand) || this.slots[0].getItem() == Items.potato || this.slots[0].getItem() == Items.porkchop || this.slots[0].getItem() == Items.beef || this.slots[0].getItem() == Items.chicken || this.slots[0].getItem() == Items.fish
|| this.slots[0].getItem() == IC2Items.getItem("coalDust").getItem()
|| (OreDictionary.getOreName(OreDictionary.getOreID(this.slots[0])).toLowerCase().contains("dust") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("armour") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("armor") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("helm")
|| this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("legging") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("boot") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("chestp") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("pick")
|| this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("shovel") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("axe") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("pick"))) {
return true;
} else {
return false;
int[] oreDictIDs = OreDictionary.getOreIDs(this.slots[0]);
for (int oreDictID : oreDictIDs) {
String tName = OreDictionary.getOreName(oreDictID);
for (String allowed : EMTConfigHandler.etherealMaceratorWhiteList) {
if (tName.indexOf(allowed) == 0) return true;
}
}
return false;
}
@Override
@@ -118,10 +118,10 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
return 2F;
}
case AER:
case TERRA:
case IGNIS: {
case TERRA: {
return 3F;
}
case IGNIS:
case AQUA: {
return 6F;
}
@@ -169,12 +169,14 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
return 1F;
}
case IGNIS: {
float mult = 1F;
if (VisNetHandler.drainVis(worldObj, xCoord, yCoord, zCoord, Aspect.FIRE, 10) >= 10)
return 3F;
else if (this.worldObj.provider.dimensionId == (-1))
return 2F;
else
return 1F;
mult *= 3F;
if (this.worldObj.provider.dimensionId == (-1))
mult *= 2F;
return mult;
}
default:
return 1f;
+5 -1
View File
@@ -5,6 +5,9 @@ import gregtech.api.enums.GT_Values;
import net.minecraftforge.common.config.Configuration;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* TODO: Need to rewrite...
@@ -72,6 +75,7 @@ public class EMTConfigHandler {
public static boolean smoke;
public static boolean oneRingSpawn;
public static boolean removeAmberAndCinnabarMacerating;
public static List<String> etherealMaceratorWhiteList = new ArrayList<>();
/**
* Loot chance
@@ -156,6 +160,7 @@ public class EMTConfigHandler {
chanceOneRing = config.get(RANDOM, "One Ring spawning chance", 15, "If you have a lot of mods adding dungeon loot, you should definetely increase this").getInt();
removeAmberAndCinnabarMacerating = config.get(RANDOM, "Clear Amber/Cinnabar Macerating", true, "This is here because of conflicts between mods that add the same input and different outputs").getBoolean(removeAmberAndCinnabarMacerating);
impactOfRain = config.get(RANDOM, "Impact of rain", true, "The impact of rain on all wings").getBoolean(impactOfRain);
etherealMaceratorWhiteList.addAll(Arrays.asList(config.get(RANDOM, "White List for Ethereal Processor", new String[]{"ore", "cluster"}, "The allowed ore dictionary prefix for Ethereal Processor.").getStringList()));
// DEFAULTS - Aer - 15,000 Aqua - 5,000 Ignis - 20,000 Ordo - 16,000 Perditio - 10,000 Terra - 2,000
airOutput = config.get(OUTPUTS, "Aer Output", 15000).getDouble(airOutput);
@@ -190,7 +195,6 @@ public class EMTConfigHandler {
inventoryBaubleProdution = config.get(VALUES, "Inventory Charging Ring production", 32, "Default is 32").getInt();
wandChargeFocusCost = config.get(VALUES, "Wand Focus: Wand Charging Cost", 40000, "Default is 40000").getInt();
nanoBootsMinDrop = config.get(VALUES, "Nano Boots of the Traveller minimum drop", 6.0, "The distance allowed to fall without any damage").getDouble(nanoBootsMinDrop);
nanoBootsMaxDrop = config.get(VALUES, "Nano Boots of the Traveller maximum healthy drop", 35.0, "Energy amount drained will tripled if player drops more than this amount of blocks").getDouble(nanoBootsMaxDrop);
quantumBootsMinDrop = config.get(VALUES, "Quantum Boots of the Traveller minimum drop", 10.0, "The distance allowed to fall without any damage").getDouble(quantumBootsMinDrop);