Merge pull request #150 from TehNut/master
Switch to real logger, create ConfigGui, remove random debug thing, add ritual disabling
This commit is contained in:
commit
7946a7c226
|
@ -1,14 +1,53 @@
|
||||||
package WayofTime.alchemicalWizardry;
|
package WayofTime.alchemicalWizardry;
|
||||||
|
|
||||||
import java.io.File;
|
import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler;
|
||||||
import java.io.FileOutputStream;
|
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||||
import java.io.InputStream;
|
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||||
import java.lang.reflect.Field;
|
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||||
import java.lang.reflect.Modifier;
|
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
|
||||||
import java.util.List;
|
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry;
|
||||||
import java.util.zip.ZipEntry;
|
import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry;
|
||||||
import java.util.zip.ZipInputStream;
|
import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe;
|
||||||
|
import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe;
|
||||||
|
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
||||||
|
import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry;
|
||||||
|
import WayofTime.alchemicalWizardry.common.*;
|
||||||
|
import WayofTime.alchemicalWizardry.common.alchemy.CombinedPotionRegistry;
|
||||||
|
import WayofTime.alchemicalWizardry.common.block.ArmourForge;
|
||||||
|
import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars;
|
||||||
|
import WayofTime.alchemicalWizardry.common.book.BUEntries;
|
||||||
|
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.DemonPacketAngel;
|
||||||
|
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.DemonPacketRegistry;
|
||||||
|
import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal;
|
||||||
|
import WayofTime.alchemicalWizardry.common.entity.mob.*;
|
||||||
|
import WayofTime.alchemicalWizardry.common.harvest.BloodMagicHarvestHandler;
|
||||||
|
import WayofTime.alchemicalWizardry.common.harvest.CactusReedHarvestHandler;
|
||||||
|
import WayofTime.alchemicalWizardry.common.harvest.GourdHarvestHandler;
|
||||||
|
import WayofTime.alchemicalWizardry.common.harvest.PamHarvestCompatRegistry;
|
||||||
|
import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner;
|
||||||
|
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding;
|
||||||
|
import WayofTime.alchemicalWizardry.common.items.thaumcraft.ItemSanguineArmour;
|
||||||
|
import WayofTime.alchemicalWizardry.common.potion.*;
|
||||||
|
import WayofTime.alchemicalWizardry.common.renderer.AlchemyCircleRenderer;
|
||||||
|
import WayofTime.alchemicalWizardry.common.rituals.*;
|
||||||
|
import WayofTime.alchemicalWizardry.common.spell.simple.*;
|
||||||
|
import WayofTime.alchemicalWizardry.common.summoning.SummoningHelperAW;
|
||||||
|
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry;
|
||||||
|
import WayofTime.alchemicalWizardry.common.tileEntity.*;
|
||||||
|
import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiHandler;
|
||||||
|
import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration;
|
||||||
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
|
import cpw.mods.fml.common.Loader;
|
||||||
|
import cpw.mods.fml.common.Mod;
|
||||||
|
import cpw.mods.fml.common.Mod.EventHandler;
|
||||||
|
import cpw.mods.fml.common.Mod.Instance;
|
||||||
|
import cpw.mods.fml.common.SidedProxy;
|
||||||
|
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||||
|
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||||
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||||
|
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||||
|
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
|
@ -28,150 +67,23 @@ import net.minecraftforge.fluids.FluidRegistry;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
import net.minecraftforge.oredict.RecipeSorter;
|
import net.minecraftforge.oredict.RecipeSorter;
|
||||||
import net.minecraftforge.oredict.RecipeSorter.Category;
|
import net.minecraftforge.oredict.RecipeSorter.Category;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
import thaumcraft.api.ItemApi;
|
import thaumcraft.api.ItemApi;
|
||||||
import thaumcraft.api.ThaumcraftApi;
|
import thaumcraft.api.ThaumcraftApi;
|
||||||
import thaumcraft.api.aspects.Aspect;
|
import thaumcraft.api.aspects.Aspect;
|
||||||
import thaumcraft.api.aspects.AspectList;
|
import thaumcraft.api.aspects.AspectList;
|
||||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler;
|
|
||||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
|
||||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
|
||||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
|
||||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
|
|
||||||
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry;
|
|
||||||
import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry;
|
|
||||||
import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe;
|
|
||||||
import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe;
|
|
||||||
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
|
||||||
import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry;
|
|
||||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks;
|
|
||||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardryFuelHandler;
|
|
||||||
import WayofTime.alchemicalWizardry.common.CommonProxy;
|
|
||||||
import WayofTime.alchemicalWizardry.common.EntityAirElemental;
|
|
||||||
import WayofTime.alchemicalWizardry.common.LifeBucketHandler;
|
|
||||||
import WayofTime.alchemicalWizardry.common.LifeEssence;
|
|
||||||
import WayofTime.alchemicalWizardry.common.ModLivingDropsEvent;
|
|
||||||
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
|
|
||||||
import WayofTime.alchemicalWizardry.common.alchemy.CombinedPotionRegistry;
|
|
||||||
import WayofTime.alchemicalWizardry.common.block.ArmourForge;
|
|
||||||
import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars;
|
|
||||||
import WayofTime.alchemicalWizardry.common.book.BUEntries;
|
|
||||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.DemonPacketAngel;
|
|
||||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.DemonPacketRegistry;
|
|
||||||
import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal;
|
|
||||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityBileDemon;
|
|
||||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityBoulderFist;
|
|
||||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityEarthElemental;
|
|
||||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel;
|
|
||||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityFireElemental;
|
|
||||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityHolyElemental;
|
|
||||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon;
|
|
||||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian;
|
|
||||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityShade;
|
|
||||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityShadeElemental;
|
|
||||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem;
|
|
||||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityWaterElemental;
|
|
||||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon;
|
|
||||||
import WayofTime.alchemicalWizardry.common.harvest.BloodMagicHarvestHandler;
|
|
||||||
import WayofTime.alchemicalWizardry.common.harvest.CactusReedHarvestHandler;
|
|
||||||
import WayofTime.alchemicalWizardry.common.harvest.GourdHarvestHandler;
|
|
||||||
import WayofTime.alchemicalWizardry.common.harvest.PamHarvestCompatRegistry;
|
|
||||||
import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner;
|
|
||||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding;
|
|
||||||
import WayofTime.alchemicalWizardry.common.items.thaumcraft.ItemSanguineArmour;
|
|
||||||
import WayofTime.alchemicalWizardry.common.potion.PotionBoost;
|
|
||||||
import WayofTime.alchemicalWizardry.common.potion.PotionDeaf;
|
|
||||||
import WayofTime.alchemicalWizardry.common.potion.PotionDrowning;
|
|
||||||
import WayofTime.alchemicalWizardry.common.potion.PotionFeatherFall;
|
|
||||||
import WayofTime.alchemicalWizardry.common.potion.PotionFireFuse;
|
|
||||||
import WayofTime.alchemicalWizardry.common.potion.PotionFlameCloak;
|
|
||||||
import WayofTime.alchemicalWizardry.common.potion.PotionFlight;
|
|
||||||
import WayofTime.alchemicalWizardry.common.potion.PotionHeavyHeart;
|
|
||||||
import WayofTime.alchemicalWizardry.common.potion.PotionIceCloak;
|
|
||||||
import WayofTime.alchemicalWizardry.common.potion.PotionInhibit;
|
|
||||||
import WayofTime.alchemicalWizardry.common.potion.PotionPlanarBinding;
|
|
||||||
import WayofTime.alchemicalWizardry.common.potion.PotionProjectileProtect;
|
|
||||||
import WayofTime.alchemicalWizardry.common.potion.PotionReciprocation;
|
|
||||||
import WayofTime.alchemicalWizardry.common.potion.PotionSoulFray;
|
|
||||||
import WayofTime.alchemicalWizardry.common.potion.PotionSoulHarden;
|
|
||||||
import WayofTime.alchemicalWizardry.common.renderer.AlchemyCircleRenderer;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAnimalGrowth;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAutoAlchemy;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectBiomeChanger;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectContainment;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectCrushing;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectEllipsoid;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectEvaporation;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectExpulsion;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectFeatheredEarth;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectFeatheredKnife;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectFlight;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectFullStomach;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectGrowth;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectHarvest;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectHealing;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectInterdiction;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectItemSuction;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectJumping;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectLava;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectLeap;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectLifeConduit;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectMagnetic;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSoulBound;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSpawnWard;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSummonMeteor;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSupression;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectUnbinding;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectVeilOfEvil;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectWater;
|
|
||||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectWellOfSuffering;
|
|
||||||
import WayofTime.alchemicalWizardry.common.spell.simple.HomSpellRegistry;
|
|
||||||
import WayofTime.alchemicalWizardry.common.spell.simple.SpellEarthBender;
|
|
||||||
import WayofTime.alchemicalWizardry.common.spell.simple.SpellExplosions;
|
|
||||||
import WayofTime.alchemicalWizardry.common.spell.simple.SpellFireBurst;
|
|
||||||
import WayofTime.alchemicalWizardry.common.spell.simple.SpellFrozenWater;
|
|
||||||
import WayofTime.alchemicalWizardry.common.spell.simple.SpellHolyBlast;
|
|
||||||
import WayofTime.alchemicalWizardry.common.spell.simple.SpellLightningBolt;
|
|
||||||
import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport;
|
|
||||||
import WayofTime.alchemicalWizardry.common.spell.simple.SpellWateryGrave;
|
|
||||||
import WayofTime.alchemicalWizardry.common.spell.simple.SpellWindGust;
|
|
||||||
import WayofTime.alchemicalWizardry.common.summoning.SummoningHelperAW;
|
|
||||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry;
|
|
||||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator;
|
|
||||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
|
||||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar;
|
|
||||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit;
|
|
||||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart;
|
|
||||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
|
||||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEOrientable;
|
|
||||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal;
|
|
||||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth;
|
|
||||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
|
|
||||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESchematicSaver;
|
|
||||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESocket;
|
|
||||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock;
|
|
||||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer;
|
|
||||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock;
|
|
||||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock;
|
|
||||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock;
|
|
||||||
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;
|
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
|
||||||
import cpw.mods.fml.common.Loader;
|
|
||||||
import cpw.mods.fml.common.Mod;
|
|
||||||
import cpw.mods.fml.common.Mod.EventHandler;
|
|
||||||
import cpw.mods.fml.common.Mod.Instance;
|
|
||||||
import cpw.mods.fml.common.SidedProxy;
|
|
||||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
|
||||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
|
||||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
|
||||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
|
||||||
|
|
||||||
@Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v1.2.0b (Beta1)")
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.lang.reflect.Modifier;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.zip.ZipEntry;
|
||||||
|
import java.util.zip.ZipInputStream;
|
||||||
|
|
||||||
|
@Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v1.2.0b (Beta1)", guiFactory = "WayofTime.alchemicalWizardry.client.gui.ConfigGuiFactory")
|
||||||
|
|
||||||
public class AlchemicalWizardry
|
public class AlchemicalWizardry
|
||||||
{
|
{
|
||||||
|
@ -219,6 +131,37 @@ public class AlchemicalWizardry
|
||||||
public static int customPotionDeafID;
|
public static int customPotionDeafID;
|
||||||
public static int customPotionFeatherFallID;
|
public static int customPotionFeatherFallID;
|
||||||
|
|
||||||
|
public static boolean ritualDisabledWater;
|
||||||
|
public static boolean ritualDisabledLava;
|
||||||
|
public static boolean ritualDisabledGreenGrove;
|
||||||
|
public static boolean ritualDisabledInterdiction;
|
||||||
|
public static boolean ritualDisabledContainment;
|
||||||
|
public static boolean ritualDisabledBinding;
|
||||||
|
public static boolean ritualDisabledUnbinding;
|
||||||
|
public static boolean ritualDisabledHighJump;
|
||||||
|
public static boolean ritualDisabledMagnetism;
|
||||||
|
public static boolean ritualDisabledCrusher;
|
||||||
|
public static boolean ritualDisabledSpeed;
|
||||||
|
public static boolean ritualDisabledAnimalGrowth;
|
||||||
|
public static boolean ritualDisabledSuffering;
|
||||||
|
public static boolean ritualDisabledRegen;
|
||||||
|
public static boolean ritualDisabledFeatheredKnife;
|
||||||
|
public static boolean ritualDisabledFeatheredEarth;
|
||||||
|
public static boolean ritualDisabledGaia;
|
||||||
|
public static boolean ritualDisabledCondor;
|
||||||
|
public static boolean ritualDisabledFallingTower;
|
||||||
|
public static boolean ritualDisabledBalladOfAlchemy;
|
||||||
|
public static boolean ritualDisabledExpulsion;
|
||||||
|
public static boolean ritualDisabledSuppression;
|
||||||
|
public static boolean ritualDisabledZephyr;
|
||||||
|
public static boolean ritualDisabledHarvest;
|
||||||
|
public static boolean ritualDisabledConduit;
|
||||||
|
public static boolean ritualDisabledEllipsoid;
|
||||||
|
public static boolean ritualDisabledEvaporation;
|
||||||
|
public static boolean ritualDisabledSpawnWard;
|
||||||
|
public static boolean ritualDisabledVeilOfEvil;
|
||||||
|
public static boolean ritualDisabledFullStomach;
|
||||||
|
|
||||||
public static boolean isThaumcraftLoaded;
|
public static boolean isThaumcraftLoaded;
|
||||||
public static boolean isForestryLoaded;
|
public static boolean isForestryLoaded;
|
||||||
public static boolean isBotaniaLoaded;
|
public static boolean isBotaniaLoaded;
|
||||||
|
@ -230,6 +173,7 @@ public class AlchemicalWizardry
|
||||||
|
|
||||||
public static List<Class> wellBlacklist;
|
public static List<Class> wellBlacklist;
|
||||||
|
|
||||||
|
public static Logger logger = LogManager.getLogger("BloodMagic");
|
||||||
public static CreativeTabs tabBloodMagic = new CreativeTabs("tabBloodMagic")
|
public static CreativeTabs tabBloodMagic = new CreativeTabs("tabBloodMagic")
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
@ -294,10 +238,10 @@ public class AlchemicalWizardry
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
InputStream in = AlchemicalWizardry.class.getResourceAsStream("/assets/alchemicalwizardry/schematics/building/buildings.zip");
|
InputStream in = AlchemicalWizardry.class.getResourceAsStream("/assets/alchemicalwizardry/schematics/building/buildings.zip");
|
||||||
System.out.println("none yet!");
|
logger.info("none yet!");
|
||||||
if (in != null)
|
if (in != null)
|
||||||
{
|
{
|
||||||
System.out.println("I have found a zip!");
|
logger.info("I have found a zip!");
|
||||||
ZipInputStream zipStream = new ZipInputStream(in);
|
ZipInputStream zipStream = new ZipInputStream(in);
|
||||||
ZipEntry entry = null;
|
ZipEntry entry = null;
|
||||||
|
|
||||||
|
@ -948,17 +892,18 @@ public class AlchemicalWizardry
|
||||||
if (Loader.isModLoaded("harvestcraft"))
|
if (Loader.isModLoaded("harvestcraft"))
|
||||||
{
|
{
|
||||||
PamHarvestCompatRegistry.registerPamHandlers();
|
PamHarvestCompatRegistry.registerPamHandlers();
|
||||||
System.out.println("Loaded Harvestcraft Handlers!");
|
AlchemicalWizardry.logger.info("Loaded Harvestcraft Handlers!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Loader.isModLoaded("MineTweaker3")) {
|
if(Loader.isModLoaded("MineTweaker3")) {
|
||||||
MineTweakerIntegration.register();
|
MineTweakerIntegration.register();
|
||||||
System.out.println("Loaded MineTweaker 3 Integration");
|
AlchemicalWizardry.logger.info("Loaded MineTweaker 3 Integration");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.isBotaniaLoaded = Loader.isModLoaded("Botania");
|
this.isBotaniaLoaded = Loader.isModLoaded("Botania");
|
||||||
|
|
||||||
BloodMagicConfiguration.loadBlacklist();
|
BloodMagicConfiguration.loadBlacklist();
|
||||||
|
BloodMagicConfiguration.blacklistRituals();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void initAlchemyPotionRecipes()
|
public static void initAlchemyPotionRecipes()
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package WayofTime.alchemicalWizardry;
|
package WayofTime.alchemicalWizardry;
|
||||||
|
|
||||||
|
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
||||||
import WayofTime.alchemicalWizardry.client.renderer.ColourThreshold;
|
import WayofTime.alchemicalWizardry.client.renderer.ColourThreshold;
|
||||||
import WayofTime.alchemicalWizardry.client.renderer.RenderHelper;
|
import WayofTime.alchemicalWizardry.client.renderer.RenderHelper;
|
||||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm;
|
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm;
|
||||||
|
@ -23,125 +24,310 @@ import java.util.Map.Entry;
|
||||||
*/
|
*/
|
||||||
public class BloodMagicConfiguration
|
public class BloodMagicConfiguration
|
||||||
{
|
{
|
||||||
private static final String DEFAULT_COLOR_LIST = "100,f; 80,7; 60,e; 40,6; 25,c; 10,4";
|
private static final String DEFAULT_COLOR_LIST = "100,f; 80,7; 60,e; 40,6; 25,c; 10,4";
|
||||||
public static final List<ColourThreshold> colorList = new ArrayList<ColourThreshold>();
|
public static final List<ColourThreshold> colorList = new ArrayList<ColourThreshold>();
|
||||||
|
|
||||||
public static Configuration config;
|
public static Configuration config;
|
||||||
public static final String CATEGORY_GAMEPLAY = "gameplay";
|
public static final String CATEGORY_GAMEPLAY = "gameplay";
|
||||||
|
|
||||||
|
|
||||||
public static void init(File configFile)
|
public static void init(File configFile)
|
||||||
{
|
{
|
||||||
for (String s : DEFAULT_COLOR_LIST.split(";"))
|
for (String s : DEFAULT_COLOR_LIST.split(";"))
|
||||||
{
|
{
|
||||||
String[] ct = s.split(",");
|
String[] ct = s.split(",");
|
||||||
colorList.add(new ColourThreshold(Integer.valueOf(ct[0].trim()), ct[1].trim()));
|
colorList.add(new ColourThreshold(Integer.valueOf(ct[0].trim()), ct[1].trim()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
config = new Configuration(configFile);
|
config = new Configuration(configFile);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
config.load();
|
||||||
|
syncConfig();
|
||||||
|
|
||||||
config.load();
|
} catch (Exception e)
|
||||||
|
{
|
||||||
|
AlchemicalWizardry.logger.error("There has been a problem loading the configuration, go ask on the forums :p");
|
||||||
|
|
||||||
AlchemicalWizardry.standardBindingAgentDungeonChance = config.get("Dungeon Loot Chances", "standardBindingAgent", 30).getInt();
|
} finally
|
||||||
AlchemicalWizardry.mundanePowerCatalystDungeonChance = config.get("Dungeon Loot Chances", "mundanePowerCatalyst", 20).getInt();
|
{
|
||||||
AlchemicalWizardry.averagePowerCatalystDungeonChance = config.get("Dungeon Loot Chances", "averagePowerCatalyst", 10).getInt();
|
config.save();
|
||||||
AlchemicalWizardry.greaterPowerCatalystDungeonChance = config.get("Dungeon Loot Chances", "greaterPowerCatalyst", 05).getInt();
|
}
|
||||||
AlchemicalWizardry.mundaneLengtheningCatalystDungeonChance = config.get("Dungeon Loot Chances", "mundaneLengtheningCatalyst", 20).getInt();
|
}
|
||||||
AlchemicalWizardry.averageLengtheningCatalystDungeonChance = config.get("Dungeon Loot Chances", "averageLengtheningCatalyst", 10).getInt();
|
|
||||||
AlchemicalWizardry.greaterLengtheningCatalystDungeonChance = config.get("Dungeon Loot Chances", "greaterLengtheningCatalyst", 05).getInt();
|
|
||||||
AlchemicalWizardry.customPotionDrowningID = config.get("Potion ID", "Drowning", 100).getInt();
|
|
||||||
AlchemicalWizardry.customPotionBoostID = config.get("Potion ID", "Boost", 101).getInt();
|
|
||||||
AlchemicalWizardry.customPotionProjProtID = config.get("Potion ID", "ProjProt", 102).getInt();
|
|
||||||
AlchemicalWizardry.customPotionInhibitID = config.get("Potion ID", "Inhibit", 103).getInt();
|
|
||||||
AlchemicalWizardry.customPotionFlightID = config.get("Potion ID", "Flight", 104).getInt();
|
|
||||||
AlchemicalWizardry.customPotionReciprocationID = config.get("Potion ID", "Reciprocation", 105).getInt();
|
|
||||||
AlchemicalWizardry.customPotionFlameCloakID = config.get("Potion ID", "FlameCloak", 106).getInt();
|
|
||||||
AlchemicalWizardry.customPotionIceCloakID = config.get("Potion ID", "IceCloak", 107).getInt();
|
|
||||||
AlchemicalWizardry.customPotionHeavyHeartID = config.get("Potion ID", "HeavyHeart", 108).getInt();
|
|
||||||
AlchemicalWizardry.customPotionFireFuseID = config.get("Potion ID", "FireFuse", 109).getInt();
|
|
||||||
AlchemicalWizardry.customPotionPlanarBindingID = config.get("Potion ID", "PlanarBinding", 110).getInt();
|
|
||||||
AlchemicalWizardry.customPotionSoulFrayID = config.get("Potion ID", "SoulFray", 111).getInt();
|
|
||||||
AlchemicalWizardry.customPotionSoulHardenID = config.get("Potion ID", "SoulHarden", 112).getInt();
|
|
||||||
AlchemicalWizardry.customPotionDeafID = config.get("Potion ID", "Deaf", 113).getInt();
|
|
||||||
AlchemicalWizardry.customPotionFeatherFallID = config.get("Potion ID", "FeatherFall", 114).getInt();
|
|
||||||
|
|
||||||
MeteorParadigm.maxChance = config.get("meteor", "maxChance", 1000).getInt();
|
public static void syncConfig()
|
||||||
AlchemicalWizardry.doMeteorsDestroyBlocks = config.get("meteor", "doMeteorsDestroyBlocks", true).getBoolean(true);
|
{
|
||||||
AlchemicalWizardry.diamondMeteorArray = config.get("meteor", "diamondMeteor", new String[]{"oreDiamond", "100", "oreEmerald", "75", "oreCinnabar", "200", "oreAmber", "200"}).getStringList();
|
AlchemicalWizardry.standardBindingAgentDungeonChance = config.get("Dungeon Loot Chances", "standardBindingAgent", 30).getInt();
|
||||||
AlchemicalWizardry.diamondMeteorRadius = config.get("meteor", "diamondMeteorRadius", 5).getInt();
|
AlchemicalWizardry.mundanePowerCatalystDungeonChance = config.get("Dungeon Loot Chances", "mundanePowerCatalyst", 20).getInt();
|
||||||
AlchemicalWizardry.stoneMeteorArray = config.get("meteor", "stoneBlockMeteor", new String[]{"oreCoal", "150", "oreApatite", "50", "oreIron", "50"}).getStringList();
|
AlchemicalWizardry.averagePowerCatalystDungeonChance = config.get("Dungeon Loot Chances", "averagePowerCatalyst", 10).getInt();
|
||||||
AlchemicalWizardry.stoneMeteorRadius = config.get("meteor", "stoneMeteorRadius", 16).getInt();
|
AlchemicalWizardry.greaterPowerCatalystDungeonChance = config.get("Dungeon Loot Chances", "greaterPowerCatalyst", 05).getInt();
|
||||||
AlchemicalWizardry.ironBlockMeteorArray = config.get("meteor", "ironBlockMeteor", new String[]{"oreIron", "400", "oreGold", "30", "oreCopper", "200", "oreTin", "140", "oreSilver", "70", "oreLead", "80", "oreLapis", "60", "oreRedstone", "100"}).getStringList();
|
AlchemicalWizardry.mundaneLengtheningCatalystDungeonChance = config.get("Dungeon Loot Chances", "mundaneLengtheningCatalyst", 20).getInt();
|
||||||
AlchemicalWizardry.ironBlockMeteorRadius = config.get("meteor", "ironBlockMeteorRadius", 7).getInt();
|
AlchemicalWizardry.averageLengtheningCatalystDungeonChance = config.get("Dungeon Loot Chances", "averageLengtheningCatalyst", 10).getInt();
|
||||||
AlchemicalWizardry.netherStarMeteorArray = config.get("meteor", "netherStarMeteor", new String[]{"oreDiamond", "150", "oreEmerald", "100", "oreQuartz", "250", "oreSunstone", "5", "oreMoonstone", "50", "oreIridium", "5", "oreCertusQuartz", "150"}).getStringList();
|
AlchemicalWizardry.greaterLengtheningCatalystDungeonChance = config.get("Dungeon Loot Chances", "greaterLengtheningCatalyst", 05).getInt();
|
||||||
AlchemicalWizardry.netherStarMeteorRadius = config.get("meteor", "netherStarMeteorRadius", 3).getInt();
|
AlchemicalWizardry.customPotionDrowningID = config.get("Potion ID", "Drowning", 100).getInt();
|
||||||
|
AlchemicalWizardry.customPotionBoostID = config.get("Potion ID", "Boost", 101).getInt();
|
||||||
|
AlchemicalWizardry.customPotionProjProtID = config.get("Potion ID", "ProjProt", 102).getInt();
|
||||||
|
AlchemicalWizardry.customPotionInhibitID = config.get("Potion ID", "Inhibit", 103).getInt();
|
||||||
|
AlchemicalWizardry.customPotionFlightID = config.get("Potion ID", "Flight", 104).getInt();
|
||||||
|
AlchemicalWizardry.customPotionReciprocationID = config.get("Potion ID", "Reciprocation", 105).getInt();
|
||||||
|
AlchemicalWizardry.customPotionFlameCloakID = config.get("Potion ID", "FlameCloak", 106).getInt();
|
||||||
|
AlchemicalWizardry.customPotionIceCloakID = config.get("Potion ID", "IceCloak", 107).getInt();
|
||||||
|
AlchemicalWizardry.customPotionHeavyHeartID = config.get("Potion ID", "HeavyHeart", 108).getInt();
|
||||||
|
AlchemicalWizardry.customPotionFireFuseID = config.get("Potion ID", "FireFuse", 109).getInt();
|
||||||
|
AlchemicalWizardry.customPotionPlanarBindingID = config.get("Potion ID", "PlanarBinding", 110).getInt();
|
||||||
|
AlchemicalWizardry.customPotionSoulFrayID = config.get("Potion ID", "SoulFray", 111).getInt();
|
||||||
|
AlchemicalWizardry.customPotionSoulHardenID = config.get("Potion ID", "SoulHarden", 112).getInt();
|
||||||
|
AlchemicalWizardry.customPotionDeafID = config.get("Potion ID", "Deaf", 113).getInt();
|
||||||
|
AlchemicalWizardry.customPotionFeatherFallID = config.get("Potion ID", "FeatherFall", 114).getInt();
|
||||||
|
|
||||||
AlchemicalWizardry.allowedCrushedOresArray = config.get("oreCrushing", "allowedOres", new String[]{"iron", "gold", "copper", "tin", "lead", "silver", "osmium"}).getStringList();
|
MeteorParadigm.maxChance = config.get("meteor", "maxChance", 1000).getInt();
|
||||||
|
AlchemicalWizardry.doMeteorsDestroyBlocks = config.get("meteor", "doMeteorsDestroyBlocks", true).getBoolean(true);
|
||||||
|
AlchemicalWizardry.diamondMeteorArray = config.get("meteor", "diamondMeteor", new String[]{"oreDiamond", "100", "oreEmerald", "75", "oreCinnabar", "200", "oreAmber", "200"}).getStringList();
|
||||||
|
AlchemicalWizardry.diamondMeteorRadius = config.get("meteor", "diamondMeteorRadius", 5).getInt();
|
||||||
|
AlchemicalWizardry.stoneMeteorArray = config.get("meteor", "stoneBlockMeteor", new String[]{"oreCoal", "150", "oreApatite", "50", "oreIron", "50"}).getStringList();
|
||||||
|
AlchemicalWizardry.stoneMeteorRadius = config.get("meteor", "stoneMeteorRadius", 16).getInt();
|
||||||
|
AlchemicalWizardry.ironBlockMeteorArray = config.get("meteor", "ironBlockMeteor", new String[]{"oreIron", "400", "oreGold", "30", "oreCopper", "200", "oreTin", "140", "oreSilver", "70", "oreLead", "80", "oreLapis", "60", "oreRedstone", "100"}).getStringList();
|
||||||
|
AlchemicalWizardry.ironBlockMeteorRadius = config.get("meteor", "ironBlockMeteorRadius", 7).getInt();
|
||||||
|
AlchemicalWizardry.netherStarMeteorArray = config.get("meteor", "netherStarMeteor", new String[]{"oreDiamond", "150", "oreEmerald", "100", "oreQuartz", "250", "oreSunstone", "5", "oreMoonstone", "50", "oreIridium", "5", "oreCertusQuartz", "150"}).getStringList();
|
||||||
|
AlchemicalWizardry.netherStarMeteorRadius = config.get("meteor", "netherStarMeteorRadius", 3).getInt();
|
||||||
|
|
||||||
AlchemicalWizardry.wimpySettings = config.get("WimpySettings", "IDontLikeFun", false).getBoolean(false);
|
AlchemicalWizardry.allowedCrushedOresArray = config.get("oreCrushing", "allowedOres", new String[]{"iron", "gold", "copper", "tin", "lead", "silver", "osmium"}).getStringList();
|
||||||
AlchemicalWizardry.respawnWithDebuff = config.get("WimpySettings", "RespawnWithDebuff", true).getBoolean();
|
|
||||||
AlchemicalWizardry.causeHungerWithRegen = config.get("WimpySettings", "causeHungerWithRegen", true).getBoolean();
|
|
||||||
// AlchemicalWizardry.lockdownAltar = config.get("WimpySettings", "LockdownAltarWithRegen", true).getBoolean();
|
|
||||||
AlchemicalWizardry.lockdownAltar = false;
|
|
||||||
|
|
||||||
Side side = FMLCommonHandler.instance().getSide();
|
AlchemicalWizardry.wimpySettings = config.get("WimpySettings", "IDontLikeFun", false).getBoolean(false);
|
||||||
if (side == Side.CLIENT)
|
AlchemicalWizardry.respawnWithDebuff = config.get("WimpySettings", "RespawnWithDebuff", true).getBoolean();
|
||||||
{
|
AlchemicalWizardry.causeHungerWithRegen = config.get("WimpySettings", "causeHungerWithRegen", true).getBoolean();
|
||||||
RenderHelper.xOffset = config.get("ClientSettings", "AlchemyHUDxOffset", 50).getInt();
|
// AlchemicalWizardry.lockdownAltar = config.get("WimpySettings", "LockdownAltarWithRegen", true).getBoolean();
|
||||||
RenderHelper.yOffset = config.get("ClientSettings", "AlchemyHUDyOffset", 2).getInt();
|
AlchemicalWizardry.lockdownAltar = false;
|
||||||
}
|
|
||||||
|
AlchemicalWizardry.ritualDisabledWater = config.get("Ritual Blacklist", "Ritual of the Full Spring", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledLava = config.get("Ritual Blacklist", "Serenade of the Nether", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledGreenGrove = config.get("Ritual Blacklist", "Ritual of the Green Grove", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledInterdiction = config.get("Ritual Blacklist", "Interdiction Ritual", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledContainment = config.get("Ritual Blacklist", "Ritual of Containment", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledBinding = config.get("Ritual Blacklist", "Ritual of Binding", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledUnbinding = config.get("Ritual Blacklist", "Ritual of Unbinding", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledHighJump = config.get("Ritual Blacklist", "Ritual of the High Jump", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledMagnetism = config.get("Ritual Blacklist", "Ritual of Magnetism", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledCrusher = config.get("Ritual Blacklist", "Ritual of the Crusher", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledSpeed = config.get("Ritual Blacklist", "Ritual of Speed", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledAnimalGrowth = config.get("Ritual Blacklist", "Ritual of the Shepherd", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledSuffering = config.get("Ritual Blacklist", "Well of Suffering", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledRegen = config.get("Ritual Blacklist", "Ritual of Regeneration", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledFeatheredKnife = config.get("Ritual Blacklist", "Ritual of the Feathered Knife", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledFeatheredEarth = config.get("Ritual Blacklist", "Ritual of the Feathered Earth", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledGaia = config.get("Ritual Blacklist", "Ritual of Gaia's Transformation", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledCondor = config.get("Ritual Blacklist", "Reverence of the Condor", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledFallingTower = config.get("Ritual Blacklist", "Mark of the Falling Tower", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledBalladOfAlchemy = config.get("Ritual Blacklist", "Ballad of Alchemy", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledExpulsion = config.get("Ritual Blacklist", "Aura of Expulsion", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledSuppression = config.get("Ritual Blacklist", "Dome of Supression", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledZephyr = config.get("Ritual Blacklist", "Call of the Zephyr", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledHarvest = config.get("Ritual Blacklist", "Reap of the Harvest Moon", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledConduit = config.get("Ritual Blacklist", "Cry of the Eternal Soul", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledEllipsoid = config.get("Ritual Blacklist", "Focus of the Ellipsoid", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledEvaporation = config.get("Ritual Blacklist", "Song of Evaporation", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledSpawnWard = config.get("Ritual Blacklist", "Ward of Sacrosanctity", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledVeilOfEvil = config.get("Ritual Blacklist", "Veil of Evil", false).getBoolean(false);
|
||||||
|
AlchemicalWizardry.ritualDisabledFullStomach = config.get("Ritual Blacklist", "Requiem of the Satiated Stomach", false).getBoolean(false);
|
||||||
|
|
||||||
|
Side side = FMLCommonHandler.instance().getSide();
|
||||||
|
if (side == Side.CLIENT)
|
||||||
|
{
|
||||||
|
RenderHelper.xOffset = config.get("ClientSettings", "AlchemyHUDxOffset", 50).getInt();
|
||||||
|
RenderHelper.yOffset = config.get("ClientSettings", "AlchemyHUDyOffset", 2).getInt();
|
||||||
|
}
|
||||||
|
|
||||||
|
config.save();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void set(String categoryName, String propertyName, String newValue)
|
||||||
|
{
|
||||||
|
|
||||||
|
config.load();
|
||||||
|
if (config.getCategoryNames().contains(categoryName))
|
||||||
|
{
|
||||||
|
if (config.getCategory(categoryName).containsKey(propertyName))
|
||||||
|
{
|
||||||
|
config.getCategory(categoryName).get(propertyName).set(newValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
config.save();
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e)
|
}
|
||||||
{
|
|
||||||
|
|
||||||
//TODO Log
|
public static void loadBlacklist()
|
||||||
//FMLLog.log(Level.SEVERE, e, "Blood Magic" + " has had a problem loading its configuration, go ask on the forums :p");
|
{
|
||||||
|
AlchemicalWizardry.wellBlacklist = new ArrayList<Class>();
|
||||||
} finally
|
for (Object o : EntityList.stringToClassMapping.entrySet())
|
||||||
{
|
{
|
||||||
config.save();
|
Entry entry = (Entry) o;
|
||||||
}
|
Class curClass = (Class) entry.getValue();
|
||||||
}
|
boolean valid = EntityLivingBase.class.isAssignableFrom(curClass) && !Modifier.isAbstract(curClass.getModifiers());
|
||||||
|
if (valid)
|
||||||
public static void set(String categoryName, String propertyName, String newValue)
|
{
|
||||||
{
|
boolean blacklisted = config.get("wellOfSufferingBlackList", entry.getKey().toString(), false).getBoolean();
|
||||||
|
if (blacklisted)
|
||||||
config.load();
|
AlchemicalWizardry.wellBlacklist.add(curClass);
|
||||||
if (config.getCategoryNames().contains(categoryName))
|
}
|
||||||
{
|
|
||||||
if (config.getCategory(categoryName).containsKey(propertyName))
|
|
||||||
{
|
|
||||||
config.getCategory(categoryName).get(propertyName).set(newValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
config.save();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void loadBlacklist()
|
|
||||||
{
|
|
||||||
AlchemicalWizardry.wellBlacklist = new ArrayList<Class>();
|
|
||||||
for (Object o : EntityList.stringToClassMapping.entrySet())
|
|
||||||
{
|
|
||||||
Entry entry = (Entry) o;
|
|
||||||
Class curClass = (Class) entry.getValue();
|
|
||||||
boolean valid = EntityLivingBase.class.isAssignableFrom(curClass) && !Modifier.isAbstract(curClass.getModifiers());
|
|
||||||
if (valid)
|
|
||||||
{
|
|
||||||
boolean blacklisted = config.get("wellOfSufferingBlackList", entry.getKey().toString(), false).getBoolean();
|
|
||||||
if (blacklisted)
|
|
||||||
AlchemicalWizardry.wellBlacklist.add(curClass);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
config.save();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
config.save();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void blacklistRituals()
|
||||||
|
{
|
||||||
|
if (AlchemicalWizardry.ritualDisabledWater)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW001Water");
|
||||||
|
Rituals.keyList.remove("AW001Water");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledLava)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW002Lava");
|
||||||
|
Rituals.keyList.remove("AW002Lava");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledGreenGrove)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW003GreenGrove");
|
||||||
|
Rituals.keyList.remove("AW003GreenGrove");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledInterdiction)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW004Interdiction");
|
||||||
|
Rituals.keyList.remove("AW004Interdiction");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledContainment)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW005Containment");
|
||||||
|
Rituals.keyList.remove("AW005Containment");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledBinding)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW006Binding");
|
||||||
|
Rituals.keyList.remove("AW006Binding");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledUnbinding)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW007Unbinding");//007 reporting for duty
|
||||||
|
Rituals.keyList.remove("AW007Unbinding");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledHighJump)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW008HighJump");
|
||||||
|
Rituals.keyList.remove("AW008HighJump");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledMagnetism)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW009Magnetism");
|
||||||
|
Rituals.keyList.remove("AW009Magnetism");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledCrusher)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW010Crusher");
|
||||||
|
Rituals.keyList.remove("AW010Crusher");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledSpeed)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW011Speed");
|
||||||
|
Rituals.keyList.remove("AW011Speed");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledAnimalGrowth)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW012AnimalGrowth");
|
||||||
|
Rituals.keyList.remove("AW012AnimalGrowth");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledSuffering)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW013Suffering");
|
||||||
|
Rituals.keyList.remove("AW013Suffering");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledRegen)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW014Regen");
|
||||||
|
Rituals.keyList.remove("AW014Regen");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledFeatheredKnife)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW015FeatheredKnife");
|
||||||
|
Rituals.keyList.remove("AW015FeatheredKnife");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledFeatheredEarth)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW016FeatheredEarth");
|
||||||
|
Rituals.keyList.remove("AW016FeatheredEarth");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledGaia)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW017Gaia");
|
||||||
|
Rituals.keyList.remove("AW017Gaia");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledCondor)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW018Condor");
|
||||||
|
Rituals.keyList.remove("AW018Condor");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledFallingTower)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW019FallingTower");
|
||||||
|
Rituals.keyList.remove("AW019FallingTower");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledBalladOfAlchemy)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW020BalladOfAlchemy");
|
||||||
|
Rituals.keyList.remove("AW020BalladOfAlchemy");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledExpulsion)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW021Expulsion");
|
||||||
|
Rituals.keyList.remove("AW021Expulsion");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledSuppression)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW022Suppression");
|
||||||
|
Rituals.keyList.remove("AW022Suppression");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledZephyr)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW023Zephyr");
|
||||||
|
Rituals.keyList.remove("AW023Zephyr");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledHarvest)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW024Harvest");
|
||||||
|
Rituals.keyList.remove("AW024Harvest");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledConduit)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW025Conduit");
|
||||||
|
Rituals.keyList.remove("AW025Conduit");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledEllipsoid)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW026Ellipsoid");
|
||||||
|
Rituals.keyList.remove("AW026Ellipsoid");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledEvaporation)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW027Evaporation");
|
||||||
|
Rituals.keyList.remove("AW027Evaporation");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledSpawnWard)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW028SpawnWard");
|
||||||
|
Rituals.keyList.remove("AW028SpawnWard");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledVeilOfEvil)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW029VeilOfEvil");
|
||||||
|
Rituals.keyList.remove("AW029VeilOfEvil");
|
||||||
|
}
|
||||||
|
if (AlchemicalWizardry.ritualDisabledFullStomach)
|
||||||
|
{
|
||||||
|
Rituals.ritualMap.remove("AW030FullStomach");
|
||||||
|
Rituals.keyList.remove("AW030FullStomach");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
package WayofTime.alchemicalWizardry.client.gui;
|
||||||
|
|
||||||
|
import cpw.mods.fml.client.config.GuiConfig;
|
||||||
|
import cpw.mods.fml.client.config.IConfigElement;
|
||||||
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
|
import net.minecraftforge.common.config.ConfigCategory;
|
||||||
|
import net.minecraftforge.common.config.ConfigElement;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static WayofTime.alchemicalWizardry.BloodMagicConfiguration.config;
|
||||||
|
|
||||||
|
public class ConfigGui extends GuiConfig {
|
||||||
|
|
||||||
|
public ConfigGui(GuiScreen parentScreen) {
|
||||||
|
super(parentScreen, getConfigElements(parentScreen), "AWWayofTime", false, false, "Blood Magic Configuration");
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
|
private static List<IConfigElement> getConfigElements(GuiScreen parent) {
|
||||||
|
List<IConfigElement> list = new ArrayList<IConfigElement>();
|
||||||
|
|
||||||
|
// adds sections declared in ConfigHandler. toLowerCase() is used because the configuration class automatically does this, so must we.
|
||||||
|
list.add(new ConfigElement<ConfigCategory>(config.getCategory("clientsettings".toLowerCase())));
|
||||||
|
list.add(new ConfigElement<ConfigCategory>(config.getCategory("dungeon loot chances".toLowerCase())));
|
||||||
|
list.add(new ConfigElement<ConfigCategory>(config.getCategory("meteor".toLowerCase())));
|
||||||
|
list.add(new ConfigElement<ConfigCategory>(config.getCategory("orecrushing".toLowerCase())));
|
||||||
|
list.add(new ConfigElement<ConfigCategory>(config.getCategory("potion id".toLowerCase())));
|
||||||
|
list.add(new ConfigElement<ConfigCategory>(config.getCategory("wellofsufferingblacklist".toLowerCase())));
|
||||||
|
list.add(new ConfigElement<ConfigCategory>(config.getCategory("wimpysettings".toLowerCase())));
|
||||||
|
list.add(new ConfigElement<ConfigCategory>(config.getCategory("ritual blacklist".toLowerCase())));
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
package WayofTime.alchemicalWizardry.client.gui;
|
||||||
|
|
||||||
|
import cpw.mods.fml.client.IModGuiFactory;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
public class ConfigGuiFactory implements IModGuiFactory {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize(Minecraft minecraftInstance) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<? extends GuiScreen> mainConfigGuiClass() {
|
||||||
|
return ConfigGui.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,11 +1,18 @@
|
||||||
package WayofTime.alchemicalWizardry.common;
|
package WayofTime.alchemicalWizardry.common;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||||
import java.util.HashMap;
|
import WayofTime.alchemicalWizardry.BloodMagicConfiguration;
|
||||||
import java.util.Iterator;
|
import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile;
|
||||||
import java.util.List;
|
import WayofTime.alchemicalWizardry.common.items.BoundArmour;
|
||||||
import java.util.Map;
|
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||||
|
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||||
|
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||||
|
import cpw.mods.fml.common.ObfuscationReflectionHelper;
|
||||||
|
import cpw.mods.fml.common.Optional;
|
||||||
|
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||||
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent;
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.IProjectile;
|
import net.minecraft.entity.IProjectile;
|
||||||
|
@ -28,476 +35,476 @@ import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent;
|
||||||
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
||||||
import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn;
|
import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn;
|
||||||
import vazkii.botania.api.internal.IManaBurst;
|
import vazkii.botania.api.internal.IManaBurst;
|
||||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
|
||||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile;
|
import java.util.*;
|
||||||
import WayofTime.alchemicalWizardry.common.items.BoundArmour;
|
|
||||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
|
||||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
|
||||||
import cpw.mods.fml.common.ObfuscationReflectionHelper;
|
|
||||||
import cpw.mods.fml.common.Optional;
|
|
||||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
|
||||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
|
||||||
import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent;
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
|
||||||
|
|
||||||
public class AlchemicalWizardryEventHooks
|
public class AlchemicalWizardryEventHooks
|
||||||
{
|
{
|
||||||
public static Map<String, Boolean> playerFlightBuff = new HashMap();
|
public static Map<String, Boolean> playerFlightBuff = new HashMap();
|
||||||
public static Map<String, Boolean> playerBoostStepHeight = new HashMap();
|
public static Map<String, Boolean> playerBoostStepHeight = new HashMap();
|
||||||
public static List<String> playersWith1Step = new ArrayList();
|
public static List<String> playersWith1Step = new ArrayList();
|
||||||
|
|
||||||
public static Map<Integer, List<CoordAndRange>> respawnMap = new HashMap();
|
public static Map<Integer, List<CoordAndRange>> respawnMap = new HashMap();
|
||||||
public static Map<Integer, List<CoordAndRange>> forceSpawnMap = new HashMap();
|
public static Map<Integer, List<CoordAndRange>> forceSpawnMap = new HashMap();
|
||||||
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onAnvilUpdateEvent(AnvilUpdateEvent event)
|
|
||||||
{
|
|
||||||
if(event.isCancelable() && event.left != null && event.left.getItem() instanceof BoundArmour && event.right != null)
|
|
||||||
{
|
|
||||||
event.setCanceled(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onPlayerDamageEvent(LivingAttackEvent event)
|
|
||||||
{
|
|
||||||
if (event.source.isProjectile())
|
|
||||||
{
|
|
||||||
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionProjProt) && event.isCancelable())
|
|
||||||
{
|
|
||||||
event.setCanceled(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onLivingSpawnEvent(CheckSpawn event)
|
public void onAnvilUpdateEvent(AnvilUpdateEvent event)
|
||||||
{
|
{
|
||||||
if (!(event.entityLiving instanceof EntityMob))
|
if(event.isCancelable() && event.left != null && event.left.getItem() instanceof BoundArmour && event.right != null)
|
||||||
{
|
{
|
||||||
return;
|
event.setCanceled(true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String respawnRitual = "AW028SpawnWard";
|
@SubscribeEvent
|
||||||
|
public void onPlayerDamageEvent(LivingAttackEvent event)
|
||||||
|
{
|
||||||
|
if (event.source.isProjectile())
|
||||||
|
{
|
||||||
|
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionProjProt) && event.isCancelable())
|
||||||
|
{
|
||||||
|
event.setCanceled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Integer dimension = new Integer(event.world.provider.dimensionId);
|
@SubscribeEvent
|
||||||
if (respawnMap.containsKey(dimension))
|
public void onLivingSpawnEvent(CheckSpawn event)
|
||||||
{
|
{
|
||||||
List<CoordAndRange> list = respawnMap.get(dimension);
|
if (!(event.entityLiving instanceof EntityMob))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (list != null)
|
String respawnRitual = "AW028SpawnWard";
|
||||||
{
|
|
||||||
for (CoordAndRange coords : list)
|
|
||||||
{
|
|
||||||
TileEntity tile = event.world.getTileEntity(coords.xCoord, coords.yCoord, coords.zCoord);
|
|
||||||
|
|
||||||
if (tile instanceof TEMasterStone && ((TEMasterStone) tile).isRunning && ((TEMasterStone) tile).getCurrentRitual().equals(respawnRitual))
|
Integer dimension = new Integer(event.world.provider.dimensionId);
|
||||||
{
|
if (respawnMap.containsKey(dimension))
|
||||||
if (event.x > coords.xCoord - coords.horizRadius && event.x < coords.xCoord + coords.horizRadius && event.z > coords.zCoord - coords.horizRadius && event.z < coords.zCoord + coords.horizRadius && event.y > coords.yCoord - coords.vertRadius && event.y < coords.yCoord + coords.vertRadius)
|
{
|
||||||
{
|
List<CoordAndRange> list = respawnMap.get(dimension);
|
||||||
switch (event.getResult())
|
|
||||||
{
|
|
||||||
case ALLOW:
|
|
||||||
event.setResult(Result.DEFAULT);
|
|
||||||
break;
|
|
||||||
case DEFAULT:
|
|
||||||
event.setResult(Result.DENY);
|
|
||||||
break;
|
|
||||||
case DENY:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
list.remove(coords);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (event.entityLiving instanceof EntityCreeper)
|
if (list != null)
|
||||||
{
|
{
|
||||||
GameRegistry d;
|
for (CoordAndRange coords : list)
|
||||||
return;
|
{
|
||||||
}
|
TileEntity tile = event.world.getTileEntity(coords.xCoord, coords.yCoord, coords.zCoord);
|
||||||
|
|
||||||
String forceSpawnRitual = "AW029VeilOfEvil";
|
if (tile instanceof TEMasterStone && ((TEMasterStone) tile).isRunning && ((TEMasterStone) tile).getCurrentRitual().equals(respawnRitual))
|
||||||
|
{
|
||||||
|
if (event.x > coords.xCoord - coords.horizRadius && event.x < coords.xCoord + coords.horizRadius && event.z > coords.zCoord - coords.horizRadius && event.z < coords.zCoord + coords.horizRadius && event.y > coords.yCoord - coords.vertRadius && event.y < coords.yCoord + coords.vertRadius)
|
||||||
|
{
|
||||||
|
switch (event.getResult())
|
||||||
|
{
|
||||||
|
case ALLOW:
|
||||||
|
event.setResult(Result.DEFAULT);
|
||||||
|
break;
|
||||||
|
case DEFAULT:
|
||||||
|
event.setResult(Result.DENY);
|
||||||
|
break;
|
||||||
|
case DENY:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
list.remove(coords);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (forceSpawnMap.containsKey(dimension))
|
if (event.entityLiving instanceof EntityCreeper)
|
||||||
{
|
{
|
||||||
List<CoordAndRange> list = forceSpawnMap.get(dimension);
|
GameRegistry d;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (list != null)
|
String forceSpawnRitual = "AW029VeilOfEvil";
|
||||||
{
|
|
||||||
for (CoordAndRange coords : list)
|
|
||||||
{
|
|
||||||
TileEntity tile = event.world.getTileEntity(coords.xCoord, coords.yCoord, coords.zCoord);
|
|
||||||
|
|
||||||
if (tile instanceof TEMasterStone && ((TEMasterStone) tile).isRunning && ((TEMasterStone) tile).getCurrentRitual().equals(forceSpawnRitual))
|
if (forceSpawnMap.containsKey(dimension))
|
||||||
{
|
{
|
||||||
if (event.x > coords.xCoord - coords.horizRadius && event.x < coords.xCoord + coords.horizRadius && event.z > coords.zCoord - coords.horizRadius && event.z < coords.zCoord + coords.horizRadius && event.y > coords.yCoord - coords.vertRadius && event.y < coords.yCoord + coords.vertRadius)
|
List<CoordAndRange> list = forceSpawnMap.get(dimension);
|
||||||
{
|
|
||||||
switch (event.getResult())
|
|
||||||
{
|
|
||||||
case ALLOW:
|
|
||||||
break;
|
|
||||||
case DEFAULT:
|
|
||||||
event.setResult(Result.ALLOW);
|
|
||||||
break;
|
|
||||||
case DENY:
|
|
||||||
event.setResult(Result.DEFAULT);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
list.remove(coords);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
if (list != null)
|
||||||
public void onPlayerRespawnEvent(PlayerRespawnEvent event)
|
{
|
||||||
{
|
for (CoordAndRange coords : list)
|
||||||
if (AlchemicalWizardry.respawnWithDebuff)
|
{
|
||||||
{
|
TileEntity tile = event.world.getTileEntity(coords.xCoord, coords.yCoord, coords.zCoord);
|
||||||
event.player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionSoulFray.id, 20 * 60 * 5, 0));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
if (tile instanceof TEMasterStone && ((TEMasterStone) tile).isRunning && ((TEMasterStone) tile).getCurrentRitual().equals(forceSpawnRitual))
|
||||||
public void onLivingJumpEvent(LivingJumpEvent event)
|
{
|
||||||
{
|
if (event.x > coords.xCoord - coords.horizRadius && event.x < coords.xCoord + coords.horizRadius && event.z > coords.zCoord - coords.horizRadius && event.z < coords.zCoord + coords.horizRadius && event.y > coords.yCoord - coords.vertRadius && event.y < coords.yCoord + coords.vertRadius)
|
||||||
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionBoost))
|
{
|
||||||
{
|
switch (event.getResult())
|
||||||
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionBoost).getAmplifier();
|
{
|
||||||
event.entityLiving.motionY += (0.1f) * (2 + i);
|
case ALLOW:
|
||||||
}
|
break;
|
||||||
|
case DEFAULT:
|
||||||
|
event.setResult(Result.ALLOW);
|
||||||
|
break;
|
||||||
|
case DENY:
|
||||||
|
event.setResult(Result.DEFAULT);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
list.remove(coords);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionHeavyHeart))
|
@SubscribeEvent
|
||||||
{
|
public void onPlayerRespawnEvent(PlayerRespawnEvent event)
|
||||||
event.entityLiving.motionY = 0;
|
{
|
||||||
}
|
if (AlchemicalWizardry.respawnWithDebuff)
|
||||||
}
|
{
|
||||||
|
event.player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionSoulFray.id, 20 * 60 * 5, 0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onEndermanTeleportEvent(EnderTeleportEvent event)
|
public void onLivingJumpEvent(LivingJumpEvent event)
|
||||||
{
|
{
|
||||||
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionPlanarBinding) && event.isCancelable())
|
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionBoost))
|
||||||
{
|
{
|
||||||
event.setCanceled(true);
|
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionBoost).getAmplifier();
|
||||||
}
|
event.entityLiving.motionY += (0.1f) * (2 + i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionHeavyHeart))
|
||||||
public void onEntityDamaged(LivingAttackEvent event)
|
{
|
||||||
{
|
event.entityLiving.motionY = 0;
|
||||||
EntityLivingBase entityAttacked = event.entityLiving;
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (entityAttacked.isPotionActive(AlchemicalWizardry.customPotionReciprocation))
|
@SubscribeEvent
|
||||||
{
|
public void onEndermanTeleportEvent(EnderTeleportEvent event)
|
||||||
Entity entityAttacking = event.source.getSourceOfDamage();
|
{
|
||||||
|
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionPlanarBinding) && event.isCancelable())
|
||||||
|
{
|
||||||
|
event.setCanceled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (entityAttacking != null && entityAttacking instanceof EntityLivingBase)
|
@SubscribeEvent
|
||||||
{
|
public void onEntityDamaged(LivingAttackEvent event)
|
||||||
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionReciprocation).getAmplifier();
|
{
|
||||||
float damageRecieve = event.ammount / 2 * (i + 1);
|
EntityLivingBase entityAttacked = event.entityLiving;
|
||||||
((EntityLivingBase) entityAttacking).attackEntityFrom(DamageSource.generic, damageRecieve);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (entityAttacked.isPotionActive(AlchemicalWizardry.customPotionFlameCloak))
|
if (entityAttacked.isPotionActive(AlchemicalWizardry.customPotionReciprocation))
|
||||||
{
|
{
|
||||||
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFlameCloak).getAmplifier();
|
Entity entityAttacking = event.source.getSourceOfDamage();
|
||||||
|
|
||||||
Entity entityAttacking = event.source.getSourceOfDamage();
|
if (entityAttacking != null && entityAttacking instanceof EntityLivingBase)
|
||||||
|
{
|
||||||
|
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionReciprocation).getAmplifier();
|
||||||
|
float damageRecieve = event.ammount / 2 * (i + 1);
|
||||||
|
((EntityLivingBase) entityAttacking).attackEntityFrom(DamageSource.generic, damageRecieve);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (entityAttacking != null && entityAttacking instanceof EntityLivingBase && !entityAttacking.isImmuneToFire() && !((EntityLivingBase) entityAttacking).isPotionActive(Potion.fireResistance))
|
if (entityAttacked.isPotionActive(AlchemicalWizardry.customPotionFlameCloak))
|
||||||
{
|
{
|
||||||
entityAttacking.attackEntityFrom(DamageSource.inFire, 2 * i + 2);
|
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFlameCloak).getAmplifier();
|
||||||
entityAttacking.setFire(3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// @ForgeSubscribe
|
Entity entityAttacking = event.source.getSourceOfDamage();
|
||||||
// public void onFOVUpdate(FOVUpdateEvent event)
|
|
||||||
// {
|
|
||||||
// event.setResult(Result.DEFAULT);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @SubscribeEvent
|
if (entityAttacking != null && entityAttacking instanceof EntityLivingBase && !entityAttacking.isImmuneToFire() && !((EntityLivingBase) entityAttacking).isPotionActive(Potion.fireResistance))
|
||||||
// public void onPlayerTickEnd(PlayerTickEvent event)
|
{
|
||||||
// {
|
entityAttacking.attackEntityFrom(DamageSource.inFire, 2 * i + 2);
|
||||||
// if(event.type.equals(Type.PLAYER) && event.phase.equals(TickEvent.Phase.END))
|
entityAttacking.setFire(3);
|
||||||
// {
|
}
|
||||||
// ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, event.player.capabilities, Float.valueOf(0.1f), new String[]{"walkSpeed", "g", "field_75097_g"});
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
@SubscribeEvent
|
// @ForgeSubscribe
|
||||||
public void onEntityUpdate(LivingUpdateEvent event)
|
// public void onFOVUpdate(FOVUpdateEvent event)
|
||||||
{
|
// {
|
||||||
EntityLivingBase entityLiving = event.entityLiving;
|
// event.setResult(Result.DEFAULT);
|
||||||
double x = entityLiving.posX;
|
// }
|
||||||
double y = entityLiving.posY;
|
|
||||||
double z = entityLiving.posZ;
|
|
||||||
|
|
||||||
Vec3 blockVector = SpellHelper.getEntityBlockVector(entityLiving);
|
// @SubscribeEvent
|
||||||
int xPos = (int) (blockVector.xCoord);
|
// public void onPlayerTickEnd(PlayerTickEvent event)
|
||||||
int yPos = (int) (blockVector.yCoord);
|
// {
|
||||||
int zPos = (int) (blockVector.zCoord);
|
// if(event.type.equals(Type.PLAYER) && event.phase.equals(TickEvent.Phase.END))
|
||||||
|
// {
|
||||||
|
// ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, event.player.capabilities, Float.valueOf(0.1f), new String[]{"walkSpeed", "g", "field_75097_g"});
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
if (entityLiving instanceof EntityPlayer)
|
@SubscribeEvent
|
||||||
{
|
public void onEntityUpdate(LivingUpdateEvent event)
|
||||||
ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, ((EntityPlayer) event.entityLiving).capabilities, Float.valueOf(0.1f), new String[]{"walkSpeed", "g", "field_75097_g"});
|
{
|
||||||
}
|
EntityLivingBase entityLiving = event.entityLiving;
|
||||||
|
double x = entityLiving.posX;
|
||||||
|
double y = entityLiving.posY;
|
||||||
|
double z = entityLiving.posZ;
|
||||||
|
|
||||||
if (entityLiving instanceof EntityPlayer && entityLiving.worldObj.isRemote)
|
Vec3 blockVector = SpellHelper.getEntityBlockVector(entityLiving);
|
||||||
{
|
int xPos = (int) (blockVector.xCoord);
|
||||||
EntityPlayer entityPlayer = (EntityPlayer) entityLiving;
|
int yPos = (int) (blockVector.yCoord);
|
||||||
boolean highStepListed = playersWith1Step.contains(entityPlayer.getDisplayName());
|
int zPos = (int) (blockVector.zCoord);
|
||||||
boolean hasHighStep = entityPlayer.isPotionActive(AlchemicalWizardry.customPotionBoost);
|
|
||||||
|
|
||||||
if (hasHighStep && !highStepListed)
|
if (entityLiving instanceof EntityPlayer)
|
||||||
{
|
{
|
||||||
playersWith1Step.add(SpellHelper.getUsername(entityPlayer));
|
ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, ((EntityPlayer) event.entityLiving).capabilities, Float.valueOf(0.1f), new String[]{"walkSpeed", "g", "field_75097_g"});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hasHighStep && highStepListed)
|
if (entityLiving instanceof EntityPlayer && entityLiving.worldObj.isRemote)
|
||||||
{
|
{
|
||||||
playersWith1Step.remove(SpellHelper.getUsername(entityPlayer));
|
EntityPlayer entityPlayer = (EntityPlayer) entityLiving;
|
||||||
entityPlayer.stepHeight = 0.5F;
|
boolean highStepListed = playersWith1Step.contains(entityPlayer.getDisplayName());
|
||||||
}
|
boolean hasHighStep = entityPlayer.isPotionActive(AlchemicalWizardry.customPotionBoost);
|
||||||
}
|
|
||||||
|
|
||||||
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionFeatherFall))
|
if (hasHighStep && !highStepListed)
|
||||||
{
|
{
|
||||||
event.entityLiving.fallDistance = 0;
|
playersWith1Step.add(SpellHelper.getUsername(entityPlayer));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionDrowning))
|
if (!hasHighStep && highStepListed)
|
||||||
{
|
{
|
||||||
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionDrowning).getAmplifier();
|
playersWith1Step.remove(SpellHelper.getUsername(entityPlayer));
|
||||||
|
entityPlayer.stepHeight = 0.5F;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (event.entityLiving.worldObj.getWorldTime() % ((int) (20 / (i + 1))) == 0)
|
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionFeatherFall))
|
||||||
{
|
{
|
||||||
event.entityLiving.attackEntityFrom(DamageSource.drown, 2);
|
event.entityLiving.fallDistance = 0;
|
||||||
event.entityLiving.hurtResistantTime = Math.min(event.entityLiving.hurtResistantTime, 20 / (i + 1));
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionBoost))
|
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionDrowning))
|
||||||
{
|
{
|
||||||
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionBoost).getAmplifier();
|
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionDrowning).getAmplifier();
|
||||||
EntityLivingBase entity = event.entityLiving;
|
|
||||||
//if(!entity.isSneaking())
|
|
||||||
{
|
|
||||||
float percentIncrease = (i + 1) * 0.05f;
|
|
||||||
|
|
||||||
if (event.entityLiving instanceof EntityPlayer)
|
if (event.entityLiving.worldObj.getWorldTime() % ((int) (20 / (i + 1))) == 0)
|
||||||
{
|
{
|
||||||
EntityPlayer entityPlayer = (EntityPlayer) event.entityLiving;
|
event.entityLiving.attackEntityFrom(DamageSource.drown, 2);
|
||||||
entityPlayer.stepHeight = 1.0f;
|
event.entityLiving.hurtResistantTime = Math.min(event.entityLiving.hurtResistantTime, 20 / (i + 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((entityPlayer.onGround || entityPlayer.capabilities.isFlying) && entityPlayer.moveForward > 0F)
|
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionBoost))
|
||||||
entityPlayer.moveFlying(0F, 1F, entityPlayer.capabilities.isFlying ? (percentIncrease / 2.0f) : percentIncrease);
|
{
|
||||||
}
|
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionBoost).getAmplifier();
|
||||||
}
|
EntityLivingBase entity = event.entityLiving;
|
||||||
}
|
//if(!entity.isSneaking())
|
||||||
|
{
|
||||||
|
float percentIncrease = (i + 1) * 0.05f;
|
||||||
|
|
||||||
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionProjProt))
|
if (event.entityLiving instanceof EntityPlayer)
|
||||||
{
|
{
|
||||||
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionProjProt).getAmplifier();
|
EntityPlayer entityPlayer = (EntityPlayer) event.entityLiving;
|
||||||
EntityLivingBase entity = event.entityLiving;
|
entityPlayer.stepHeight = 1.0f;
|
||||||
int posX = (int) Math.round(entity.posX - 0.5f);
|
|
||||||
int posY = (int) Math.round(entity.posY);
|
|
||||||
int posZ = (int) Math.round(entity.posZ - 0.5f);
|
|
||||||
int d0 = (int) ((i + 1) * 2.5);
|
|
||||||
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(posX - 0.5, posY - 0.5, posZ - 0.5, posX + 0.5, posY + 0.5, posZ + 0.5).expand(d0, d0, d0);
|
|
||||||
List list = event.entityLiving.worldObj.getEntitiesWithinAABB(Entity.class, axisalignedbb);
|
|
||||||
Iterator iterator = list.iterator();
|
|
||||||
EntityLivingBase livingEntity;
|
|
||||||
|
|
||||||
while (iterator.hasNext())
|
if ((entityPlayer.onGround || entityPlayer.capabilities.isFlying) && entityPlayer.moveForward > 0F)
|
||||||
{
|
entityPlayer.moveFlying(0F, 1F, entityPlayer.capabilities.isFlying ? (percentIncrease / 2.0f) : percentIncrease);
|
||||||
Entity projectile = (Entity) iterator.next();
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (projectile == null)
|
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionProjProt))
|
||||||
{
|
{
|
||||||
continue;
|
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionProjProt).getAmplifier();
|
||||||
}
|
EntityLivingBase entity = event.entityLiving;
|
||||||
|
int posX = (int) Math.round(entity.posX - 0.5f);
|
||||||
|
int posY = (int) Math.round(entity.posY);
|
||||||
|
int posZ = (int) Math.round(entity.posZ - 0.5f);
|
||||||
|
int d0 = (int) ((i + 1) * 2.5);
|
||||||
|
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(posX - 0.5, posY - 0.5, posZ - 0.5, posX + 0.5, posY + 0.5, posZ + 0.5).expand(d0, d0, d0);
|
||||||
|
List list = event.entityLiving.worldObj.getEntitiesWithinAABB(Entity.class, axisalignedbb);
|
||||||
|
Iterator iterator = list.iterator();
|
||||||
|
EntityLivingBase livingEntity;
|
||||||
|
|
||||||
if (!(projectile instanceof IProjectile) || (AlchemicalWizardry.isBotaniaLoaded && isManaBurst(projectile)))
|
while (iterator.hasNext())
|
||||||
{
|
{
|
||||||
continue;
|
Entity projectile = (Entity) iterator.next();
|
||||||
}
|
|
||||||
|
|
||||||
Entity throwingEntity = null;
|
if (projectile == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (projectile instanceof EntityArrow)
|
if (!(projectile instanceof IProjectile) || (AlchemicalWizardry.isBotaniaLoaded && isManaBurst(projectile)))
|
||||||
{
|
{
|
||||||
throwingEntity = ((EntityArrow) projectile).shootingEntity;
|
continue;
|
||||||
} else if (projectile instanceof EnergyBlastProjectile)
|
}
|
||||||
{
|
|
||||||
throwingEntity = ((EnergyBlastProjectile) projectile).shootingEntity;
|
|
||||||
} else if (projectile instanceof EntityThrowable)
|
|
||||||
{
|
|
||||||
throwingEntity = ((EntityThrowable) projectile).getThrower();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (throwingEntity != null && throwingEntity.equals(entity))
|
Entity throwingEntity = null;
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
double delX = projectile.posX - entity.posX;
|
if (projectile instanceof EntityArrow)
|
||||||
double delY = projectile.posY - entity.posY;
|
{
|
||||||
double delZ = projectile.posZ - entity.posZ;
|
throwingEntity = ((EntityArrow) projectile).shootingEntity;
|
||||||
|
} else if (projectile instanceof EnergyBlastProjectile)
|
||||||
|
{
|
||||||
|
throwingEntity = ((EnergyBlastProjectile) projectile).shootingEntity;
|
||||||
|
} else if (projectile instanceof EntityThrowable)
|
||||||
|
{
|
||||||
|
throwingEntity = ((EntityThrowable) projectile).getThrower();
|
||||||
|
}
|
||||||
|
|
||||||
if (throwingEntity != null)
|
if (throwingEntity != null && throwingEntity.equals(entity))
|
||||||
{
|
{
|
||||||
delX = -projectile.posX + throwingEntity.posX;
|
continue;
|
||||||
delY = -projectile.posY + (throwingEntity.posY + throwingEntity.getEyeHeight());
|
}
|
||||||
delZ = -projectile.posZ + throwingEntity.posZ;
|
|
||||||
}
|
|
||||||
|
|
||||||
double curVel = Math.sqrt(delX * delX + delY * delY + delZ * delZ);
|
double delX = projectile.posX - entity.posX;
|
||||||
|
double delY = projectile.posY - entity.posY;
|
||||||
|
double delZ = projectile.posZ - entity.posZ;
|
||||||
|
|
||||||
delX /= curVel;
|
if (throwingEntity != null)
|
||||||
delY /= curVel;
|
{
|
||||||
delZ /= curVel;
|
delX = -projectile.posX + throwingEntity.posX;
|
||||||
double newVel = Math.sqrt(projectile.motionX * projectile.motionX + projectile.motionY * projectile.motionY + projectile.motionZ * projectile.motionZ);
|
delY = -projectile.posY + (throwingEntity.posY + throwingEntity.getEyeHeight());
|
||||||
projectile.motionX = newVel * delX;
|
delZ = -projectile.posZ + throwingEntity.posZ;
|
||||||
projectile.motionY = newVel * delY;
|
}
|
||||||
projectile.motionZ = newVel * delZ;
|
|
||||||
//TODO make this not affect player's projectiles
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionFlight))
|
double curVel = Math.sqrt(delX * delX + delY * delY + delZ * delZ);
|
||||||
{
|
|
||||||
if (event.entityLiving instanceof EntityPlayer)
|
|
||||||
{
|
|
||||||
EntityPlayer entityPlayer = (EntityPlayer) event.entityLiving;
|
|
||||||
String ownerName = SpellHelper.getUsername(entityPlayer);
|
|
||||||
playerFlightBuff.put(ownerName, true);
|
|
||||||
entityPlayer.capabilities.allowFlying = true;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
if (event.entityLiving instanceof EntityPlayer)
|
|
||||||
{
|
|
||||||
EntityPlayer entityPlayer = (EntityPlayer) event.entityLiving;
|
|
||||||
String ownerName = SpellHelper.getUsername(entityPlayer);
|
|
||||||
|
|
||||||
if (!playerFlightBuff.containsKey(ownerName))
|
delX /= curVel;
|
||||||
{
|
delY /= curVel;
|
||||||
playerFlightBuff.put(ownerName, false);
|
delZ /= curVel;
|
||||||
}
|
double newVel = Math.sqrt(projectile.motionX * projectile.motionX + projectile.motionY * projectile.motionY + projectile.motionZ * projectile.motionZ);
|
||||||
|
projectile.motionX = newVel * delX;
|
||||||
|
projectile.motionY = newVel * delY;
|
||||||
|
projectile.motionZ = newVel * delZ;
|
||||||
|
//TODO make this not affect player's projectiles
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (playerFlightBuff.get(ownerName))
|
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionFlight))
|
||||||
{
|
{
|
||||||
playerFlightBuff.put(ownerName, false);
|
if (event.entityLiving instanceof EntityPlayer)
|
||||||
|
{
|
||||||
|
EntityPlayer entityPlayer = (EntityPlayer) event.entityLiving;
|
||||||
|
String ownerName = SpellHelper.getUsername(entityPlayer);
|
||||||
|
playerFlightBuff.put(ownerName, true);
|
||||||
|
entityPlayer.capabilities.allowFlying = true;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
if (event.entityLiving instanceof EntityPlayer)
|
||||||
|
{
|
||||||
|
EntityPlayer entityPlayer = (EntityPlayer) event.entityLiving;
|
||||||
|
String ownerName = SpellHelper.getUsername(entityPlayer);
|
||||||
|
|
||||||
if (!entityPlayer.capabilities.isCreativeMode)
|
if (!playerFlightBuff.containsKey(ownerName))
|
||||||
{
|
{
|
||||||
entityPlayer.capabilities.allowFlying = false;
|
playerFlightBuff.put(ownerName, false);
|
||||||
entityPlayer.capabilities.isFlying = false;
|
}
|
||||||
entityPlayer.sendPlayerAbilities();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionFlameCloak))
|
if (playerFlightBuff.get(ownerName))
|
||||||
{
|
{
|
||||||
entityLiving.worldObj.spawnParticle("flame", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0);
|
playerFlightBuff.put(ownerName, false);
|
||||||
|
|
||||||
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFlameCloak).getAmplifier();
|
if (!entityPlayer.capabilities.isCreativeMode)
|
||||||
double range = i * 0.5;
|
{
|
||||||
|
entityPlayer.capabilities.allowFlying = false;
|
||||||
|
entityPlayer.capabilities.isFlying = false;
|
||||||
|
entityPlayer.sendPlayerAbilities();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<Entity> entities = SpellHelper.getEntitiesInRange(entityLiving.worldObj, x, y, z, range, range);
|
if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionFlameCloak))
|
||||||
if (entities != null)
|
{
|
||||||
{
|
entityLiving.worldObj.spawnParticle("flame", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0);
|
||||||
for (Entity entity : entities)
|
|
||||||
{
|
|
||||||
if (!entity.equals(entityLiving) && !entity.isImmuneToFire() && !(entity instanceof EntityLivingBase && ((EntityLivingBase) entity).isPotionActive(Potion.fireResistance)))
|
|
||||||
{
|
|
||||||
entity.setFire(3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionIceCloak))
|
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFlameCloak).getAmplifier();
|
||||||
{
|
double range = i * 0.5;
|
||||||
if (entityLiving.worldObj.getWorldTime() % 2 == 0)
|
|
||||||
entityLiving.worldObj.spawnParticle("reddust", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0x74, 0xbb, 0xfb);
|
|
||||||
|
|
||||||
int r = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionIceCloak).getAmplifier();
|
List<Entity> entities = SpellHelper.getEntitiesInRange(entityLiving.worldObj, x, y, z, range, range);
|
||||||
int horizRange = r + 1;
|
if (entities != null)
|
||||||
int vertRange = 1;
|
{
|
||||||
|
for (Entity entity : entities)
|
||||||
|
{
|
||||||
|
if (!entity.equals(entityLiving) && !entity.isImmuneToFire() && !(entity instanceof EntityLivingBase && ((EntityLivingBase) entity).isPotionActive(Potion.fireResistance)))
|
||||||
|
{
|
||||||
|
entity.setFire(3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!entityLiving.worldObj.isRemote)
|
if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionIceCloak))
|
||||||
{
|
{
|
||||||
for (int i = -horizRange; i <= horizRange; i++)
|
if (entityLiving.worldObj.getWorldTime() % 2 == 0)
|
||||||
{
|
entityLiving.worldObj.spawnParticle("reddust", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0x74, 0xbb, 0xfb);
|
||||||
for (int k = -horizRange; k <= horizRange; k++)
|
|
||||||
{
|
|
||||||
for (int j = -vertRange - 1; j <= vertRange - 1; j++)
|
|
||||||
{
|
|
||||||
SpellHelper.freezeWaterBlock(entityLiving.worldObj, xPos + i, yPos + j, zPos + k);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionHeavyHeart))
|
int r = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionIceCloak).getAmplifier();
|
||||||
{
|
int horizRange = r + 1;
|
||||||
entityLiving.worldObj.spawnParticle("flame", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0);
|
int vertRange = 1;
|
||||||
|
|
||||||
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionHeavyHeart).getAmplifier();
|
if (!entityLiving.worldObj.isRemote)
|
||||||
double decrease = 0.025 * (i + 1);
|
{
|
||||||
|
for (int i = -horizRange; i <= horizRange; i++)
|
||||||
|
{
|
||||||
|
for (int k = -horizRange; k <= horizRange; k++)
|
||||||
|
{
|
||||||
|
for (int j = -vertRange - 1; j <= vertRange - 1; j++)
|
||||||
|
{
|
||||||
|
SpellHelper.freezeWaterBlock(entityLiving.worldObj, xPos + i, yPos + j, zPos + k);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (entityLiving.motionY > -0.9)
|
if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionHeavyHeart))
|
||||||
{
|
{
|
||||||
entityLiving.motionY -= decrease;
|
entityLiving.worldObj.spawnParticle("flame", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0);
|
||||||
}
|
|
||||||
|
|
||||||
if(entityLiving instanceof EntityPlayer)
|
|
||||||
{
|
|
||||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer)entityLiving, entityLiving.motionX, entityLiving.motionY - decrease, entityLiving.motionZ);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionFireFuse))
|
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionHeavyHeart).getAmplifier();
|
||||||
{
|
double decrease = 0.025 * (i + 1);
|
||||||
entityLiving.worldObj.spawnParticle("flame", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0);
|
|
||||||
|
|
||||||
int r = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFireFuse).getAmplifier();
|
if (entityLiving.motionY > -0.9)
|
||||||
int radius = r + 1;
|
{
|
||||||
|
entityLiving.motionY -= decrease;
|
||||||
|
}
|
||||||
|
|
||||||
if (entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFireFuse).getDuration() <= 2)
|
if(entityLiving instanceof EntityPlayer)
|
||||||
{
|
{
|
||||||
entityLiving.worldObj.createExplosion(null, x, y, z, radius, false);
|
SpellHelper.setPlayerSpeedFromServer((EntityPlayer)entityLiving, entityLiving.motionX, entityLiving.motionY - decrease, entityLiving.motionZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionFireFuse))
|
||||||
@Optional.Method(modid = "Botania")
|
{
|
||||||
private boolean isManaBurst(Entity projectile)
|
entityLiving.worldObj.spawnParticle("flame", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0);
|
||||||
{
|
|
||||||
return projectile instanceof IManaBurst;
|
int r = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFireFuse).getAmplifier();
|
||||||
}
|
int radius = r + 1;
|
||||||
|
|
||||||
|
if (entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFireFuse).getDuration() <= 2)
|
||||||
|
{
|
||||||
|
entityLiving.worldObj.createExplosion(null, x, y, z, radius, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) {
|
||||||
|
if (event.modID.equals("AWWayofTime")) {
|
||||||
|
BloodMagicConfiguration.syncConfig();
|
||||||
|
AlchemicalWizardry.logger.info("Refreshing configuration file.");
|
||||||
|
BloodMagicConfiguration.syncConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Optional.Method(modid = "Botania")
|
||||||
|
private boolean isManaBurst(Entity projectile)
|
||||||
|
{
|
||||||
|
return projectile instanceof IManaBurst;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package WayofTime.alchemicalWizardry.common.demonVillage;
|
package WayofTime.alchemicalWizardry.common.demonVillage;
|
||||||
|
|
||||||
|
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
@ -64,8 +65,6 @@ public class GridSpaceHolder
|
||||||
{
|
{
|
||||||
GridSpace[][] newGrid = new GridSpace[negXRadius + posXRadius + 1][negZRadius + posZRadius + 2];
|
GridSpace[][] newGrid = new GridSpace[negXRadius + posXRadius + 1][negZRadius + posZRadius + 2];
|
||||||
|
|
||||||
System.out.println("x " + newGrid.length + "z " + newGrid[0].length);
|
|
||||||
|
|
||||||
for (int i = 0; i <= negXRadius + posXRadius; i++)
|
for (int i = 0; i <= negXRadius + posXRadius; i++)
|
||||||
{
|
{
|
||||||
newGrid[i][0] = new GridSpace();
|
newGrid[i][0] = new GridSpace();
|
||||||
|
@ -147,7 +146,7 @@ public class GridSpaceHolder
|
||||||
{
|
{
|
||||||
if (master != null)
|
if (master != null)
|
||||||
{
|
{
|
||||||
System.out.println("negXRadius: " + negXRadius + " posXRadius: " + posXRadius + " negZRadius: " + negZRadius + " posZRadius: " + posZRadius);
|
AlchemicalWizardry.logger.info("negXRadius: " + negXRadius + " posXRadius: " + posXRadius + " negZRadius: " + negZRadius + " posZRadius: " + posZRadius);
|
||||||
for (int i = -negXRadius; i <= posXRadius; i++)
|
for (int i = -negXRadius; i <= posXRadius; i++)
|
||||||
{
|
{
|
||||||
for (int j = -negZRadius; j <= posZRadius; j++)
|
for (int j = -negZRadius; j <= posZRadius; j++)
|
||||||
|
@ -158,7 +157,7 @@ public class GridSpaceHolder
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("x: " + i + " z: " + j);
|
AlchemicalWizardry.logger.info("x: " + i + " z: " + j);
|
||||||
|
|
||||||
int xOff = 0;
|
int xOff = 0;
|
||||||
int zOff = 0;
|
int zOff = 0;
|
||||||
|
@ -195,7 +194,7 @@ public class GridSpaceHolder
|
||||||
|
|
||||||
public void setAllGridSpaces(int xInit, int zInit, int yLevel, ForgeDirection dir, int type, GridSpaceHolder master)
|
public void setAllGridSpaces(int xInit, int zInit, int yLevel, ForgeDirection dir, int type, GridSpaceHolder master)
|
||||||
{
|
{
|
||||||
System.out.println("Grid space selected: (" + xInit + "," + zInit + ")");
|
AlchemicalWizardry.logger.info("Grid space selected: (" + xInit + "," + zInit + ")");
|
||||||
if (master != null)
|
if (master != null)
|
||||||
{
|
{
|
||||||
for (int i = -negXRadius; i <= posXRadius; i++)
|
for (int i = -negXRadius; i <= posXRadius; i++)
|
||||||
|
@ -231,7 +230,7 @@ public class GridSpaceHolder
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("Grid space (" + (xInit + xOff) + "," + (zInit + zOff) + ")");
|
AlchemicalWizardry.logger.info("Grid space (" + (xInit + xOff) + "," + (zInit + zOff) + ")");
|
||||||
|
|
||||||
master.setGridSpace(xInit + xOff, zInit + zOff, new GridSpace(type, yLevel));
|
master.setGridSpace(xInit + xOff, zInit + zOff, new GridSpace(type, yLevel));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,14 @@
|
||||||
package WayofTime.alchemicalWizardry.common.demonVillage.tileEntity;
|
package WayofTime.alchemicalWizardry.common.demonVillage.tileEntity;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||||
import java.io.File;
|
import WayofTime.alchemicalWizardry.common.Int3;
|
||||||
import java.io.FileNotFoundException;
|
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
|
||||||
import java.io.FileReader;
|
import WayofTime.alchemicalWizardry.common.demonVillage.*;
|
||||||
import java.util.ArrayList;
|
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.DemonPacketRegistry;
|
||||||
import java.util.HashMap;
|
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.DemonType;
|
||||||
import java.util.HashSet;
|
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon;
|
||||||
import java.util.LinkedList;
|
import com.google.gson.Gson;
|
||||||
import java.util.List;
|
import com.google.gson.GsonBuilder;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
import java.util.Random;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.EntityCreature;
|
import net.minecraft.entity.EntityCreature;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
@ -24,20 +19,13 @@ import net.minecraft.nbt.NBTTagList;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraftforge.common.util.Constants;
|
import net.minecraftforge.common.util.Constants;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
import WayofTime.alchemicalWizardry.common.Int3;
|
|
||||||
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
|
|
||||||
import WayofTime.alchemicalWizardry.common.demonVillage.BuildingSchematic;
|
|
||||||
import WayofTime.alchemicalWizardry.common.demonVillage.DemonBuilding;
|
|
||||||
import WayofTime.alchemicalWizardry.common.demonVillage.DemonCrosspath;
|
|
||||||
import WayofTime.alchemicalWizardry.common.demonVillage.DemonVillagePath;
|
|
||||||
import WayofTime.alchemicalWizardry.common.demonVillage.GridSpace;
|
|
||||||
import WayofTime.alchemicalWizardry.common.demonVillage.GridSpaceHolder;
|
|
||||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.DemonPacketRegistry;
|
|
||||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.DemonType;
|
|
||||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon;
|
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import java.io.BufferedReader;
|
||||||
import com.google.gson.GsonBuilder;
|
import java.io.File;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
|
import java.io.FileReader;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
public class TEDemonPortal extends TileEntity
|
public class TEDemonPortal extends TileEntity
|
||||||
{
|
{
|
||||||
|
@ -240,11 +228,11 @@ public class TEDemonPortal extends TileEntity
|
||||||
this.incrementPoints();
|
this.incrementPoints();
|
||||||
this.assignPoints();
|
this.assignPoints();
|
||||||
|
|
||||||
System.out.println("Roads: " + roadCooldown + " Buildings: " + houseCooldown);
|
AlchemicalWizardry.logger.info("Roads: " + roadCooldown + " Buildings: " + houseCooldown);
|
||||||
|
|
||||||
if(buildingStage >= 0 && buildingStage <=2)
|
if(buildingStage >= 0 && buildingStage <=2)
|
||||||
{
|
{
|
||||||
System.out.println("BuildingStage = " + buildingStage);
|
AlchemicalWizardry.logger.info("BuildingStage = " + buildingStage);
|
||||||
this.createPortalBuilding(buildingStage, nextDemonPortalName, tier);
|
this.createPortalBuilding(buildingStage, nextDemonPortalName, tier);
|
||||||
buildingStage++;
|
buildingStage++;
|
||||||
return;
|
return;
|
||||||
|
@ -463,7 +451,7 @@ public class TEDemonPortal extends TileEntity
|
||||||
int z = road.zCoord;
|
int z = road.zCoord;
|
||||||
|
|
||||||
if(printDebug)
|
if(printDebug)
|
||||||
System.out.println("X: " + x + " Z: " + z + " Direction: " + dir.toString());
|
AlchemicalWizardry.logger.info("X: " + x + " Z: " + z + " Direction: " + dir.toString());
|
||||||
|
|
||||||
List<ForgeDirection> directions = this.findValidExtentionDirection(x, z);
|
List<ForgeDirection> directions = this.findValidExtentionDirection(x, z);
|
||||||
|
|
||||||
|
@ -495,9 +483,9 @@ public class TEDemonPortal extends TileEntity
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if(printDebug)
|
if(printDebug)
|
||||||
System.out.println("I got here!");
|
AlchemicalWizardry.logger.info("I got here!");
|
||||||
if(printDebug)
|
if(printDebug)
|
||||||
System.out.println("Distance: " + distance + " Direction: " + dominantDirection.toString() + " yLevel: " + yLevel);
|
AlchemicalWizardry.logger.info("Distance: " + distance + " Direction: " + dominantDirection.toString() + " yLevel: " + yLevel);
|
||||||
|
|
||||||
this.createGriddedRoad(x, yLevel, z, dominantDirection, distance + 1, true);
|
this.createGriddedRoad(x, yLevel, z, dominantDirection, distance + 1, true);
|
||||||
|
|
||||||
|
@ -859,7 +847,7 @@ public class TEDemonPortal extends TileEntity
|
||||||
{
|
{
|
||||||
initY = next.yCoord;
|
initY = next.yCoord;
|
||||||
if(printDebug)
|
if(printDebug)
|
||||||
System.out.println("" + initY);
|
AlchemicalWizardry.logger.info("" + initY);
|
||||||
}
|
}
|
||||||
|
|
||||||
initGridX += dir.offsetX;
|
initGridX += dir.offsetX;
|
||||||
|
@ -918,7 +906,7 @@ public class TEDemonPortal extends TileEntity
|
||||||
GridSpace[][] newGrid = new GridSpace[negXRadius + posXRadius + 1][negZRadius + posZRadius + 2];
|
GridSpace[][] newGrid = new GridSpace[negXRadius + posXRadius + 1][negZRadius + posZRadius + 2];
|
||||||
|
|
||||||
if(printDebug)
|
if(printDebug)
|
||||||
System.out.println("x " + newGrid.length + "z " + newGrid[0].length);
|
AlchemicalWizardry.logger.info("x " + newGrid.length + "z " + newGrid[0].length);
|
||||||
|
|
||||||
for (int i = 0; i <= negXRadius + posXRadius; i++)
|
for (int i = 0; i <= negXRadius + posXRadius; i++)
|
||||||
{
|
{
|
||||||
|
@ -1033,7 +1021,7 @@ public class TEDemonPortal extends TileEntity
|
||||||
|
|
||||||
public int createPortalBuilding(int buildingTier) //TODO Telepose block next time, then build the new building.
|
public int createPortalBuilding(int buildingTier) //TODO Telepose block next time, then build the new building.
|
||||||
{
|
{
|
||||||
System.out.println("Hello, I am here!");
|
AlchemicalWizardry.logger.info("Hello, I am here!");
|
||||||
int x = 0;
|
int x = 0;
|
||||||
int z = 0;
|
int z = 0;
|
||||||
|
|
||||||
|
@ -1189,7 +1177,7 @@ public class TEDemonPortal extends TileEntity
|
||||||
int yLevel = space.yCoord;
|
int yLevel = space.yCoord;
|
||||||
|
|
||||||
if(printDebug)
|
if(printDebug)
|
||||||
System.out.println("Road space - x: " + x + " z: " + z);
|
AlchemicalWizardry.logger.info("Road space - x: " + x + " z: " + z);
|
||||||
|
|
||||||
GridSpaceHolder grid = this.createGSH();
|
GridSpaceHolder grid = this.createGSH();
|
||||||
|
|
||||||
|
@ -1240,7 +1228,7 @@ public class TEDemonPortal extends TileEntity
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
System.out.println("This ISN'T valid!");
|
AlchemicalWizardry.logger.info("This ISN'T valid!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -356,7 +356,7 @@ public class ItemFluidSigil extends Item implements IFluidContainerItem
|
||||||
}
|
}
|
||||||
Fluid fluid = FluidRegistry.lookupFluidForBlock(block);
|
Fluid fluid = FluidRegistry.lookupFluidForBlock(block);
|
||||||
|
|
||||||
System.out.println("x: " + (i - range) + " y: " + (j - range) + " z: " + (k - range));
|
AlchemicalWizardry.logger.info("x: " + (i - range) + " y: " + (j - range) + " z: " + (k - range));
|
||||||
|
|
||||||
|
|
||||||
if (fluid == null || world.getBlockMetadata(x + i - range, y + j - range, z + k - range) != 0)
|
if (fluid == null || world.getBlockMetadata(x + i - range, y + j - range, z + k - range) != 0)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool;
|
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool;
|
||||||
|
|
||||||
|
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||||
import WayofTime.alchemicalWizardry.common.items.spell.ItemSpellMultiTool;
|
import WayofTime.alchemicalWizardry.common.items.spell.ItemSpellMultiTool;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -37,7 +38,7 @@ public class DigAreaTunnel extends DigAreaEffect
|
||||||
ForgeDirection sidehit = ForgeDirection.getOrientation(blockPos.sideHit);
|
ForgeDirection sidehit = ForgeDirection.getOrientation(blockPos.sideHit);
|
||||||
ForgeDirection opposite = sidehit.getOpposite();
|
ForgeDirection opposite = sidehit.getOpposite();
|
||||||
|
|
||||||
System.out.println(opposite.toString());
|
AlchemicalWizardry.logger.info(opposite.toString());
|
||||||
|
|
||||||
double initialLength = this.getRandomVectorLength();
|
double initialLength = this.getRandomVectorLength();
|
||||||
|
|
||||||
|
@ -149,7 +150,7 @@ public class DigAreaTunnel extends DigAreaEffect
|
||||||
public void travelVector(Vec3 vector, World world, double x, double y, double z)
|
public void travelVector(Vec3 vector, World world, double x, double y, double z)
|
||||||
{
|
{
|
||||||
double vecLength = vector.lengthVector();
|
double vecLength = vector.lengthVector();
|
||||||
System.out.println(vecLength);
|
AlchemicalWizardry.logger.info(vecLength);
|
||||||
Vec3 normVec = Vec3.createVectorHelper(vector.xCoord, vector.yCoord, vector.zCoord);
|
Vec3 normVec = Vec3.createVectorHelper(vector.xCoord, vector.yCoord, vector.zCoord);
|
||||||
normVec = normVec.normalize();
|
normVec = normVec.normalize();
|
||||||
|
|
||||||
|
@ -158,7 +159,7 @@ public class DigAreaTunnel extends DigAreaEffect
|
||||||
|
|
||||||
while (distanceTravelled < vecLength)
|
while (distanceTravelled < vecLength)
|
||||||
{
|
{
|
||||||
System.out.println(distanceTravelled);
|
AlchemicalWizardry.logger.info(distanceTravelled);
|
||||||
double stepLength = this.getRandomStepLength();
|
double stepLength = this.getRandomStepLength();
|
||||||
|
|
||||||
prevVec = prevVec.addVector(stepLength * normVec.xCoord, stepLength * normVec.yCoord, normVec.zCoord);
|
prevVec = prevVec.addVector(stepLength * normVec.xCoord, stepLength * normVec.yCoord, normVec.zCoord);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package WayofTime.alchemicalWizardry.common.tileEntity;
|
package WayofTime.alchemicalWizardry.common.tileEntity;
|
||||||
|
|
||||||
|
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||||
import WayofTime.alchemicalWizardry.common.demonVillage.BuildingSchematic;
|
import WayofTime.alchemicalWizardry.common.demonVillage.BuildingSchematic;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
|
@ -45,13 +46,13 @@ public class TESchematicSaver extends TileEntity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("" + i);
|
AlchemicalWizardry.logger.info("" + i);
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("I got here!");
|
AlchemicalWizardry.logger.info("I got here!");
|
||||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||||
String json = gson.toJson(schematic);
|
String json = gson.toJson(schematic);
|
||||||
System.out.println("Here, too!");
|
AlchemicalWizardry.logger.info("Here, too!");
|
||||||
Writer writer;
|
Writer writer;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue