mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-17 19:25:02 +00:00
update Thermal expansion to new alpha/beta/the latest one
This commit is contained in:
1 parent
f024a39179
commit
24b41792d0
4 files changed
+12
-44
No files matched your search
@@ -1,8 +1,10 @@
|
||||
package modtweaker2;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.player.IPlayer;
|
||||
import minetweaker.api.server.ICommandFunction;
|
||||
import minetweaker.mc1710.MineTweakerMod;
|
||||
import modtweaker2.commands.EntityMappingLogger;
|
||||
import modtweaker2.mods.botania.commands.BotaniaBrewLogger;
|
||||
import modtweaker2.mods.botania.commands.BotaniaOrechidLogger;
|
||||
@@ -19,6 +21,7 @@ import modtweaker2.mods.thaumcraft.research.commands.ResearchLogger;
|
||||
import modtweaker2.util.TweakerPlugin;
|
||||
|
||||
public class Commands {
|
||||
|
||||
public static void registerCommands() {
|
||||
|
||||
registerMineTweakerCommand("tooltips", new String[] { "/minetweaker tooltips", " Adds tooltips to all items ingame with their mt script name, press ctrl on an item to print to the log" }, new ICommandFunction() {
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
package modtweaker2;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.event.entity.living.LivingDropsEvent;
|
||||
|
||||
import org.apache.commons.lang3.tuple.MutablePair;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
public class TweakEventHandler {
|
||||
|
||||
public static ArrayList<MutablePair<EntityLivingBase, ArrayList<ItemStack>>> drops = new ArrayList<MutablePair<EntityLivingBase, ArrayList<ItemStack>>>();
|
||||
public static ArrayList<EntityLiving> cancleDrops = new ArrayList<EntityLiving>();
|
||||
|
||||
@SubscribeEvent
|
||||
public void handleDrops(LivingDropsEvent event) {
|
||||
if (cancleDrops.contains(event.entityLiving)) {
|
||||
event.setCanceled(true);
|
||||
}
|
||||
for (MutablePair<EntityLivingBase, ArrayList<ItemStack>> ent : drops) {
|
||||
if (ent.left.isEntityEqual(event.entityLiving)) {
|
||||
for (ItemStack stack : ent.right) {
|
||||
event.drops.add(new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, stack));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -26,16 +26,16 @@ public class ThermalHelper {
|
||||
|
||||
static {
|
||||
try {
|
||||
smelterRecipe = getConstructor("thermalexpansion.util.crafting.SmelterManager$RecipeSmelter", ItemStack.class, ItemStack.class, ItemStack.class, ItemStack.class, int.class, int.class);
|
||||
transposerRecipe = getConstructor("thermalexpansion.util.crafting.TransposerManager$RecipeTransposer", ItemStack.class, ItemStack.class, FluidStack.class, int.class, int.class);
|
||||
smelterRecipe = getConstructor("cofh.thermalexpansion.util.crafting.SmelterManager$RecipeSmelter", ItemStack.class, ItemStack.class, ItemStack.class, ItemStack.class, int.class, int.class);
|
||||
transposerRecipe = getConstructor("cofh.thermalexpansion.util.crafting.TransposerManager$RecipeTransposer", ItemStack.class, ItemStack.class, FluidStack.class, int.class, int.class);
|
||||
} catch (Exception e) {}
|
||||
}
|
||||
|
||||
/** Need to perform this reflection on the fly as the map is ALWAYS changing, thanks to the way that te handles stuff */
|
||||
public static Map<List, RecipeSmelter> getSmelterMap() {
|
||||
try {
|
||||
smelter = getStaticObject(Class.forName("thermalexpansion.util.crafting.SmelterManager"), "recipeMap");
|
||||
smelterValid = getStaticObject(Class.forName("thermalexpansion.util.crafting.SmelterManager"), "validationSet");
|
||||
smelter = getStaticObject(Class.forName("cofh.thermalexpansion.util.crafting.SmelterManager"), "recipeMap");
|
||||
smelterValid = getStaticObject(Class.forName("cofh.thermalexpansion.util.crafting.SmelterManager"), "validationSet");
|
||||
} catch (Exception e) {}
|
||||
|
||||
return smelter;
|
||||
@@ -43,8 +43,8 @@ public class ThermalHelper {
|
||||
|
||||
public static Map<List, RecipeTransposer> getFillMap() {
|
||||
try {
|
||||
transposerFill = getStaticObject(Class.forName("thermalexpansion.util.crafting.TransposerManager"), "recipeMapFill");
|
||||
transposerValid = getStaticObject(Class.forName("thermalexpansion.util.crafting.TransposerManager"), "validationSet");
|
||||
transposerFill = getStaticObject(Class.forName("cofh.thermalexpansion.util.crafting.TransposerManager"), "recipeMapFill");
|
||||
transposerValid = getStaticObject(Class.forName("cofh.thermalexpansion.util.crafting.TransposerManager"), "validationSet");
|
||||
} catch (Exception e) {}
|
||||
|
||||
return transposerFill;
|
||||
@@ -52,8 +52,8 @@ public class ThermalHelper {
|
||||
|
||||
public static Map<ComparableItemStackSafe, RecipeTransposer> getExtractMap() {
|
||||
try {
|
||||
transposerEmpty = getStaticObject(Class.forName("thermalexpansion.util.crafting.TransposerManager"), "recipeMapExtraction");
|
||||
transposerValid = getStaticObject(Class.forName("thermalexpansion.util.crafting.TransposerManager"), "validationSet");
|
||||
transposerEmpty = getStaticObject(Class.forName("cofh.thermalexpansion.util.crafting.TransposerManager"), "recipeMapExtraction");
|
||||
transposerValid = getStaticObject(Class.forName("cofh.thermalexpansion.util.crafting.TransposerManager"), "validationSet");
|
||||
} catch (Exception e) {}
|
||||
|
||||
return transposerEmpty;
|
||||
@@ -61,7 +61,7 @@ public class ThermalHelper {
|
||||
|
||||
public static boolean removeCrucibleRecipe(ItemStack input) {
|
||||
try {
|
||||
crucible = getStaticObject(Class.forName("thermalexpansion.util.crafting.CrucibleManager"), "recipeMap");
|
||||
crucible = getStaticObject(Class.forName("cofh.thermalexpansion.util.crafting.CrucibleManager"), "recipeMap");
|
||||
} catch (Exception e) {}
|
||||
|
||||
return crucible.remove(new ComparableItemStackSafe(input)) != null;
|
||||
|
||||
Reference in new issue
Block a user