Fixed more issues
This commit is contained in:
parent
e9562e37cb
commit
59b8ecc271
|
@ -50,10 +50,6 @@ import org.apache.logging.log4j.Level;
|
|||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import thaumcraft.api.ItemApi;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
|
@ -287,7 +283,6 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock;
|
|||
import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiHandler;
|
||||
import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration;
|
||||
|
||||
|
||||
@Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v1.3.3", guiFactory = "WayofTime.alchemicalWizardry.client.gui.ConfigGuiFactory")
|
||||
|
@ -1149,39 +1144,39 @@ public class AlchemicalWizardry
|
|||
GameRegistry.registerItem(ModItems.sanguinePants, "sanguinePants");
|
||||
GameRegistry.registerItem(ModItems.sanguineBoots, "sanguineBoots");
|
||||
|
||||
ItemStack itemGoggles = ItemApi.getItem("itemGoggles", 0);
|
||||
Item itemThaumChest = GameRegistry.findItem("Thaumcraft", "ItemChestplateThaumium");
|
||||
Item itemThaumLeggings = GameRegistry.findItem("Thaumcraft", "ItemLeggingsThaumium");
|
||||
Item itemThaumBoots = GameRegistry.findItem("Thaumcraft", "ItemBootsThaumium");
|
||||
|
||||
AspectList aspectList = new AspectList();
|
||||
aspectList.add(Aspect.ARMOR, 5).add(Aspect.MAGIC, 5);
|
||||
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguineHelmet), aspectList);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguineRobe), aspectList);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguinePants), aspectList);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguineBoots), aspectList);
|
||||
|
||||
|
||||
if (itemGoggles != null)
|
||||
{
|
||||
BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineHelmet), itemGoggles);
|
||||
}
|
||||
|
||||
if (itemThaumChest != null)
|
||||
{
|
||||
BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineRobe), new ItemStack(itemThaumChest));
|
||||
}
|
||||
|
||||
if (itemThaumLeggings != null)
|
||||
{
|
||||
BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguinePants), new ItemStack(itemThaumLeggings));
|
||||
}
|
||||
|
||||
if (itemThaumBoots != null)
|
||||
{
|
||||
BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineBoots), new ItemStack(itemThaumBoots));
|
||||
}
|
||||
// ItemStack itemGoggles = ItemApi.getItem("itemGoggles", 0);
|
||||
// Item itemThaumChest = GameRegistry.findItem("Thaumcraft", "ItemChestplateThaumium");
|
||||
// Item itemThaumLeggings = GameRegistry.findItem("Thaumcraft", "ItemLeggingsThaumium");
|
||||
// Item itemThaumBoots = GameRegistry.findItem("Thaumcraft", "ItemBootsThaumium");
|
||||
//
|
||||
// AspectList aspectList = new AspectList();
|
||||
// aspectList.add(Aspect.ARMOR, 5).add(Aspect.MAGIC, 5);
|
||||
//
|
||||
// ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguineHelmet), aspectList);
|
||||
// ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguineRobe), aspectList);
|
||||
// ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguinePants), aspectList);
|
||||
// ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguineBoots), aspectList);
|
||||
//
|
||||
//
|
||||
// if (itemGoggles != null)
|
||||
// {
|
||||
// BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineHelmet), itemGoggles);
|
||||
// }
|
||||
//
|
||||
// if (itemThaumChest != null)
|
||||
// {
|
||||
// BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineRobe), new ItemStack(itemThaumChest));
|
||||
// }
|
||||
//
|
||||
// if (itemThaumLeggings != null)
|
||||
// {
|
||||
// BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguinePants), new ItemStack(itemThaumLeggings));
|
||||
// }
|
||||
//
|
||||
// if (itemThaumBoots != null)
|
||||
// {
|
||||
// BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineBoots), new ItemStack(itemThaumBoots));
|
||||
// }
|
||||
|
||||
//LogHelper.log(Level.INFO, "Loaded RP2 World addon");
|
||||
} catch (Exception e)
|
||||
|
@ -1231,11 +1226,11 @@ public class AlchemicalWizardry
|
|||
AlchemicalWizardry.logger.info("Loaded Harvestcraft Handlers!");
|
||||
}
|
||||
|
||||
if(Loader.isModLoaded("MineTweaker3"))
|
||||
{
|
||||
MineTweakerIntegration.register();
|
||||
AlchemicalWizardry.logger.info("Loaded MineTweaker 3 Integration");
|
||||
}
|
||||
// if(Loader.isModLoaded("MineTweaker3"))
|
||||
// {
|
||||
// MineTweakerIntegration.register();
|
||||
// AlchemicalWizardry.logger.info("Loaded MineTweaker 3 Integration");
|
||||
// }
|
||||
|
||||
// if(Loader.isModLoaded("AgriCraft"))
|
||||
// {
|
||||
|
@ -1264,7 +1259,7 @@ public class AlchemicalWizardry
|
|||
@Optional.Method(modid = "guideapi")
|
||||
public static void registerBMBook()
|
||||
{
|
||||
BloodMagicGuide.registerGuide();
|
||||
// BloodMagicGuide.registerGuide();
|
||||
}
|
||||
|
||||
public static void blacklistAccelerators()
|
||||
|
|
|
@ -9,6 +9,8 @@ import java.util.Map.Entry;
|
|||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
||||
import WayofTime.alchemicalWizardry.client.renderer.ColourThreshold;
|
||||
import WayofTime.alchemicalWizardry.client.renderer.RenderHelper;
|
||||
|
@ -16,8 +18,6 @@ import WayofTime.alchemicalWizardry.common.demonVillage.DemonVillagePath;
|
|||
import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal;
|
||||
import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
|
|
|
@ -1,11 +1,53 @@
|
|||
package WayofTime.alchemicalWizardry;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.items.*;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool;
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.AWBaseItems;
|
||||
import WayofTime.alchemicalWizardry.common.items.ActivationCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.items.AirScribeTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.ApprenticeBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.common.items.ArchmageBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.common.items.ArmourInhibitor;
|
||||
import WayofTime.alchemicalWizardry.common.items.BlankSpell;
|
||||
import WayofTime.alchemicalWizardry.common.items.BloodShard;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundAxe;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundPickaxe;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundShovel;
|
||||
import WayofTime.alchemicalWizardry.common.items.CheatyItem;
|
||||
import WayofTime.alchemicalWizardry.common.items.CreativeDagger;
|
||||
import WayofTime.alchemicalWizardry.common.items.DaggerOfSacrifice;
|
||||
import WayofTime.alchemicalWizardry.common.items.DawnScribeTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.DemonPlacer;
|
||||
import WayofTime.alchemicalWizardry.common.items.DemonicTelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.items.DuskScribeTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.EarthScribeTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBazooka;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBlast;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergySword;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnhancedTelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.items.FireScribeTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemAlchemyBase;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemBloodLetterPack;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemComplexSpellCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemComponents;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemDiabloKey;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemIncense;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemRitualDismantler;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner;
|
||||
import WayofTime.alchemicalWizardry.common.items.LavaCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.items.LifeBucket;
|
||||
import WayofTime.alchemicalWizardry.common.items.MagicianBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.common.items.MasterBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.common.items.ReinforcedTelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.items.SacrificialDagger;
|
||||
import WayofTime.alchemicalWizardry.common.items.TelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.items.TranscendentBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.common.items.WaterScribeTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour;
|
||||
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourEarth;
|
||||
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourFire;
|
||||
|
@ -51,7 +93,6 @@ import WayofTime.alchemicalWizardry.common.items.sigil.SigilSeer;
|
|||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilVoid;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilWater;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.holding.SigilOfHolding;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.api;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public class RoutingFocusPosAndFacing
|
||||
{
|
||||
public Int3 location;
|
||||
public ForgeDirection facing;
|
||||
public EnumFacing facing;
|
||||
|
||||
public RoutingFocusPosAndFacing(Int3 location, ForgeDirection facing)
|
||||
public RoutingFocusPosAndFacing(Int3 location, EnumFacing facing)
|
||||
{
|
||||
this.location = location;
|
||||
this.facing = facing;
|
||||
|
|
|
@ -2,7 +2,7 @@ package WayofTime.alchemicalWizardry.api.event;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
|
||||
@Cancelable
|
||||
public class ItemDrainNetworkEvent extends PlayerDrainNetworkEvent
|
||||
|
|
|
@ -2,7 +2,7 @@ package WayofTime.alchemicalWizardry.api.event;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
|
||||
@Cancelable
|
||||
public class PlayerAddToNetworkEvent extends AddToNetworkEvent
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.api.event;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
|
||||
@Cancelable
|
||||
public class PlayerDrainNetworkEvent extends SoulNetworkEvent
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.api.event;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
@Cancelable
|
||||
public class SacrificeKnifeUsedEvent extends Event
|
||||
|
|
|
@ -9,7 +9,6 @@ import java.util.Set;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
|
@ -25,7 +24,6 @@ import net.minecraft.util.MovingObjectPosition;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellEffect;
|
||||
|
|
|
@ -19,10 +19,10 @@ import net.minecraft.util.MathHelper;
|
|||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class APISpellHelper
|
||||
{
|
||||
|
|
|
@ -22,8 +22,8 @@ import net.minecraft.util.MovingObjectPosition;
|
|||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class EntitySpellProjectile extends Entity implements IProjectile
|
||||
{
|
||||
|
|
|
@ -42,7 +42,6 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
|||
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import vazkii.botania.api.internal.IManaBurst;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.BloodMagicConfiguration;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
|
@ -817,11 +816,11 @@ public class AlchemicalWizardryEventHooks
|
|||
@Optional.Method(modid = "Botania")
|
||||
private boolean isManaBurst(Entity entity)
|
||||
{
|
||||
if(entity instanceof IManaBurst) {
|
||||
ItemStack lens = ((IManaBurst)entity).getSourceLens();
|
||||
return !(lens.getItemDamage()!=8 && lens.getItemDamage()!=11);
|
||||
}
|
||||
else
|
||||
// if(entity instanceof IManaBurst) {
|
||||
// ItemStack lens = ((IManaBurst)entity).getSourceLens();
|
||||
// return !(lens.getItemDamage()!=8 && lens.getItemDamage()!=11);
|
||||
// }
|
||||
// else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
||||
public class ClientToServerPacketHandler
|
||||
{
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.registry.EntityRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.spell.EntitySpellProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.BookEntityItem;
|
||||
|
@ -22,8 +24,6 @@ import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile;
|
|||
import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class CommonProxy
|
||||
{
|
||||
|
|
|
@ -3,10 +3,10 @@ package WayofTime.alchemicalWizardry.common;
|
|||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
|
||||
public class MessageKeyPressed implements IMessage, IMessageHandler<MessageKeyPressed, IMessage>
|
||||
{
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraftforge.event.entity.living.LivingDropsEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
|
||||
public class ModLivingDropsEvent
|
||||
{
|
||||
|
|
|
@ -19,6 +19,13 @@ import net.minecraft.util.BlockPos;
|
|||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.network.FMLEmbeddedChannel;
|
||||
import net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec;
|
||||
import net.minecraftforge.fml.common.network.FMLOutboundHandler;
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.ColourAndCoords;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
|
@ -33,13 +40,6 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
|
|||
import WayofTime.alchemicalWizardry.common.tileEntity.TESocket;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.network.FMLEmbeddedChannel;
|
||||
import cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec;
|
||||
import cpw.mods.fml.common.network.FMLOutboundHandler;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public enum NewPacketHandler
|
||||
{
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.achievements;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.PlayerEvent;
|
||||
|
||||
public class AchievementTrigger
|
||||
{
|
||||
|
|
|
@ -3,8 +3,8 @@ package WayofTime.alchemicalWizardry.common.achievements;
|
|||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.common.AchievementPage;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
|
||||
public class ModAchievements
|
||||
{
|
||||
|
|
|
@ -17,13 +17,13 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry.UniqueIdentifier;
|
||||
import WayofTime.alchemicalWizardry.api.Int3;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.loot.DemonVillageLootRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.IBlockPortalNode;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.ITilePortalNode;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier;
|
||||
|
||||
public class BlockSet
|
||||
{
|
||||
|
|
|
@ -20,10 +20,10 @@ import net.minecraft.util.BlockPos;
|
|||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class EntityElemental extends EntityDemon
|
||||
{
|
||||
|
|
|
@ -5,8 +5,8 @@ import net.minecraft.entity.effect.EntityLightningBolt;
|
|||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.Optional;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
|
||||
public class MailOrderEntityItem extends EntityItem
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ package WayofTime.alchemicalWizardry.common.renderer.model;
|
|||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public class ModelConduit extends ModelBase
|
||||
{
|
||||
|
@ -147,7 +147,7 @@ public class ModelConduit extends ModelBase
|
|||
setRotation(spacer8, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output)
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, EnumFacing input, EnumFacing output)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class RitualEffectApiaryOverclock extends RitualEffect
|
||||
{
|
||||
|
|
|
@ -2,8 +2,8 @@ package WayofTime.alchemicalWizardry.common.routing;
|
|||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.registry.GameData;
|
||||
import WayofTime.alchemicalWizardry.api.RoutingFocusLogic;
|
||||
import cpw.mods.fml.common.registry.GameData;
|
||||
|
||||
public class RoutingFocusLogicModItems extends RoutingFocusLogic
|
||||
{
|
||||
|
|
|
@ -43,6 +43,7 @@ import net.minecraft.world.World;
|
|||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import net.minecraftforge.fluids.IFluidBlock;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles;
|
||||
|
@ -52,7 +53,6 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
|||
import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilDivination;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
|
||||
public class SpellHelper extends APISpellHelper
|
||||
{
|
||||
|
|
|
@ -19,6 +19,7 @@ import net.minecraftforge.fml.common.FMLCommonHandler;
|
|||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||
import net.minecraftforge.fml.relauncher.FMLInjectionData;
|
||||
|
||||
public class GAPIChecker
|
||||
{
|
||||
|
@ -34,7 +35,7 @@ public class GAPIChecker
|
|||
public void init()
|
||||
{
|
||||
FMLCommonHandler.instance().bus().register(this);
|
||||
File mcDir = (File)cpw.mods.fml.relauncher.FMLInjectionData.data()[6];
|
||||
File mcDir = (File)FMLInjectionData.data()[6];
|
||||
|
||||
this.modsDir = new File(mcDir, "mods");
|
||||
|
||||
|
|
|
@ -19,6 +19,8 @@ import net.minecraft.util.BlockPos;
|
|||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import WayofTime.alchemicalWizardry.api.ColourAndCoords;
|
||||
import WayofTime.alchemicalWizardry.api.Int3;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler;
|
||||
|
@ -29,8 +31,6 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
|||
import WayofTime.alchemicalWizardry.api.alchemy.energy.TileSegmentedReagentHandler;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityParticleBeam;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class TEReagentConduit extends TileSegmentedReagentHandler implements IUpdatePlayerListBox
|
||||
{
|
||||
|
|
|
@ -1,131 +1,126 @@
|
|||
package WayofTime.alchemicalWizardry.common.tweaker;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack;
|
||||
import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStacks;
|
||||
import minetweaker.IUndoableAction;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
|
||||
/**
|
||||
* MineTweaker3 Alchemy Recipe Handler by joshie *
|
||||
*/
|
||||
@ZenClass("mods.bloodmagic.Alchemy")
|
||||
public class Alchemy
|
||||
{
|
||||
@ZenMethod
|
||||
public static void addRecipe(IItemStack output, IItemStack[] input, int tier, int lp) {
|
||||
MineTweakerAPI.apply(new Add(new AlchemyRecipe(toStack(output), (int) (((double) lp) / 100), toStacks(input), tier)));
|
||||
}
|
||||
|
||||
private static class Add implements IUndoableAction
|
||||
{
|
||||
private final AlchemyRecipe recipe;
|
||||
|
||||
public Add(AlchemyRecipe recipe)
|
||||
{
|
||||
this.recipe = recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
AlchemyRecipeRegistry.recipes.add(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo()
|
||||
{
|
||||
return AlchemyRecipeRegistry.recipes != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo()
|
||||
{
|
||||
AlchemyRecipeRegistry.recipes.remove(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe()
|
||||
{
|
||||
return "Adding Alchemy Recipe for " + ((AlchemyRecipe) recipe).getResult().getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo()
|
||||
{
|
||||
return "Removing Alchemy Recipe for " + ((AlchemyRecipe) recipe).getResult().getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack output) {
|
||||
MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
}
|
||||
|
||||
private static class Remove implements IUndoableAction
|
||||
{
|
||||
private final ItemStack output;
|
||||
private AlchemyRecipe recipe;
|
||||
|
||||
public Remove(ItemStack output)
|
||||
{
|
||||
this.output = output;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
for (AlchemyRecipe r : AlchemyRecipeRegistry.recipes)
|
||||
{
|
||||
if (r.getResult() != null && r.getResult().isItemEqual(output))
|
||||
{
|
||||
recipe = r;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
AlchemyRecipeRegistry.recipes.remove(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo()
|
||||
{
|
||||
return AlchemyRecipeRegistry.recipes != null && recipe != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo()
|
||||
{
|
||||
AlchemyRecipeRegistry.recipes.add(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe()
|
||||
{
|
||||
return "Removing Alchemy Recipe for " + output.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo()
|
||||
{
|
||||
return "Restoring Alchemy Recipe for " + output.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
//package WayofTime.alchemicalWizardry.common.tweaker;
|
||||
//
|
||||
//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack;
|
||||
//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStacks;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe;
|
||||
//import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
//
|
||||
///**
|
||||
// * MineTweaker3 Alchemy Recipe Handler by joshie *
|
||||
// */
|
||||
//@ZenClass("mods.bloodmagic.Alchemy")
|
||||
//public class Alchemy
|
||||
//{
|
||||
// @ZenMethod
|
||||
// public static void addRecipe(IItemStack output, IItemStack[] input, int tier, int lp) {
|
||||
// MineTweakerAPI.apply(new Add(new AlchemyRecipe(toStack(output), (int) (((double) lp) / 100), toStacks(input), tier)));
|
||||
// }
|
||||
//
|
||||
// private static class Add implements IUndoableAction
|
||||
// {
|
||||
// private final AlchemyRecipe recipe;
|
||||
//
|
||||
// public Add(AlchemyRecipe recipe)
|
||||
// {
|
||||
// this.recipe = recipe;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void apply()
|
||||
// {
|
||||
// AlchemyRecipeRegistry.recipes.add(recipe);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canUndo()
|
||||
// {
|
||||
// return AlchemyRecipeRegistry.recipes != null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void undo()
|
||||
// {
|
||||
// AlchemyRecipeRegistry.recipes.remove(recipe);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describe()
|
||||
// {
|
||||
// return "Adding Alchemy Recipe for " + ((AlchemyRecipe) recipe).getResult().getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describeUndo()
|
||||
// {
|
||||
// return "Removing Alchemy Recipe for " + ((AlchemyRecipe) recipe).getResult().getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Object getOverrideKey()
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @ZenMethod
|
||||
// public static void removeRecipe(IItemStack output) {
|
||||
// MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
// }
|
||||
//
|
||||
// private static class Remove implements IUndoableAction
|
||||
// {
|
||||
// private final ItemStack output;
|
||||
// private AlchemyRecipe recipe;
|
||||
//
|
||||
// public Remove(ItemStack output)
|
||||
// {
|
||||
// this.output = output;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void apply()
|
||||
// {
|
||||
// for (AlchemyRecipe r : AlchemyRecipeRegistry.recipes)
|
||||
// {
|
||||
// if (r.getResult() != null && r.getResult().isItemEqual(output))
|
||||
// {
|
||||
// recipe = r;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// AlchemyRecipeRegistry.recipes.remove(recipe);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canUndo()
|
||||
// {
|
||||
// return AlchemyRecipeRegistry.recipes != null && recipe != null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void undo()
|
||||
// {
|
||||
// AlchemyRecipeRegistry.recipes.add(recipe);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describe()
|
||||
// {
|
||||
// return "Removing Alchemy Recipe for " + output.getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describeUndo()
|
||||
// {
|
||||
// return "Restoring Alchemy Recipe for " + output.getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Object getOverrideKey()
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
|
|
@ -1,130 +1,130 @@
|
|||
package WayofTime.alchemicalWizardry.common.tweaker;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack;
|
||||
import minetweaker.IUndoableAction;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry;
|
||||
|
||||
/**
|
||||
* MineTweaker3 Binding Recipe Handler by joshie *
|
||||
*/
|
||||
@ZenClass("mods.bloodmagic.Binding")
|
||||
public class Binding
|
||||
{
|
||||
@ZenMethod
|
||||
public static void addRecipe(IItemStack input, IItemStack output) {
|
||||
MineTweakerAPI.apply(new Add(new BindingRecipe(toStack(output), toStack(input))));
|
||||
}
|
||||
|
||||
private static class Add implements IUndoableAction
|
||||
{
|
||||
private final BindingRecipe recipe;
|
||||
|
||||
public Add(BindingRecipe recipe)
|
||||
{
|
||||
this.recipe = recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
BindingRegistry.bindingRecipes.add(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo()
|
||||
{
|
||||
return BindingRegistry.bindingRecipes != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo()
|
||||
{
|
||||
BindingRegistry.bindingRecipes.remove(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe()
|
||||
{
|
||||
return "Adding Binding Recipe for " + ((BindingRecipe) recipe).getResult().getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo()
|
||||
{
|
||||
return "Removing Binding Recipe for " + ((BindingRecipe) recipe).getResult().getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack output) {
|
||||
MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
}
|
||||
|
||||
private static class Remove implements IUndoableAction
|
||||
{
|
||||
private final ItemStack output;
|
||||
private BindingRecipe recipe;
|
||||
|
||||
public Remove(ItemStack output)
|
||||
{
|
||||
this.output = output;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
for (BindingRecipe r : BindingRegistry.bindingRecipes)
|
||||
{
|
||||
if (r.getResult() != null && r.getResult().isItemEqual(output))
|
||||
{
|
||||
recipe = r;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
BindingRegistry.bindingRecipes.remove(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo()
|
||||
{
|
||||
return BindingRegistry.bindingRecipes != null && recipe != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo()
|
||||
{
|
||||
BindingRegistry.bindingRecipes.add(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe()
|
||||
{
|
||||
return "Removing Binding Recipe for " + output.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo()
|
||||
{
|
||||
return "Restoring Binding Recipe for " + output.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
//package WayofTime.alchemicalWizardry.common.tweaker;
|
||||
//
|
||||
//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack;
|
||||
//import minetweaker.IUndoableAction;
|
||||
//import minetweaker.MineTweakerAPI;
|
||||
//import minetweaker.api.item.IItemStack;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//import stanhebben.zenscript.annotations.ZenClass;
|
||||
//import stanhebben.zenscript.annotations.ZenMethod;
|
||||
//import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe;
|
||||
//import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry;
|
||||
//
|
||||
///**
|
||||
// * MineTweaker3 Binding Recipe Handler by joshie *
|
||||
// */
|
||||
//@ZenClass("mods.bloodmagic.Binding")
|
||||
//public class Binding
|
||||
//{
|
||||
// @ZenMethod
|
||||
// public static void addRecipe(IItemStack input, IItemStack output) {
|
||||
// MineTweakerAPI.apply(new Add(new BindingRecipe(toStack(output), toStack(input))));
|
||||
// }
|
||||
//
|
||||
// private static class Add implements IUndoableAction
|
||||
// {
|
||||
// private final BindingRecipe recipe;
|
||||
//
|
||||
// public Add(BindingRecipe recipe)
|
||||
// {
|
||||
// this.recipe = recipe;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void apply()
|
||||
// {
|
||||
// BindingRegistry.bindingRecipes.add(recipe);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canUndo()
|
||||
// {
|
||||
// return BindingRegistry.bindingRecipes != null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void undo()
|
||||
// {
|
||||
// BindingRegistry.bindingRecipes.remove(recipe);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describe()
|
||||
// {
|
||||
// return "Adding Binding Recipe for " + ((BindingRecipe) recipe).getResult().getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describeUndo()
|
||||
// {
|
||||
// return "Removing Binding Recipe for " + ((BindingRecipe) recipe).getResult().getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Object getOverrideKey()
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @ZenMethod
|
||||
// public static void removeRecipe(IItemStack output) {
|
||||
// MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
// }
|
||||
//
|
||||
// private static class Remove implements IUndoableAction
|
||||
// {
|
||||
// private final ItemStack output;
|
||||
// private BindingRecipe recipe;
|
||||
//
|
||||
// public Remove(ItemStack output)
|
||||
// {
|
||||
// this.output = output;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void apply()
|
||||
// {
|
||||
// for (BindingRecipe r : BindingRegistry.bindingRecipes)
|
||||
// {
|
||||
// if (r.getResult() != null && r.getResult().isItemEqual(output))
|
||||
// {
|
||||
// recipe = r;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// BindingRegistry.bindingRecipes.remove(recipe);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canUndo()
|
||||
// {
|
||||
// return BindingRegistry.bindingRecipes != null && recipe != null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void undo()
|
||||
// {
|
||||
// BindingRegistry.bindingRecipes.add(recipe);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describe()
|
||||
// {
|
||||
// return "Removing Binding Recipe for " + output.getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describeUndo()
|
||||
// {
|
||||
// return "Restoring Binding Recipe for " + output.getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Object getOverrideKey()
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
|
|
@ -1,133 +1,133 @@
|
|||
package WayofTime.alchemicalWizardry.common.tweaker;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack;
|
||||
import minetweaker.IUndoableAction;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import stanhebben.zenscript.annotations.Optional;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
|
||||
|
||||
/**
|
||||
* MineTweaker3 Blood Altar Recipe Handler by joshie *
|
||||
*/
|
||||
@ZenClass("mods.bloodmagic.Altar")
|
||||
public class BloodAltar
|
||||
{
|
||||
@ZenMethod
|
||||
public static void addRecipe(IItemStack output, IItemStack input, int tier, int lp, @Optional int consume, @Optional int drain) {
|
||||
consume = consume > 0 ? consume : 20;
|
||||
drain = drain > 0 ? drain : 20;
|
||||
MineTweakerAPI.apply(new Add(new AltarRecipe(toStack(output), toStack(input), tier, lp, consume, drain, false)));
|
||||
}
|
||||
|
||||
private static class Add implements IUndoableAction
|
||||
{
|
||||
private final AltarRecipe recipe;
|
||||
|
||||
public Add(AltarRecipe recipe)
|
||||
{
|
||||
this.recipe = recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
AltarRecipeRegistry.altarRecipes.add(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo()
|
||||
{
|
||||
return AltarRecipeRegistry.altarRecipes != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo()
|
||||
{
|
||||
AltarRecipeRegistry.altarRecipes.remove(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe()
|
||||
{
|
||||
return "Adding Blood Altar Recipe for " + ((AltarRecipe) recipe).getResult().getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo()
|
||||
{
|
||||
return "Removing Blood Altar Recipe for " + ((AltarRecipe) recipe).getResult().getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack output) {
|
||||
MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
}
|
||||
|
||||
private static class Remove implements IUndoableAction
|
||||
{
|
||||
private final ItemStack output;
|
||||
private AltarRecipe recipe;
|
||||
|
||||
public Remove(ItemStack output)
|
||||
{
|
||||
this.output = output;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
for (AltarRecipe r : AltarRecipeRegistry.altarRecipes)
|
||||
{
|
||||
if (r.getResult() != null && r.getResult().isItemEqual(output))
|
||||
{
|
||||
recipe = r;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
AltarRecipeRegistry.altarRecipes.remove(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo()
|
||||
{
|
||||
return AltarRecipeRegistry.altarRecipes != null && recipe != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo()
|
||||
{
|
||||
AltarRecipeRegistry.altarRecipes.add(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe()
|
||||
{
|
||||
return "Removing Blood Altar Recipe for " + output.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo()
|
||||
{
|
||||
return "Restoring Blood Altar Recipe for " + output.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
//package WayofTime.alchemicalWizardry.common.tweaker;
|
||||
//
|
||||
//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack;
|
||||
//import minetweaker.IUndoableAction;
|
||||
//import minetweaker.MineTweakerAPI;
|
||||
//import minetweaker.api.item.IItemStack;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//import stanhebben.zenscript.annotations.Optional;
|
||||
//import stanhebben.zenscript.annotations.ZenClass;
|
||||
//import stanhebben.zenscript.annotations.ZenMethod;
|
||||
//import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe;
|
||||
//import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
|
||||
//
|
||||
///**
|
||||
// * MineTweaker3 Blood Altar Recipe Handler by joshie *
|
||||
// */
|
||||
//@ZenClass("mods.bloodmagic.Altar")
|
||||
//public class BloodAltar
|
||||
//{
|
||||
// @ZenMethod
|
||||
// public static void addRecipe(IItemStack output, IItemStack input, int tier, int lp, @Optional int consume, @Optional int drain) {
|
||||
// consume = consume > 0 ? consume : 20;
|
||||
// drain = drain > 0 ? drain : 20;
|
||||
// MineTweakerAPI.apply(new Add(new AltarRecipe(toStack(output), toStack(input), tier, lp, consume, drain, false)));
|
||||
// }
|
||||
//
|
||||
// private static class Add implements IUndoableAction
|
||||
// {
|
||||
// private final AltarRecipe recipe;
|
||||
//
|
||||
// public Add(AltarRecipe recipe)
|
||||
// {
|
||||
// this.recipe = recipe;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void apply()
|
||||
// {
|
||||
// AltarRecipeRegistry.altarRecipes.add(recipe);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canUndo()
|
||||
// {
|
||||
// return AltarRecipeRegistry.altarRecipes != null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void undo()
|
||||
// {
|
||||
// AltarRecipeRegistry.altarRecipes.remove(recipe);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describe()
|
||||
// {
|
||||
// return "Adding Blood Altar Recipe for " + ((AltarRecipe) recipe).getResult().getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describeUndo()
|
||||
// {
|
||||
// return "Removing Blood Altar Recipe for " + ((AltarRecipe) recipe).getResult().getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Object getOverrideKey()
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @ZenMethod
|
||||
// public static void removeRecipe(IItemStack output) {
|
||||
// MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
// }
|
||||
//
|
||||
// private static class Remove implements IUndoableAction
|
||||
// {
|
||||
// private final ItemStack output;
|
||||
// private AltarRecipe recipe;
|
||||
//
|
||||
// public Remove(ItemStack output)
|
||||
// {
|
||||
// this.output = output;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void apply()
|
||||
// {
|
||||
// for (AltarRecipe r : AltarRecipeRegistry.altarRecipes)
|
||||
// {
|
||||
// if (r.getResult() != null && r.getResult().isItemEqual(output))
|
||||
// {
|
||||
// recipe = r;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// AltarRecipeRegistry.altarRecipes.remove(recipe);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canUndo()
|
||||
// {
|
||||
// return AltarRecipeRegistry.altarRecipes != null && recipe != null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void undo()
|
||||
// {
|
||||
// AltarRecipeRegistry.altarRecipes.add(recipe);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describe()
|
||||
// {
|
||||
// return "Removing Blood Altar Recipe for " + output.getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describeUndo()
|
||||
// {
|
||||
// return "Restoring Blood Altar Recipe for " + output.getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Object getOverrideKey()
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
|
|
@ -1,147 +1,147 @@
|
|||
package WayofTime.alchemicalWizardry.common.tweaker;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toObjects;
|
||||
import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toShapedObjects;
|
||||
import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe;
|
||||
import minetweaker.IUndoableAction;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IIngredient;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe;
|
||||
|
||||
/**
|
||||
* MineTweaker3 Blood Orb Recipe Handler by joshie *
|
||||
*/
|
||||
@ZenClass("mods.bloodmagic.BloodOrb")
|
||||
public class BloodOrb
|
||||
{
|
||||
@ZenMethod
|
||||
public static void addShaped(IItemStack output, IIngredient[][] ingredients)
|
||||
{
|
||||
MineTweakerAPI.apply(new Add(false, toStack(output), toShapedObjects(ingredients)));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addShapeless(IItemStack output, IIngredient[] ingredients)
|
||||
{
|
||||
MineTweakerAPI.apply(new Add(true, toStack(output), toObjects(ingredients)));
|
||||
}
|
||||
|
||||
private static class Add implements IUndoableAction {
|
||||
private IRecipe iRecipe;
|
||||
private final boolean isShapeless;
|
||||
private final ItemStack output;
|
||||
private final Object[] recipe;
|
||||
|
||||
public Add(boolean isShapeless, ItemStack output, Object... recipe)
|
||||
{
|
||||
this.isShapeless = isShapeless;
|
||||
this.output = output;
|
||||
this.recipe = recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
if (isShapeless) iRecipe = new ShapelessBloodOrbRecipe(output, recipe);
|
||||
else iRecipe = new ShapedBloodOrbRecipe(output, recipe);
|
||||
CraftingManager.getInstance().getRecipeList().add(iRecipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo()
|
||||
{
|
||||
return CraftingManager.getInstance().getRecipeList() != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo()
|
||||
{
|
||||
CraftingManager.getInstance().getRecipeList().remove(iRecipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe() {
|
||||
return "Adding Blood Orb Recipe for " + output.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo()
|
||||
{
|
||||
return "Removing Blood Orb Recipe for " + output.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack output) {
|
||||
MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
}
|
||||
|
||||
private static class Remove implements IUndoableAction {
|
||||
private final ItemStack output;
|
||||
private IRecipe iRecipe;
|
||||
|
||||
public Remove(ItemStack output)
|
||||
{
|
||||
this.output = output;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
for (IRecipe r : (List<IRecipe>) CraftingManager.getInstance().getRecipeList())
|
||||
{
|
||||
if((r instanceof ShapedBloodOrbRecipe || r instanceof ShapelessBloodOrbRecipe) && r.getRecipeOutput() != null && r.getRecipeOutput().isItemEqual(output)) {
|
||||
iRecipe = r;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
CraftingManager.getInstance().getRecipeList().remove(iRecipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo()
|
||||
{
|
||||
return CraftingManager.getInstance().getRecipeList() != null && iRecipe != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo()
|
||||
{
|
||||
CraftingManager.getInstance().getRecipeList().add(iRecipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe() {
|
||||
return "Removing Blood Orb Recipe for " + output.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo()
|
||||
{
|
||||
return "Restoring Blood Orb Recipe for " + output.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
//package WayofTime.alchemicalWizardry.common.tweaker;
|
||||
//
|
||||
//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toObjects;
|
||||
//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toShapedObjects;
|
||||
//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
//import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe;
|
||||
//import minetweaker.IUndoableAction;
|
||||
//import minetweaker.MineTweakerAPI;
|
||||
//import minetweaker.api.item.IIngredient;
|
||||
//import minetweaker.api.item.IItemStack;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//import net.minecraft.item.crafting.CraftingManager;
|
||||
//import net.minecraft.item.crafting.IRecipe;
|
||||
//import stanhebben.zenscript.annotations.ZenClass;
|
||||
//import stanhebben.zenscript.annotations.ZenMethod;
|
||||
//import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe;
|
||||
//
|
||||
///**
|
||||
// * MineTweaker3 Blood Orb Recipe Handler by joshie *
|
||||
// */
|
||||
//@ZenClass("mods.bloodmagic.BloodOrb")
|
||||
//public class BloodOrb
|
||||
//{
|
||||
// @ZenMethod
|
||||
// public static void addShaped(IItemStack output, IIngredient[][] ingredients)
|
||||
// {
|
||||
// MineTweakerAPI.apply(new Add(false, toStack(output), toShapedObjects(ingredients)));
|
||||
// }
|
||||
//
|
||||
// @ZenMethod
|
||||
// public static void addShapeless(IItemStack output, IIngredient[] ingredients)
|
||||
// {
|
||||
// MineTweakerAPI.apply(new Add(true, toStack(output), toObjects(ingredients)));
|
||||
// }
|
||||
//
|
||||
// private static class Add implements IUndoableAction {
|
||||
// private IRecipe iRecipe;
|
||||
// private final boolean isShapeless;
|
||||
// private final ItemStack output;
|
||||
// private final Object[] recipe;
|
||||
//
|
||||
// public Add(boolean isShapeless, ItemStack output, Object... recipe)
|
||||
// {
|
||||
// this.isShapeless = isShapeless;
|
||||
// this.output = output;
|
||||
// this.recipe = recipe;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void apply()
|
||||
// {
|
||||
// if (isShapeless) iRecipe = new ShapelessBloodOrbRecipe(output, recipe);
|
||||
// else iRecipe = new ShapedBloodOrbRecipe(output, recipe);
|
||||
// CraftingManager.getInstance().getRecipeList().add(iRecipe);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canUndo()
|
||||
// {
|
||||
// return CraftingManager.getInstance().getRecipeList() != null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void undo()
|
||||
// {
|
||||
// CraftingManager.getInstance().getRecipeList().remove(iRecipe);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describe() {
|
||||
// return "Adding Blood Orb Recipe for " + output.getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describeUndo()
|
||||
// {
|
||||
// return "Removing Blood Orb Recipe for " + output.getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Object getOverrideKey()
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @ZenMethod
|
||||
// public static void removeRecipe(IItemStack output) {
|
||||
// MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
// }
|
||||
//
|
||||
// private static class Remove implements IUndoableAction {
|
||||
// private final ItemStack output;
|
||||
// private IRecipe iRecipe;
|
||||
//
|
||||
// public Remove(ItemStack output)
|
||||
// {
|
||||
// this.output = output;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void apply()
|
||||
// {
|
||||
// for (IRecipe r : (List<IRecipe>) CraftingManager.getInstance().getRecipeList())
|
||||
// {
|
||||
// if((r instanceof ShapedBloodOrbRecipe || r instanceof ShapelessBloodOrbRecipe) && r.getRecipeOutput() != null && r.getRecipeOutput().isItemEqual(output)) {
|
||||
// iRecipe = r;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// CraftingManager.getInstance().getRecipeList().remove(iRecipe);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canUndo()
|
||||
// {
|
||||
// return CraftingManager.getInstance().getRecipeList() != null && iRecipe != null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void undo()
|
||||
// {
|
||||
// CraftingManager.getInstance().getRecipeList().add(iRecipe);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describe() {
|
||||
// return "Removing Blood Orb Recipe for " + output.getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describeUndo()
|
||||
// {
|
||||
// return "Restoring Blood Orb Recipe for " + output.getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Object getOverrideKey()
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
|
|
@ -1,139 +1,139 @@
|
|||
package WayofTime.alchemicalWizardry.common.tweaker;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry;
|
||||
import minetweaker.IUndoableAction;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack;
|
||||
|
||||
/**
|
||||
* MineTweaker3 Falling Tower Paradigm Handler by hilburn *
|
||||
*/
|
||||
@ZenClass("mods.bloodmagic.FallingTower")
|
||||
public class FallingTower
|
||||
{
|
||||
@ZenMethod
|
||||
public static void addFocus(IItemStack stack, int radius, String[] components)
|
||||
{
|
||||
MineTweakerAPI.apply(new Add(toStack(stack),radius, components));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addFocus(IItemStack stack, int radius, String components)
|
||||
{
|
||||
MineTweakerAPI.apply(new Add(toStack(stack),radius, components.split("\\s*,\\s*")));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeFocus(IItemStack output) {
|
||||
MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
}
|
||||
|
||||
private static class Add implements IUndoableAction
|
||||
{
|
||||
private MeteorParadigm paradigm;
|
||||
|
||||
public Add(ItemStack stack, int radius, String[] components)
|
||||
{
|
||||
paradigm = new MeteorParadigm(stack,radius);
|
||||
paradigm.parseStringArray(components);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
MeteorRegistry.registerMeteorParadigm(paradigm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo()
|
||||
{
|
||||
return MeteorRegistry.paradigmList!= null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo()
|
||||
{
|
||||
MeteorRegistry.paradigmList.remove(paradigm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe() {
|
||||
return "Adding Falling Tower Focus for " + paradigm.focusStack.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo()
|
||||
{
|
||||
return "Removing Falling Tower Focus for " + paradigm.focusStack.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static class Remove implements IUndoableAction {
|
||||
private final ItemStack focus;
|
||||
private MeteorParadigm paradigm;
|
||||
|
||||
public Remove(ItemStack focus)
|
||||
{
|
||||
this.focus = focus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
for (Iterator<MeteorParadigm> itr = MeteorRegistry.paradigmList.iterator(); itr.hasNext();)
|
||||
{
|
||||
MeteorParadigm paradigm = itr.next();
|
||||
if (OreDictionary.itemMatches(paradigm.focusStack,focus,false))
|
||||
{
|
||||
this.paradigm = paradigm;
|
||||
itr.remove();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo()
|
||||
{
|
||||
return MeteorRegistry.paradigmList!= null && paradigm != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo()
|
||||
{
|
||||
MeteorRegistry.paradigmList.add(paradigm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe() {
|
||||
return "Removing Falling Tower Focus for " + focus.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo()
|
||||
{
|
||||
return "Restoring Falling Tower Focus for " + focus.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
//package WayofTime.alchemicalWizardry.common.tweaker;
|
||||
//
|
||||
//import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm;
|
||||
//import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry;
|
||||
//import minetweaker.IUndoableAction;
|
||||
//import minetweaker.MineTweakerAPI;
|
||||
//import minetweaker.api.item.IItemStack;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//import net.minecraftforge.oredict.OreDictionary;
|
||||
//import stanhebben.zenscript.annotations.ZenClass;
|
||||
//import stanhebben.zenscript.annotations.ZenMethod;
|
||||
//
|
||||
//import java.util.Iterator;
|
||||
//
|
||||
//import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack;
|
||||
//
|
||||
///**
|
||||
// * MineTweaker3 Falling Tower Paradigm Handler by hilburn *
|
||||
// */
|
||||
//@ZenClass("mods.bloodmagic.FallingTower")
|
||||
//public class FallingTower
|
||||
//{
|
||||
// @ZenMethod
|
||||
// public static void addFocus(IItemStack stack, int radius, String[] components)
|
||||
// {
|
||||
// MineTweakerAPI.apply(new Add(toStack(stack),radius, components));
|
||||
// }
|
||||
//
|
||||
// @ZenMethod
|
||||
// public static void addFocus(IItemStack stack, int radius, String components)
|
||||
// {
|
||||
// MineTweakerAPI.apply(new Add(toStack(stack),radius, components.split("\\s*,\\s*")));
|
||||
// }
|
||||
//
|
||||
// @ZenMethod
|
||||
// public static void removeFocus(IItemStack output) {
|
||||
// MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
// }
|
||||
//
|
||||
// private static class Add implements IUndoableAction
|
||||
// {
|
||||
// private MeteorParadigm paradigm;
|
||||
//
|
||||
// public Add(ItemStack stack, int radius, String[] components)
|
||||
// {
|
||||
// paradigm = new MeteorParadigm(stack,radius);
|
||||
// paradigm.parseStringArray(components);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void apply()
|
||||
// {
|
||||
// MeteorRegistry.registerMeteorParadigm(paradigm);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canUndo()
|
||||
// {
|
||||
// return MeteorRegistry.paradigmList!= null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void undo()
|
||||
// {
|
||||
// MeteorRegistry.paradigmList.remove(paradigm);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describe() {
|
||||
// return "Adding Falling Tower Focus for " + paradigm.focusStack.getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describeUndo()
|
||||
// {
|
||||
// return "Removing Falling Tower Focus for " + paradigm.focusStack.getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Object getOverrideKey()
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private static class Remove implements IUndoableAction {
|
||||
// private final ItemStack focus;
|
||||
// private MeteorParadigm paradigm;
|
||||
//
|
||||
// public Remove(ItemStack focus)
|
||||
// {
|
||||
// this.focus = focus;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void apply()
|
||||
// {
|
||||
// for (Iterator<MeteorParadigm> itr = MeteorRegistry.paradigmList.iterator(); itr.hasNext();)
|
||||
// {
|
||||
// MeteorParadigm paradigm = itr.next();
|
||||
// if (OreDictionary.itemMatches(paradigm.focusStack,focus,false))
|
||||
// {
|
||||
// this.paradigm = paradigm;
|
||||
// itr.remove();
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canUndo()
|
||||
// {
|
||||
// return MeteorRegistry.paradigmList!= null && paradigm != null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void undo()
|
||||
// {
|
||||
// MeteorRegistry.paradigmList.add(paradigm);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describe() {
|
||||
// return "Removing Falling Tower Focus for " + focus.getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describeUndo()
|
||||
// {
|
||||
// return "Restoring Falling Tower Focus for " + focus.getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Object getOverrideKey()
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
|
|
@ -1,90 +1,90 @@
|
|||
package WayofTime.alchemicalWizardry.common.tweaker;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler;
|
||||
import WayofTime.alchemicalWizardry.common.harvest.GenericItemStackHarvestHandler;
|
||||
import minetweaker.IUndoableAction;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
|
||||
/**
|
||||
* MineTweaker3 Harvest Moon Handler by hilburn *
|
||||
*/
|
||||
@ZenClass("mods.bloodmagic.HarvestMoon")
|
||||
public class HarvestMoon
|
||||
{
|
||||
|
||||
@ZenMethod
|
||||
public static void addHarvestable(IItemStack block, IItemStack seed)
|
||||
{
|
||||
addHarvestable(block,block.getDamage(),seed);
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addHarvestable(IItemStack block, int meta, IItemStack seed)
|
||||
{
|
||||
ItemStack seedStack = MTHelper.toStack(seed);
|
||||
Block plantBlock = Block.getBlockFromItem(MTHelper.toStack(block).getItem());
|
||||
if (!(plantBlock==null || plantBlock== Blocks.air || seedStack==null || !(seedStack.getItem() instanceof IPlantable)))
|
||||
{
|
||||
MineTweakerAPI.apply(new Add(plantBlock, meta, seedStack));
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new IllegalArgumentException("Invalid Harvest Block or Seed");
|
||||
}
|
||||
}
|
||||
|
||||
private static class Add implements IUndoableAction
|
||||
{
|
||||
private IHarvestHandler handler;
|
||||
private String name;
|
||||
|
||||
public Add(Block block, int meta, ItemStack seed)
|
||||
{
|
||||
handler = new GenericItemStackHarvestHandler(block,meta,seed);
|
||||
name = seed.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
HarvestRegistry.registerHarvestHandler(handler);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo()
|
||||
{
|
||||
return HarvestRegistry.handlerList!=null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo()
|
||||
{
|
||||
HarvestRegistry.handlerList.remove(handler);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe() {
|
||||
return "Adding Harvest Moon Support for " + name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo()
|
||||
{
|
||||
return "Removing Harvest Moon Support for " + name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
//package WayofTime.alchemicalWizardry.common.tweaker;
|
||||
//
|
||||
//import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry;
|
||||
//import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler;
|
||||
//import WayofTime.alchemicalWizardry.common.harvest.GenericItemStackHarvestHandler;
|
||||
//import minetweaker.IUndoableAction;
|
||||
//import minetweaker.MineTweakerAPI;
|
||||
//import minetweaker.api.item.IItemStack;
|
||||
//import net.minecraft.block.Block;
|
||||
//import net.minecraft.init.Blocks;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//import net.minecraftforge.common.IPlantable;
|
||||
//import stanhebben.zenscript.annotations.ZenClass;
|
||||
//import stanhebben.zenscript.annotations.ZenMethod;
|
||||
//
|
||||
///**
|
||||
// * MineTweaker3 Harvest Moon Handler by hilburn *
|
||||
// */
|
||||
//@ZenClass("mods.bloodmagic.HarvestMoon")
|
||||
//public class HarvestMoon
|
||||
//{
|
||||
//
|
||||
// @ZenMethod
|
||||
// public static void addHarvestable(IItemStack block, IItemStack seed)
|
||||
// {
|
||||
// addHarvestable(block,block.getDamage(),seed);
|
||||
// }
|
||||
//
|
||||
// @ZenMethod
|
||||
// public static void addHarvestable(IItemStack block, int meta, IItemStack seed)
|
||||
// {
|
||||
// ItemStack seedStack = MTHelper.toStack(seed);
|
||||
// Block plantBlock = Block.getBlockFromItem(MTHelper.toStack(block).getItem());
|
||||
// if (!(plantBlock==null || plantBlock== Blocks.air || seedStack==null || !(seedStack.getItem() instanceof IPlantable)))
|
||||
// {
|
||||
// MineTweakerAPI.apply(new Add(plantBlock, meta, seedStack));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// throw new IllegalArgumentException("Invalid Harvest Block or Seed");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private static class Add implements IUndoableAction
|
||||
// {
|
||||
// private IHarvestHandler handler;
|
||||
// private String name;
|
||||
//
|
||||
// public Add(Block block, int meta, ItemStack seed)
|
||||
// {
|
||||
// handler = new GenericItemStackHarvestHandler(block,meta,seed);
|
||||
// name = seed.getDisplayName();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void apply()
|
||||
// {
|
||||
// HarvestRegistry.registerHarvestHandler(handler);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canUndo()
|
||||
// {
|
||||
// return HarvestRegistry.handlerList!=null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void undo()
|
||||
// {
|
||||
// HarvestRegistry.handlerList.remove(handler);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describe() {
|
||||
// return "Adding Harvest Moon Support for " + name;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String describeUndo()
|
||||
// {
|
||||
// return "Removing Harvest Moon Support for " + name;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Object getOverrideKey()
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
|
|
@ -1,82 +1,82 @@
|
|||
package WayofTime.alchemicalWizardry.common.tweaker;
|
||||
|
||||
import static minetweaker.api.minecraft.MineTweakerMC.getItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import minetweaker.api.item.IIngredient;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import minetweaker.api.oredict.IOreDictEntry;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* MineTweaker3 Helper by joshie *
|
||||
*/
|
||||
public class MTHelper {
|
||||
public static ItemStack toStack(IItemStack iStack) {
|
||||
return getItemStack(iStack);
|
||||
}
|
||||
|
||||
public static ItemStack[] toStacks(IItemStack[] iStack) {
|
||||
if (iStack == null) return null;
|
||||
else {
|
||||
ItemStack[] output = new ItemStack[iStack.length];
|
||||
for (int i = 0; i < iStack.length; i++) {
|
||||
output[i] = toStack(iStack[i]);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
}
|
||||
|
||||
public static Object toObject(IIngredient iStack) {
|
||||
if (iStack == null) return null;
|
||||
else {
|
||||
if (iStack instanceof IOreDictEntry) {
|
||||
return toString((IOreDictEntry) iStack);
|
||||
} else if (iStack instanceof IItemStack) {
|
||||
return getItemStack((IItemStack) iStack);
|
||||
} else return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static Object[] toObjects(IIngredient[] ingredient) {
|
||||
if (ingredient == null) return null;
|
||||
else {
|
||||
Object[] output = new Object[ingredient.length];
|
||||
for (int i = 0; i < ingredient.length; i++) {
|
||||
if (ingredient[i] != null) {
|
||||
output[i] = toObject(ingredient[i]);
|
||||
} else output[i] = "";
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
}
|
||||
|
||||
public static Object[] toShapedObjects(IIngredient[][] ingredients) {
|
||||
if (ingredients == null) return null;
|
||||
else {
|
||||
ArrayList prep = new ArrayList();
|
||||
prep.add("abc");
|
||||
prep.add("def");
|
||||
prep.add("ghi");
|
||||
char[][] map = new char[][] { { 'a', 'b', 'c' }, { 'd', 'e', 'f' }, { 'g', 'h', 'i' } };
|
||||
for (int x = 0; x < ingredients.length; x++) {
|
||||
if (ingredients[x] != null) {
|
||||
for (int y = 0; y < ingredients[x].length; y++) {
|
||||
if (ingredients[x][y] != null && x < map.length && y < map[x].length) {
|
||||
prep.add(map[x][y]);
|
||||
prep.add(toObject(ingredients[x][y]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return prep.toArray();
|
||||
}
|
||||
}
|
||||
|
||||
public static String toString(IOreDictEntry entry) {
|
||||
return ((IOreDictEntry) entry).getName();
|
||||
}
|
||||
}
|
||||
//package WayofTime.alchemicalWizardry.common.tweaker;
|
||||
//
|
||||
//import static minetweaker.api.minecraft.MineTweakerMC.getItemStack;
|
||||
//
|
||||
//import java.util.ArrayList;
|
||||
//
|
||||
//import minetweaker.api.item.IIngredient;
|
||||
//import minetweaker.api.item.IItemStack;
|
||||
//import minetweaker.api.oredict.IOreDictEntry;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//
|
||||
///**
|
||||
// * MineTweaker3 Helper by joshie *
|
||||
// */
|
||||
//public class MTHelper {
|
||||
// public static ItemStack toStack(IItemStack iStack) {
|
||||
// return getItemStack(iStack);
|
||||
// }
|
||||
//
|
||||
// public static ItemStack[] toStacks(IItemStack[] iStack) {
|
||||
// if (iStack == null) return null;
|
||||
// else {
|
||||
// ItemStack[] output = new ItemStack[iStack.length];
|
||||
// for (int i = 0; i < iStack.length; i++) {
|
||||
// output[i] = toStack(iStack[i]);
|
||||
// }
|
||||
//
|
||||
// return output;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public static Object toObject(IIngredient iStack) {
|
||||
// if (iStack == null) return null;
|
||||
// else {
|
||||
// if (iStack instanceof IOreDictEntry) {
|
||||
// return toString((IOreDictEntry) iStack);
|
||||
// } else if (iStack instanceof IItemStack) {
|
||||
// return getItemStack((IItemStack) iStack);
|
||||
// } else return null;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public static Object[] toObjects(IIngredient[] ingredient) {
|
||||
// if (ingredient == null) return null;
|
||||
// else {
|
||||
// Object[] output = new Object[ingredient.length];
|
||||
// for (int i = 0; i < ingredient.length; i++) {
|
||||
// if (ingredient[i] != null) {
|
||||
// output[i] = toObject(ingredient[i]);
|
||||
// } else output[i] = "";
|
||||
// }
|
||||
//
|
||||
// return output;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public static Object[] toShapedObjects(IIngredient[][] ingredients) {
|
||||
// if (ingredients == null) return null;
|
||||
// else {
|
||||
// ArrayList prep = new ArrayList();
|
||||
// prep.add("abc");
|
||||
// prep.add("def");
|
||||
// prep.add("ghi");
|
||||
// char[][] map = new char[][] { { 'a', 'b', 'c' }, { 'd', 'e', 'f' }, { 'g', 'h', 'i' } };
|
||||
// for (int x = 0; x < ingredients.length; x++) {
|
||||
// if (ingredients[x] != null) {
|
||||
// for (int y = 0; y < ingredients[x].length; y++) {
|
||||
// if (ingredients[x][y] != null && x < map.length && y < map[x].length) {
|
||||
// prep.add(map[x][y]);
|
||||
// prep.add(toObject(ingredients[x][y]));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return prep.toArray();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public static String toString(IOreDictEntry entry) {
|
||||
// return ((IOreDictEntry) entry).getName();
|
||||
// }
|
||||
//}
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
package WayofTime.alchemicalWizardry.common.tweaker;
|
||||
|
||||
import minetweaker.MineTweakerAPI;
|
||||
|
||||
/**
|
||||
* MineTweaker3 Integration by joshie *
|
||||
*/
|
||||
public class MineTweakerIntegration
|
||||
{
|
||||
public static void register()
|
||||
{
|
||||
MineTweakerAPI.registerClass(Alchemy.class);
|
||||
MineTweakerAPI.registerClass(Binding.class);
|
||||
MineTweakerAPI.registerClass(BloodAltar.class);
|
||||
MineTweakerAPI.registerClass(BloodOrb.class);
|
||||
MineTweakerAPI.registerClass(FallingTower.class);
|
||||
MineTweakerAPI.registerClass(HarvestMoon.class);
|
||||
}
|
||||
}
|
||||
//package WayofTime.alchemicalWizardry.common.tweaker;
|
||||
//
|
||||
//import minetweaker.MineTweakerAPI;
|
||||
//
|
||||
///**
|
||||
// * MineTweaker3 Integration by joshie *
|
||||
// */
|
||||
//public class MineTweakerIntegration
|
||||
//{
|
||||
// public static void register()
|
||||
// {
|
||||
// MineTweakerAPI.registerClass(Alchemy.class);
|
||||
// MineTweakerAPI.registerClass(Binding.class);
|
||||
// MineTweakerAPI.registerClass(BloodAltar.class);
|
||||
// MineTweakerAPI.registerClass(BloodOrb.class);
|
||||
// MineTweakerAPI.registerClass(FallingTower.class);
|
||||
// MineTweakerAPI.registerClass(HarvestMoon.class);
|
||||
// }
|
||||
//}
|
||||
|
|
Loading…
Reference in a new issue