commit
25bc226994
|
@ -1,14 +1,45 @@
|
|||
package WayofTime.alchemicalWizardry;
|
||||
|
||||
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;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry;
|
||||
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.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 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 joshie.alchemicalWizardy.ShapedBloodOrbRecipe;
|
||||
import joshie.alchemicalWizardy.ShapelessBloodOrbRecipe;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
@ -34,140 +65,17 @@ import thaumcraft.api.ItemApi;
|
|||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry;
|
||||
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.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.TEDemonPortal;
|
||||
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 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 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.0")
|
||||
//@NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = {"BloodAltar", "particle", "SetLifeEssence", "GetLifeEssence", "Ritual", "GetAltarEssence", "TESocket", "TEWritingTable", "CustomParticle", "SetPlayerVel", "SetPlayerPos", "TEPedestal", "TEPlinth", "TETeleposer", "InfiniteLPPath", "TEOrientor"}, packetHandler = PacketHandler.class)
|
||||
|
||||
public class AlchemicalWizardry
|
||||
{
|
||||
|
@ -284,13 +192,13 @@ public class AlchemicalWizardry
|
|||
{
|
||||
File bmDirectory = new File("config/BloodMagic/schematics");
|
||||
|
||||
if(!bmDirectory.exists() && bmDirectory.mkdirs())
|
||||
if (!bmDirectory.exists() && bmDirectory.mkdirs())
|
||||
{
|
||||
try
|
||||
{
|
||||
InputStream in = AlchemicalWizardry.class.getResourceAsStream("/assets/alchemicalwizardry/schematics/building/buildings.zip");
|
||||
System.out.println("none yet!");
|
||||
if(in != null)
|
||||
if (in != null)
|
||||
{
|
||||
System.out.println("I have found a zip!");
|
||||
ZipInputStream zipStream = new ZipInputStream(in);
|
||||
|
@ -298,10 +206,10 @@ public class AlchemicalWizardry
|
|||
|
||||
int extractCount = 0;
|
||||
|
||||
while((entry = zipStream.getNextEntry()) != null)
|
||||
while ((entry = zipStream.getNextEntry()) != null)
|
||||
{
|
||||
File file = new File(bmDirectory, entry.getName());
|
||||
if(file.exists() && file.length() > 3L)
|
||||
if (file.exists() && file.length() > 3L)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -309,7 +217,7 @@ public class AlchemicalWizardry
|
|||
|
||||
byte[] buffer = new byte[8192];
|
||||
int len;
|
||||
while((len = zipStream.read(buffer)) != -1)
|
||||
while ((len = zipStream.read(buffer)) != -1)
|
||||
{
|
||||
out.write(buffer, 0, len);
|
||||
}
|
||||
|
@ -318,10 +226,8 @@ public class AlchemicalWizardry
|
|||
extractCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
} catch (Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -331,8 +237,6 @@ public class AlchemicalWizardry
|
|||
BloodMagicConfiguration.init(new File(event.getModConfigurationDirectory(), "AWWayofTime.cfg"));
|
||||
|
||||
//Custom config stuff goes here
|
||||
|
||||
|
||||
Potion[] potionTypes = null;
|
||||
|
||||
for (Field f : Potion.class.getDeclaredFields())
|
||||
|
@ -361,12 +265,8 @@ public class AlchemicalWizardry
|
|||
FluidRegistry.registerFluid(lifeEssenceFluid);
|
||||
|
||||
ModBlocks.init();
|
||||
|
||||
|
||||
ModBlocks.registerBlocksInPre();
|
||||
|
||||
ModItems.init();
|
||||
|
||||
ModItems.registerItems();
|
||||
|
||||
RecipeSorter.INSTANCE.register("AWWayofTime:shapedorb", ShapedBloodOrbRecipe.class, Category.SHAPED, "before:minecraft:shapeless");
|
||||
|
@ -382,7 +282,6 @@ public class AlchemicalWizardry
|
|||
public void load(FMLInitializationEvent event)
|
||||
{
|
||||
int craftingConstant = OreDictionary.WILDCARD_VALUE;
|
||||
//TickRegistry.registerTickHandler(new AlchemicalWizardryTickHandler(), Side.SERVER);
|
||||
|
||||
ModBlocks.registerBlocksInInit();
|
||||
//blocks
|
||||
|
@ -391,8 +290,9 @@ public class AlchemicalWizardry
|
|||
proxy.registerEntities();
|
||||
proxy.registerEntityTrackers();
|
||||
proxy.registerEvents();
|
||||
|
||||
//ItemStacks used for crafting go here
|
||||
ItemStack lapisStack = new ItemStack(Items.dye,1,4);
|
||||
ItemStack lapisStack = new ItemStack(Items.dye, 1, 4);
|
||||
ItemStack lavaBucketStack = new ItemStack(Items.lava_bucket);
|
||||
ItemStack cobblestoneStack = new ItemStack(Blocks.cobblestone, 1, craftingConstant);
|
||||
ItemStack glassStack = new ItemStack(Blocks.glass, 1, craftingConstant);
|
||||
|
@ -423,9 +323,7 @@ public class AlchemicalWizardry
|
|||
ItemStack saplingStack = new ItemStack(Blocks.sapling);
|
||||
ItemStack reedStack = new ItemStack(Items.reeds);
|
||||
ItemStack blankSlateStack = new ItemStack(ModItems.blankSlate, 1, craftingConstant);
|
||||
//ItemStack glassShardStack = new ItemStack(glassShard);
|
||||
ItemStack weakBloodOrbStackCrafted = new ItemStack(ModItems.weakBloodOrb);
|
||||
//ItemStack bloodiedShardStack = new ItemStack(bloodiedShard);
|
||||
ItemStack reinforcedSlateStack = new ItemStack(ModItems.reinforcedSlate, 1, craftingConstant);
|
||||
ItemStack weakBloodOrbStack = new ItemStack(ModItems.weakBloodOrb, 1, craftingConstant);
|
||||
ItemStack imbuedSlateStack = new ItemStack(ModItems.imbuedSlate, 1, craftingConstant);
|
||||
|
@ -441,7 +339,7 @@ public class AlchemicalWizardry
|
|||
ItemStack energySwordStack = new ItemStack(ModItems.energySword);
|
||||
ItemStack energyBlasterStack = new ItemStack(ModItems.energyBlaster);
|
||||
ItemStack sacrificialDaggerStack = new ItemStack(ModItems.sacrificialDagger);
|
||||
ItemStack bloodAltarStack = new ItemStack(ModBlocks.blockAltar,1,0);
|
||||
ItemStack bloodAltarStack = new ItemStack(ModBlocks.blockAltar, 1, 0);
|
||||
ItemStack bloodRuneCraftedStack = new ItemStack(ModBlocks.bloodRune, 1);
|
||||
ItemStack bloodRuneStack = new ItemStack(ModBlocks.bloodRune);
|
||||
ItemStack speedRuneStack = new ItemStack(ModBlocks.speedRune);
|
||||
|
@ -451,10 +349,6 @@ public class AlchemicalWizardry
|
|||
ItemStack miningSigilStackCrafted = new ItemStack(ModItems.sigilOfTheFastMiner);
|
||||
ItemStack divinationSigilStackCrafted = new ItemStack(ModItems.divinationSigil);
|
||||
ItemStack seerSigilStackCrafted = new ItemStack(ModItems.itemSeerSigil);
|
||||
// ItemStack elementalInkWaterStack = new ItemStack(elementalInkWater);
|
||||
// ItemStack elementalInkFireStack = new ItemStack(elementalInkFire);
|
||||
// ItemStack elementalInkEarthStack = new ItemStack(elementalInkEarth);
|
||||
// ItemStack elementalInkAirStack = new ItemStack(elementalInkAir);
|
||||
ItemStack waterScribeToolStack = new ItemStack(ModItems.waterScribeTool);
|
||||
ItemStack fireScribeToolStack = new ItemStack(ModItems.fireScribeTool);
|
||||
ItemStack earthScribeToolStack = new ItemStack(ModItems.earthScribeTool);
|
||||
|
@ -481,7 +375,6 @@ public class AlchemicalWizardry
|
|||
ItemStack simpleCatalystStack = new ItemStack(ModItems.simpleCatalyst);
|
||||
ItemStack duskRitualDivinerStack = new ItemStack(ModItems.itemRitualDiviner);
|
||||
((ItemRitualDiviner) duskRitualDivinerStack.getItem()).setMaxRuneDisplacement(duskRitualDivinerStack, 1);
|
||||
//weakBloodOrbStackCrafted.setItemDamage(weakBloodOrbStackCrafted.getMaxDamage());
|
||||
waterSigilStackCrafted.setItemDamage(waterSigilStackCrafted.getMaxDamage());
|
||||
lavaSigilStackCrafted.setItemDamage(lavaSigilStackCrafted.getMaxDamage());
|
||||
voidSigilStackCrafted.setItemDamage(voidSigilStackCrafted.getMaxDamage());
|
||||
|
@ -499,37 +392,24 @@ public class AlchemicalWizardry
|
|||
ItemStack crepitousStack = new ItemStack(ModItems.crepitous);
|
||||
ItemStack magicalesStack = new ItemStack(ModItems.magicales);
|
||||
//All crafting goes here
|
||||
// GameRegistry.addRecipe(orbOfTestingStack, "x x", " ", "x x", 'x', cobblestoneStack);
|
||||
//GameRegistry.addRecipe(glassShardStack, " x", "y ", 'x', ironIngotStack, 'y', glassStack);
|
||||
//GameRegistry.addRecipe(weakBloodOrbStackCrafted, "xxx", "xdx", "www", 'x', bloodiedShardStack, 'd', diamondStack, 'w', woolStack);
|
||||
GameRegistry.addRecipe(sacrificialDaggerStack, "ggg", " dg", "i g", 'g', glassStack, 'd', goldIngotStack, 'i', ironIngotStack);
|
||||
//GameRegistry.addRecipe(blankSlateStack, "sgs", "gig", "sgs", 's', stoneStack, 'g', goldNuggetStack, 'i', ironIngotStack);
|
||||
//GameRegistry.addRecipe(reinforcedSlateStack, "rir", "ibi", "gig", 'r', redstoneStack, 'i', ironIngotStack, 'b', blankSlateStack, 'g', glowstoneBlockStack);
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(lavaCrystalStackCrafted, "glg", "lbl", "odo", 'g', glassStack, 'l', lavaBucketStack, 'b', weakBloodOrbStack, 'd', diamondStack, 'o', obsidianStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(waterSigilStackCrafted, "www", "wbw", "wow", 'w', waterBucketStack, 'b', blankSlateStack, 'o', weakBloodOrbStack));
|
||||
GameRegistry.addRecipe(lavaSigilStackCrafted, "lml", "lbl", "lcl", 'l', lavaBucketStack, 'b', blankSlateStack, 'm', magmaCreamStack, 'c', lavaCrystalStack);
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(voidSigilStackCrafted, "ese", "ere", "eoe", 'e', emptyBucketStack, 'r', reinforcedSlateStack, 'o', apprenticeBloodOrbStack, 's', stringStack));
|
||||
GameRegistry.addRecipe(bloodAltarStack, "s s", "scs", "gdg", 's', stoneStack, 'c', furnaceStack, 'd', diamondStack, 'g', goldIngotStack);
|
||||
//GameRegistry.addRecipe(energySwordStack, " o ", " o ", " s ", 'o', weakBloodOrbStack, 's', diamondSwordStack);
|
||||
//GameRegistry.addRecipe(energyBlasterStack, "oi ", "gdi", " rd", 'o', weakBloodOrbStack, 'i', ironIngotStack, 'd', diamondStack, 'r', reinforcedSlateStack, 'g', goldIngotStack);
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(bloodRuneCraftedStack, "sss", "ror", "sss", 's', stoneStack, 'o', weakBloodOrbStack, 'r', blankSlateStack));
|
||||
GameRegistry.addRecipe(speedRuneStack, "sbs", "uru", "sbs", 'u', sugarStack, 's', stoneStack, 'r', bloodRuneStack, 'b', blankSlateStack);
|
||||
//GameRegistry.addRecipe(efficiencyRuneStack, "sbs", "rur", "sbs", 'r', redstoneStack, 's', stoneStack, 'u', bloodRuneStack,'b',blankSlateStack);
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.bloodRune, 1, 1), "sbs", "bob", "srs", 's', stoneStack, 'o', magicianBloodOrbStack, 'b', emptyBucketStack, 'r', new ItemStack(ModItems.imbuedSlate)));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.bloodRune, 1, 2), "sbs", "bob", "srs", 's', stoneStack, 'o', magicianBloodOrbStack, 'b', waterBucketStack, 'r', new ItemStack(ModItems.imbuedSlate)));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.bloodRune, 1, 3), "sws", "ror", "sws", 's', stoneStack, 'o', new ItemStack(ModItems.masterBloodOrb), 'w', weakBloodOrbStack, 'r', new ItemStack(ModItems.demonicSlate)));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.bloodRune, 1, 4), "srs", "beb", "sos", 's', obsidianStack, 'o', new ItemStack(ModItems.masterBloodOrb), 'r', new ItemStack(ModItems.demonicSlate), 'b', emptyBucketStack,'e',new ItemStack(ModBlocks.bloodRune, 1, 1)));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.bloodRune, 1, 4), "srs", "beb", "sos", 's', obsidianStack, 'o', new ItemStack(ModItems.masterBloodOrb), 'r', new ItemStack(ModItems.demonicSlate), 'b', emptyBucketStack, 'e', new ItemStack(ModBlocks.bloodRune, 1, 1)));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(airSigilStack, "fgf", "fsf", "fof", 'f', featherStack, 'g', ghastTearStack, 's', reinforcedSlateStack, 'o', apprenticeBloodOrbStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(miningSigilStackCrafted, "sps", "hra", "sos", 'o', apprenticeBloodOrbStack, 's', stoneStack, 'p', ironPickaxeStack, 'h', ironShovelStack, 'a', ironAxeStack, 'r', reinforcedSlateStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(runeOfSacrificeStack, "srs", "gog", "srs", 's', stoneStack, 'g', goldIngotStack, 'o', apprenticeBloodOrbStack, 'r', reinforcedSlateStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(runeOfSelfSacrificeStack, "srs", "gog", "srs", 's', stoneStack, 'g', glowstoneDustStack, 'o', apprenticeBloodOrbStack, 'r', reinforcedSlateStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(divinationSigilStackCrafted, "ggg", "gsg", "gog", 'g', glassStack, 's', blankSlateStack, 'o', weakBloodOrbStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(seerSigilStackCrafted, "gbg", "gsg", "gog", 'g', glassStack, 's', divinationSigilStackCrafted, 'o', apprenticeBloodOrbStack, 'b', new ItemStack(ModItems.bucketLife)));
|
||||
|
||||
// GameRegistry.addRecipe(waterScribeToolStack, "f", "i", 'f', featherStack, 'i', elementalInkWaterStack);
|
||||
// GameRegistry.addRecipe(fireScribeToolStack, "f", "i", 'f', featherStack, 'i', elementalInkFireStack);
|
||||
// GameRegistry.addRecipe(earthScribeToolStack, "f", "i", 'f', featherStack, 'i', elementalInkEarthStack);
|
||||
// GameRegistry.addRecipe(airScribeToolStack, "f", "i", 'f', featherStack, 'i', elementalInkAirStack);
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(ritualStoneStackCrafted, "srs", "ror", "srs", 's', obsidianStack, 'o', apprenticeBloodOrbStack, 'r', reinforcedSlateStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(masterRitualStoneStack, "brb", "ror", "brb", 'b', obsidianStack, 'o', magicianBloodOrbStack, 'r', ritualStoneStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(imperfectRitualStoneStack, "bsb", "sos", "bsb", 's', stoneStack, 'b', obsidianStack, 'o', weakBloodOrbStack));
|
||||
|
@ -568,32 +448,22 @@ public class AlchemicalWizardry
|
|||
customPotionInhibit = (new PotionInhibit(customPotionInhibitID, false, 0)).setIconIndex(0, 0).setPotionName("Inhibit");
|
||||
customPotionFlight = (new PotionFlight(customPotionFlightID, false, 0)).setIconIndex(0, 0).setPotionName("Flight");
|
||||
customPotionReciprocation = (new PotionReciprocation(customPotionReciprocationID, false, 0xFFFFFF)).setIconIndex(0, 0).setPotionName("Reciprocation");
|
||||
customPotionFlameCloak = (new PotionFlameCloak(customPotionFlameCloakID,false,0).setIconIndex(0,0).setPotionName("Flame Cloak"));
|
||||
customPotionIceCloak = (new PotionIceCloak(customPotionIceCloakID,false,0).setIconIndex(0,0).setPotionName("Ice Cloak"));
|
||||
customPotionHeavyHeart = (new PotionHeavyHeart(customPotionHeavyHeartID,true,0).setIconIndex(0, 0).setPotionName("Heavy Heart"));
|
||||
customPotionFireFuse = (new PotionFireFuse(customPotionFireFuseID,true,0).setIconIndex(0, 0).setPotionName("Fire Fuse"));
|
||||
customPotionPlanarBinding = (new PotionPlanarBinding(customPotionPlanarBindingID,true,0).setIconIndex(0,0).setPotionName("Planar Binding"));
|
||||
customPotionSoulFray = (new PotionSoulFray(customPotionSoulFrayID,true,0).setIconIndex(0,0).setPotionName("Soul Fray"));
|
||||
customPotionSoulHarden = (new PotionSoulHarden(customPotionSoulHardenID,false,0).setIconIndex(0,0).setPotionName("Soul Harden"));
|
||||
customPotionDeaf = (new PotionDeaf(customPotionDeafID,true,0).setIconIndex(0,0).setPotionName("Deafness"));
|
||||
customPotionFeatherFall = (new PotionFeatherFall(customPotionFeatherFallID,false,0).setIconIndex(0,0).setPotionName("Feather Fall"));
|
||||
customPotionFlameCloak = (new PotionFlameCloak(customPotionFlameCloakID, false, 0).setIconIndex(0, 0).setPotionName("Flame Cloak"));
|
||||
customPotionIceCloak = (new PotionIceCloak(customPotionIceCloakID, false, 0).setIconIndex(0, 0).setPotionName("Ice Cloak"));
|
||||
customPotionHeavyHeart = (new PotionHeavyHeart(customPotionHeavyHeartID, true, 0).setIconIndex(0, 0).setPotionName("Heavy Heart"));
|
||||
customPotionFireFuse = (new PotionFireFuse(customPotionFireFuseID, true, 0).setIconIndex(0, 0).setPotionName("Fire Fuse"));
|
||||
customPotionPlanarBinding = (new PotionPlanarBinding(customPotionPlanarBindingID, true, 0).setIconIndex(0, 0).setPotionName("Planar Binding"));
|
||||
customPotionSoulFray = (new PotionSoulFray(customPotionSoulFrayID, true, 0).setIconIndex(0, 0).setPotionName("Soul Fray"));
|
||||
customPotionSoulHarden = (new PotionSoulHarden(customPotionSoulHardenID, false, 0).setIconIndex(0, 0).setPotionName("Soul Harden"));
|
||||
customPotionDeaf = (new PotionDeaf(customPotionDeafID, true, 0).setIconIndex(0, 0).setPotionName("Deafness"));
|
||||
customPotionFeatherFall = (new PotionFeatherFall(customPotionFeatherFallID, false, 0).setIconIndex(0, 0).setPotionName("Feather Fall"));
|
||||
|
||||
ItemStack masterBloodOrbStack = new ItemStack(ModItems.masterBloodOrb);
|
||||
|
||||
//FluidStack lifeEssenceFluidStack = new FluidStack(lifeEssenceFluid, 1);
|
||||
//LiquidStack lifeEssence = new LiquidStack(lifeEssenceFlowing, 1);
|
||||
//LiquidDictionary.getOrCreateLiquid("Life Essence", lifeEssence);
|
||||
|
||||
|
||||
// ModBlocks.blockLifeEssence.setUnlocalizedName("lifeEssenceBlock");
|
||||
FluidContainerRegistry.registerFluidContainer(lifeEssenceFluid, new ItemStack(ModItems.bucketLife), FluidContainerRegistry.EMPTY_BUCKET);
|
||||
|
||||
//lifeEssenceFluid.setUnlocalizedName("lifeEssence");
|
||||
//LiquidContainerRegistry.registerLiquid(new LiquidContainerData(LiquidDictionary.getLiquid("Life Essence", LiquidContainerRegistry.BUCKET_VOLUME), new ItemStack(AlchemicalWizardry.bucketLife), new ItemStack(Items.bucketEmpty)));
|
||||
//GameRegistry.registerBlock(testingBlock, "testingBlock");
|
||||
//LanguageRegistry.addName(testingBlock, "Testing Block");
|
||||
//(testingBlock, "pickaxe", 0);
|
||||
ModBlocks.blockAltar.setHarvestLevel("pickaxe", 1);
|
||||
|
||||
//Register Tile Entity
|
||||
GameRegistry.registerTileEntity(TEAltar.class, "containerAltar");
|
||||
GameRegistry.registerTileEntity(TEMasterStone.class, "containerMasterStone");
|
||||
|
@ -609,14 +479,13 @@ public class AlchemicalWizardry
|
|||
GameRegistry.registerTileEntity(TESpellEffectBlock.class, "containerSpellEffectBlock");
|
||||
GameRegistry.registerTileEntity(TESpellModifierBlock.class, "containerSpellModifierBlock");
|
||||
GameRegistry.registerTileEntity(TESpellEnhancementBlock.class, "containerSpellEnhancementBlock");
|
||||
GameRegistry.registerTileEntity(TESpectralContainer.class,"spectralContainerTileEntity");
|
||||
GameRegistry.registerTileEntity(TESpectralContainer.class, "spectralContainerTileEntity");
|
||||
GameRegistry.registerTileEntity(TEDemonPortal.class, "containerDemonPortal");
|
||||
GameRegistry.registerTileEntity(TESchematicSaver.class, "containerSchematicSaver");
|
||||
GameRegistry.registerTileEntity(TESpectralBlock.class, "containerSpectralBlock");
|
||||
GameRegistry.registerTileEntity(TEReagentConduit.class, "containerReagentConduit");
|
||||
GameRegistry.registerTileEntity(TEBellJar.class, "containerBellJar");
|
||||
GameRegistry.registerTileEntity(TEAlchemicCalcinator.class, "containerAlchemicCalcinator");
|
||||
//GameRegistry.registerBlock(ModBlocks.blockSpellEffect,"blockSpellEffect");
|
||||
ModBlocks.bloodRune.setHarvestLevel("pickaxe", 2);
|
||||
ModBlocks.speedRune.setHarvestLevel("pickaxe", 2);
|
||||
ModBlocks.efficiencyRune.setHarvestLevel("pickaxe", 2);
|
||||
|
@ -635,12 +504,11 @@ public class AlchemicalWizardry
|
|||
ModBlocks.blockPedestal.setHarvestLevel("pickaxe", 2);
|
||||
ModBlocks.blockPlinth.setHarvestLevel("pickaxe", 2);
|
||||
ModBlocks.blockTeleposer.setHarvestLevel("pickaxe", 2);
|
||||
|
||||
//Fuel handler
|
||||
GameRegistry.registerFuelHandler(new AlchemicalWizardryFuelHandler());
|
||||
//EntityRegistry.registerModEntity(EnergyBlastProjectile.class, "BlasterProj", 0, this, 128, 5, true);
|
||||
|
||||
//Gui registration
|
||||
// NetworkRegistry.instance().registerGuiHandler(this, new GuiHandlerAltar());
|
||||
UpgradedAltars.loadAltars();
|
||||
SigilOfHolding.initiateSigilOfHolding();
|
||||
ArmourForge.initializeRecipes();
|
||||
|
@ -654,33 +522,23 @@ public class AlchemicalWizardry
|
|||
this.initCombinedAlchemyPotionRecipes();
|
||||
ReagentRegistry.initReagents();
|
||||
|
||||
//MinecraftForge.setToolClass(ModItems.boundPickaxe, "pickaxe", 5);
|
||||
//MinecraftForge.setToolClass(ModItems.boundAxe, "axe", 5);
|
||||
//MinecraftForge.setToolClass(ModItems.boundShovel, "shovel", 5);
|
||||
MinecraftForge.EVENT_BUS.register(new ModLivingDropsEvent());
|
||||
proxy.InitRendering();
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());
|
||||
// ItemStack[] comp = new ItemStack[5];
|
||||
// for(int i=0;i<5;i++)
|
||||
// {
|
||||
// comp[i] = redstoneStack;
|
||||
// }
|
||||
// AlchemyRecipeRegistry.registerRecipe(glowstoneDustStack, 2, comp, 2);
|
||||
|
||||
ItemStack gunpowderStack = new ItemStack(Items.gunpowder);
|
||||
ItemStack offensaStack = new ItemStack(ModItems.baseAlchemyItems, 1, 0);
|
||||
ItemStack praesidiumStack = new ItemStack(ModItems.baseAlchemyItems, 1, 1);
|
||||
ItemStack orbisTerraeStack = new ItemStack(ModItems.baseAlchemyItems, 1, 2);
|
||||
ItemStack strengthenedCatalystStack = new ItemStack(ModItems.baseAlchemyItems, 1, 3);
|
||||
ItemStack concentratedCatalystStack = new ItemStack(ModItems.baseAlchemyItems, 1, 4);
|
||||
ItemStack fracturedBoneStack = new ItemStack(ModItems.baseAlchemyItems, 1, 5);
|
||||
ItemStack virtusStack = new ItemStack(ModItems.baseAlchemyItems, 1, 6);
|
||||
ItemStack reductusStack = new ItemStack(ModItems.baseAlchemyItems, 1, 7);
|
||||
ItemStack potentiaStack = new ItemStack(ModItems.baseAlchemyItems, 1, 8);
|
||||
|
||||
ItemStack offensaStack = new ItemStack(ModItems.baseAlchemyItems,1,0);
|
||||
ItemStack praesidiumStack = new ItemStack(ModItems.baseAlchemyItems,1,1);
|
||||
ItemStack orbisTerraeStack = new ItemStack(ModItems.baseAlchemyItems,1,2);
|
||||
ItemStack strengthenedCatalystStack = new ItemStack(ModItems.baseAlchemyItems,1,3);
|
||||
ItemStack concentratedCatalystStack = new ItemStack(ModItems.baseAlchemyItems,1,4);
|
||||
ItemStack fracturedBoneStack = new ItemStack(ModItems.baseAlchemyItems,1,5);
|
||||
ItemStack virtusStack = new ItemStack(ModItems.baseAlchemyItems,1,6);
|
||||
ItemStack reductusStack = new ItemStack(ModItems.baseAlchemyItems,1,7);
|
||||
ItemStack potentiaStack = new ItemStack(ModItems.baseAlchemyItems,1,8);
|
||||
|
||||
ItemStack strengthenedCatalystStackCrafted = new ItemStack(ModItems.baseAlchemyItems,2,3);
|
||||
ItemStack fracturedBoneStackCrafted = new ItemStack(ModItems.baseAlchemyItems,4,5);
|
||||
ItemStack strengthenedCatalystStackCrafted = new ItemStack(ModItems.baseAlchemyItems, 2, 3);
|
||||
ItemStack fracturedBoneStackCrafted = new ItemStack(ModItems.baseAlchemyItems, 4, 5);
|
||||
|
||||
//TODO NEW RECIPES!
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.weakBindingAgent), 10, new ItemStack[]{simpleCatalystStack, simpleCatalystStack, new ItemStack(Items.clay_ball)}, 2);
|
||||
|
@ -707,18 +565,18 @@ public class AlchemicalWizardry
|
|||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.activationCrystal, 1, 1), 100, new ItemStack[]{new ItemStack(ModItems.activationCrystal, 1, 0), new ItemStack(ModItems.demonBloodShard), incendiumStack, aquasalusStack, aetherStack}, 4);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(ModItems.activationCrystal, 1, 1), 100, new ItemStack[]{new ItemStack(ModItems.activationCrystal, 1, 0), new ItemStack(Items.nether_star), incendiumStack, aquasalusStack, aetherStack}, 4);
|
||||
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.web),2,new ItemStack[]{new ItemStack(Items.string),new ItemStack(Items.string),new ItemStack(Items.string),new ItemStack(Items.string),new ItemStack(Items.string)},1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.gunpowder,2,0), 2, new ItemStack[]{gunpowderStack, new ItemStack(Items.coal), new ItemStack(Blocks.sand)}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.web), 2, new ItemStack[]{new ItemStack(Items.string), new ItemStack(Items.string), new ItemStack(Items.string), new ItemStack(Items.string), new ItemStack(Items.string)}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.gunpowder, 2, 0), 2, new ItemStack[]{gunpowderStack, new ItemStack(Items.coal), new ItemStack(Blocks.sand)}, 1);
|
||||
|
||||
AlchemyRecipeRegistry.registerRecipe(strengthenedCatalystStackCrafted, 10, new ItemStack[]{simpleCatalystStack, simpleCatalystStack, new ItemStack(Items.dye,1,15), new ItemStack(Items.nether_wart)}, 3);
|
||||
AlchemyRecipeRegistry.registerRecipe(offensaStack,10, new ItemStack[]{strengthenedCatalystStack,incendiumStack, new ItemStack(Items.arrow), new ItemStack(Items.flint), new ItemStack(Items.arrow)},3);
|
||||
AlchemyRecipeRegistry.registerRecipe(praesidiumStack, 10, new ItemStack[]{strengthenedCatalystStack,tennebraeStack,ironIngotStack,new ItemStack(Blocks.web),redstoneStack}, 3);
|
||||
AlchemyRecipeRegistry.registerRecipe(orbisTerraeStack, 10, new ItemStack[]{strengthenedCatalystStack,terraeStack, gunpowderStack, new ItemStack(Blocks.netherrack), new ItemStack(Blocks.sand)}, 3);
|
||||
AlchemyRecipeRegistry.registerRecipe(concentratedCatalystStack,10,new ItemStack[]{strengthenedCatalystStack,fracturedBoneStack,goldNuggetStack},4);
|
||||
AlchemyRecipeRegistry.registerRecipe(fracturedBoneStackCrafted, 2, new ItemStack[]{new ItemStack(Items.bone), new ItemStack(Items.bone),new ItemStack(Items.bone),new ItemStack(Items.bone), gunpowderStack},1);
|
||||
AlchemyRecipeRegistry.registerRecipe(virtusStack,20, new ItemStack[]{redstoneStack, new ItemStack(Items.coal),strengthenedCatalystStack,redstoneStack,gunpowderStack}, 3);
|
||||
AlchemyRecipeRegistry.registerRecipe(reductusStack,20,new ItemStack[]{redstoneStack, goldIngotStack, strengthenedCatalystStack,new ItemStack(Blocks.soul_sand), new ItemStack(Items.carrot)},3);
|
||||
AlchemyRecipeRegistry.registerRecipe(potentiaStack,20, new ItemStack[]{glowstoneDustStack,strengthenedCatalystStack,lapisStack,lapisStack,new ItemStack(Items.quartz)}, 3);
|
||||
AlchemyRecipeRegistry.registerRecipe(strengthenedCatalystStackCrafted, 10, new ItemStack[]{simpleCatalystStack, simpleCatalystStack, new ItemStack(Items.dye, 1, 15), new ItemStack(Items.nether_wart)}, 3);
|
||||
AlchemyRecipeRegistry.registerRecipe(offensaStack, 10, new ItemStack[]{strengthenedCatalystStack, incendiumStack, new ItemStack(Items.arrow), new ItemStack(Items.flint), new ItemStack(Items.arrow)}, 3);
|
||||
AlchemyRecipeRegistry.registerRecipe(praesidiumStack, 10, new ItemStack[]{strengthenedCatalystStack, tennebraeStack, ironIngotStack, new ItemStack(Blocks.web), redstoneStack}, 3);
|
||||
AlchemyRecipeRegistry.registerRecipe(orbisTerraeStack, 10, new ItemStack[]{strengthenedCatalystStack, terraeStack, gunpowderStack, new ItemStack(Blocks.netherrack), new ItemStack(Blocks.sand)}, 3);
|
||||
AlchemyRecipeRegistry.registerRecipe(concentratedCatalystStack, 10, new ItemStack[]{strengthenedCatalystStack, fracturedBoneStack, goldNuggetStack}, 4);
|
||||
AlchemyRecipeRegistry.registerRecipe(fracturedBoneStackCrafted, 2, new ItemStack[]{new ItemStack(Items.bone), new ItemStack(Items.bone), new ItemStack(Items.bone), new ItemStack(Items.bone), gunpowderStack}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(virtusStack, 20, new ItemStack[]{redstoneStack, new ItemStack(Items.coal), strengthenedCatalystStack, redstoneStack, gunpowderStack}, 3);
|
||||
AlchemyRecipeRegistry.registerRecipe(reductusStack, 20, new ItemStack[]{redstoneStack, goldIngotStack, strengthenedCatalystStack, new ItemStack(Blocks.soul_sand), new ItemStack(Items.carrot)}, 3);
|
||||
AlchemyRecipeRegistry.registerRecipe(potentiaStack, 20, new ItemStack[]{glowstoneDustStack, strengthenedCatalystStack, lapisStack, lapisStack, new ItemStack(Items.quartz)}, 3);
|
||||
|
||||
|
||||
HomSpellRegistry.registerBasicSpell(new ItemStack(Items.flint_and_steel), new SpellFireBurst());
|
||||
|
@ -742,8 +600,9 @@ public class AlchemicalWizardry
|
|||
SummoningRegistry.registerSummon(new SummoningHelperAW(this.entityWaterElementalID), new ItemStack[]{aquasalusStack, aquasalusStack, aquasalusStack, aquasalusStack, aquasalusStack, aquasalusStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4);
|
||||
SummoningRegistry.registerSummon(new SummoningHelperAW(this.entityEarthElementalID), new ItemStack[]{terraeStack, terraeStack, terraeStack, terraeStack, terraeStack, terraeStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4);
|
||||
SummoningRegistry.registerSummon(new SummoningHelperAW(this.entityFireElementalID), new ItemStack[]{incendiumStack, incendiumStack, incendiumStack, incendiumStack, incendiumStack, incendiumStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4);
|
||||
SummoningRegistry.registerSummon(new SummoningHelperAW(this.entityShadeElementalID), new ItemStack[]{tennebraeStack,tennebraeStack,tennebraeStack,tennebraeStack,tennebraeStack,tennebraeStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4);
|
||||
SummoningRegistry.registerSummon(new SummoningHelperAW(this.entityShadeElementalID), new ItemStack[]{tennebraeStack, tennebraeStack, tennebraeStack, tennebraeStack, tennebraeStack, tennebraeStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4);
|
||||
SummoningRegistry.registerSummon(new SummoningHelperAW(this.entityHolyElementalID), new ItemStack[]{sanctusStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4);
|
||||
|
||||
//Custom mobs
|
||||
EntityRegistry.registerModEntity(EntityFallenAngel.class, "FallenAngel", this.entityFallenAngelID, this, 80, 3, true);
|
||||
EntityRegistry.registerModEntity(EntityLowerGuardian.class, "LowerGuardian", this.entityLowerGuardianID, this, 80, 3, true);
|
||||
|
@ -759,7 +618,7 @@ public class AlchemicalWizardry
|
|||
EntityRegistry.registerModEntity(EntityFireElemental.class, "FireElemental", this.entityFireElementalID, this, 120, 3, true);
|
||||
EntityRegistry.registerModEntity(EntityShadeElemental.class, "ShadeElemental", this.entityShadeElementalID, this, 120, 3, true);
|
||||
EntityRegistry.registerModEntity(EntityHolyElemental.class, "HolyElemental", this.entityHolyElementalID, this, 120, 3, true);
|
||||
//EntityRegistry.addSpawn(EntityFallenAngel.class, 5, 1, 5, EnumCreatureType.creature, BiomeGenBase.biomeList);
|
||||
|
||||
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.standardBindingAgent), 1, 3, this.standardBindingAgentDungeonChance));
|
||||
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.mundanePowerCatalyst), 1, 1, this.mundanePowerCatalystDungeonChance));
|
||||
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.mundaneLengtheningCatalyst), 1, 1, this.mundaneLengtheningCatalystDungeonChance));
|
||||
|
@ -767,6 +626,7 @@ public class AlchemicalWizardry
|
|||
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.averageLengtheningCatalyst), 1, 1, this.averageLengtheningCatalystDungeonChance));
|
||||
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.greaterPowerCatalyst), 1, 1, this.greaterPowerCatalystDungeonChance));
|
||||
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ModItems.greaterLengtheningCatalyst), 1, 1, this.greaterLengtheningCatalystDungeonChance));
|
||||
|
||||
//Ore Dictionary Registration
|
||||
OreDictionary.registerOre("oreCoal", Blocks.coal_ore);
|
||||
MeteorRegistry.registerMeteorParadigm(diamondStack, diamondMeteorArray, diamondMeteorRadius);
|
||||
|
@ -776,128 +636,128 @@ public class AlchemicalWizardry
|
|||
|
||||
//Register spell component recipes
|
||||
ItemStack complexSpellCrystalStack = new ItemStack(ModItems.itemComplexSpellCrystal);
|
||||
ItemStack quartzRodStack = new ItemStack(ModItems.baseItems,1,0);
|
||||
ItemStack emptyCoreStack = new ItemStack(ModItems.baseItems,1,1);
|
||||
ItemStack magicalesCableStack = new ItemStack(ModItems.baseItems,1,2);
|
||||
ItemStack woodBraceStack = new ItemStack(ModItems.baseItems,1,3);
|
||||
ItemStack stoneBraceStack = new ItemStack(ModItems.baseItems,1,4);
|
||||
ItemStack projectileCoreStack = new ItemStack(ModItems.baseItems,1,5);
|
||||
ItemStack selfCoreStack = new ItemStack(ModItems.baseItems,1,6);
|
||||
ItemStack meleeCoreStack = new ItemStack(ModItems.baseItems,1,7);
|
||||
ItemStack toolCoreStack = new ItemStack(ModItems.baseItems,1,26);
|
||||
ItemStack paradigmBackPlateStack = new ItemStack(ModItems.baseItems,1,8);
|
||||
ItemStack outputCableStack = new ItemStack(ModItems.baseItems,1,9);
|
||||
ItemStack flameCoreStack = new ItemStack(ModItems.baseItems,1,10);
|
||||
ItemStack iceCoreStack = new ItemStack(ModItems.baseItems,1,11);
|
||||
ItemStack windCoreStack = new ItemStack(ModItems.baseItems,1,12);
|
||||
ItemStack earthCoreStack = new ItemStack(ModItems.baseItems,1,13);
|
||||
ItemStack inputCableStack = new ItemStack(ModItems.baseItems,1,14);
|
||||
ItemStack crackedRunicPlateStack = new ItemStack(ModItems.baseItems,1,15);
|
||||
ItemStack runicPlateStack = new ItemStack(ModItems.baseItems,1,16);
|
||||
ItemStack imbuedRunicPlateStack = new ItemStack(ModItems.baseItems,1,17);
|
||||
ItemStack defaultCoreStack = new ItemStack(ModItems.baseItems,1,18);
|
||||
ItemStack offenseCoreStack = new ItemStack(ModItems.baseItems,1,19);
|
||||
ItemStack defensiveCoreStack = new ItemStack(ModItems.baseItems,1,20);
|
||||
ItemStack environmentalCoreStack = new ItemStack(ModItems.baseItems,1,21);
|
||||
ItemStack powerCoreStack = new ItemStack(ModItems.baseItems,1,22);
|
||||
ItemStack costCoreStack = new ItemStack(ModItems.baseItems,1,23);
|
||||
ItemStack potencyCoreStack = new ItemStack(ModItems.baseItems,1,24);
|
||||
ItemStack obsidianBraceStack = new ItemStack(ModItems.baseItems,1,25);
|
||||
ItemStack quartzRodStack = new ItemStack(ModItems.baseItems, 1, 0);
|
||||
ItemStack emptyCoreStack = new ItemStack(ModItems.baseItems, 1, 1);
|
||||
ItemStack magicalesCableStack = new ItemStack(ModItems.baseItems, 1, 2);
|
||||
ItemStack woodBraceStack = new ItemStack(ModItems.baseItems, 1, 3);
|
||||
ItemStack stoneBraceStack = new ItemStack(ModItems.baseItems, 1, 4);
|
||||
ItemStack projectileCoreStack = new ItemStack(ModItems.baseItems, 1, 5);
|
||||
ItemStack selfCoreStack = new ItemStack(ModItems.baseItems, 1, 6);
|
||||
ItemStack meleeCoreStack = new ItemStack(ModItems.baseItems, 1, 7);
|
||||
ItemStack toolCoreStack = new ItemStack(ModItems.baseItems, 1, 26);
|
||||
ItemStack paradigmBackPlateStack = new ItemStack(ModItems.baseItems, 1, 8);
|
||||
ItemStack outputCableStack = new ItemStack(ModItems.baseItems, 1, 9);
|
||||
ItemStack flameCoreStack = new ItemStack(ModItems.baseItems, 1, 10);
|
||||
ItemStack iceCoreStack = new ItemStack(ModItems.baseItems, 1, 11);
|
||||
ItemStack windCoreStack = new ItemStack(ModItems.baseItems, 1, 12);
|
||||
ItemStack earthCoreStack = new ItemStack(ModItems.baseItems, 1, 13);
|
||||
ItemStack inputCableStack = new ItemStack(ModItems.baseItems, 1, 14);
|
||||
ItemStack crackedRunicPlateStack = new ItemStack(ModItems.baseItems, 1, 15);
|
||||
ItemStack runicPlateStack = new ItemStack(ModItems.baseItems, 1, 16);
|
||||
ItemStack imbuedRunicPlateStack = new ItemStack(ModItems.baseItems, 1, 17);
|
||||
ItemStack defaultCoreStack = new ItemStack(ModItems.baseItems, 1, 18);
|
||||
ItemStack offenseCoreStack = new ItemStack(ModItems.baseItems, 1, 19);
|
||||
ItemStack defensiveCoreStack = new ItemStack(ModItems.baseItems, 1, 20);
|
||||
ItemStack environmentalCoreStack = new ItemStack(ModItems.baseItems, 1, 21);
|
||||
ItemStack powerCoreStack = new ItemStack(ModItems.baseItems, 1, 22);
|
||||
ItemStack costCoreStack = new ItemStack(ModItems.baseItems, 1, 23);
|
||||
ItemStack potencyCoreStack = new ItemStack(ModItems.baseItems, 1, 24);
|
||||
ItemStack obsidianBraceStack = new ItemStack(ModItems.baseItems, 1, 25);
|
||||
|
||||
ItemStack magicalesCraftedCableStack = new ItemStack(ModItems.baseItems,5,2);
|
||||
ItemStack crackedRunicPlateStackCrafted = new ItemStack(ModItems.baseItems,2,15);
|
||||
ItemStack runicPlateStackCrafted = new ItemStack(ModItems.baseItems,2,16);
|
||||
ItemStack magicalesCraftedCableStack = new ItemStack(ModItems.baseItems, 5, 2);
|
||||
ItemStack crackedRunicPlateStackCrafted = new ItemStack(ModItems.baseItems, 2, 15);
|
||||
ItemStack runicPlateStackCrafted = new ItemStack(ModItems.baseItems, 2, 16);
|
||||
|
||||
GameRegistry.addRecipe(quartzRodStack, "qqq", 'q', new ItemStack(Items.quartz));
|
||||
GameRegistry.addRecipe(emptyCoreStack,"gig","nrn","gig",'n',goldIngotStack,'i',ironIngotStack,'g',glassStack,'r',simpleCatalystStack);
|
||||
GameRegistry.addRecipe(magicalesCraftedCableStack,"sss","mmm","sss",'s',new ItemStack(Items.string),'m',magicalesStack);
|
||||
GameRegistry.addRecipe(woodBraceStack," il","ili","li ",'l', new ItemStack(Blocks.log,1,craftingConstant),'i',new ItemStack(Items.string));
|
||||
GameRegistry.addRecipe(stoneBraceStack," is","isi","si ",'i', ironIngotStack,'s',reinforcedSlateStack);
|
||||
GameRegistry.addRecipe(obsidianBraceStack," is","ibi","si ",'i', obsidianStack,'s',reinforcedSlateStack,'b',stoneBraceStack);
|
||||
GameRegistry.addRecipe(emptyCoreStack, "gig", "nrn", "gig", 'n', goldIngotStack, 'i', ironIngotStack, 'g', glassStack, 'r', simpleCatalystStack);
|
||||
GameRegistry.addRecipe(magicalesCraftedCableStack, "sss", "mmm", "sss", 's', new ItemStack(Items.string), 'm', magicalesStack);
|
||||
GameRegistry.addRecipe(woodBraceStack, " il", "ili", "li ", 'l', new ItemStack(Blocks.log, 1, craftingConstant), 'i', new ItemStack(Items.string));
|
||||
GameRegistry.addRecipe(stoneBraceStack, " is", "isi", "si ", 'i', ironIngotStack, 's', reinforcedSlateStack);
|
||||
GameRegistry.addRecipe(obsidianBraceStack, " is", "ibi", "si ", 'i', obsidianStack, 's', reinforcedSlateStack, 'b', stoneBraceStack);
|
||||
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(projectileCoreStack, "mbm","aca","mom",'c', emptyCoreStack,'b',weakBloodShardStack,'m', magicalesStack,'o', magicianBloodOrbStack,'a',new ItemStack(Items.arrow)));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(selfCoreStack,"sbs","ncn","sos",'c', emptyCoreStack, 's',sanctusStack,'b', weakBloodShardStack,'o', magicianBloodOrbStack,'n',glowstoneDustStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(meleeCoreStack,"sbs","ncn","sos",'c', emptyCoreStack, 's',incendiumStack,'b', weakBloodShardStack,'o', magicianBloodOrbStack,'n',new ItemStack(Items.fire_charge)));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(toolCoreStack,"sbs","ncn","sos",'c', emptyCoreStack, 's',terraeStack,'b', weakBloodShardStack,'o', magicianBloodOrbStack,'n',new ItemStack(Blocks.obsidian)));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(projectileCoreStack, "mbm", "aca", "mom", 'c', emptyCoreStack, 'b', weakBloodShardStack, 'm', magicalesStack, 'o', magicianBloodOrbStack, 'a', new ItemStack(Items.arrow)));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(selfCoreStack, "sbs", "ncn", "sos", 'c', emptyCoreStack, 's', sanctusStack, 'b', weakBloodShardStack, 'o', magicianBloodOrbStack, 'n', glowstoneDustStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(meleeCoreStack, "sbs", "ncn", "sos", 'c', emptyCoreStack, 's', incendiumStack, 'b', weakBloodShardStack, 'o', magicianBloodOrbStack, 'n', new ItemStack(Items.fire_charge)));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(toolCoreStack, "sbs", "ncn", "sos", 'c', emptyCoreStack, 's', terraeStack, 'b', weakBloodShardStack, 'o', magicianBloodOrbStack, 'n', new ItemStack(Blocks.obsidian)));
|
||||
|
||||
GameRegistry.addRecipe(paradigmBackPlateStack,"isi","rgr","isi",'i',ironIngotStack,'r',stoneStack,'g',goldIngotStack,'s',reinforcedSlateStack);
|
||||
GameRegistry.addRecipe(outputCableStack, " si","s c"," si",'s',stoneStack,'i',ironIngotStack,'c',simpleCatalystStack);
|
||||
GameRegistry.addRecipe(paradigmBackPlateStack, "isi", "rgr", "isi", 'i', ironIngotStack, 'r', stoneStack, 'g', goldIngotStack, 's', reinforcedSlateStack);
|
||||
GameRegistry.addRecipe(outputCableStack, " si", "s c", " si", 's', stoneStack, 'i', ironIngotStack, 'c', simpleCatalystStack);
|
||||
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(flameCoreStack,"mdm","scs","mom",'m',incendiumStack,'c',emptyCoreStack,'o',magicianBloodOrbStack,'d',diamondStack,'s',weakBloodShardStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(iceCoreStack,"mdm","scs","mom",'m',crystallosStack,'c',emptyCoreStack,'o',magicianBloodOrbStack,'d',diamondStack,'s',weakBloodShardStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(windCoreStack,"mdm","scs","mom",'m',aetherStack,'c',emptyCoreStack,'o',magicianBloodOrbStack,'d',diamondStack,'s',weakBloodShardStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(earthCoreStack,"mdm","scs","mom",'m',terraeStack,'c',emptyCoreStack,'o',magicianBloodOrbStack,'d',diamondStack,'s',weakBloodShardStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(flameCoreStack, "mdm", "scs", "mom", 'm', incendiumStack, 'c', emptyCoreStack, 'o', magicianBloodOrbStack, 'd', diamondStack, 's', weakBloodShardStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(iceCoreStack, "mdm", "scs", "mom", 'm', crystallosStack, 'c', emptyCoreStack, 'o', magicianBloodOrbStack, 'd', diamondStack, 's', weakBloodShardStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(windCoreStack, "mdm", "scs", "mom", 'm', aetherStack, 'c', emptyCoreStack, 'o', magicianBloodOrbStack, 'd', diamondStack, 's', weakBloodShardStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(earthCoreStack, "mdm", "scs", "mom", 'm', terraeStack, 'c', emptyCoreStack, 'o', magicianBloodOrbStack, 'd', diamondStack, 's', weakBloodShardStack));
|
||||
|
||||
GameRegistry.addRecipe(inputCableStack, "ws ","rcs","ws ",'w',blankSlateStack,'s',stoneStack,'r',imbuedSlateStack,'c',simpleCatalystStack);
|
||||
GameRegistry.addRecipe(inputCableStack, "ws ", "rcs", "ws ", 'w', blankSlateStack, 's', stoneStack, 'r', imbuedSlateStack, 'c', simpleCatalystStack);
|
||||
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(defaultCoreStack,"msm","geg","mom",'m', strengthenedCatalystStack,'e', emptyCoreStack, 'o', magicianBloodOrbStack, 's',weakBloodShardStack, 'g', goldIngotStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(offenseCoreStack,"msm","geg","mom",'m', offensaStack,'e', emptyCoreStack, 'o', magicianBloodOrbStack, 's',weakBloodShardStack, 'g', goldIngotStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(defensiveCoreStack,"msm","geg","mom",'m', praesidiumStack,'e', emptyCoreStack, 'o', magicianBloodOrbStack, 's',weakBloodShardStack, 'g', goldIngotStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(environmentalCoreStack,"msm","geg","mom",'m', orbisTerraeStack,'e', emptyCoreStack, 'o', magicianBloodOrbStack, 's',weakBloodShardStack, 'g', goldIngotStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(defaultCoreStack, "msm", "geg", "mom", 'm', strengthenedCatalystStack, 'e', emptyCoreStack, 'o', magicianBloodOrbStack, 's', weakBloodShardStack, 'g', goldIngotStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(offenseCoreStack, "msm", "geg", "mom", 'm', offensaStack, 'e', emptyCoreStack, 'o', magicianBloodOrbStack, 's', weakBloodShardStack, 'g', goldIngotStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(defensiveCoreStack, "msm", "geg", "mom", 'm', praesidiumStack, 'e', emptyCoreStack, 'o', magicianBloodOrbStack, 's', weakBloodShardStack, 'g', goldIngotStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(environmentalCoreStack, "msm", "geg", "mom", 'm', orbisTerraeStack, 'e', emptyCoreStack, 'o', magicianBloodOrbStack, 's', weakBloodShardStack, 'g', goldIngotStack));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(powerCoreStack,"msm","geg","mom",'m', virtusStack,'e', emptyCoreStack, 'o', masterBloodOrbStack, 's',weakBloodShardStack, 'g', goldIngotStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(costCoreStack,"msm","geg","mom",'m', reductusStack,'e', emptyCoreStack, 'o', masterBloodOrbStack, 's',weakBloodShardStack, 'g', goldIngotStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(potencyCoreStack,"msm","geg","mom",'m', potentiaStack,'e', emptyCoreStack, 'o', masterBloodOrbStack, 's',weakBloodShardStack, 'g', goldIngotStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(powerCoreStack, "msm", "geg", "mom", 'm', virtusStack, 'e', emptyCoreStack, 'o', masterBloodOrbStack, 's', weakBloodShardStack, 'g', goldIngotStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(costCoreStack, "msm", "geg", "mom", 'm', reductusStack, 'e', emptyCoreStack, 'o', masterBloodOrbStack, 's', weakBloodShardStack, 'g', goldIngotStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(potencyCoreStack, "msm", "geg", "mom", 'm', potentiaStack, 'e', emptyCoreStack, 'o', masterBloodOrbStack, 's', weakBloodShardStack, 'g', goldIngotStack));
|
||||
|
||||
AlchemyRecipeRegistry.registerRecipe(crackedRunicPlateStackCrafted, 10, new ItemStack[]{imbuedSlateStack,imbuedSlateStack,concentratedCatalystStack}, 4);
|
||||
AlchemyRecipeRegistry.registerRecipe(runicPlateStack, 30, new ItemStack[]{crackedRunicPlateStack,terraeStack}, 5);
|
||||
AlchemyRecipeRegistry.registerRecipe(imbuedRunicPlateStack, 100, new ItemStack[]{magicalesStack,incendiumStack,runicPlateStack, runicPlateStack,aquasalusStack}, 5);
|
||||
AlchemyRecipeRegistry.registerRecipe(complexSpellCrystalStack,50,new ItemStack[]{new ItemStack(ModItems.blankSpell), weakBloodShardStack, weakBloodShardStack, diamondStack,goldIngotStack},3);
|
||||
AlchemyRecipeRegistry.registerRecipe(crackedRunicPlateStackCrafted, 10, new ItemStack[]{imbuedSlateStack, imbuedSlateStack, concentratedCatalystStack}, 4);
|
||||
AlchemyRecipeRegistry.registerRecipe(runicPlateStack, 30, new ItemStack[]{crackedRunicPlateStack, terraeStack}, 5);
|
||||
AlchemyRecipeRegistry.registerRecipe(imbuedRunicPlateStack, 100, new ItemStack[]{magicalesStack, incendiumStack, runicPlateStack, runicPlateStack, aquasalusStack}, 5);
|
||||
AlchemyRecipeRegistry.registerRecipe(complexSpellCrystalStack, 50, new ItemStack[]{new ItemStack(ModItems.blankSpell), weakBloodShardStack, weakBloodShardStack, diamondStack, goldIngotStack}, 3);
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockConduit,1,0),"q q","ccc","q q",'q', quartzRodStack,'c', magicalesCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockConduit, 1, 0), "q q", "ccc", "q q", 'q', quartzRodStack, 'c', magicalesCableStack);
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellParadigm,1,0),"gb ","pcw","gb ",'p',paradigmBackPlateStack,'c', projectileCoreStack,'g',goldIngotStack,'b',stoneBraceStack,'w',outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellParadigm,1,1),"gb ","pcw","gb ",'p',paradigmBackPlateStack,'c', selfCoreStack,'g',goldIngotStack,'b',stoneBraceStack,'w',outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellParadigm,1,2),"gb ","pcw","gb ",'p',paradigmBackPlateStack,'c', meleeCoreStack,'g',goldIngotStack,'b',stoneBraceStack,'w',outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellParadigm,1,3),"gb ","pcw","gb ",'p',paradigmBackPlateStack,'c', toolCoreStack,'g',goldIngotStack,'b',stoneBraceStack,'w',outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellParadigm, 1, 0), "gb ", "pcw", "gb ", 'p', paradigmBackPlateStack, 'c', projectileCoreStack, 'g', goldIngotStack, 'b', stoneBraceStack, 'w', outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellParadigm, 1, 1), "gb ", "pcw", "gb ", 'p', paradigmBackPlateStack, 'c', selfCoreStack, 'g', goldIngotStack, 'b', stoneBraceStack, 'w', outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellParadigm, 1, 2), "gb ", "pcw", "gb ", 'p', paradigmBackPlateStack, 'c', meleeCoreStack, 'g', goldIngotStack, 'b', stoneBraceStack, 'w', outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellParadigm, 1, 3), "gb ", "pcw", "gb ", 'p', paradigmBackPlateStack, 'c', toolCoreStack, 'g', goldIngotStack, 'b', stoneBraceStack, 'w', outputCableStack);
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect,1,0),"bgb","ico","bgb",'c',flameCoreStack,'b',stoneBraceStack,'g',goldIngotStack,'i',inputCableStack,'o',outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect,1,1),"bgb","ico","bgb",'c',iceCoreStack,'b',stoneBraceStack,'g',goldIngotStack,'i',inputCableStack,'o',outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect,1,2),"bgb","ico","bgb",'c',windCoreStack,'b',stoneBraceStack,'g',goldIngotStack,'i',inputCableStack,'o',outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect,1,3),"bgb","ico","bgb",'c',earthCoreStack,'b',stoneBraceStack,'g',goldIngotStack,'i',inputCableStack,'o',outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect, 1, 0), "bgb", "ico", "bgb", 'c', flameCoreStack, 'b', stoneBraceStack, 'g', goldIngotStack, 'i', inputCableStack, 'o', outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect, 1, 1), "bgb", "ico", "bgb", 'c', iceCoreStack, 'b', stoneBraceStack, 'g', goldIngotStack, 'i', inputCableStack, 'o', outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect, 1, 2), "bgb", "ico", "bgb", 'c', windCoreStack, 'b', stoneBraceStack, 'g', goldIngotStack, 'i', inputCableStack, 'o', outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEffect, 1, 3), "bgb", "ico", "bgb", 'c', earthCoreStack, 'b', stoneBraceStack, 'g', goldIngotStack, 'i', inputCableStack, 'o', outputCableStack);
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellModifier,1,0),"bgb","ico","bgb",'c',defaultCoreStack,'i',inputCableStack,'o',outputCableStack,'b',stoneBraceStack,'g',ironIngotStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellModifier,1,1),"bgb","ico","bgb",'c',offenseCoreStack,'i',inputCableStack,'o',outputCableStack,'b',stoneBraceStack,'g',ironIngotStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellModifier,1,2),"bgb","ico","bgb",'c',defensiveCoreStack,'i',inputCableStack,'o',outputCableStack,'b',stoneBraceStack,'g',ironIngotStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellModifier,1,3),"bgb","ico","bgb",'c',environmentalCoreStack,'i',inputCableStack,'o',outputCableStack,'b',stoneBraceStack,'g',ironIngotStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellModifier, 1, 0), "bgb", "ico", "bgb", 'c', defaultCoreStack, 'i', inputCableStack, 'o', outputCableStack, 'b', stoneBraceStack, 'g', ironIngotStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellModifier, 1, 1), "bgb", "ico", "bgb", 'c', offenseCoreStack, 'i', inputCableStack, 'o', outputCableStack, 'b', stoneBraceStack, 'g', ironIngotStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellModifier, 1, 2), "bgb", "ico", "bgb", 'c', defensiveCoreStack, 'i', inputCableStack, 'o', outputCableStack, 'b', stoneBraceStack, 'g', ironIngotStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellModifier, 1, 3), "bgb", "ico", "bgb", 'c', environmentalCoreStack, 'i', inputCableStack, 'o', outputCableStack, 'b', stoneBraceStack, 'g', ironIngotStack);
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement,1,0),"bpb","ico","bpb",'c', powerCoreStack,'b',woodBraceStack,'p',crackedRunicPlateStack,'i',inputCableStack,'o',outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement,1,1),"bpb","ico","bpb",'c', powerCoreStack,'b',stoneBraceStack,'p',runicPlateStack,'i',inputCableStack,'o',outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement,1,2),"bpb","ico","bpb",'c', powerCoreStack,'b',obsidianBraceStack,'p',imbuedRunicPlateStack,'i',inputCableStack,'o',outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement,1,5),"bpb","ico","bpb",'c', costCoreStack,'b',woodBraceStack,'p',crackedRunicPlateStack,'i',inputCableStack,'o',outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement,1,6),"bpb","ico","bpb",'c', costCoreStack,'b',stoneBraceStack,'p',runicPlateStack,'i',inputCableStack,'o',outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement,1,7),"bpb","ico","bpb",'c', costCoreStack,'b',obsidianBraceStack,'p',imbuedRunicPlateStack,'i',inputCableStack,'o',outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement,1,10),"bpb","ico","bpb",'c', potencyCoreStack,'b',woodBraceStack,'p',crackedRunicPlateStack,'i',inputCableStack,'o',outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement,1,11),"bpb","ico","bpb",'c', potencyCoreStack,'b',stoneBraceStack,'p',runicPlateStack,'i',inputCableStack,'o',outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement,1,12),"bpb","ico","bpb",'c', potencyCoreStack,'b',obsidianBraceStack,'p',imbuedRunicPlateStack,'i',inputCableStack,'o',outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 0), "bpb", "ico", "bpb", 'c', powerCoreStack, 'b', woodBraceStack, 'p', crackedRunicPlateStack, 'i', inputCableStack, 'o', outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 1), "bpb", "ico", "bpb", 'c', powerCoreStack, 'b', stoneBraceStack, 'p', runicPlateStack, 'i', inputCableStack, 'o', outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 2), "bpb", "ico", "bpb", 'c', powerCoreStack, 'b', obsidianBraceStack, 'p', imbuedRunicPlateStack, 'i', inputCableStack, 'o', outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 5), "bpb", "ico", "bpb", 'c', costCoreStack, 'b', woodBraceStack, 'p', crackedRunicPlateStack, 'i', inputCableStack, 'o', outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 6), "bpb", "ico", "bpb", 'c', costCoreStack, 'b', stoneBraceStack, 'p', runicPlateStack, 'i', inputCableStack, 'o', outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 7), "bpb", "ico", "bpb", 'c', costCoreStack, 'b', obsidianBraceStack, 'p', imbuedRunicPlateStack, 'i', inputCableStack, 'o', outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 10), "bpb", "ico", "bpb", 'c', potencyCoreStack, 'b', woodBraceStack, 'p', crackedRunicPlateStack, 'i', inputCableStack, 'o', outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 11), "bpb", "ico", "bpb", 'c', potencyCoreStack, 'b', stoneBraceStack, 'p', runicPlateStack, 'i', inputCableStack, 'o', outputCableStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockSpellEnhancement, 1, 12), "bpb", "ico", "bpb", 'c', potencyCoreStack, 'b', obsidianBraceStack, 'p', imbuedRunicPlateStack, 'i', inputCableStack, 'o', outputCableStack);
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.itemAttunedCrystal), "Sr ", " ar", "s S", 'r', quartzRodStack, 's', new ItemStack(Items.stick,1,craftingConstant), 'a', strengthenedCatalystStack, 'S', stoneStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.itemAttunedCrystal), "Sr ", " ar", "s S", 'r', quartzRodStack, 's', new ItemStack(Items.stick, 1, craftingConstant), 'a', strengthenedCatalystStack, 'S', stoneStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.itemTankSegmenter), "gqi", " rq", "q g", 'q', quartzRodStack, 'i', ironIngotStack, 'r', strengthenedCatalystStack, 'g', goldIngotStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.itemDestinationClearer), "qcq", "c c", "qcq", 'q', quartzRodStack, 'c', simpleCatalystStack);
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockAlchemicCalcinator), "pgp", "gsg", "ccc", 'p', crackedRunicPlateStack, 'g', glassStack, 's', strengthenedCatalystStack, 'c', cobblestoneStack);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockCrystalBelljar), "GGG", "GcG", "www", 'G', glassStack, 'c', concentratedCatalystStack, 'w', new ItemStack(Blocks.wooden_slab,1,craftingConstant));
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockCrystalBelljar), "GGG", "GcG", "www", 'G', glassStack, 'c', concentratedCatalystStack, 'w', new ItemStack(Blocks.wooden_slab, 1, craftingConstant));
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockReagentConduit), "isi", "scs", "isi", 'c', concentratedCatalystStack, 's', stringStack, 'i', ironIngotStack);
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.dye,5,15),fracturedBoneStack);
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 5, 15), fracturedBoneStack);
|
||||
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModItems.itemSigilOfSupression),"wtl","wvl","wol",'v',new ItemStack(ModItems.voidSigil),'t',new ItemStack(ModBlocks.blockTeleposer),'o',masterBloodOrbStack,'l',lavaBucketStack,'w',waterBucketStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModItems.itemSigilOfEnderSeverance),"ptp","ese","pop",'s',new ItemStack(ModItems.demonicSlate),'t',weakBloodShardStack,'o',masterBloodOrbStack,'e',new ItemStack(Items.ender_eye),'p', new ItemStack(Items.ender_pearl)));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModItems.itemSigilOfSupression), "wtl", "wvl", "wol", 'v', new ItemStack(ModItems.voidSigil), 't', new ItemStack(ModBlocks.blockTeleposer), 'o', masterBloodOrbStack, 'l', lavaBucketStack, 'w', waterBucketStack));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModItems.itemSigilOfEnderSeverance), "ptp", "ese", "pop", 's', new ItemStack(ModItems.demonicSlate), 't', weakBloodShardStack, 'o', masterBloodOrbStack, 'e', new ItemStack(Items.ender_eye), 'p', new ItemStack(Items.ender_pearl)));
|
||||
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.flint,2,0), 1, new ItemStack[]{new ItemStack(Blocks.gravel),new ItemStack(Items.flint)}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.grass), 2, new ItemStack[]{new ItemStack(Blocks.dirt),new ItemStack(Items.dye,1,15),new ItemStack(Items.wheat_seeds),new ItemStack(Items.wheat_seeds)}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.leather,3,0), 2, new ItemStack[]{new ItemStack(Items.rotten_flesh),new ItemStack(Items.rotten_flesh),new ItemStack(Items.rotten_flesh),waterBucketStack,new ItemStack(Items.flint)}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.bread), 1, new ItemStack[]{new ItemStack(Items.wheat),new ItemStack(Items.sugar)}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.fire_charge,5,0), 3, new ItemStack[]{new ItemStack(Items.coal),new ItemStack(Items.blaze_powder),gunpowderStack}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.sand,2,0), 1, new ItemStack[]{new ItemStack(Blocks.cobblestone),gunpowderStack}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.clay,4,0), 2, new ItemStack[]{new ItemStack(Blocks.hardened_clay,1,craftingConstant),new ItemStack(Blocks.hardened_clay,1,craftingConstant),new ItemStack(Blocks.hardened_clay,1,craftingConstant),new ItemStack(Blocks.hardened_clay,1,craftingConstant),waterBucketStack}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.string,4,0), 1, new ItemStack[]{new ItemStack(Blocks.wool,1,craftingConstant),new ItemStack(Items.flint)}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.gravel,2,0), 1, new ItemStack[]{new ItemStack(Blocks.stone),gunpowderStack}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.obsidian), 1, new ItemStack[]{waterBucketStack,lavaBucketStack}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.flint, 2, 0), 1, new ItemStack[]{new ItemStack(Blocks.gravel), new ItemStack(Items.flint)}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.grass), 2, new ItemStack[]{new ItemStack(Blocks.dirt), new ItemStack(Items.dye, 1, 15), new ItemStack(Items.wheat_seeds), new ItemStack(Items.wheat_seeds)}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.leather, 3, 0), 2, new ItemStack[]{new ItemStack(Items.rotten_flesh), new ItemStack(Items.rotten_flesh), new ItemStack(Items.rotten_flesh), waterBucketStack, new ItemStack(Items.flint)}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.bread), 1, new ItemStack[]{new ItemStack(Items.wheat), new ItemStack(Items.sugar)}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.fire_charge, 5, 0), 3, new ItemStack[]{new ItemStack(Items.coal), new ItemStack(Items.blaze_powder), gunpowderStack}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.sand, 2, 0), 1, new ItemStack[]{new ItemStack(Blocks.cobblestone), gunpowderStack}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.clay, 4, 0), 2, new ItemStack[]{new ItemStack(Blocks.hardened_clay, 1, craftingConstant), new ItemStack(Blocks.hardened_clay, 1, craftingConstant), new ItemStack(Blocks.hardened_clay, 1, craftingConstant), new ItemStack(Blocks.hardened_clay, 1, craftingConstant), waterBucketStack}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.string, 4, 0), 1, new ItemStack[]{new ItemStack(Blocks.wool, 1, craftingConstant), new ItemStack(Items.flint)}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.gravel, 2, 0), 1, new ItemStack[]{new ItemStack(Blocks.stone), gunpowderStack}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.obsidian), 1, new ItemStack[]{waterBucketStack, lavaBucketStack}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.paper), 1, new ItemStack[]{new ItemStack(Items.reeds)}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.soul_sand,3,0), 3, new ItemStack[]{new ItemStack(Blocks.sand),new ItemStack(Blocks.sand),new ItemStack(Blocks.sand),waterBucketStack,weakBloodShardStack}, 3);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.mycelium,1,0), 5, new ItemStack[]{new ItemStack(Blocks.grass),new ItemStack(Blocks.brown_mushroom), new ItemStack(Blocks.red_mushroom)}, 2);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.ice), 2, new ItemStack[]{waterBucketStack,new ItemStack(Items.snowball)}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.soul_sand, 3, 0), 3, new ItemStack[]{new ItemStack(Blocks.sand), new ItemStack(Blocks.sand), new ItemStack(Blocks.sand), waterBucketStack, weakBloodShardStack}, 3);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.mycelium, 1, 0), 5, new ItemStack[]{new ItemStack(Blocks.grass), new ItemStack(Blocks.brown_mushroom), new ItemStack(Blocks.red_mushroom)}, 2);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.ice), 2, new ItemStack[]{waterBucketStack, new ItemStack(Items.snowball)}, 1);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -934,23 +794,22 @@ public class AlchemicalWizardry
|
|||
ThaumcraftApi.registerObjectTag(new ItemStack(ModItems.sanguineBoots), aspectList);
|
||||
|
||||
|
||||
|
||||
if (itemGoggles != null)
|
||||
{
|
||||
BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineHelmet), itemGoggles);
|
||||
}
|
||||
|
||||
if(itemThaumChest != null)
|
||||
if (itemThaumChest != null)
|
||||
{
|
||||
BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineRobe), new ItemStack(itemThaumChest));
|
||||
}
|
||||
|
||||
if(itemThaumLeggings != null)
|
||||
if (itemThaumLeggings != null)
|
||||
{
|
||||
BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguinePants), new ItemStack(itemThaumLeggings));
|
||||
}
|
||||
|
||||
if(itemThaumBoots != null)
|
||||
if (itemThaumBoots != null)
|
||||
{
|
||||
BindingRegistry.registerRecipe(new ItemStack(ModItems.sanguineBoots), new ItemStack(itemThaumBoots));
|
||||
}
|
||||
|
@ -966,7 +825,7 @@ public class AlchemicalWizardry
|
|||
this.isThaumcraftLoaded = false;
|
||||
}
|
||||
|
||||
if(Loader.isModLoaded("Forestry"))
|
||||
if (Loader.isModLoaded("Forestry"))
|
||||
{
|
||||
this.isForestryLoaded = true;
|
||||
|
||||
|
@ -978,12 +837,12 @@ public class AlchemicalWizardry
|
|||
// {
|
||||
// AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.itemBloodFrame), provenFrame, 3, 30000, 20, 20, false);
|
||||
// }
|
||||
}else
|
||||
} else
|
||||
{
|
||||
this.isForestryLoaded = false;
|
||||
}
|
||||
|
||||
if(Loader.isModLoaded("harvestcraft"))
|
||||
if (Loader.isModLoaded("harvestcraft"))
|
||||
{
|
||||
PamHarvestCompatRegistry.registerPamHandlers();
|
||||
System.out.println("Loaded Harvestcraft Handlers!");
|
||||
|
@ -1001,7 +860,7 @@ public class AlchemicalWizardry
|
|||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.sugar), Potion.moveSpeed.id, 2 * 60 * 20);
|
||||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.speckled_melon), Potion.heal.id, 2 * 60 * 20);
|
||||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.spider_eye), Potion.poison.id, 450);
|
||||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.dye,1,0), Potion.blindness.id, 450);
|
||||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.dye, 1, 0), Potion.blindness.id, 450);
|
||||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.fermented_spider_eye), Potion.weakness.id, 450);
|
||||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.blaze_powder), Potion.damageBoost.id, 2 * 60 * 20);
|
||||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.aether), Potion.jump.id, 2 * 60 * 20);
|
||||
|
@ -1017,77 +876,77 @@ public class AlchemicalWizardry
|
|||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.terrae), AlchemicalWizardry.customPotionBoost.id, 1 * 60 * 20);
|
||||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.feather), AlchemicalWizardry.customPotionFlight.id, 1 * 60 * 20);
|
||||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.arrow), AlchemicalWizardry.customPotionReciprocation.id, 1 * 60 * 20);
|
||||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.ender_pearl),AlchemicalWizardry.customPotionPlanarBinding.id,1*60*20);
|
||||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Blocks.soul_sand),AlchemicalWizardry.customPotionSoulFray.id,60*20);
|
||||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.baseItems,1,16),AlchemicalWizardry.customPotionSoulHarden.id,60*20);
|
||||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.slime_ball),AlchemicalWizardry.customPotionDeaf.id,60*20);
|
||||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.ender_pearl), AlchemicalWizardry.customPotionPlanarBinding.id, 1 * 60 * 20);
|
||||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Blocks.soul_sand), AlchemicalWizardry.customPotionSoulFray.id, 60 * 20);
|
||||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.baseItems, 1, 16), AlchemicalWizardry.customPotionSoulHarden.id, 60 * 20);
|
||||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.slime_ball), AlchemicalWizardry.customPotionDeaf.id, 60 * 20);
|
||||
}
|
||||
|
||||
public static void initAltarRecipes()
|
||||
{
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.weakBloodOrb), new ItemStack(Items.diamond),1,2000,2,1,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.apprenticeBloodOrb), new ItemStack(Items.emerald),2,5000,5,5,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.magicianBloodOrb), new ItemStack(Blocks.gold_block),3,25000,20,20,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.masterBloodOrb), new ItemStack(ModItems.weakBloodShard),4,40000,30,50,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.archmageBloodOrb), new ItemStack(ModItems.demonBloodShard),5,75000,50,100,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.weakBloodOrb), new ItemStack(Items.diamond), 1, 2000, 2, 1, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.apprenticeBloodOrb), new ItemStack(Items.emerald), 2, 5000, 5, 5, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.magicianBloodOrb), new ItemStack(Blocks.gold_block), 3, 25000, 20, 20, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.masterBloodOrb), new ItemStack(ModItems.weakBloodShard), 4, 40000, 30, 50, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.archmageBloodOrb), new ItemStack(ModItems.demonBloodShard), 5, 75000, 50, 100, false);
|
||||
|
||||
AltarRecipeRegistry.registerAltarOrbRecipe(new ItemStack(ModItems.weakBloodOrb),1,2);
|
||||
AltarRecipeRegistry.registerAltarOrbRecipe(new ItemStack(ModItems.apprenticeBloodOrb),2,5);
|
||||
AltarRecipeRegistry.registerAltarOrbRecipe(new ItemStack(ModItems.magicianBloodOrb),3,15);
|
||||
AltarRecipeRegistry.registerAltarOrbRecipe(new ItemStack(ModItems.masterBloodOrb),4,25);
|
||||
AltarRecipeRegistry.registerAltarOrbRecipe(new ItemStack(ModItems.archmageBloodOrb),5,50);
|
||||
AltarRecipeRegistry.registerAltarOrbRecipe(new ItemStack(ModItems.weakBloodOrb), 1, 2);
|
||||
AltarRecipeRegistry.registerAltarOrbRecipe(new ItemStack(ModItems.apprenticeBloodOrb), 2, 5);
|
||||
AltarRecipeRegistry.registerAltarOrbRecipe(new ItemStack(ModItems.magicianBloodOrb), 3, 15);
|
||||
AltarRecipeRegistry.registerAltarOrbRecipe(new ItemStack(ModItems.masterBloodOrb), 4, 25);
|
||||
AltarRecipeRegistry.registerAltarOrbRecipe(new ItemStack(ModItems.archmageBloodOrb), 5, 50);
|
||||
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.telepositionFocus), new ItemStack(Items.ender_pearl),4,2000,10,10,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.enhancedTelepositionFocus), new ItemStack(ModItems.telepositionFocus),4,10000,25,15,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.demonicSlate), new ItemStack(ModItems.imbuedSlate),4,15000,20,20,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.duskScribeTool), new ItemStack(Blocks.coal_block),4,2000,20,10,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModBlocks.bloodSocket), new ItemStack(ModBlocks.emptySocket),3,30000,40,10,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.earthScribeTool), new ItemStack(Blocks.obsidian),3,1000,5,5,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.waterScribeTool), new ItemStack(Blocks.lapis_block),3,1000,5,5,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.blankSpell), new ItemStack(Blocks.glass),2,1000,5,5,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.blankSlate), new ItemStack(Blocks.stone),1,1000,5,5,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.activationCrystal), new ItemStack(ModItems.lavaCrystal),3,10000,20,10,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.fireScribeTool), new ItemStack(Items.magma_cream),3,1000,5,5,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.airScribeTool), new ItemStack(Items.ghast_tear),3,1000,5,5,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.imbuedSlate), new ItemStack(ModItems.reinforcedSlate),3,5000,15,10,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.daggerOfSacrifice), new ItemStack(Items.iron_sword),2,3000,5,5,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.alchemyFlask), new ItemStack(Items.glass_bottle),2,2000,5,5,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.reinforcedSlate), new ItemStack(ModItems.blankSlate),2,2000,5,5,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.bucketLife), new ItemStack(Items.bucket),1,1000,5,0,false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.telepositionFocus), new ItemStack(Items.ender_pearl), 4, 2000, 10, 10, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.enhancedTelepositionFocus), new ItemStack(ModItems.telepositionFocus), 4, 10000, 25, 15, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.demonicSlate), new ItemStack(ModItems.imbuedSlate), 4, 15000, 20, 20, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.duskScribeTool), new ItemStack(Blocks.coal_block), 4, 2000, 20, 10, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModBlocks.bloodSocket), new ItemStack(ModBlocks.emptySocket), 3, 30000, 40, 10, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.earthScribeTool), new ItemStack(Blocks.obsidian), 3, 1000, 5, 5, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.waterScribeTool), new ItemStack(Blocks.lapis_block), 3, 1000, 5, 5, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.blankSpell), new ItemStack(Blocks.glass), 2, 1000, 5, 5, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.blankSlate), new ItemStack(Blocks.stone), 1, 1000, 5, 5, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.activationCrystal), new ItemStack(ModItems.lavaCrystal), 3, 10000, 20, 10, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.fireScribeTool), new ItemStack(Items.magma_cream), 3, 1000, 5, 5, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.airScribeTool), new ItemStack(Items.ghast_tear), 3, 1000, 5, 5, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.imbuedSlate), new ItemStack(ModItems.reinforcedSlate), 3, 5000, 15, 10, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.daggerOfSacrifice), new ItemStack(Items.iron_sword), 2, 3000, 5, 5, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.alchemyFlask), new ItemStack(Items.glass_bottle), 2, 2000, 5, 5, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.reinforcedSlate), new ItemStack(ModItems.blankSlate), 2, 2000, 5, 5, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ModItems.bucketLife), new ItemStack(Items.bucket), 1, 1000, 5, 0, false);
|
||||
}
|
||||
|
||||
public static void initRituals()
|
||||
{
|
||||
Rituals.registerRitual("AW001Water", 1, 500, new RitualEffectWater(), "Ritual of the Full Spring", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,30,255,255,0,0.501,0.8,0, 1.5, false));
|
||||
Rituals.registerRitual("AW002Lava", 1, 10000, new RitualEffectLava(), "Serenade of the Nether", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),255,0,0,255,0,0.501,0.8,0, 1.5, false));
|
||||
Rituals.registerRitual("AW003GreenGrove", 1, 1000, new RitualEffectGrowth(), "Ritual of the Green Grove", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),244,164,96,255,0,1.0,1.6,0, 1.5, false));
|
||||
Rituals.registerRitual("AW004Interdiction", 1, 1000, new RitualEffectInterdiction(), "Interdiction Ritual", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),27,227,206,255,0,0.501,0.8, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW005Containment", 1, 2000, new RitualEffectContainment(), "Ritual of Containment", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),186,21,21,255,0,2.5, 2.5, 0, 2.5, false));
|
||||
Rituals.registerRitual("AW006Binding", 1, 5000, new RitualEffectSoulBound(), "Ritual of Binding", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/TransCircleBinding.png"),193,7,7,255,0,0.501,1.0,0, 2.5, true));
|
||||
Rituals.registerRitual("AW007Unbinding", 1, 30000, new RitualEffectUnbinding(), "Ritual of Unbinding", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),193,7,7,255, 0, 0.5, 0.8, 0, 2.5, false));
|
||||
Rituals.registerRitual("AW008HighJump", 1, 1000, new RitualEffectJumping(), "Ritual of the High Jump", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),10,183,173,255, 0, 0.501, 1.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW009Magnetism", 1, 5000, new RitualEffectMagnetic(), "Ritual of Magnetism", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),126,39,0,255, 0, 0.501, 2.0, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW010Crusher", 1, 2500, new RitualEffectCrushing(), "Ritual of the Crusher", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW011Speed", 1, 1000, new RitualEffectLeap(), "Ritual of Speed", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW012AnimalGrowth", 1, 10000, new RitualEffectAnimalGrowth(), "Ritual of the Shepherd", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW013Suffering", 1, 50000, new RitualEffectWellOfSuffering(), "Well of Suffering", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/TransCircleSuffering.png"),0,0,0,255,0,0.501,0.8,0, 2.5, true));
|
||||
Rituals.registerRitual("AW014Regen", 1, 25000, new RitualEffectHealing(), "Ritual of Regeneration", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW015FeatheredKnife", 1, 50000, new RitualEffectFeatheredKnife(), "Ritual of the Feathered Knife", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW016FeatheredEarth", 2, 100000, new RitualEffectFeatheredEarth(), "Ritual of the Feathered Earth", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW017Gaia", 2, 1000000, new RitualEffectBiomeChanger(), "Ritual of Gaia's Transformation", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW018Condor", 2, 1000000, new RitualEffectFlight(), "Reverence of the Condor", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW019FallingTower", 2, 1000000, new RitualEffectSummonMeteor(), "Mark of the Falling Tower", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW020BalladOfAlchemy", 1, 20000, new RitualEffectAutoAlchemy(), "Ballad of Alchemy", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW021Expulsion", 1, 1000000, new RitualEffectExpulsion(), "Aura of Expulsion", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW022Supression", 1, 10000, new RitualEffectSupression(), "Dome of Supression", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW023Zephyr", 1, 25000, new RitualEffectItemSuction(),"Call of the Zephyr", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW024Harvest", 1, 20000, new RitualEffectHarvest(), "Reap of the Harvest Moon", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW025Conduit", 2, 2000000, new RitualEffectLifeConduit(), "Cry of the Eternal Soul", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW026Ellipsoid", 1, 25000, new RitualEffectEllipsoid(), "Focus of the Ellipsoid", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW027Evaporation", 1, 20000, new RitualEffectEvaporation(), "Song of Evaporation", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW028SpawnWard", 1, 150000, new RitualEffectSpawnWard(), "Ward of Sacrosanctity", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW029VeilOfEvil", 1, 150000, new RitualEffectVeilOfEvil(), "Veil of Evil", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW030FullStomach", 1, 100000, new RitualEffectFullStomach(), "Requiem of the Satiated Stomach", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW001Water", 1, 500, new RitualEffectWater(), "Ritual of the Full Spring", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 30, 255, 255, 0, 0.501, 0.8, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW002Lava", 1, 10000, new RitualEffectLava(), "Serenade of the Nether", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 255, 0, 0, 255, 0, 0.501, 0.8, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW003GreenGrove", 1, 1000, new RitualEffectGrowth(), "Ritual of the Green Grove", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 244, 164, 96, 255, 0, 1.0, 1.6, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW004Interdiction", 1, 1000, new RitualEffectInterdiction(), "Interdiction Ritual", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 27, 227, 206, 255, 0, 0.501, 0.8, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW005Containment", 1, 2000, new RitualEffectContainment(), "Ritual of Containment", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 186, 21, 21, 255, 0, 2.5, 2.5, 0, 2.5, false));
|
||||
Rituals.registerRitual("AW006Binding", 1, 5000, new RitualEffectSoulBound(), "Ritual of Binding", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/TransCircleBinding.png"), 193, 7, 7, 255, 0, 0.501, 1.0, 0, 2.5, true));
|
||||
Rituals.registerRitual("AW007Unbinding", 1, 30000, new RitualEffectUnbinding(), "Ritual of Unbinding", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 193, 7, 7, 255, 0, 0.5, 0.8, 0, 2.5, false));
|
||||
Rituals.registerRitual("AW008HighJump", 1, 1000, new RitualEffectJumping(), "Ritual of the High Jump", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 10, 183, 173, 255, 0, 0.501, 1.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW009Magnetism", 1, 5000, new RitualEffectMagnetic(), "Ritual of Magnetism", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 126, 39, 0, 255, 0, 0.501, 2.0, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW010Crusher", 1, 2500, new RitualEffectCrushing(), "Ritual of the Crusher", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW011Speed", 1, 1000, new RitualEffectLeap(), "Ritual of Speed", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW012AnimalGrowth", 1, 10000, new RitualEffectAnimalGrowth(), "Ritual of the Shepherd", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW013Suffering", 1, 50000, new RitualEffectWellOfSuffering(), "Well of Suffering", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/TransCircleSuffering.png"), 0, 0, 0, 255, 0, 0.501, 0.8, 0, 2.5, true));
|
||||
Rituals.registerRitual("AW014Regen", 1, 25000, new RitualEffectHealing(), "Ritual of Regeneration", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW015FeatheredKnife", 1, 50000, new RitualEffectFeatheredKnife(), "Ritual of the Feathered Knife", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW016FeatheredEarth", 2, 100000, new RitualEffectFeatheredEarth(), "Ritual of the Feathered Earth", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW017Gaia", 2, 1000000, new RitualEffectBiomeChanger(), "Ritual of Gaia's Transformation", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW018Condor", 2, 1000000, new RitualEffectFlight(), "Reverence of the Condor", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW019FallingTower", 2, 1000000, new RitualEffectSummonMeteor(), "Mark of the Falling Tower", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW020BalladOfAlchemy", 1, 20000, new RitualEffectAutoAlchemy(), "Ballad of Alchemy", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW021Expulsion", 1, 1000000, new RitualEffectExpulsion(), "Aura of Expulsion", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW022Supression", 1, 10000, new RitualEffectSupression(), "Dome of Supression", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW023Zephyr", 1, 25000, new RitualEffectItemSuction(), "Call of the Zephyr", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW024Harvest", 1, 20000, new RitualEffectHarvest(), "Reap of the Harvest Moon", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW025Conduit", 2, 2000000, new RitualEffectLifeConduit(), "Cry of the Eternal Soul", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW026Ellipsoid", 1, 25000, new RitualEffectEllipsoid(), "Focus of the Ellipsoid", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW027Evaporation", 1, 20000, new RitualEffectEvaporation(), "Song of Evaporation", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW028SpawnWard", 1, 150000, new RitualEffectSpawnWard(), "Ward of Sacrosanctity", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW029VeilOfEvil", 1, 150000, new RitualEffectVeilOfEvil(), "Veil of Evil", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW030FullStomach", 1, 100000, new RitualEffectFullStomach(), "Requiem of the Satiated Stomach", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
//Rituals.registerRitual(1,100,new RitualEffectApiaryOverclock(),"Apiary Overclock"));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
package WayofTime.alchemicalWizardry;
|
||||
|
||||
import WayofTime.alchemicalWizardry.client.renderer.ColourThreshold;
|
||||
import WayofTime.alchemicalWizardry.client.renderer.RenderHelper;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import WayofTime.alchemicalWizardry.client.renderer.ColourThreshold;
|
||||
import WayofTime.alchemicalWizardry.client.renderer.RenderHelper;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* User: Pokefenn
|
||||
|
@ -59,12 +59,12 @@ public class BloodMagicConfiguration
|
|||
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.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();
|
||||
|
@ -80,16 +80,16 @@ public class BloodMagicConfiguration
|
|||
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.allowedCrushedOresArray = config.get("oreCrushing", "allowedOres", new String[]{"iron","gold","copper","tin","lead","silver","osmium"}).getStringList();
|
||||
AlchemicalWizardry.allowedCrushedOresArray = config.get("oreCrushing", "allowedOres", new String[]{"iron", "gold", "copper", "tin", "lead", "silver", "osmium"}).getStringList();
|
||||
|
||||
AlchemicalWizardry.wimpySettings = config.get("WimpySettings","IDontLikeFun",false).getBoolean(false);
|
||||
AlchemicalWizardry.wimpySettings = config.get("WimpySettings", "IDontLikeFun", false).getBoolean(false);
|
||||
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();
|
||||
if(side == Side.CLIENT)
|
||||
if (side == Side.CLIENT)
|
||||
{
|
||||
RenderHelper.xOffset = config.get("ClientSettings", "AlchemyHUDxOffset", 50).getInt();
|
||||
RenderHelper.yOffset = config.get("ClientSettings", "AlchemyHUDyOffset", 2).getInt();
|
||||
|
@ -126,16 +126,16 @@ public class BloodMagicConfiguration
|
|||
|
||||
public static void loadBlacklist()
|
||||
{
|
||||
AlchemicalWizardry.wellBlacklist=new ArrayList<Class>();
|
||||
for( Object o : EntityList.stringToClassMapping.entrySet())
|
||||
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)
|
||||
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)
|
||||
boolean blacklisted = config.get("wellOfSufferingBlackList", entry.getKey().toString(), false).getBoolean();
|
||||
if (blacklisted)
|
||||
AlchemicalWizardry.wellBlacklist.add(curClass);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,46 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import WayofTime.alchemicalWizardry.common.block.ArmourForge;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockAlchemicCalcinator;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockAltar;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockBelljar;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockBloodLightSource;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockConduit;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockDemonPortal;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockHomHeart;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockMasterStone;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockPedestal;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockPlinth;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockReagentConduit;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockSchematicSaver;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockSocket;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockSpectralContainer;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockSpellEffect;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockSpellEnhancement;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockSpellModifier;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockSpellParadigm;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockWritingTable;
|
||||
import WayofTime.alchemicalWizardry.common.block.BloodRune;
|
||||
import WayofTime.alchemicalWizardry.common.block.BloodStoneBrick;
|
||||
import WayofTime.alchemicalWizardry.common.block.EfficiencyRune;
|
||||
import WayofTime.alchemicalWizardry.common.block.EmptySocket;
|
||||
import WayofTime.alchemicalWizardry.common.block.ImperfectRitualStone;
|
||||
import WayofTime.alchemicalWizardry.common.block.LargeBloodStoneBrick;
|
||||
import WayofTime.alchemicalWizardry.common.block.LifeEssenceBlock;
|
||||
import WayofTime.alchemicalWizardry.common.block.RitualStone;
|
||||
import WayofTime.alchemicalWizardry.common.block.RuneOfSacrifice;
|
||||
import WayofTime.alchemicalWizardry.common.block.RuneOfSelfSacrifice;
|
||||
import WayofTime.alchemicalWizardry.common.block.SpectralBlock;
|
||||
import WayofTime.alchemicalWizardry.common.block.SpeedRune;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemBlockCrystalBelljar;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemBloodRuneBlock;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemSpellEffectBlock;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemSpellEnhancementBlock;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemSpellModifierBlock;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemSpellParadigmBlock;
|
||||
import WayofTime.alchemicalWizardry.common.block.*;
|
||||
import WayofTime.alchemicalWizardry.common.items.*;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
|
@ -54,8 +17,6 @@ public class ModBlocks
|
|||
public static Block testingBlock;
|
||||
public static Block bloodStoneBrick;
|
||||
public static Block largeBloodStoneBrick;
|
||||
// public static Block lifeEssenceStill;
|
||||
// public static Block lifeEssenceFlowing;
|
||||
public static BlockAltar blockAltar;
|
||||
public static BloodRune bloodRune;
|
||||
public static SpeedRune speedRune;
|
||||
|
@ -96,7 +57,6 @@ public class ModBlocks
|
|||
efficiencyRune = new EfficiencyRune();
|
||||
runeOfSacrifice = new RuneOfSacrifice();
|
||||
runeOfSelfSacrifice = new RuneOfSelfSacrifice();
|
||||
|
||||
blockTeleposer = new BlockTeleposer();
|
||||
spectralBlock = new SpectralBlock();
|
||||
ritualStone = new RitualStone();
|
||||
|
@ -153,11 +113,11 @@ public class ModBlocks
|
|||
GameRegistry.registerBlock(ModBlocks.spectralBlock, "spectralBlock");
|
||||
GameRegistry.registerBlock(ModBlocks.blockBloodLight, "bloodLight");
|
||||
|
||||
GameRegistry.registerBlock(ModBlocks.blockConduit,"blockConduit");
|
||||
GameRegistry.registerBlock(ModBlocks.blockConduit, "blockConduit");
|
||||
GameRegistry.registerBlock(ModBlocks.blockSpellParadigm, ItemSpellParadigmBlock.class, "AlchemicalWizardry" + (ModBlocks.blockSpellParadigm.getUnlocalizedName()));
|
||||
GameRegistry.registerBlock(ModBlocks.blockSpellEnhancement, ItemSpellEnhancementBlock.class,"AlchemicalWizardry" + (ModBlocks.blockSpellEnhancement.getUnlocalizedName()));
|
||||
GameRegistry.registerBlock(ModBlocks.blockSpellModifier, ItemSpellModifierBlock.class,"AlchemicalWizardry" + (ModBlocks.blockSpellModifier.getUnlocalizedName()));
|
||||
GameRegistry.registerBlock(ModBlocks.blockSpellEffect, ItemSpellEffectBlock.class,"AlchemicalWizardry" + (ModBlocks.blockSpellEffect.getUnlocalizedName()));
|
||||
GameRegistry.registerBlock(ModBlocks.blockSpellEnhancement, ItemSpellEnhancementBlock.class, "AlchemicalWizardry" + (ModBlocks.blockSpellEnhancement.getUnlocalizedName()));
|
||||
GameRegistry.registerBlock(ModBlocks.blockSpellModifier, ItemSpellModifierBlock.class, "AlchemicalWizardry" + (ModBlocks.blockSpellModifier.getUnlocalizedName()));
|
||||
GameRegistry.registerBlock(ModBlocks.blockSpellEffect, ItemSpellEffectBlock.class, "AlchemicalWizardry" + (ModBlocks.blockSpellEffect.getUnlocalizedName()));
|
||||
|
||||
GameRegistry.registerBlock(ModBlocks.blockSpectralContainer, "spectralContainer");
|
||||
GameRegistry.registerBlock(ModBlocks.blockDemonPortal, "demonPortalMain");
|
||||
|
@ -169,6 +129,5 @@ public class ModBlocks
|
|||
|
||||
public static void registerBlocksInInit()
|
||||
{
|
||||
//GameRegistry.registerBlock(ModBlocks.blockLifeEssence, "lifeEssence");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,82 +1,16 @@
|
|||
package WayofTime.alchemicalWizardry;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import WayofTime.alchemicalWizardry.common.items.AWBaseItems;
|
||||
import WayofTime.alchemicalWizardry.common.items.ActivationCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.items.AirScribeTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.ApprenticeBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.common.items.ArchmageBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.common.items.ArmourInhibitor;
|
||||
import WayofTime.alchemicalWizardry.common.items.BlankSpell;
|
||||
import WayofTime.alchemicalWizardry.common.items.BloodShard;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundArmour;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundAxe;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundPickaxe;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundShovel;
|
||||
import WayofTime.alchemicalWizardry.common.items.CheatyItem;
|
||||
import WayofTime.alchemicalWizardry.common.items.DaggerOfSacrifice;
|
||||
import WayofTime.alchemicalWizardry.common.items.DemonPlacer;
|
||||
import WayofTime.alchemicalWizardry.common.items.DemonicTelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.items.DuskScribeTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.EarthScribeTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBazooka;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBlast;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergySword;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnhancedTelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.items.FireScribeTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemAlchemyBase;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemComplexSpellCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemComponents;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemDiabloKey;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner;
|
||||
import WayofTime.alchemicalWizardry.common.items.LavaCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.items.LifeBucket;
|
||||
import WayofTime.alchemicalWizardry.common.items.MagicianBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.common.items.MasterBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.common.items.ReinforcedTelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.items.SacrificialDagger;
|
||||
import WayofTime.alchemicalWizardry.common.items.TelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.items.WaterScribeTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.*;
|
||||
import WayofTime.alchemicalWizardry.common.items.energy.ItemAttunedCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.items.energy.ItemDestinationClearer;
|
||||
import WayofTime.alchemicalWizardry.common.items.energy.ItemTankSegmenter;
|
||||
import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask;
|
||||
import WayofTime.alchemicalWizardry.common.items.potion.AlchemyReagent;
|
||||
import WayofTime.alchemicalWizardry.common.items.potion.AverageLengtheningCatalyst;
|
||||
import WayofTime.alchemicalWizardry.common.items.potion.AveragePowerCatalyst;
|
||||
import WayofTime.alchemicalWizardry.common.items.potion.CombinationalCatalyst;
|
||||
import WayofTime.alchemicalWizardry.common.items.potion.EnhancedFillingAgent;
|
||||
import WayofTime.alchemicalWizardry.common.items.potion.GreaterLengtheningCatalyst;
|
||||
import WayofTime.alchemicalWizardry.common.items.potion.GreaterPowerCatalyst;
|
||||
import WayofTime.alchemicalWizardry.common.items.potion.MundaneLengtheningCatalyst;
|
||||
import WayofTime.alchemicalWizardry.common.items.potion.MundanePowerCatalyst;
|
||||
import WayofTime.alchemicalWizardry.common.items.potion.StandardBindingAgent;
|
||||
import WayofTime.alchemicalWizardry.common.items.potion.StandardFillingAgent;
|
||||
import WayofTime.alchemicalWizardry.common.items.potion.WeakBindingAgent;
|
||||
import WayofTime.alchemicalWizardry.common.items.potion.WeakFillingAgent;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.AirSigil;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.DivinationSigil;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.ItemBloodLightSigil;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.ItemFluidSigil;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.ItemSeerSigil;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.ItemSigilOfEnderSeverance;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.ItemSigilOfSupression;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.LavaSigil;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfElementalAffinity;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfGrowth;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHaste;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfMagnetism;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheBridge;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheFastMiner;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfWind;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.VoidSigil;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.WaterSigil;
|
||||
import WayofTime.alchemicalWizardry.common.items.potion.*;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.*;
|
||||
import WayofTime.alchemicalWizardry.common.items.spell.ItemSpellMultiTool;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.api.alchemy;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class AlchemicalPotionCreationHandler
|
||||
{
|
||||
public static ArrayList<AlchemyPotionHandlerComponent> registeredPotionEffects = new ArrayList();
|
||||
|
|
|
@ -104,7 +104,7 @@ public class AlchemyRecipe
|
|||
continue;
|
||||
}
|
||||
|
||||
if ((checkedItemStack.getItemDamage() == recipeItemStack.getItemDamage() || OreDictionary.WILDCARD_VALUE == recipeItemStack.getItemDamage()) && checkedItemStack.getItem()==recipeItemStack.getItem())
|
||||
if ((checkedItemStack.getItemDamage() == recipeItemStack.getItemDamage() || OreDictionary.WILDCARD_VALUE == recipeItemStack.getItemDamage()) && checkedItemStack.getItem() == recipeItemStack.getItem())
|
||||
{
|
||||
test = true;
|
||||
checkList[j] = true;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.api.alchemy;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
|
||||
public class AlchemyRecipeRegistry
|
||||
{
|
||||
public static List<AlchemyRecipe> recipes = new ArrayList();
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package WayofTime.alchemicalWizardry.api.alchemy.energy;
|
||||
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
|
||||
public interface IReagentContainer
|
||||
{
|
||||
public ReagentStack getReagent();
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package WayofTime.alchemicalWizardry.api.alchemy.energy;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class Reagent
|
||||
{
|
||||
public final String name;
|
||||
|
@ -49,6 +47,6 @@ public class Reagent
|
|||
@Override
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
return o instanceof Reagent ? this == o && name.equals(((Reagent)o).name) : false;
|
||||
return o instanceof Reagent ? this == o && name.equals(((Reagent) o).name) : false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.api.alchemy.energy;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
|
||||
public class ReagentContainer implements IReagentContainer
|
||||
{
|
||||
|
@ -35,7 +31,7 @@ public class ReagentContainer implements IReagentContainer
|
|||
if (reagent != null)
|
||||
{
|
||||
return new ReagentContainer(reagent, capacity);
|
||||
}else
|
||||
} else
|
||||
{
|
||||
return new ReagentContainer(null, capacity);
|
||||
}
|
||||
|
@ -115,8 +111,7 @@ public class ReagentContainer implements IReagentContainer
|
|||
{
|
||||
reagentStack.amount += resource.amount;
|
||||
filled = resource.amount;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
reagentStack.amount = capacity;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package WayofTime.alchemicalWizardry.api.alchemy.energy;
|
||||
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidTank;
|
||||
|
||||
public final class ReagentContainerInfo
|
||||
{
|
||||
public final ReagentStack reagent;
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.api.alchemy.energy;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
|
||||
public class ReagentRegistry
|
||||
{
|
||||
public static Map<String, Reagent> reagentList = new HashMap();
|
||||
|
@ -89,17 +89,17 @@ public class ReagentRegistry
|
|||
ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.crystallos), new ReagentStack(crystallosReagent, 1000));
|
||||
ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.terrae), new ReagentStack(terraeReagent, 1000));
|
||||
ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.tennebrae), new ReagentStack(tenebraeReagent, 1000));
|
||||
ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems,1,0), new ReagentStack(offensaReagent, 1000));
|
||||
ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems,1,1), new ReagentStack(praesidiumReagent, 1000));
|
||||
ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems,1,2), new ReagentStack(orbisTerraeReagent, 1000));
|
||||
ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems,1,6), new ReagentStack(virtusReagent, 1000));
|
||||
ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems,1,7), new ReagentStack(reductusReagent, 1000));
|
||||
ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems,1,8), new ReagentStack(potentiaReagent, 1000));
|
||||
ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems, 1, 0), new ReagentStack(offensaReagent, 1000));
|
||||
ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems, 1, 1), new ReagentStack(praesidiumReagent, 1000));
|
||||
ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems, 1, 2), new ReagentStack(orbisTerraeReagent, 1000));
|
||||
ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems, 1, 6), new ReagentStack(virtusReagent, 1000));
|
||||
ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems, 1, 7), new ReagentStack(reductusReagent, 1000));
|
||||
ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems, 1, 8), new ReagentStack(potentiaReagent, 1000));
|
||||
}
|
||||
|
||||
public static boolean registerReagent(String key, Reagent reagent)
|
||||
{
|
||||
if(reagentList.containsKey(key) || reagent == null)
|
||||
if (reagentList.containsKey(key) || reagent == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ public class ReagentRegistry
|
|||
|
||||
public static Reagent getReagentForKey(String key)
|
||||
{
|
||||
if(reagentList.containsKey(key))
|
||||
if (reagentList.containsKey(key))
|
||||
{
|
||||
return reagentList.get(key);
|
||||
}
|
||||
|
@ -121,12 +121,12 @@ public class ReagentRegistry
|
|||
|
||||
public static String getKeyForReagent(Reagent reagent)
|
||||
{
|
||||
if(reagentList.containsValue(reagent))
|
||||
if (reagentList.containsValue(reagent))
|
||||
{
|
||||
Set<Entry<String, Reagent>> set = reagentList.entrySet();
|
||||
for(Entry<String, Reagent> entry : set)
|
||||
for (Entry<String, Reagent> entry : set)
|
||||
{
|
||||
if(entry.getValue().equals(reagent))
|
||||
if (entry.getValue().equals(reagent))
|
||||
{
|
||||
return entry.getKey();
|
||||
}
|
||||
|
@ -143,19 +143,19 @@ public class ReagentRegistry
|
|||
|
||||
public static ReagentStack getReagentStackForItem(ItemStack stack)
|
||||
{
|
||||
if(stack == null)
|
||||
if (stack == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
for(Entry<ItemStack, ReagentStack> entry : itemToReagentMap.entrySet())
|
||||
for (Entry<ItemStack, ReagentStack> entry : itemToReagentMap.entrySet())
|
||||
{
|
||||
if(entry.getKey() != null && entry.getKey().isItemEqual(stack))
|
||||
if (entry.getKey() != null && entry.getKey().isItemEqual(stack))
|
||||
{
|
||||
if(entry.getValue() == null)
|
||||
if (entry.getValue() == null)
|
||||
{
|
||||
return null;
|
||||
}else
|
||||
} else
|
||||
{
|
||||
return entry.getValue().copy();
|
||||
}
|
||||
|
@ -167,19 +167,19 @@ public class ReagentRegistry
|
|||
|
||||
public static ItemStack getItemForReagent(Reagent reagent)
|
||||
{
|
||||
if(reagent == null)
|
||||
if (reagent == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
for(Entry<ItemStack, ReagentStack> entry : itemToReagentMap.entrySet())
|
||||
for (Entry<ItemStack, ReagentStack> entry : itemToReagentMap.entrySet())
|
||||
{
|
||||
if(entry.getValue() != null && entry.getValue().reagent == reagent)
|
||||
if (entry.getValue() != null && entry.getValue().reagent == reagent)
|
||||
{
|
||||
if(entry.getKey() == null)
|
||||
if (entry.getKey() == null)
|
||||
{
|
||||
return null;
|
||||
}else
|
||||
} else
|
||||
{
|
||||
return entry.getKey().copy();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.api.alchemy.energy;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class ReagentStack
|
||||
{
|
||||
|
@ -16,14 +15,14 @@ public class ReagentStack
|
|||
|
||||
public ReagentStack(ReagentStack reagentStack, int amount)
|
||||
{
|
||||
this(reagentStack.reagent,amount);
|
||||
this(reagentStack.reagent, amount);
|
||||
}
|
||||
|
||||
public static ReagentStack loadReagentStackFromNBT(NBTTagCompound tag)
|
||||
{
|
||||
Reagent reagent = ReagentRegistry.getReagentForKey(tag.getString("Reagent"));
|
||||
|
||||
if(reagent == null)
|
||||
if (reagent == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -4,8 +4,6 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
|
||||
public class TileReagentHandler extends TileEntity implements IReagentHandler
|
||||
{
|
||||
|
@ -63,6 +61,6 @@ public class TileReagentHandler extends TileEntity implements IReagentHandler
|
|||
@Override
|
||||
public ReagentContainerInfo[] getContainerInfo(ForgeDirection from)
|
||||
{
|
||||
return new ReagentContainerInfo[] {tank.getInfo()};
|
||||
return new ReagentContainerInfo[]{tank.getInfo()};
|
||||
}
|
||||
}
|
|
@ -1,16 +1,16 @@
|
|||
|
||||
package WayofTime.alchemicalWizardry.api.alchemy.energy;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class TileSegmentedReagentHandler extends TileEntity implements ISegmentedReagentHandler
|
||||
{
|
||||
protected ReagentContainer[] tanks;
|
||||
|
@ -32,7 +32,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
|
|||
|
||||
this.attunedTankMap = new HashMap();
|
||||
this.tanks = new ReagentContainer[numberOfTanks];
|
||||
for(int i=0; i<numberOfTanks; i++)
|
||||
for (int i = 0; i < numberOfTanks; i++)
|
||||
{
|
||||
this.tanks[i] = new ReagentContainer(tankSize);
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
|
|||
int size = tagList.tagCount();
|
||||
this.tanks = new ReagentContainer[size];
|
||||
|
||||
for(int i=0; i<size; i++)
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
NBTTagCompound savedTag = tagList.getCompoundTagAt(i);
|
||||
this.tanks[i] = ReagentContainer.readFromNBT(savedTag);
|
||||
|
@ -56,7 +56,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
|
|||
|
||||
NBTTagList attunedTagList = tag.getTagList("attunedTankMap", Constants.NBT.TAG_COMPOUND);
|
||||
|
||||
for(int i=0; i<attunedTagList.tagCount(); i++)
|
||||
for (int i = 0; i < attunedTagList.tagCount(); i++)
|
||||
{
|
||||
NBTTagCompound savedTag = attunedTagList.getCompoundTagAt(i);
|
||||
Reagent reagent = ReagentRegistry.getReagentForKey(savedTag.getString("reagent"));
|
||||
|
@ -71,10 +71,10 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
|
|||
|
||||
NBTTagList tagList = new NBTTagList();
|
||||
|
||||
for(int i=0; i<this.tanks.length; i++)
|
||||
for (int i = 0; i < this.tanks.length; i++)
|
||||
{
|
||||
NBTTagCompound savedTag = new NBTTagCompound();
|
||||
if(this.tanks[i] != null)
|
||||
if (this.tanks[i] != null)
|
||||
{
|
||||
this.tanks[i].writeToNBT(savedTag);
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
|
|||
|
||||
NBTTagList attunedTagList = new NBTTagList();
|
||||
|
||||
for(Entry<Reagent, Integer> entry : this.attunedTankMap.entrySet())
|
||||
for (Entry<Reagent, Integer> entry : this.attunedTankMap.entrySet())
|
||||
{
|
||||
NBTTagCompound savedTag = new NBTTagCompound();
|
||||
savedTag.setString("reagent", ReagentRegistry.getKeyForReagent(entry.getKey()));
|
||||
|
@ -104,57 +104,57 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
|
|||
|
||||
boolean useTankLimit = !this.attunedTankMap.isEmpty();
|
||||
|
||||
if(resource != null)
|
||||
if (resource != null)
|
||||
{
|
||||
int totalTanksFillable = useTankLimit ? this.getTanksTunedToReagent(resource.reagent) : this.tanks.length;
|
||||
int tanksFilled = 0;
|
||||
|
||||
int maxFill = resource.amount;
|
||||
|
||||
for(int i=this.tanks.length-1; i>=0; i--)
|
||||
for (int i = this.tanks.length - 1; i >= 0; i--)
|
||||
{
|
||||
ReagentStack remainingStack = resource.copy();
|
||||
remainingStack.amount = maxFill - totalFill;
|
||||
|
||||
boolean doesReagentMatch = tanks[i].getReagent() == null ? false : tanks[i].getReagent().isReagentEqual(remainingStack);
|
||||
|
||||
if(doesReagentMatch)
|
||||
if (doesReagentMatch)
|
||||
{
|
||||
totalFill += tanks[i].fill(remainingStack, doFill);
|
||||
tanksFilled++;
|
||||
}else
|
||||
} else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(totalFill >= maxFill || tanksFilled >= totalTanksFillable)
|
||||
if (totalFill >= maxFill || tanksFilled >= totalTanksFillable)
|
||||
{
|
||||
return totalFill;
|
||||
}
|
||||
}
|
||||
|
||||
if(tanksFilled >= totalTanksFillable)
|
||||
if (tanksFilled >= totalTanksFillable)
|
||||
{
|
||||
return totalFill;
|
||||
}
|
||||
|
||||
for(int i=this.tanks.length-1; i>=0; i--)
|
||||
for (int i = this.tanks.length - 1; i >= 0; i--)
|
||||
{
|
||||
ReagentStack remainingStack = resource.copy();
|
||||
remainingStack.amount = maxFill - totalFill;
|
||||
|
||||
boolean isTankEmpty = tanks[i].getReagent() == null;
|
||||
|
||||
if(isTankEmpty)
|
||||
if (isTankEmpty)
|
||||
{
|
||||
totalFill += tanks[i].fill(remainingStack, doFill);
|
||||
tanksFilled++;
|
||||
}else
|
||||
} else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(totalFill >= maxFill || tanksFilled >= totalTanksFillable)
|
||||
if (totalFill >= maxFill || tanksFilled >= totalTanksFillable)
|
||||
{
|
||||
return totalFill;
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
|
|||
@Override
|
||||
public ReagentStack drain(ForgeDirection from, ReagentStack resource, boolean doDrain)
|
||||
{
|
||||
if(resource == null)
|
||||
if (resource == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -175,17 +175,17 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
|
|||
Reagent reagent = resource.reagent;
|
||||
int drained = 0;
|
||||
|
||||
for(int i=0; i<tanks.length; i++)
|
||||
for (int i = 0; i < tanks.length; i++)
|
||||
{
|
||||
if(drained >= maxDrain)
|
||||
if (drained >= maxDrain)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if(resource.isReagentEqual(tanks[i].getReagent()))
|
||||
if (resource.isReagentEqual(tanks[i].getReagent()))
|
||||
{
|
||||
ReagentStack drainStack = tanks[i].drain(maxDrain-drained, doDrain);
|
||||
if(drainStack != null)
|
||||
ReagentStack drainStack = tanks[i].drain(maxDrain - drained, doDrain);
|
||||
if (drainStack != null)
|
||||
{
|
||||
drained += drainStack.amount;
|
||||
}
|
||||
|
@ -199,10 +199,10 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
|
|||
@Override
|
||||
public ReagentStack drain(ForgeDirection from, int maxDrain, boolean doDrain)
|
||||
{
|
||||
for(int i=0; i<tanks.length; i++)
|
||||
for (int i = 0; i < tanks.length; i++)
|
||||
{
|
||||
ReagentStack stack = tanks[i].drain(maxDrain, doDrain);
|
||||
if(stack != null)
|
||||
if (stack != null)
|
||||
{
|
||||
return stack;
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
|
|||
public ReagentContainerInfo[] getContainerInfo(ForgeDirection from)
|
||||
{
|
||||
ReagentContainerInfo[] info = new ReagentContainerInfo[this.getNumberOfTanks()];
|
||||
for(int i=0; i<this.getNumberOfTanks(); i++)
|
||||
for (int i = 0; i < this.getNumberOfTanks(); i++)
|
||||
{
|
||||
info[i] = tanks[i].getInfo();
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
|
|||
@Override
|
||||
public int getTanksTunedToReagent(Reagent reagent)
|
||||
{
|
||||
if(this.attunedTankMap.containsKey(reagent) && this.attunedTankMap.get(reagent) != null)
|
||||
if (this.attunedTankMap.containsKey(reagent) && this.attunedTankMap.get(reagent) != null)
|
||||
{
|
||||
return this.attunedTankMap.get(reagent);
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
|
|||
@Override
|
||||
public void setTanksTunedToReagent(Reagent reagent, int total)
|
||||
{
|
||||
if(total == 0 && this.attunedTankMap.containsKey(reagent))
|
||||
if (total == 0 && this.attunedTankMap.containsKey(reagent))
|
||||
{
|
||||
this.attunedTankMap.remove(reagent);
|
||||
return;
|
||||
|
@ -270,9 +270,9 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
|
|||
|
||||
public boolean areTanksEmpty()
|
||||
{
|
||||
for(int i=0; i<this.tanks.length; i++)
|
||||
for (int i = 0; i < this.tanks.length; i++)
|
||||
{
|
||||
if(tanks[i] != null && tanks[i].reagentStack != null)
|
||||
if (tanks[i] != null && tanks[i].reagentStack != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -35,12 +35,12 @@ public class AltarRecipe
|
|||
|
||||
public boolean doesRequiredItemMatch(ItemStack comparedStack, int tierCheck)
|
||||
{
|
||||
if(comparedStack == null || this.requiredItem == null)
|
||||
if (comparedStack == null || this.requiredItem == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return tierCheck>=minTier && this.requiredItem.isItemEqual(comparedStack);
|
||||
return tierCheck >= minTier && this.requiredItem.isItemEqual(comparedStack);
|
||||
}
|
||||
|
||||
public int getMinTier()
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.api.altarRecipeRegistry;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class AltarRecipeRegistry
|
||||
{
|
||||
public static List<AltarRecipe> altarRecipes = new LinkedList();
|
||||
|
@ -21,9 +21,9 @@ public class AltarRecipeRegistry
|
|||
|
||||
public static boolean isRequiredItemValid(ItemStack testItem, int currentTierAltar)
|
||||
{
|
||||
for(AltarRecipe recipe : altarRecipes)
|
||||
for (AltarRecipe recipe : altarRecipes)
|
||||
{
|
||||
if(recipe.doesRequiredItemMatch(testItem, currentTierAltar))
|
||||
if (recipe.doesRequiredItemMatch(testItem, currentTierAltar))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -34,9 +34,9 @@ public class AltarRecipeRegistry
|
|||
|
||||
public static ItemStack getItemForItemAndTier(ItemStack testItem, int currentTierAltar)
|
||||
{
|
||||
for(AltarRecipe recipe : altarRecipes)
|
||||
for (AltarRecipe recipe : altarRecipes)
|
||||
{
|
||||
if(recipe.doesRequiredItemMatch(testItem, currentTierAltar))
|
||||
if (recipe.doesRequiredItemMatch(testItem, currentTierAltar))
|
||||
{
|
||||
return ItemStack.copyItemStack(recipe.getResult());
|
||||
}
|
||||
|
@ -47,9 +47,9 @@ public class AltarRecipeRegistry
|
|||
|
||||
public static AltarRecipe getAltarRecipeForItemAndTier(ItemStack testItem, int currentTierAltar)
|
||||
{
|
||||
for(AltarRecipe recipe : altarRecipes)
|
||||
for (AltarRecipe recipe : altarRecipes)
|
||||
{
|
||||
if(recipe.doesRequiredItemMatch(testItem, currentTierAltar))
|
||||
if (recipe.doesRequiredItemMatch(testItem, currentTierAltar))
|
||||
{
|
||||
return recipe;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ public class BindingRecipe
|
|||
|
||||
public boolean doesRequiredItemMatch(ItemStack testStack)
|
||||
{
|
||||
if(testStack == null || this.requiredItem == null)
|
||||
if (testStack == null || this.requiredItem == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.api.bindingRegistry;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BindingRegistry
|
||||
{
|
||||
public static List<BindingRecipe> bindingRecipes = new LinkedList();
|
||||
|
@ -16,9 +16,9 @@ public class BindingRegistry
|
|||
|
||||
public static boolean isRequiredItemValid(ItemStack testItem)
|
||||
{
|
||||
for(BindingRecipe recipe : bindingRecipes)
|
||||
for (BindingRecipe recipe : bindingRecipes)
|
||||
{
|
||||
if(recipe.doesRequiredItemMatch(testItem))
|
||||
if (recipe.doesRequiredItemMatch(testItem))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -29,9 +29,9 @@ public class BindingRegistry
|
|||
|
||||
public static ItemStack getItemForItemAndTier(ItemStack testItem)
|
||||
{
|
||||
for(BindingRecipe recipe : bindingRecipes)
|
||||
for (BindingRecipe recipe : bindingRecipes)
|
||||
{
|
||||
if(recipe.doesRequiredItemMatch(testItem))
|
||||
if (recipe.doesRequiredItemMatch(testItem))
|
||||
{
|
||||
return recipe.getResult(testItem).copy();
|
||||
}
|
||||
|
@ -42,10 +42,10 @@ public class BindingRegistry
|
|||
|
||||
public static int getIndexForItem(ItemStack testItem)
|
||||
{
|
||||
int i=0;
|
||||
for(BindingRecipe recipe : bindingRecipes)
|
||||
int i = 0;
|
||||
for (BindingRecipe recipe : bindingRecipes)
|
||||
{
|
||||
if(recipe.doesRequiredItemMatch(testItem))
|
||||
if (recipe.doesRequiredItemMatch(testItem))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public class BindingRegistry
|
|||
|
||||
public static ItemStack getOutputForIndex(int index)
|
||||
{
|
||||
if(bindingRecipes.size()<=index)
|
||||
if (bindingRecipes.size() <= index)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.api.harvest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class HarvestRegistry
|
||||
{
|
||||
public static List<IHarvestHandler> handlerList = new ArrayList();
|
||||
|
@ -20,9 +20,9 @@ public class HarvestRegistry
|
|||
Block block = world.getBlock(xCoord, yCoord, zCoord);
|
||||
int meta = world.getBlockMetadata(xCoord, yCoord, zCoord);
|
||||
|
||||
for(IHarvestHandler handler : handlerList)
|
||||
for (IHarvestHandler handler : handlerList)
|
||||
{
|
||||
if(handler.harvestAndPlant(world, xCoord, yCoord, zCoord, block, meta))
|
||||
if (handler.harvestAndPlant(world, xCoord, yCoord, zCoord, block, meta))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package WayofTime.alchemicalWizardry.api.harvest;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
|
||||
public interface IHarvestHandler
|
||||
{
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.api.items;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -14,10 +9,18 @@ import net.minecraft.item.crafting.IRecipe;
|
|||
import net.minecraft.item.crafting.ShapedRecipes;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
|
||||
/** Shaped Blood Orb Recipe Handler by joshie **/
|
||||
public class ShapedBloodOrbRecipe implements IRecipe {
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
/**
|
||||
* Shaped Blood Orb Recipe Handler by joshie *
|
||||
*/
|
||||
public class ShapedBloodOrbRecipe implements IRecipe
|
||||
{
|
||||
private static final int MAX_CRAFT_GRID_WIDTH = 3;
|
||||
private static final int MAX_CRAFT_GRID_HEIGHT = 3;
|
||||
|
||||
|
@ -27,40 +30,50 @@ public class ShapedBloodOrbRecipe implements IRecipe {
|
|||
public int height = 0;
|
||||
private boolean mirrored = true;
|
||||
|
||||
public ShapedBloodOrbRecipe(Block result, Object... recipe) {
|
||||
public ShapedBloodOrbRecipe(Block result, Object... recipe)
|
||||
{
|
||||
this(new ItemStack(result), recipe);
|
||||
}
|
||||
|
||||
public ShapedBloodOrbRecipe(Item result, Object... recipe) {
|
||||
public ShapedBloodOrbRecipe(Item result, Object... recipe)
|
||||
{
|
||||
this(new ItemStack(result), recipe);
|
||||
}
|
||||
|
||||
public ShapedBloodOrbRecipe(ItemStack result, Object... recipe) {
|
||||
public ShapedBloodOrbRecipe(ItemStack result, Object... recipe)
|
||||
{
|
||||
output = result.copy();
|
||||
|
||||
String shape = "";
|
||||
int idx = 0;
|
||||
|
||||
if (recipe[idx] instanceof Boolean) {
|
||||
if (recipe[idx] instanceof Boolean)
|
||||
{
|
||||
mirrored = (Boolean) recipe[idx];
|
||||
if (recipe[idx + 1] instanceof Object[]) {
|
||||
if (recipe[idx + 1] instanceof Object[])
|
||||
{
|
||||
recipe = (Object[]) recipe[idx + 1];
|
||||
} else {
|
||||
} else
|
||||
{
|
||||
idx = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (recipe[idx] instanceof String[]) {
|
||||
if (recipe[idx] instanceof String[])
|
||||
{
|
||||
String[] parts = ((String[]) recipe[idx++]);
|
||||
|
||||
for (String s : parts) {
|
||||
for (String s : parts)
|
||||
{
|
||||
width = s.length();
|
||||
shape += s;
|
||||
}
|
||||
|
||||
height = parts.length;
|
||||
} else {
|
||||
while (recipe[idx] instanceof String) {
|
||||
} else
|
||||
{
|
||||
while (recipe[idx] instanceof String)
|
||||
{
|
||||
String s = (String) recipe[idx++];
|
||||
shape += s;
|
||||
width = s.length();
|
||||
|
@ -68,9 +81,11 @@ public class ShapedBloodOrbRecipe implements IRecipe {
|
|||
}
|
||||
}
|
||||
|
||||
if (width * height != shape.length()) {
|
||||
if (width * height != shape.length())
|
||||
{
|
||||
String ret = "Invalid shaped ore recipe: ";
|
||||
for (Object tmp : recipe) {
|
||||
for (Object tmp : recipe)
|
||||
{
|
||||
ret += tmp + ", ";
|
||||
}
|
||||
ret += output;
|
||||
|
@ -79,24 +94,33 @@ public class ShapedBloodOrbRecipe implements IRecipe {
|
|||
|
||||
HashMap<Character, Object> itemMap = new HashMap<Character, Object>();
|
||||
|
||||
for (; idx < recipe.length; idx += 2) {
|
||||
for (; idx < recipe.length; idx += 2)
|
||||
{
|
||||
Character chr = (Character) recipe[idx];
|
||||
Object in = recipe[idx + 1];
|
||||
|
||||
if (in instanceof IBloodOrb || (in instanceof ItemStack && ((ItemStack)in).getItem() instanceof IBloodOrb)) { //If the item is an instanceof IBloodOrb then save the level of the orb
|
||||
if(in instanceof ItemStack) itemMap.put(chr, (Integer)(((IBloodOrb)((ItemStack)in).getItem()).getOrbLevel()));
|
||||
else itemMap.put(chr, (Integer)(((IBloodOrb)in).getOrbLevel()));
|
||||
} else if (in instanceof ItemStack) {
|
||||
if (in instanceof IBloodOrb || (in instanceof ItemStack && ((ItemStack) in).getItem() instanceof IBloodOrb))
|
||||
{ //If the item is an instanceof IBloodOrb then save the level of the orb
|
||||
if (in instanceof ItemStack)
|
||||
itemMap.put(chr, (Integer) (((IBloodOrb) ((ItemStack) in).getItem()).getOrbLevel()));
|
||||
else itemMap.put(chr, (Integer) (((IBloodOrb) in).getOrbLevel()));
|
||||
} else if (in instanceof ItemStack)
|
||||
{
|
||||
itemMap.put(chr, ((ItemStack) in).copy());
|
||||
} else if (in instanceof Item) {
|
||||
} else if (in instanceof Item)
|
||||
{
|
||||
itemMap.put(chr, new ItemStack((Item) in));
|
||||
} else if (in instanceof Block) {
|
||||
} else if (in instanceof Block)
|
||||
{
|
||||
itemMap.put(chr, new ItemStack((Block) in, 1, OreDictionary.WILDCARD_VALUE));
|
||||
} else if (in instanceof String) {
|
||||
} else if (in instanceof String)
|
||||
{
|
||||
itemMap.put(chr, OreDictionary.getOres((String) in));
|
||||
} else {
|
||||
} else
|
||||
{
|
||||
String ret = "Invalid shaped ore recipe: ";
|
||||
for (Object tmp : recipe) {
|
||||
for (Object tmp : recipe)
|
||||
{
|
||||
ret += tmp + ", ";
|
||||
}
|
||||
ret += output;
|
||||
|
@ -106,19 +130,22 @@ public class ShapedBloodOrbRecipe implements IRecipe {
|
|||
|
||||
input = new Object[width * height];
|
||||
int x = 0;
|
||||
for (char chr : shape.toCharArray()) {
|
||||
for (char chr : shape.toCharArray())
|
||||
{
|
||||
input[x++] = itemMap.get(chr);
|
||||
}
|
||||
}
|
||||
|
||||
ShapedBloodOrbRecipe(ShapedRecipes recipe, Map<ItemStack, String> replacements) {
|
||||
ShapedBloodOrbRecipe(ShapedRecipes recipe, Map<ItemStack, String> replacements)
|
||||
{
|
||||
output = recipe.getRecipeOutput();
|
||||
width = recipe.recipeWidth;
|
||||
height = recipe.recipeHeight;
|
||||
|
||||
input = new Object[recipe.recipeItems.length];
|
||||
|
||||
for (int i = 0; i < input.length; i++) {
|
||||
for (int i = 0; i < input.length; i++)
|
||||
{
|
||||
ItemStack ingred = recipe.recipeItems[i];
|
||||
|
||||
if (ingred == null)
|
||||
|
@ -126,8 +153,10 @@ public class ShapedBloodOrbRecipe implements IRecipe {
|
|||
|
||||
input[i] = recipe.recipeItems[i];
|
||||
|
||||
for (Entry<ItemStack, String> replace : replacements.entrySet()) {
|
||||
if (OreDictionary.itemMatches(replace.getKey(), ingred, true)) {
|
||||
for (Entry<ItemStack, String> replace : replacements.entrySet())
|
||||
{
|
||||
if (OreDictionary.itemMatches(replace.getKey(), ingred, true))
|
||||
{
|
||||
input[i] = OreDictionary.getOres(replace.getValue());
|
||||
break;
|
||||
}
|
||||
|
@ -136,29 +165,37 @@ public class ShapedBloodOrbRecipe implements IRecipe {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getCraftingResult(InventoryCrafting var1) {
|
||||
public ItemStack getCraftingResult(InventoryCrafting var1)
|
||||
{
|
||||
return output.copy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRecipeSize() {
|
||||
public int getRecipeSize()
|
||||
{
|
||||
return input.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getRecipeOutput() {
|
||||
public ItemStack getRecipeOutput()
|
||||
{
|
||||
return output;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean matches(InventoryCrafting inv, World world) {
|
||||
for (int x = 0; x <= MAX_CRAFT_GRID_WIDTH - width; x++) {
|
||||
for (int y = 0; y <= MAX_CRAFT_GRID_HEIGHT - height; ++y) {
|
||||
if (checkMatch(inv, x, y, false)) {
|
||||
public boolean matches(InventoryCrafting inv, World world)
|
||||
{
|
||||
for (int x = 0; x <= MAX_CRAFT_GRID_WIDTH - width; x++)
|
||||
{
|
||||
for (int y = 0; y <= MAX_CRAFT_GRID_HEIGHT - height; ++y)
|
||||
{
|
||||
if (checkMatch(inv, x, y, false))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mirrored && checkMatch(inv, x, y, true)) {
|
||||
if (mirrored && checkMatch(inv, x, y, true))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -168,46 +205,61 @@ public class ShapedBloodOrbRecipe implements IRecipe {
|
|||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private boolean checkMatch(InventoryCrafting inv, int startX, int startY, boolean mirror) {
|
||||
for (int x = 0; x < MAX_CRAFT_GRID_WIDTH; x++) {
|
||||
for (int y = 0; y < MAX_CRAFT_GRID_HEIGHT; y++) {
|
||||
private boolean checkMatch(InventoryCrafting inv, int startX, int startY, boolean mirror)
|
||||
{
|
||||
for (int x = 0; x < MAX_CRAFT_GRID_WIDTH; x++)
|
||||
{
|
||||
for (int y = 0; y < MAX_CRAFT_GRID_HEIGHT; y++)
|
||||
{
|
||||
int subX = x - startX;
|
||||
int subY = y - startY;
|
||||
Object target = null;
|
||||
|
||||
if (subX >= 0 && subY >= 0 && subX < width && subY < height) {
|
||||
if (mirror) {
|
||||
if (subX >= 0 && subY >= 0 && subX < width && subY < height)
|
||||
{
|
||||
if (mirror)
|
||||
{
|
||||
target = input[width - subX - 1 + subY * width];
|
||||
} else {
|
||||
} else
|
||||
{
|
||||
target = input[subX + subY * width];
|
||||
}
|
||||
}
|
||||
|
||||
ItemStack slot = inv.getStackInRowAndColumn(x, y);
|
||||
//If target is integer, then we should be check the blood orb value of the item instead
|
||||
if(target instanceof Integer) {
|
||||
if(slot != null && slot.getItem() instanceof IBloodOrb) {
|
||||
if (target instanceof Integer)
|
||||
{
|
||||
if (slot != null && slot.getItem() instanceof IBloodOrb)
|
||||
{
|
||||
IBloodOrb orb = (IBloodOrb) slot.getItem();
|
||||
if(orb.getOrbLevel() < (Integer)target) {
|
||||
if (orb.getOrbLevel() < (Integer) target)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
} else return false;
|
||||
} else if (target instanceof ItemStack) {
|
||||
if (!OreDictionary.itemMatches((ItemStack) target, slot, false)) {
|
||||
} else if (target instanceof ItemStack)
|
||||
{
|
||||
if (!OreDictionary.itemMatches((ItemStack) target, slot, false))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
} else if (target instanceof ArrayList) {
|
||||
} else if (target instanceof ArrayList)
|
||||
{
|
||||
boolean matched = false;
|
||||
|
||||
Iterator<ItemStack> itr = ((ArrayList<ItemStack>) target).iterator();
|
||||
while (itr.hasNext() && !matched) {
|
||||
while (itr.hasNext() && !matched)
|
||||
{
|
||||
matched = OreDictionary.itemMatches(itr.next(), slot, false);
|
||||
}
|
||||
|
||||
if (!matched) {
|
||||
if (!matched)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
} else if (target == null && slot != null) {
|
||||
} else if (target == null && slot != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -216,12 +268,14 @@ public class ShapedBloodOrbRecipe implements IRecipe {
|
|||
return true;
|
||||
}
|
||||
|
||||
public ShapedBloodOrbRecipe setMirrored(boolean mirror) {
|
||||
public ShapedBloodOrbRecipe setMirrored(boolean mirror)
|
||||
{
|
||||
mirrored = mirror;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Object[] getInput() {
|
||||
public Object[] getInput()
|
||||
{
|
||||
return this.input;
|
||||
}
|
||||
}
|
|
@ -1,11 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.api.items;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -14,37 +9,56 @@ import net.minecraft.item.crafting.IRecipe;
|
|||
import net.minecraft.item.crafting.ShapelessRecipes;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
|
||||
/** Shapeless Blood Orb Recipe Handler by joshie **/
|
||||
public class ShapelessBloodOrbRecipe implements IRecipe {
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
/**
|
||||
* Shapeless Blood Orb Recipe Handler by joshie *
|
||||
*/
|
||||
public class ShapelessBloodOrbRecipe implements IRecipe
|
||||
{
|
||||
private ItemStack output = null;
|
||||
private ArrayList<Object> input = new ArrayList<Object>();
|
||||
|
||||
public ShapelessBloodOrbRecipe(Block result, Object... recipe) {
|
||||
public ShapelessBloodOrbRecipe(Block result, Object... recipe)
|
||||
{
|
||||
this(new ItemStack(result), recipe);
|
||||
}
|
||||
|
||||
public ShapelessBloodOrbRecipe(Item result, Object... recipe) {
|
||||
public ShapelessBloodOrbRecipe(Item result, Object... recipe)
|
||||
{
|
||||
this(new ItemStack(result), recipe);
|
||||
}
|
||||
|
||||
public ShapelessBloodOrbRecipe(ItemStack result, Object... recipe) {
|
||||
public ShapelessBloodOrbRecipe(ItemStack result, Object... recipe)
|
||||
{
|
||||
output = result.copy();
|
||||
for (Object in : recipe) {
|
||||
if (in instanceof ItemStack) {
|
||||
for (Object in : recipe)
|
||||
{
|
||||
if (in instanceof ItemStack)
|
||||
{
|
||||
input.add(((ItemStack) in).copy());
|
||||
} else if (in instanceof IBloodOrb) { //If the item is an instanceof IBloodOrb then save the level of the orb
|
||||
input.add((Integer)(((IBloodOrb)in).getOrbLevel()));
|
||||
} else if (in instanceof Item) {
|
||||
} else if (in instanceof IBloodOrb)
|
||||
{ //If the item is an instanceof IBloodOrb then save the level of the orb
|
||||
input.add((Integer) (((IBloodOrb) in).getOrbLevel()));
|
||||
} else if (in instanceof Item)
|
||||
{
|
||||
input.add(new ItemStack((Item) in));
|
||||
} else if (in instanceof Block) {
|
||||
} else if (in instanceof Block)
|
||||
{
|
||||
input.add(new ItemStack((Block) in));
|
||||
} else if (in instanceof String) {
|
||||
} else if (in instanceof String)
|
||||
{
|
||||
input.add(OreDictionary.getOres((String) in));
|
||||
} else {
|
||||
} else
|
||||
{
|
||||
String ret = "Invalid shapeless ore recipe: ";
|
||||
for (Object tmp : recipe) {
|
||||
for (Object tmp : recipe)
|
||||
{
|
||||
ret += tmp + ", ";
|
||||
}
|
||||
ret += output;
|
||||
|
@ -54,13 +68,17 @@ public class ShapelessBloodOrbRecipe implements IRecipe {
|
|||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
ShapelessBloodOrbRecipe(ShapelessRecipes recipe, Map<ItemStack, String> replacements) {
|
||||
ShapelessBloodOrbRecipe(ShapelessRecipes recipe, Map<ItemStack, String> replacements)
|
||||
{
|
||||
output = recipe.getRecipeOutput();
|
||||
|
||||
for (ItemStack ingred : ((List<ItemStack>) recipe.recipeItems)) {
|
||||
for (ItemStack ingred : ((List<ItemStack>) recipe.recipeItems))
|
||||
{
|
||||
Object finalObj = ingred;
|
||||
for (Entry<ItemStack, String> replace : replacements.entrySet()) {
|
||||
if (OreDictionary.itemMatches(replace.getKey(), ingred, false)) {
|
||||
for (Entry<ItemStack, String> replace : replacements.entrySet())
|
||||
{
|
||||
if (OreDictionary.itemMatches(replace.getKey(), ingred, false))
|
||||
{
|
||||
finalObj = OreDictionary.getOres(replace.getValue());
|
||||
break;
|
||||
}
|
||||
|
@ -70,62 +88,77 @@ public class ShapelessBloodOrbRecipe implements IRecipe {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getRecipeSize() {
|
||||
public int getRecipeSize()
|
||||
{
|
||||
return input.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getRecipeOutput() {
|
||||
public ItemStack getRecipeOutput()
|
||||
{
|
||||
return output;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getCraftingResult(InventoryCrafting var1) {
|
||||
public ItemStack getCraftingResult(InventoryCrafting var1)
|
||||
{
|
||||
return output.copy();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public boolean matches(InventoryCrafting var1, World world) {
|
||||
public boolean matches(InventoryCrafting var1, World world)
|
||||
{
|
||||
ArrayList<Object> required = new ArrayList<Object>(input);
|
||||
|
||||
for (int x = 0; x < var1.getSizeInventory(); x++) {
|
||||
for (int x = 0; x < var1.getSizeInventory(); x++)
|
||||
{
|
||||
ItemStack slot = var1.getStackInSlot(x);
|
||||
|
||||
if (slot != null) {
|
||||
if (slot != null)
|
||||
{
|
||||
boolean inRecipe = false;
|
||||
Iterator<Object> req = required.iterator();
|
||||
|
||||
while (req.hasNext()) {
|
||||
while (req.hasNext())
|
||||
{
|
||||
boolean match = false;
|
||||
|
||||
Object next = req.next();
|
||||
|
||||
//If target is integer, then we should be check the blood orb value of the item instead
|
||||
if(next instanceof Integer) {
|
||||
if(slot != null && slot.getItem() instanceof IBloodOrb) {
|
||||
if (next instanceof Integer)
|
||||
{
|
||||
if (slot != null && slot.getItem() instanceof IBloodOrb)
|
||||
{
|
||||
IBloodOrb orb = (IBloodOrb) slot.getItem();
|
||||
if(orb.getOrbLevel() < (Integer)next) {
|
||||
if (orb.getOrbLevel() < (Integer) next)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
} else return false;
|
||||
} else if (next instanceof ItemStack) {
|
||||
} else if (next instanceof ItemStack)
|
||||
{
|
||||
match = OreDictionary.itemMatches((ItemStack) next, slot, false);
|
||||
} else if (next instanceof ArrayList) {
|
||||
} else if (next instanceof ArrayList)
|
||||
{
|
||||
Iterator<ItemStack> itr = ((ArrayList<ItemStack>) next).iterator();
|
||||
while (itr.hasNext() && !match) {
|
||||
while (itr.hasNext() && !match)
|
||||
{
|
||||
match = OreDictionary.itemMatches(itr.next(), slot, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (match) {
|
||||
if (match)
|
||||
{
|
||||
inRecipe = true;
|
||||
required.remove(next);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!inRecipe) {
|
||||
if (!inRecipe)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -134,7 +167,8 @@ public class ShapelessBloodOrbRecipe implements IRecipe {
|
|||
return required.isEmpty();
|
||||
}
|
||||
|
||||
public ArrayList<Object> getInput() {
|
||||
public ArrayList<Object> getInput()
|
||||
{
|
||||
return this.input;
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.api.rituals;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ISegmentedReagentHandler;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ISegmentedReagentHandler;
|
||||
|
||||
public interface IMasterRitualStone extends ISegmentedReagentHandler
|
||||
{
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.api.rituals;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public abstract class RitualEffect
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ public abstract class RitualEffect
|
|||
|
||||
public boolean canDrainReagent(IMasterRitualStone ritualStone, Reagent reagent, int amount, boolean doDrain)
|
||||
{
|
||||
if(ritualStone == null || reagent == null || amount == 0)
|
||||
if (ritualStone == null || reagent == null || amount == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -41,9 +41,9 @@ public abstract class RitualEffect
|
|||
|
||||
ReagentStack stack = ritualStone.drain(ForgeDirection.UNKNOWN, reagentStack, false);
|
||||
|
||||
if(stack != null && stack.amount >= amount)
|
||||
if (stack != null && stack.amount >= amount)
|
||||
{
|
||||
if(doDrain)
|
||||
if (doDrain)
|
||||
{
|
||||
ritualStone.drain(ForgeDirection.UNKNOWN, reagentStack, true);
|
||||
}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package WayofTime.alchemicalWizardry.api.rituals;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.MRSRenderer;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.MRSRenderer;
|
||||
|
||||
public class Rituals
|
||||
{
|
||||
private int crystalLevel;
|
||||
|
@ -19,7 +19,7 @@ public class Rituals
|
|||
|
||||
private MRSRenderer customRenderer;
|
||||
|
||||
public static Map<String,Rituals> ritualMap = new HashMap();
|
||||
public static Map<String, Rituals> ritualMap = new HashMap();
|
||||
public static List<String> keyList = new LinkedList();
|
||||
|
||||
public Rituals(int crystalLevel, int actCost, RitualEffect effect, String name, MRSRenderer renderer)
|
||||
|
@ -40,6 +40,7 @@ public class Rituals
|
|||
|
||||
/**
|
||||
* Static method to register a ritual to the Ritual Registry
|
||||
*
|
||||
* @param key Unique identification key - must be different from all others to properly register
|
||||
* @param crystalLevel Crystal level required to activate
|
||||
* @param actCost LP amount required to activate
|
||||
|
@ -49,11 +50,10 @@ public class Rituals
|
|||
*/
|
||||
public static boolean registerRitual(String key, int crystalLevel, int actCost, RitualEffect effect, String name, MRSRenderer renderer)
|
||||
{
|
||||
if(ritualMap.containsKey(key))
|
||||
if (ritualMap.containsKey(key))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
Rituals ritual = new Rituals(crystalLevel, actCost, effect, name, renderer);
|
||||
ritual.removeRitualFromList();
|
||||
|
@ -65,11 +65,10 @@ public class Rituals
|
|||
|
||||
public static boolean registerRitual(String key, int crystalLevel, int actCost, RitualEffect effect, String name)
|
||||
{
|
||||
if(ritualMap.containsKey(key))
|
||||
if (ritualMap.containsKey(key))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
Rituals ritual = new Rituals(crystalLevel, actCost, effect, name);
|
||||
ritual.removeRitualFromList();
|
||||
|
@ -81,11 +80,11 @@ public class Rituals
|
|||
|
||||
public void removeRitualFromList()
|
||||
{
|
||||
if(ritualMap.containsValue(this))
|
||||
if (ritualMap.containsValue(this))
|
||||
{
|
||||
ritualMap.remove(ritualMap.remove(this.name));
|
||||
}
|
||||
if(keyList.contains(this.name))
|
||||
if (keyList.contains(this.name))
|
||||
{
|
||||
keyList.remove(this.name);
|
||||
}
|
||||
|
@ -93,9 +92,9 @@ public class Rituals
|
|||
|
||||
public static String checkValidRitual(World world, int x, int y, int z)
|
||||
{
|
||||
for(String key : ritualMap.keySet())
|
||||
for (String key : ritualMap.keySet())
|
||||
{
|
||||
if(checkRitualIsValid(world,x,y,z,key))
|
||||
if (checkRitualIsValid(world, x, y, z, key))
|
||||
{
|
||||
return key;
|
||||
}
|
||||
|
@ -106,10 +105,10 @@ public class Rituals
|
|||
|
||||
public static boolean canCrystalActivate(String ritualID, int crystalLevel)
|
||||
{
|
||||
if(ritualMap.containsKey(ritualID))
|
||||
if (ritualMap.containsKey(ritualID))
|
||||
{
|
||||
Rituals ritual = ritualMap.get(ritualID);
|
||||
if(ritual != null)
|
||||
if (ritual != null)
|
||||
{
|
||||
return ritual.getCrystalLevel() <= crystalLevel;
|
||||
}
|
||||
|
@ -240,10 +239,10 @@ public class Rituals
|
|||
|
||||
public static int getCostForActivation(String ritualID)
|
||||
{
|
||||
if(ritualMap.containsKey(ritualID))
|
||||
if (ritualMap.containsKey(ritualID))
|
||||
{
|
||||
Rituals ritual = ritualMap.get(ritualID);
|
||||
if(ritual != null)
|
||||
if (ritual != null)
|
||||
{
|
||||
return ritual.actCost;
|
||||
}
|
||||
|
@ -254,10 +253,10 @@ public class Rituals
|
|||
|
||||
public static int getInitialCooldown(String ritualID)
|
||||
{
|
||||
if(ritualMap.containsKey(ritualID))
|
||||
if (ritualMap.containsKey(ritualID))
|
||||
{
|
||||
Rituals ritual = ritualMap.get(ritualID);
|
||||
if(ritual != null && ritual.effect != null)
|
||||
if (ritual != null && ritual.effect != null)
|
||||
{
|
||||
return ritual.effect.getInitialCooldown();
|
||||
}
|
||||
|
@ -268,17 +267,17 @@ public class Rituals
|
|||
|
||||
public static List<RitualComponent> getRitualList(String ritualID)
|
||||
{
|
||||
if(ritualMap.containsKey(ritualID))
|
||||
if (ritualMap.containsKey(ritualID))
|
||||
{
|
||||
Rituals ritual = ritualMap.get(ritualID);
|
||||
if(ritual != null)
|
||||
if (ritual != null)
|
||||
{
|
||||
return ritual.obtainComponents();
|
||||
}else
|
||||
} else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}else
|
||||
} else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -301,10 +300,10 @@ public class Rituals
|
|||
|
||||
public static void performEffect(IMasterRitualStone ritualStone, String ritualID)
|
||||
{
|
||||
if(ritualMap.containsKey(ritualID))
|
||||
if (ritualMap.containsKey(ritualID))
|
||||
{
|
||||
Rituals ritual = ritualMap.get(ritualID);
|
||||
if(ritual != null && ritual.effect != null)
|
||||
if (ritual != null && ritual.effect != null)
|
||||
{
|
||||
ritual.effect.performEffect(ritualStone);
|
||||
}
|
||||
|
@ -313,10 +312,10 @@ public class Rituals
|
|||
|
||||
public static boolean startRitual(IMasterRitualStone ritualStone, String ritualID, EntityPlayer player)
|
||||
{
|
||||
if(ritualMap.containsKey(ritualID))
|
||||
if (ritualMap.containsKey(ritualID))
|
||||
{
|
||||
Rituals ritual = ritualMap.get(ritualID);
|
||||
if(ritual != null && ritual.effect != null)
|
||||
if (ritual != null && ritual.effect != null)
|
||||
{
|
||||
return ritual.effect.startRitual(ritualStone, player);
|
||||
}
|
||||
|
@ -327,10 +326,10 @@ public class Rituals
|
|||
|
||||
public static void onRitualBroken(IMasterRitualStone ritualStone, String ritualID)
|
||||
{
|
||||
if(ritualMap.containsKey(ritualID))
|
||||
if (ritualMap.containsKey(ritualID))
|
||||
{
|
||||
Rituals ritual = ritualMap.get(ritualID);
|
||||
if(ritual != null && ritual.effect != null)
|
||||
if (ritual != null && ritual.effect != null)
|
||||
{
|
||||
ritual.effect.onRitualBroken(ritualStone);
|
||||
}
|
||||
|
@ -349,10 +348,10 @@ public class Rituals
|
|||
|
||||
public static String getNameOfRitual(String id)
|
||||
{
|
||||
if(ritualMap.containsKey(id))
|
||||
if (ritualMap.containsKey(id))
|
||||
{
|
||||
Rituals ritual = ritualMap.get(id);
|
||||
if(ritual != null)
|
||||
if (ritual != null)
|
||||
{
|
||||
return ritual.getRitualName();
|
||||
}
|
||||
|
@ -366,17 +365,17 @@ public class Rituals
|
|||
boolean hasSpotted = false;
|
||||
String firstKey = "";
|
||||
|
||||
for(String str : keyList)
|
||||
for (String str : keyList)
|
||||
{
|
||||
if(firstKey.equals(""))
|
||||
if (firstKey.equals(""))
|
||||
{
|
||||
firstKey = str;
|
||||
}
|
||||
if(hasSpotted)
|
||||
if (hasSpotted)
|
||||
{
|
||||
return str;
|
||||
}
|
||||
if(str.equals(key))
|
||||
if (str.equals(key))
|
||||
{
|
||||
hasSpotted = true;
|
||||
}
|
||||
|
@ -388,15 +387,15 @@ public class Rituals
|
|||
public static String getPreviousRitualKey(String key)
|
||||
{
|
||||
boolean hasSpotted = false;
|
||||
String lastKey = keyList.get(keyList.size()-1);
|
||||
String lastKey = keyList.get(keyList.size() - 1);
|
||||
|
||||
for(String str : keyList)
|
||||
for (String str : keyList)
|
||||
{
|
||||
if(str.equals(key))
|
||||
if (str.equals(key))
|
||||
{
|
||||
hasSpotted = true;
|
||||
}
|
||||
if(hasSpotted)
|
||||
if (hasSpotted)
|
||||
{
|
||||
return lastKey;
|
||||
}
|
||||
|
@ -408,10 +407,10 @@ public class Rituals
|
|||
|
||||
public static MRSRenderer getRendererForKey(String ritualID)
|
||||
{
|
||||
if(ritualMap.containsKey(ritualID))
|
||||
if (ritualMap.containsKey(ritualID))
|
||||
{
|
||||
Rituals ritual = ritualMap.get(ritualID);
|
||||
if(ritual != null)
|
||||
if (ritual != null)
|
||||
{
|
||||
return ritual.getRenderer();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.api.soulNetwork;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -11,7 +10,7 @@ import net.minecraft.server.MinecraftServer;
|
|||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import java.util.UUID;
|
||||
|
||||
public class SoulNetworkHandler
|
||||
{
|
||||
|
@ -25,8 +24,6 @@ public class SoulNetworkHandler
|
|||
MinecraftServer server = MinecraftServer.getServer();
|
||||
GameProfile gameProfile;
|
||||
gameProfile = server.func_152358_ax().func_152652_a(uuid);
|
||||
// LogHelper.info("player is " + gameProfile.getName() + " : " + gameProfile.getId());
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -78,14 +75,14 @@ public class SoulNetworkHandler
|
|||
*/
|
||||
public static boolean syphonAndDamageFromNetwork(ItemStack ist, EntityPlayer player, int damageToBeDone)
|
||||
{
|
||||
if(player.worldObj.isRemote)
|
||||
if (player.worldObj.isRemote)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int amount = SoulNetworkHandler.syphonFromNetwork(ist, damageToBeDone);
|
||||
|
||||
hurtPlayer(player, damageToBeDone-amount);
|
||||
hurtPlayer(player, damageToBeDone - amount);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -186,15 +183,15 @@ public class SoulNetworkHandler
|
|||
|
||||
int currEss = data.currentEssence;
|
||||
|
||||
if(currEss>=maximum)
|
||||
if (currEss >= maximum)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int newEss = Math.min(maximum, currEss+addedEssence);
|
||||
int newEss = Math.min(maximum, currEss + addedEssence);
|
||||
data.currentEssence = newEss;
|
||||
|
||||
return newEss-currEss;
|
||||
return newEss - currEss;
|
||||
}
|
||||
|
||||
public static void hurtPlayer(EntityPlayer user, int energySyphoned)
|
||||
|
@ -261,7 +258,7 @@ public class SoulNetworkHandler
|
|||
|
||||
public static EntityPlayer getPlayerForUsername(String str)
|
||||
{
|
||||
if(MinecraftServer.getServer() == null)
|
||||
if (MinecraftServer.getServer() == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
package WayofTime.alchemicalWizardry.client;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import net.minecraftforge.client.event.sound.SoundEvent;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.client.renderer.RenderHelper;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
@ -13,6 +7,11 @@ import cpw.mods.fml.common.eventhandler.Event.Result;
|
|||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.RenderTickEvent;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import net.minecraftforge.client.event.sound.SoundEvent;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class ClientEventHandler
|
||||
{
|
||||
|
@ -21,11 +20,11 @@ public class ClientEventHandler
|
|||
@SubscribeEvent
|
||||
public void onPlayerSoundEvent(SoundEvent event)
|
||||
{
|
||||
if(Minecraft.getMinecraft() != null)
|
||||
if (Minecraft.getMinecraft() != null)
|
||||
{
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
if(player != null && player.isPotionActive(AlchemicalWizardry.customPotionDeaf))
|
||||
if (player != null && player.isPotionActive(AlchemicalWizardry.customPotionDeaf))
|
||||
{
|
||||
event.setResult(Result.DENY);
|
||||
}
|
||||
|
|
|
@ -1,89 +1,29 @@
|
|||
package WayofTime.alchemicalWizardry.client;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.CommonProxy;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAirElemental;
|
||||
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.entity.mob.*;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaMainProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityMeteor;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityParticleBeam;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderAlchemicCalcinator;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderConduit;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderCrystalBelljar;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderMasterStone;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderPedestal;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderPlinth;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderReagentConduit;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellEffectBlock;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellEnhancementBlock;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellModifierBlock;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderSpellParadigmBlock;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderWritingTable;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.ShaderHelper;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.TEAltarRenderer;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEAlchemicalCalcinatorItemRenderer;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEAltarItemRenderer;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEBellJarItemRenderer;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TEConduitItemRenderer;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TESpellEffectBlockItemRenderer;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TESpellEnhancementBlockItemRenderer;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TESpellModifierBlockItemRenderer;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.TESpellParadigmBlockItemRenderer;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.mob.RenderBileDemon;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.mob.RenderBoulderFist;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.mob.RenderElemental;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.mob.RenderFallenAngel;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.mob.RenderIceDemon;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.mob.RenderLowerGuardian;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.mob.RenderShade;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.mob.RenderSmallEarthGolem;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.mob.RenderWingedFireDemon;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelBileDemon;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelBoulderFist;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelElemental;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelFallenAngel;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelIceDemon;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelLowerGuardian;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelShade;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSmallEarthGolem;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelWingedFireDemon;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.*;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.itemRender.*;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.mob.*;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.*;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBazookaMainProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBlastProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderMeteor;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.EntitySpellProjectile;
|
||||
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.TEMasterStone;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
|
||||
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.TEWritingTable;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.*;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
public class ClientProxy extends CommonProxy
|
||||
{
|
||||
|
@ -93,39 +33,24 @@ public class ClientProxy extends CommonProxy
|
|||
@Override
|
||||
public void registerRenderers()
|
||||
{
|
||||
//altarRenderType = RenderingRegistry.getNextAvailableRenderId();
|
||||
RenderingRegistry.registerEntityRenderingHandler(EnergyBlastProjectile.class, new RenderEnergyBlastProjectile());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityEnergyBazookaMainProjectile.class, new RenderEnergyBazookaMainProjectile());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySpellProjectile.class, new RenderEnergyBlastProjectile());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityParticleBeam.class, new RenderEnergyBlastProjectile());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMeteor.class, new RenderMeteor());
|
||||
//EntityRegistry.registerGlobalEntityID(EntityFallenAngel.class, "AlchemicalWizardry.FallenAngel", EntityRegistry.findGlobalUniqueEntityId(),0x40FF00, 0x0B610B);
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityFallenAngel.class, new RenderFallenAngel(new ModelFallenAngel(), 0.5F));
|
||||
//EntityRegistry.registerGlobalEntityID(EntityLowerGuardian.class, "AlchemicalWizardry.LowerGuardian", EntityRegistry.findGlobalUniqueEntityId(),0x40FF00, 0x0B610B);
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityLowerGuardian.class, new RenderLowerGuardian(new ModelLowerGuardian(), 0.5F));
|
||||
//EntityRegistry.registerGlobalEntityID(EntityBileDemon.class, "AlchemicalWizardry.BileDemon", EntityRegistry.findGlobalUniqueEntityId(),0x40FF00, 0x0B610B);
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBileDemon.class, new RenderBileDemon(new ModelBileDemon(), 1.5F));
|
||||
//EntityRegistry.registerGlobalEntityID(EntityWingedFireDemon.class, "AlchemicalWizardry.WingedFireDemon", EntityRegistry.findGlobalUniqueEntityId(),0x40FF00, 0x0B610B);
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityWingedFireDemon.class, new RenderWingedFireDemon(new ModelWingedFireDemon(), 1.0F));
|
||||
//EntityRegistry.registerGlobalEntityID(EntitySmallEarthGolem.class, "AlchemicalWizardry.SmallEarthGolem", EntityRegistry.findGlobalUniqueEntityId(),0x40FF00, 0x0B610B);
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySmallEarthGolem.class, new RenderSmallEarthGolem(new ModelSmallEarthGolem(), 0.5F));
|
||||
//EntityRegistry.registerGlobalEntityID(EntityIceDemon.class, "AlchemicalWizardry.IceDemon", EntityRegistry.findGlobalUniqueEntityId(),0x40FF00, 0x0B610B);
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityIceDemon.class, new RenderIceDemon(new ModelIceDemon(), 0.5F));
|
||||
// EntityRegistry.registerGlobalEntityID(EntityBoulderFist.class, "AlchemicalWizardry.BoulderFist", EntityRegistry.findGlobalUniqueEntityId(),0x40FF00, 0x0B610B);
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBoulderFist.class, new RenderBoulderFist(new ModelBoulderFist(), 0.5F));
|
||||
//EntityRegistry.registerGlobalEntityID(EntityShade.class, "AlchemicalWizardry.Shade", EntityRegistry.findGlobalUniqueEntityId(),0x40FF00, 0x0B610B);
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityShade.class, new RenderShade(new ModelShade(), 0.5F));
|
||||
//EntityRegistry.registerGlobalEntityID(EntityAirElemental.class, "AlchemicalWizardry.AirElemental", EntityRegistry.findGlobalUniqueEntityId(),0x40FF00, 0x0B610B);
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityAirElemental.class, new RenderElemental(new ModelElemental(), 0.5F));
|
||||
//EntityRegistry.registerGlobalEntityID(EntityWaterElemental.class, "AlchemicalWizardry.WaterElemental", EntityRegistry.findGlobalUniqueEntityId(),0x40FF00, 0x0B610B);
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityWaterElemental.class, new RenderElemental(new ModelElemental(), 0.5F));
|
||||
//EntityRegistry.registerGlobalEntityID(EntityEarthElemental.class, "AlchemicalWizardry.EarthElemental", EntityRegistry.findGlobalUniqueEntityId(),0x40FF00, 0x0B610B);
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityEarthElemental.class, new RenderElemental(new ModelElemental(), 0.5F));
|
||||
//EntityRegistry.registerGlobalEntityID(EntityFireElemental.class, "AlchemicalWizardry.FireElemental", EntityRegistry.findGlobalUniqueEntityId(),0x40FF00, 0x0B610B);
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityFireElemental.class, new RenderElemental(new ModelElemental(), 0.5F));
|
||||
//EntityRegistry.registerGlobalEntityID(EntityShadeElemental.class, "AlchemicalWizardry.ShadeElemental", EntityRegistry.findGlobalUniqueEntityId(),0x40FF00, 0x0B610B);
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityShadeElemental.class, new RenderElemental(new ModelElemental(), 0.5F));
|
||||
//EntityRegistry.registerGlobalEntityID(EntityHolyElemental.class, "AlchemicalWizardry.HolyElemental", EntityRegistry.findGlobalUniqueEntityId(),0x40FF00, 0x0B610B);
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityHolyElemental.class, new RenderElemental(new ModelElemental(), 0.5F));
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEAltar.class, new TEAltarRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEPedestal.class, new RenderPedestal());
|
||||
|
@ -149,10 +74,6 @@ public class ClientProxy extends CommonProxy
|
|||
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockSpellModifier), new TESpellModifierBlockItemRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockAlchemicCalcinator), new TEAlchemicalCalcinatorItemRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockCrystalBelljar), new TEBellJarItemRenderer());
|
||||
|
||||
//RenderingRegistry.registerEntityRenderingHandler(FireProjectile.class, new RenderFireProjectile());
|
||||
//RenderingRegistry.registerBlockHandler(new AltarRenderer());
|
||||
|
||||
ShaderHelper.initShaders();
|
||||
}
|
||||
|
||||
|
@ -165,9 +86,7 @@ public class ClientProxy extends CommonProxy
|
|||
@Override
|
||||
public void InitRendering()
|
||||
{
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockAltar), new TEAltarItemRenderer());
|
||||
//MinecraftForgeClient.registerItemRenderer(AlchemicalWizardry.blockWritingTable.blockID, new TEWritingTableItemRenderer());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.client.renderer;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This class is a utility class that was created by bspkrs.
|
||||
* https://github.com/bspkrs/bspkrsCore/blob/master/src/main/java/bspkrs/client/util/ColorThreshold.java
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.client.renderer;
|
||||
|
||||
import WayofTime.alchemicalWizardry.BloodMagicConfiguration;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.BloodMagicConfiguration;
|
||||
|
||||
public class HUDElement
|
||||
{
|
||||
public final ItemStack itemStack;
|
||||
|
@ -76,12 +74,11 @@ public class HUDElement
|
|||
boolean showMaxDamage = true;
|
||||
boolean thresholdPercent = true;
|
||||
|
||||
if(showSpecialValue)
|
||||
if (showSpecialValue)
|
||||
{
|
||||
itemDamage = "\247" + ColourThreshold.getColorCode(BloodMagicConfiguration.colorList,
|
||||
(thresholdPercent ? damage * 100 / maxDamage : damage)) + this.value;
|
||||
}
|
||||
else if (showValue)
|
||||
} else if (showValue)
|
||||
itemDamage = "\247" + ColourThreshold.getColorCode(BloodMagicConfiguration.colorList,
|
||||
(thresholdPercent ? damage * 100 / maxDamage : damage)) + damage +
|
||||
(showMaxDamage ? "/" + maxDamage : "");
|
||||
|
@ -115,7 +112,7 @@ public class HUDElement
|
|||
|
||||
//if (ArmorStatusHUD.alignMode.toLowerCase().contains("right"))
|
||||
boolean toRight = true;
|
||||
if(toRight)
|
||||
if (toRight)
|
||||
{
|
||||
itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), itemStack, x - (iconW + padW), y);
|
||||
HUDUtils.renderItemOverlayIntoGUI(mc.fontRenderer, itemStack, x - (iconW + padW), y, showDamageOverlay, showItemCount);
|
||||
|
@ -127,8 +124,7 @@ public class HUDElement
|
|||
mc.fontRenderer.drawStringWithShadow(itemName + "\247r", x - (padW + iconW + padW) - itemNameW, y, 0xffffff);
|
||||
mc.fontRenderer.drawStringWithShadow(itemDamage + "\247r", x - (padW + iconW + padW) - itemDamageW,
|
||||
y + (enableItemName ? elementH / 2 : elementH / 4), 0xffffff);
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), itemStack, x, y);
|
||||
HUDUtils.renderItemOverlayIntoGUI(mc.fontRenderer, itemStack, x, y, showDamageOverlay, showItemCount);
|
||||
|
|
|
@ -9,7 +9,6 @@ import net.minecraft.init.Items;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
/**
|
||||
|
@ -18,8 +17,8 @@ import org.lwjgl.opengl.GL11;
|
|||
*/
|
||||
public final class HUDUtils
|
||||
{
|
||||
private static int[] colorCodes = new int[] { 0, 170, 43520, 43690, 11141120, 11141290, 16755200, 11184810, 5592405, 5592575, 5635925, 5636095, 16733525, 16733695, 16777045, 16777215,
|
||||
0, 42, 10752, 10794, 2752512, 2752554, 2763264, 2763306, 1381653, 1381695, 1392405, 1392447, 4134165, 4134207, 4144917, 4144959 };
|
||||
private static int[] colorCodes = new int[]{0, 170, 43520, 43690, 11141120, 11141290, 16755200, 11184810, 5592405, 5592575, 5635925, 5636095, 16733525, 16733695, 16777045, 16777215,
|
||||
0, 42, 10752, 10794, 2752512, 2752554, 2763264, 2763306, 1381653, 1381695, 1392405, 1392447, 4134165, 4134207, 4144917, 4144959};
|
||||
|
||||
public static int getColorCode(char c, boolean isLighter)
|
||||
{
|
||||
|
|
|
@ -1,26 +1,22 @@
|
|||
package WayofTime.alchemicalWizardry.client.renderer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiChat;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class RenderHelper
|
||||
{
|
||||
|
@ -52,7 +48,7 @@ public class RenderHelper
|
|||
{
|
||||
EntityPlayer player = mc.thePlayer;
|
||||
World world = mc.theWorld;
|
||||
if(SpellHelper.canPlayerSeeAlchemy(player))
|
||||
if (SpellHelper.canPlayerSeeAlchemy(player))
|
||||
{
|
||||
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
scaledResolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
|
||||
|
@ -85,20 +81,20 @@ public class RenderHelper
|
|||
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if(!(tile instanceof IReagentHandler))
|
||||
if (!(tile instanceof IReagentHandler))
|
||||
{
|
||||
return elements;
|
||||
}
|
||||
|
||||
IReagentHandler relay = (IReagentHandler)tile;
|
||||
IReagentHandler relay = (IReagentHandler) tile;
|
||||
|
||||
ReagentContainerInfo[] infos = relay.getContainerInfo(ForgeDirection.getOrientation(movingobjectposition.sideHit));
|
||||
|
||||
if(infos != null)
|
||||
if (infos != null)
|
||||
{
|
||||
for(ReagentContainerInfo info : infos)
|
||||
for (ReagentContainerInfo info : infos)
|
||||
{
|
||||
if(info == null || info.reagent == null || info.reagent.reagent == null)
|
||||
if (info == null || info.reagent == null || info.reagent.reagent == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -163,8 +159,7 @@ public class RenderHelper
|
|||
e.renderToHud((alignMode.toLowerCase().contains("right") ? getX(0) : getX(e.width())), yBase);
|
||||
yBase += yOffset;
|
||||
}
|
||||
}
|
||||
else if (listMode.equalsIgnoreCase("horizontal"))
|
||||
} else if (listMode.equalsIgnoreCase("horizontal"))
|
||||
{
|
||||
int totalWidth = getElementsWidth(elements);
|
||||
int yBase = getY(1, yOffset);
|
||||
|
@ -176,7 +171,7 @@ public class RenderHelper
|
|||
e.renderToHud(xBase + prevX + (alignMode.toLowerCase().contains("right") ? e.width() : 0), yBase);
|
||||
prevX += (e.width());
|
||||
}
|
||||
}else if(listMode.equalsIgnoreCase("compound"))
|
||||
} else if (listMode.equalsIgnoreCase("compound"))
|
||||
{
|
||||
//TODO
|
||||
}
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile;
|
||||
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.eventhandler.Event.Result;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IProjectile;
|
||||
|
@ -26,19 +28,13 @@ import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
|||
import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile;
|
||||
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.eventhandler.Event.Result;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class AlchemicalWizardryEventHooks
|
||||
{
|
||||
public static Map<String,Boolean> playerFlightBuff = new HashMap();
|
||||
public static Map<String,Boolean> playerBoostStepHeight = new HashMap();
|
||||
public static Map<String, Boolean> playerFlightBuff = new HashMap();
|
||||
public static Map<String, Boolean> playerBoostStepHeight = new HashMap();
|
||||
public static List<String> playersWith1Step = new ArrayList();
|
||||
|
||||
public static Map<Integer, List<CoordAndRange>> respawnMap = new HashMap();
|
||||
|
@ -47,7 +43,7 @@ public class AlchemicalWizardryEventHooks
|
|||
@SubscribeEvent
|
||||
public void onPlayerDamageEvent(LivingAttackEvent event)
|
||||
{
|
||||
if(event.source.isProjectile())
|
||||
if (event.source.isProjectile())
|
||||
{
|
||||
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionProjProt) && event.isCancelable())
|
||||
{
|
||||
|
@ -59,7 +55,7 @@ public class AlchemicalWizardryEventHooks
|
|||
@SubscribeEvent
|
||||
public void onLivingSpawnEvent(CheckSpawn event)
|
||||
{
|
||||
if(!(event.entityLiving instanceof EntityMob))
|
||||
if (!(event.entityLiving instanceof EntityMob))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -67,21 +63,21 @@ public class AlchemicalWizardryEventHooks
|
|||
String respawnRitual = "AW028SpawnWard";
|
||||
|
||||
Integer dimension = new Integer(event.world.provider.dimensionId);
|
||||
if(respawnMap.containsKey(dimension))
|
||||
if (respawnMap.containsKey(dimension))
|
||||
{
|
||||
List<CoordAndRange> list = respawnMap.get(dimension);
|
||||
|
||||
if(list != null)
|
||||
if (list != null)
|
||||
{
|
||||
for(CoordAndRange coords : list)
|
||||
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))
|
||||
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)
|
||||
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())
|
||||
switch (event.getResult())
|
||||
{
|
||||
case ALLOW:
|
||||
event.setResult(Result.DEFAULT);
|
||||
|
@ -96,7 +92,7 @@ public class AlchemicalWizardryEventHooks
|
|||
}
|
||||
break;
|
||||
}
|
||||
}else
|
||||
} else
|
||||
{
|
||||
list.remove(coords);
|
||||
}
|
||||
|
@ -104,28 +100,28 @@ public class AlchemicalWizardryEventHooks
|
|||
}
|
||||
}
|
||||
|
||||
if(event.entityLiving instanceof EntityCreeper)
|
||||
if (event.entityLiving instanceof EntityCreeper)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
String forceSpawnRitual = "AW029VeilOfEvil";
|
||||
|
||||
if(forceSpawnMap.containsKey(dimension))
|
||||
if (forceSpawnMap.containsKey(dimension))
|
||||
{
|
||||
List<CoordAndRange> list = forceSpawnMap.get(dimension);
|
||||
|
||||
if(list != null)
|
||||
if (list != null)
|
||||
{
|
||||
for(CoordAndRange coords : list)
|
||||
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 (tile instanceof TEMasterStone && ((TEMasterStone) tile).isRunning && ((TEMasterStone) tile).getCurrentRitual().equals(forceSpawnRitual))
|
||||
{
|
||||
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.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())
|
||||
switch (event.getResult())
|
||||
{
|
||||
case ALLOW:
|
||||
break;
|
||||
|
@ -140,7 +136,7 @@ public class AlchemicalWizardryEventHooks
|
|||
}
|
||||
break;
|
||||
}
|
||||
}else
|
||||
} else
|
||||
{
|
||||
list.remove(coords);
|
||||
}
|
||||
|
@ -152,9 +148,9 @@ public class AlchemicalWizardryEventHooks
|
|||
@SubscribeEvent
|
||||
public void onPlayerRespawnEvent(PlayerRespawnEvent event)
|
||||
{
|
||||
if(AlchemicalWizardry.respawnWithDebuff)
|
||||
if (AlchemicalWizardry.respawnWithDebuff)
|
||||
{
|
||||
event.player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionSoulFray.id, 20*60*5,0));
|
||||
event.player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionSoulFray.id, 20 * 60 * 5, 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -167,7 +163,7 @@ public class AlchemicalWizardryEventHooks
|
|||
event.entityLiving.motionY += (0.1f) * (2 + i);
|
||||
}
|
||||
|
||||
if(event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionHeavyHeart))
|
||||
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionHeavyHeart))
|
||||
{
|
||||
event.entityLiving.motionY = 0;
|
||||
}
|
||||
|
@ -176,7 +172,7 @@ public class AlchemicalWizardryEventHooks
|
|||
@SubscribeEvent
|
||||
public void onEndermanTeleportEvent(EnderTeleportEvent event)
|
||||
{
|
||||
if(event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionPlanarBinding) && event.isCancelable())
|
||||
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionPlanarBinding) && event.isCancelable())
|
||||
{
|
||||
event.setCanceled(true);
|
||||
}
|
||||
|
@ -199,15 +195,15 @@ public class AlchemicalWizardryEventHooks
|
|||
}
|
||||
}
|
||||
|
||||
if(entityAttacked.isPotionActive(AlchemicalWizardry.customPotionFlameCloak))
|
||||
if (entityAttacked.isPotionActive(AlchemicalWizardry.customPotionFlameCloak))
|
||||
{
|
||||
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFlameCloak).getAmplifier();
|
||||
|
||||
Entity entityAttacking = event.source.getSourceOfDamage();
|
||||
|
||||
if(entityAttacking != null && entityAttacking instanceof EntityLivingBase && !entityAttacking.isImmuneToFire() && !((EntityLivingBase)entityAttacking).isPotionActive(Potion.fireResistance))
|
||||
if (entityAttacking != null && entityAttacking instanceof EntityLivingBase && !entityAttacking.isImmuneToFire() && !((EntityLivingBase) entityAttacking).isPotionActive(Potion.fireResistance))
|
||||
{
|
||||
entityAttacking.attackEntityFrom(DamageSource.inFire, 2*i+2);
|
||||
entityAttacking.attackEntityFrom(DamageSource.inFire, 2 * i + 2);
|
||||
entityAttacking.setFire(3);
|
||||
}
|
||||
}
|
||||
|
@ -237,13 +233,13 @@ public class AlchemicalWizardryEventHooks
|
|||
double z = entityLiving.posZ;
|
||||
|
||||
Vec3 blockVector = SpellHelper.getEntityBlockVector(entityLiving);
|
||||
int xPos = (int)(blockVector.xCoord);
|
||||
int yPos = (int)(blockVector.yCoord);
|
||||
int zPos = (int)(blockVector.zCoord);
|
||||
int xPos = (int) (blockVector.xCoord);
|
||||
int yPos = (int) (blockVector.yCoord);
|
||||
int zPos = (int) (blockVector.zCoord);
|
||||
|
||||
if(entityLiving instanceof EntityPlayer)
|
||||
if (entityLiving instanceof EntityPlayer)
|
||||
{
|
||||
ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, ((EntityPlayer)event.entityLiving).capabilities, Float.valueOf(0.1f), new String[]{"walkSpeed", "g", "field_75097_g"});
|
||||
ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, ((EntityPlayer) event.entityLiving).capabilities, Float.valueOf(0.1f), new String[]{"walkSpeed", "g", "field_75097_g"});
|
||||
}
|
||||
|
||||
if (entityLiving instanceof EntityPlayer && entityLiving.worldObj.isRemote)
|
||||
|
@ -293,8 +289,8 @@ public class AlchemicalWizardryEventHooks
|
|||
EntityPlayer entityPlayer = (EntityPlayer) event.entityLiving;
|
||||
entityPlayer.stepHeight = 1.0f;
|
||||
|
||||
if((entityPlayer.onGround || entityPlayer.capabilities.isFlying) && entityPlayer.moveForward > 0F)
|
||||
entityPlayer.moveFlying(0F, 1F, entityPlayer.capabilities.isFlying ? (percentIncrease/2.0f) : percentIncrease);
|
||||
if ((entityPlayer.onGround || entityPlayer.capabilities.isFlying) && entityPlayer.moveForward > 0F)
|
||||
entityPlayer.moveFlying(0F, 1F, entityPlayer.capabilities.isFlying ? (percentIncrease / 2.0f) : percentIncrease);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -306,7 +302,7 @@ public class AlchemicalWizardryEventHooks
|
|||
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);
|
||||
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();
|
||||
|
@ -334,12 +330,12 @@ public class AlchemicalWizardryEventHooks
|
|||
} else if (projectile instanceof EnergyBlastProjectile)
|
||||
{
|
||||
throwingEntity = ((EnergyBlastProjectile) projectile).shootingEntity;
|
||||
}else if(projectile instanceof EntityThrowable)
|
||||
} else if (projectile instanceof EntityThrowable)
|
||||
{
|
||||
throwingEntity = ((EntityThrowable) projectile).getThrower();
|
||||
}
|
||||
|
||||
if(throwingEntity != null && throwingEntity.equals(entity))
|
||||
if (throwingEntity != null && throwingEntity.equals(entity))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -348,7 +344,7 @@ public class AlchemicalWizardryEventHooks
|
|||
double delY = projectile.posY - entity.posY;
|
||||
double delZ = projectile.posZ - entity.posZ;
|
||||
|
||||
if(throwingEntity != null)
|
||||
if (throwingEntity != null)
|
||||
{
|
||||
delX = -projectile.posX + throwingEntity.posX;
|
||||
delY = -projectile.posY + (throwingEntity.posY + throwingEntity.getEyeHeight());
|
||||
|
@ -376,7 +372,6 @@ public class AlchemicalWizardryEventHooks
|
|||
String ownerName = SpellHelper.getUsername(entityPlayer);
|
||||
playerFlightBuff.put(ownerName, true);
|
||||
entityPlayer.capabilities.allowFlying = true;
|
||||
//entityPlayer.sendPlayerAbilities();
|
||||
}
|
||||
} else
|
||||
{
|
||||
|
@ -404,19 +399,19 @@ public class AlchemicalWizardryEventHooks
|
|||
}
|
||||
}
|
||||
|
||||
if(entityLiving.isPotionActive(AlchemicalWizardry.customPotionFlameCloak))
|
||||
if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionFlameCloak))
|
||||
{
|
||||
entityLiving.worldObj.spawnParticle("flame", x+SpellHelper.gaussian(1),y-1.3+SpellHelper.gaussian(0.3),z+SpellHelper.gaussian(1), 0, 0.06d, 0);
|
||||
entityLiving.worldObj.spawnParticle("flame", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0);
|
||||
|
||||
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFlameCloak).getAmplifier();
|
||||
double range = i*0.5;
|
||||
double range = i * 0.5;
|
||||
|
||||
List<Entity> entities = SpellHelper.getEntitiesInRange(entityLiving.worldObj, x, y, z, range, range);
|
||||
if(entities!=null)
|
||||
if (entities != null)
|
||||
{
|
||||
for(Entity entity : entities)
|
||||
for (Entity entity : entities)
|
||||
{
|
||||
if(!entity.equals(entityLiving)&&!entity.isImmuneToFire()&&!(entity instanceof EntityLivingBase && ((EntityLivingBase)entity).isPotionActive(Potion.fireResistance)))
|
||||
if (!entity.equals(entityLiving) && !entity.isImmuneToFire() && !(entity instanceof EntityLivingBase && ((EntityLivingBase) entity).isPotionActive(Potion.fireResistance)))
|
||||
{
|
||||
entity.setFire(3);
|
||||
}
|
||||
|
@ -424,51 +419,51 @@ public class AlchemicalWizardryEventHooks
|
|||
}
|
||||
}
|
||||
|
||||
if(entityLiving.isPotionActive(AlchemicalWizardry.customPotionIceCloak))
|
||||
if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionIceCloak))
|
||||
{
|
||||
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);
|
||||
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();
|
||||
int horizRange = r+1;
|
||||
int horizRange = r + 1;
|
||||
int vertRange = 1;
|
||||
|
||||
if(!entityLiving.worldObj.isRemote)
|
||||
if (!entityLiving.worldObj.isRemote)
|
||||
{
|
||||
for(int i=-horizRange; i<=horizRange;i++)
|
||||
for (int i = -horizRange; i <= horizRange; i++)
|
||||
{
|
||||
for(int k=-horizRange; k<=horizRange;k++)
|
||||
for (int k = -horizRange; k <= horizRange; k++)
|
||||
{
|
||||
for(int j=-vertRange-1; j<=vertRange-1; j++)
|
||||
for (int j = -vertRange - 1; j <= vertRange - 1; j++)
|
||||
{
|
||||
SpellHelper.freezeWaterBlock(entityLiving.worldObj, xPos+i, yPos+j, zPos+k);
|
||||
SpellHelper.freezeWaterBlock(entityLiving.worldObj, xPos + i, yPos + j, zPos + k);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(entityLiving.isPotionActive(AlchemicalWizardry.customPotionHeavyHeart))
|
||||
if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionHeavyHeart))
|
||||
{
|
||||
entityLiving.worldObj.spawnParticle("flame", x+SpellHelper.gaussian(1),y-1.3+SpellHelper.gaussian(0.3),z+SpellHelper.gaussian(1), 0, 0.06d, 0);
|
||||
entityLiving.worldObj.spawnParticle("flame", x + SpellHelper.gaussian(1), y - 1.3 + SpellHelper.gaussian(0.3), z + SpellHelper.gaussian(1), 0, 0.06d, 0);
|
||||
|
||||
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionHeavyHeart).getAmplifier();
|
||||
double decrease = 0.025*(i+1);
|
||||
double decrease = 0.025 * (i + 1);
|
||||
|
||||
if(entityLiving.motionY>-0.9)
|
||||
if (entityLiving.motionY > -0.9)
|
||||
{
|
||||
entityLiving.motionY-=decrease;
|
||||
entityLiving.motionY -= decrease;
|
||||
}
|
||||
}
|
||||
|
||||
if(entityLiving.isPotionActive(AlchemicalWizardry.customPotionFireFuse))
|
||||
if (entityLiving.isPotionActive(AlchemicalWizardry.customPotionFireFuse))
|
||||
{
|
||||
entityLiving.worldObj.spawnParticle("flame", x+SpellHelper.gaussian(1),y-1.3+SpellHelper.gaussian(0.3),z+SpellHelper.gaussian(1), 0, 0.06d, 0);
|
||||
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();
|
||||
int radius = r+1;
|
||||
int radius = r + 1;
|
||||
|
||||
if(entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFireFuse).getDuration()<=2)
|
||||
if (entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionFireFuse).getDuration() <= 2)
|
||||
{
|
||||
entityLiving.worldObj.createExplosion(null, x, y, z, radius, false);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.items.LavaCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.common.IFuelHandler;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -7,10 +11,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.items.LavaCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.common.IFuelHandler;
|
||||
|
||||
public class AlchemicalWizardryFuelHandler implements IFuelHandler
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ public class AlchemicalWizardryFuelHandler implements IFuelHandler
|
|||
public int getBurnTime(ItemStack fuel)
|
||||
{
|
||||
ItemStack itemStack = fuel;
|
||||
if(itemStack == null)
|
||||
if (itemStack == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -27,10 +27,6 @@ public class AlchemicalWizardryFuelHandler implements IFuelHandler
|
|||
|
||||
if (fuelItem.equals(ModItems.lavaCrystal))
|
||||
{
|
||||
/*ItemStack newItem = new ItemStack(AlchemicalWizardry.lavaCrystal);
|
||||
newItem.getItem().setDamage(newItem, 50);
|
||||
fuel.getItem().setContainerItem(((LavaCrystal)newItem.getItem()).change());
|
||||
*/
|
||||
LavaCrystal item = (LavaCrystal) fuel.getItem();
|
||||
|
||||
if (item.hasEnoughEssence(fuel))
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
package WayofTime.alchemicalWizardry.common;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerCapabilities;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import cpw.mods.fml.common.ObfuscationReflectionHelper;
|
||||
|
||||
@Deprecated
|
||||
public class AlchemicalWizardryTickHandler //implements ITickHandler
|
||||
{
|
||||
// public void tickStart(EnumSet<TickType> type, Object... tickData)
|
||||
// {
|
||||
// }
|
||||
//
|
||||
// public EnumSet<TickType> ticks()
|
||||
// {
|
||||
// return EnumSet.of(TickType.PLAYER);
|
||||
// }
|
||||
//
|
||||
// public String getLabel()
|
||||
// {
|
||||
// return "BloodMagic";
|
||||
// }
|
||||
//
|
||||
// public void tickEnd(EnumSet<TickType> type, Object... tickData)
|
||||
// {
|
||||
// String[] usernames = MinecraftServer.getServer().getAllUsernames();
|
||||
//
|
||||
// if (usernames == null)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// for (String userName : usernames)
|
||||
// {
|
||||
// EntityPlayer entityPlayer = MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(userName);
|
||||
//
|
||||
// if (entityPlayer != null)
|
||||
// {
|
||||
// ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, entityPlayer.capabilities, Float.valueOf(0.1f), new String[]{"walkSpeed", "g", "field_75097_g"});
|
||||
// //entityPlayer.sendPlayerAbilities();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
|
@ -1,27 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityBloodLightProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaMainProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaSecondaryProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityMeteor;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityParticleBeam;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.LightningBoltProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.TeleportProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.*;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.EntitySpellProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class CommonProxy
|
||||
{
|
||||
|
@ -49,7 +35,6 @@ public class CommonProxy
|
|||
|
||||
public void registerEvents()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void registerSoundHandler()
|
||||
|
|
|
@ -20,6 +20,6 @@ public class CoordAndRange
|
|||
@Override
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
return o instanceof CoordAndRange ? ((CoordAndRange)o).xCoord == this.xCoord && ((CoordAndRange)o).yCoord == this.yCoord && ((CoordAndRange)o).zCoord == this.zCoord && ((CoordAndRange)o).horizRadius == this.horizRadius && ((CoordAndRange)o).vertRadius == this.vertRadius: false;
|
||||
return o instanceof CoordAndRange ? ((CoordAndRange) o).xCoord == this.xCoord && ((CoordAndRange) o).yCoord == this.yCoord && ((CoordAndRange) o).zCoord == this.zCoord && ((CoordAndRange) o).horizRadius == this.horizRadius && ((CoordAndRange) o).vertRadius == this.vertRadius : false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
package WayofTime.alchemicalWizardry.common;
|
||||
|
||||
public class EntityAIFly
|
||||
{
|
||||
}
|
|
@ -1,15 +1,14 @@
|
|||
package WayofTime.alchemicalWizardry.common;
|
||||
|
||||
import ibxm.Player;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityElemental;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.monster.IMob;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityElemental;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class EntityAirElemental extends EntityElemental implements IMob
|
||||
{
|
||||
|
@ -22,7 +21,7 @@ public class EntityAirElemental extends EntityElemental implements IMob
|
|||
{
|
||||
if (target instanceof EntityPlayer)
|
||||
{
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer)target, target.motionX, target.motionY + 3, target.motionZ);
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) target, target.motionX, target.motionY + 3, target.motionZ);
|
||||
((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0));
|
||||
} else if (target instanceof EntityLivingBase)
|
||||
{
|
||||
|
|
|
@ -33,6 +33,6 @@ public class Int3
|
|||
@Override
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
return o instanceof Int3 ? ((Int3)o).xCoord == this.xCoord && ((Int3)o).yCoord == this.yCoord && ((Int3)o).zCoord == this.zCoord : false;
|
||||
return o instanceof Int3 ? ((Int3) o).xCoord == this.xCoord && ((Int3) o).yCoord == this.yCoord && ((Int3) o).zCoord == this.zCoord : false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package WayofTime.alchemicalWizardry.common;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.entity.player.FillBucketEvent;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
public class LifeBucketHandler
|
||||
{
|
||||
|
@ -30,7 +30,7 @@ public class LifeBucketHandler
|
|||
{
|
||||
Block block = world.getBlock(pos.blockX, pos.blockY, pos.blockZ);
|
||||
|
||||
if (block!=null && (block.equals(ModBlocks.blockLifeEssence)) && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0)
|
||||
if (block != null && (block.equals(ModBlocks.blockLifeEssence)) && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0)
|
||||
{
|
||||
world.setBlockToAir(pos.blockX, pos.blockY, pos.blockZ);
|
||||
return new ItemStack(ModItems.bucketLife);
|
||||
|
|
|
@ -7,11 +7,8 @@ public class LifeEssence extends Fluid
|
|||
public LifeEssence(String fluidName)
|
||||
{
|
||||
super(fluidName);
|
||||
//setUnlocalizedName("lifeEssence");
|
||||
//setBlockID(id);
|
||||
this.setDensity(2000);
|
||||
this.setViscosity(2000);
|
||||
//this.setFlowingIcon(flowingIcon)
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraftforge.event.entity.living.LivingDropsEvent;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
public class ModLivingDropsEvent
|
||||
{
|
||||
|
|
|
@ -1,31 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.SimpleChannelInboundHandler;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.ColourAndCoords;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
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.TESocket;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.*;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.network.FMLEmbeddedChannel;
|
||||
import cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec;
|
||||
|
@ -33,12 +10,26 @@ import cpw.mods.fml.common.network.FMLOutboundHandler;
|
|||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.SimpleChannelInboundHandler;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Handles the packet wrangling for IronChest
|
||||
* @author cpw
|
||||
*
|
||||
*/
|
||||
* Handles the packet wrangling for IronChest
|
||||
*
|
||||
* @author cpw
|
||||
*/
|
||||
public enum NewPacketHandler
|
||||
{
|
||||
INSTANCE;
|
||||
|
@ -89,7 +80,6 @@ public enum NewPacketHandler
|
|||
* on the client.
|
||||
*
|
||||
* @author cpw
|
||||
*
|
||||
*/
|
||||
private static class TEAltarMessageHandler extends SimpleChannelInboundHandler<TEAltarMessage>
|
||||
{
|
||||
|
@ -116,7 +106,7 @@ public enum NewPacketHandler
|
|||
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
|
||||
if (te instanceof TEOrientable)
|
||||
{
|
||||
TEOrientable tile = (TEOrientable)te;
|
||||
TEOrientable tile = (TEOrientable) te;
|
||||
|
||||
((TEOrientable) te).setInputDirection(ForgeDirection.getOrientation(msg.input));
|
||||
((TEOrientable) te).setOutputDirection(ForgeDirection.getOrientation(msg.output));
|
||||
|
@ -222,7 +212,7 @@ public enum NewPacketHandler
|
|||
{
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
if(player!=null)
|
||||
if (player != null)
|
||||
{
|
||||
player.motionX = msg.xVel;
|
||||
player.motionY = msg.yVel;
|
||||
|
@ -396,17 +386,17 @@ public enum NewPacketHandler
|
|||
{
|
||||
target.writeInt(msg.index);
|
||||
|
||||
switch(msg.index)
|
||||
switch (msg.index)
|
||||
{
|
||||
case 0:
|
||||
target.writeInt(((TEAltarMessage)msg).x);
|
||||
target.writeInt(((TEAltarMessage)msg).y);
|
||||
target.writeInt(((TEAltarMessage)msg).z);
|
||||
target.writeInt(((TEAltarMessage) msg).x);
|
||||
target.writeInt(((TEAltarMessage) msg).y);
|
||||
target.writeInt(((TEAltarMessage) msg).z);
|
||||
|
||||
target.writeBoolean(((TEAltarMessage)msg).items != null);
|
||||
if (((TEAltarMessage)msg).items != null)
|
||||
target.writeBoolean(((TEAltarMessage) msg).items != null);
|
||||
if (((TEAltarMessage) msg).items != null)
|
||||
{
|
||||
int[] items = ((TEAltarMessage)msg).items;
|
||||
int[] items = ((TEAltarMessage) msg).items;
|
||||
for (int j = 0; j < items.length; j++)
|
||||
{
|
||||
int i = items[j];
|
||||
|
@ -414,10 +404,10 @@ public enum NewPacketHandler
|
|||
}
|
||||
}
|
||||
|
||||
target.writeBoolean(((TEAltarMessage)msg).fluids != null);
|
||||
if(((TEAltarMessage)msg).fluids != null)
|
||||
target.writeBoolean(((TEAltarMessage) msg).fluids != null);
|
||||
if (((TEAltarMessage) msg).fluids != null)
|
||||
{
|
||||
int[] fluids = ((TEAltarMessage)msg).fluids;
|
||||
int[] fluids = ((TEAltarMessage) msg).fluids;
|
||||
for (int j = 0; j < fluids.length; j++)
|
||||
{
|
||||
int i = fluids[j];
|
||||
|
@ -425,29 +415,29 @@ public enum NewPacketHandler
|
|||
}
|
||||
}
|
||||
|
||||
target.writeInt(((TEAltarMessage)msg).capacity);
|
||||
target.writeInt(((TEAltarMessage) msg).capacity);
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
target.writeInt(((TEOrientableMessage)msg).x);
|
||||
target.writeInt(((TEOrientableMessage)msg).y);
|
||||
target.writeInt(((TEOrientableMessage)msg).z);
|
||||
target.writeInt(((TEOrientableMessage) msg).x);
|
||||
target.writeInt(((TEOrientableMessage) msg).y);
|
||||
target.writeInt(((TEOrientableMessage) msg).z);
|
||||
|
||||
target.writeInt(((TEOrientableMessage)msg).input);
|
||||
target.writeInt(((TEOrientableMessage)msg).output);
|
||||
target.writeInt(((TEOrientableMessage) msg).input);
|
||||
target.writeInt(((TEOrientableMessage) msg).output);
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
target.writeInt(((TEPedestalMessage)msg).x);
|
||||
target.writeInt(((TEPedestalMessage)msg).y);
|
||||
target.writeInt(((TEPedestalMessage)msg).z);
|
||||
target.writeInt(((TEPedestalMessage) msg).x);
|
||||
target.writeInt(((TEPedestalMessage) msg).y);
|
||||
target.writeInt(((TEPedestalMessage) msg).z);
|
||||
|
||||
target.writeBoolean(((TEPedestalMessage)msg).items != null);
|
||||
if (((TEPedestalMessage)msg).items != null)
|
||||
target.writeBoolean(((TEPedestalMessage) msg).items != null);
|
||||
if (((TEPedestalMessage) msg).items != null)
|
||||
{
|
||||
int[] items = ((TEPedestalMessage)msg).items;
|
||||
int[] items = ((TEPedestalMessage) msg).items;
|
||||
for (int j = 0; j < items.length; j++)
|
||||
{
|
||||
int i = items[j];
|
||||
|
@ -458,14 +448,14 @@ public enum NewPacketHandler
|
|||
break;
|
||||
|
||||
case 3:
|
||||
target.writeInt(((TEPlinthMessage)msg).x);
|
||||
target.writeInt(((TEPlinthMessage)msg).y);
|
||||
target.writeInt(((TEPlinthMessage)msg).z);
|
||||
target.writeInt(((TEPlinthMessage) msg).x);
|
||||
target.writeInt(((TEPlinthMessage) msg).y);
|
||||
target.writeInt(((TEPlinthMessage) msg).z);
|
||||
|
||||
target.writeBoolean(((TEPlinthMessage)msg).items != null);
|
||||
if (((TEPlinthMessage)msg).items != null)
|
||||
target.writeBoolean(((TEPlinthMessage) msg).items != null);
|
||||
if (((TEPlinthMessage) msg).items != null)
|
||||
{
|
||||
int[] items = ((TEPlinthMessage)msg).items;
|
||||
int[] items = ((TEPlinthMessage) msg).items;
|
||||
for (int j = 0; j < items.length; j++)
|
||||
{
|
||||
int i = items[j];
|
||||
|
@ -476,14 +466,14 @@ public enum NewPacketHandler
|
|||
break;
|
||||
|
||||
case 4:
|
||||
target.writeInt(((TESocketMessage)msg).x);
|
||||
target.writeInt(((TESocketMessage)msg).y);
|
||||
target.writeInt(((TESocketMessage)msg).z);
|
||||
target.writeInt(((TESocketMessage) msg).x);
|
||||
target.writeInt(((TESocketMessage) msg).y);
|
||||
target.writeInt(((TESocketMessage) msg).z);
|
||||
|
||||
target.writeBoolean(((TESocketMessage)msg).items != null);
|
||||
if (((TESocketMessage)msg).items != null)
|
||||
target.writeBoolean(((TESocketMessage) msg).items != null);
|
||||
if (((TESocketMessage) msg).items != null)
|
||||
{
|
||||
int[] items = ((TESocketMessage)msg).items;
|
||||
int[] items = ((TESocketMessage) msg).items;
|
||||
for (int j = 0; j < items.length; j++)
|
||||
{
|
||||
int i = items[j];
|
||||
|
@ -494,14 +484,14 @@ public enum NewPacketHandler
|
|||
break;
|
||||
|
||||
case 5:
|
||||
target.writeInt(((TETeleposerMessage)msg).x);
|
||||
target.writeInt(((TETeleposerMessage)msg).y);
|
||||
target.writeInt(((TETeleposerMessage)msg).z);
|
||||
target.writeInt(((TETeleposerMessage) msg).x);
|
||||
target.writeInt(((TETeleposerMessage) msg).y);
|
||||
target.writeInt(((TETeleposerMessage) msg).z);
|
||||
|
||||
target.writeBoolean(((TETeleposerMessage)msg).items != null);
|
||||
if (((TETeleposerMessage)msg).items != null)
|
||||
target.writeBoolean(((TETeleposerMessage) msg).items != null);
|
||||
if (((TETeleposerMessage) msg).items != null)
|
||||
{
|
||||
int[] items = ((TETeleposerMessage)msg).items;
|
||||
int[] items = ((TETeleposerMessage) msg).items;
|
||||
for (int j = 0; j < items.length; j++)
|
||||
{
|
||||
int i = items[j];
|
||||
|
@ -512,14 +502,14 @@ public enum NewPacketHandler
|
|||
break;
|
||||
|
||||
case 6:
|
||||
target.writeInt(((TEWritingTableMessage)msg).x);
|
||||
target.writeInt(((TEWritingTableMessage)msg).y);
|
||||
target.writeInt(((TEWritingTableMessage)msg).z);
|
||||
target.writeInt(((TEWritingTableMessage) msg).x);
|
||||
target.writeInt(((TEWritingTableMessage) msg).y);
|
||||
target.writeInt(((TEWritingTableMessage) msg).z);
|
||||
|
||||
target.writeBoolean(((TEWritingTableMessage)msg).items != null);
|
||||
if (((TEWritingTableMessage)msg).items != null)
|
||||
target.writeBoolean(((TEWritingTableMessage) msg).items != null);
|
||||
if (((TEWritingTableMessage) msg).items != null)
|
||||
{
|
||||
int[] items = ((TEWritingTableMessage)msg).items;
|
||||
int[] items = ((TEWritingTableMessage) msg).items;
|
||||
for (int j = 0; j < items.length; j++)
|
||||
{
|
||||
int i = items[j];
|
||||
|
@ -530,55 +520,55 @@ public enum NewPacketHandler
|
|||
break;
|
||||
|
||||
case 7:
|
||||
String str = ((ParticleMessage)msg).particle;
|
||||
String str = ((ParticleMessage) msg).particle;
|
||||
target.writeInt(str.length());
|
||||
for(int i=0; i<str.length(); i++)
|
||||
for (int i = 0; i < str.length(); i++)
|
||||
{
|
||||
target.writeChar(str.charAt(i));
|
||||
}
|
||||
|
||||
target.writeDouble(((ParticleMessage)msg).xCoord);
|
||||
target.writeDouble(((ParticleMessage)msg).yCoord);
|
||||
target.writeDouble(((ParticleMessage)msg).zCoord);
|
||||
target.writeDouble(((ParticleMessage) msg).xCoord);
|
||||
target.writeDouble(((ParticleMessage) msg).yCoord);
|
||||
target.writeDouble(((ParticleMessage) msg).zCoord);
|
||||
|
||||
target.writeDouble(((ParticleMessage)msg).xVel);
|
||||
target.writeDouble(((ParticleMessage)msg).yVel);
|
||||
target.writeDouble(((ParticleMessage)msg).zVel);
|
||||
target.writeDouble(((ParticleMessage) msg).xVel);
|
||||
target.writeDouble(((ParticleMessage) msg).yVel);
|
||||
target.writeDouble(((ParticleMessage) msg).zVel);
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
target.writeDouble(((VelocityMessage)msg).xVel);
|
||||
target.writeDouble(((VelocityMessage)msg).yVel);
|
||||
target.writeDouble(((VelocityMessage)msg).zVel);
|
||||
target.writeDouble(((VelocityMessage) msg).xVel);
|
||||
target.writeDouble(((VelocityMessage) msg).yVel);
|
||||
target.writeDouble(((VelocityMessage) msg).zVel);
|
||||
|
||||
break;
|
||||
|
||||
case 9:
|
||||
target.writeInt(((TEMasterStoneMessage)msg).x);
|
||||
target.writeInt(((TEMasterStoneMessage)msg).y);
|
||||
target.writeInt(((TEMasterStoneMessage)msg).z);
|
||||
target.writeInt(((TEMasterStoneMessage) msg).x);
|
||||
target.writeInt(((TEMasterStoneMessage) msg).y);
|
||||
target.writeInt(((TEMasterStoneMessage) msg).z);
|
||||
|
||||
String ritual = ((TEMasterStoneMessage)msg).ritual;
|
||||
String ritual = ((TEMasterStoneMessage) msg).ritual;
|
||||
target.writeInt(ritual.length());
|
||||
for(int i=0; i<ritual.length(); i++)
|
||||
for (int i = 0; i < ritual.length(); i++)
|
||||
{
|
||||
target.writeChar(ritual.charAt(i));
|
||||
}
|
||||
|
||||
target.writeBoolean(((TEMasterStoneMessage)msg).isRunning);
|
||||
target.writeBoolean(((TEMasterStoneMessage) msg).isRunning);
|
||||
|
||||
break;
|
||||
|
||||
case 10:
|
||||
target.writeInt(((TEReagentConduitMessage)msg).x);
|
||||
target.writeInt(((TEReagentConduitMessage)msg).y);
|
||||
target.writeInt(((TEReagentConduitMessage)msg).z);
|
||||
target.writeInt(((TEReagentConduitMessage) msg).x);
|
||||
target.writeInt(((TEReagentConduitMessage) msg).y);
|
||||
target.writeInt(((TEReagentConduitMessage) msg).z);
|
||||
|
||||
List<ColourAndCoords> list = ((TEReagentConduitMessage)msg).destinationList;
|
||||
List<ColourAndCoords> list = ((TEReagentConduitMessage) msg).destinationList;
|
||||
target.writeInt(list.size());
|
||||
|
||||
for(ColourAndCoords colourSet : list)
|
||||
for (ColourAndCoords colourSet : list)
|
||||
{
|
||||
target.writeInt(colourSet.colourRed);
|
||||
target.writeInt(colourSet.colourGreen);
|
||||
|
@ -599,136 +589,136 @@ public enum NewPacketHandler
|
|||
{
|
||||
int index = dat.readInt();
|
||||
|
||||
switch(index)
|
||||
switch (index)
|
||||
{
|
||||
case 0:
|
||||
((TEAltarMessage)msg).x = dat.readInt();
|
||||
((TEAltarMessage)msg).y = dat.readInt();
|
||||
((TEAltarMessage)msg).z = dat.readInt();
|
||||
((TEAltarMessage) msg).x = dat.readInt();
|
||||
((TEAltarMessage) msg).y = dat.readInt();
|
||||
((TEAltarMessage) msg).z = dat.readInt();
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
|
||||
((TEAltarMessage)msg).items = new int[TEAltar.sizeInv*3];
|
||||
((TEAltarMessage) msg).items = new int[TEAltar.sizeInv * 3];
|
||||
if (hasStacks)
|
||||
{
|
||||
((TEAltarMessage)msg).items = new int[TEAltar.sizeInv*3];
|
||||
for (int i = 0; i < ((TEAltarMessage)msg).items.length; i++)
|
||||
((TEAltarMessage) msg).items = new int[TEAltar.sizeInv * 3];
|
||||
for (int i = 0; i < ((TEAltarMessage) msg).items.length; i++)
|
||||
{
|
||||
((TEAltarMessage)msg).items[i] = dat.readInt();
|
||||
((TEAltarMessage) msg).items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
|
||||
boolean hasFluids = dat.readBoolean();
|
||||
((TEAltarMessage)msg).fluids = new int[6];
|
||||
if(hasFluids)
|
||||
for (int i = 0; i < ((TEAltarMessage)msg).fluids.length; i++)
|
||||
((TEAltarMessage) msg).fluids = new int[6];
|
||||
if (hasFluids)
|
||||
for (int i = 0; i < ((TEAltarMessage) msg).fluids.length; i++)
|
||||
{
|
||||
((TEAltarMessage)msg).fluids[i] = dat.readInt();
|
||||
((TEAltarMessage) msg).fluids[i] = dat.readInt();
|
||||
}
|
||||
|
||||
((TEAltarMessage)msg).capacity = dat.readInt();
|
||||
((TEAltarMessage) msg).capacity = dat.readInt();
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
((TEOrientableMessage)msg).x = dat.readInt();
|
||||
((TEOrientableMessage)msg).y = dat.readInt();
|
||||
((TEOrientableMessage)msg).z = dat.readInt();
|
||||
((TEOrientableMessage) msg).x = dat.readInt();
|
||||
((TEOrientableMessage) msg).y = dat.readInt();
|
||||
((TEOrientableMessage) msg).z = dat.readInt();
|
||||
|
||||
((TEOrientableMessage)msg).input = dat.readInt();
|
||||
((TEOrientableMessage)msg).output = dat.readInt();
|
||||
((TEOrientableMessage) msg).input = dat.readInt();
|
||||
((TEOrientableMessage) msg).output = dat.readInt();
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
((TEPedestalMessage)msg).x = dat.readInt();
|
||||
((TEPedestalMessage)msg).y = dat.readInt();
|
||||
((TEPedestalMessage)msg).z = dat.readInt();
|
||||
((TEPedestalMessage) msg).x = dat.readInt();
|
||||
((TEPedestalMessage) msg).y = dat.readInt();
|
||||
((TEPedestalMessage) msg).z = dat.readInt();
|
||||
|
||||
boolean hasStacks1 = dat.readBoolean();
|
||||
|
||||
((TEPedestalMessage)msg).items = new int[TEPedestal.sizeInv*3];
|
||||
((TEPedestalMessage) msg).items = new int[TEPedestal.sizeInv * 3];
|
||||
if (hasStacks1)
|
||||
{
|
||||
((TEPedestalMessage)msg).items = new int[TEPedestal.sizeInv*3];
|
||||
for (int i = 0; i < ((TEPedestalMessage)msg).items.length; i++)
|
||||
((TEPedestalMessage) msg).items = new int[TEPedestal.sizeInv * 3];
|
||||
for (int i = 0; i < ((TEPedestalMessage) msg).items.length; i++)
|
||||
{
|
||||
((TEPedestalMessage)msg).items[i] = dat.readInt();
|
||||
((TEPedestalMessage) msg).items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
((TEPlinthMessage)msg).x = dat.readInt();
|
||||
((TEPlinthMessage)msg).y = dat.readInt();
|
||||
((TEPlinthMessage)msg).z = dat.readInt();
|
||||
((TEPlinthMessage) msg).x = dat.readInt();
|
||||
((TEPlinthMessage) msg).y = dat.readInt();
|
||||
((TEPlinthMessage) msg).z = dat.readInt();
|
||||
|
||||
boolean hasStacks2 = dat.readBoolean();
|
||||
|
||||
((TEPlinthMessage)msg).items = new int[TEPlinth.sizeInv*3];
|
||||
((TEPlinthMessage) msg).items = new int[TEPlinth.sizeInv * 3];
|
||||
if (hasStacks2)
|
||||
{
|
||||
((TEPlinthMessage)msg).items = new int[TEPlinth.sizeInv*3];
|
||||
for (int i = 0; i < ((TEPlinthMessage)msg).items.length; i++)
|
||||
((TEPlinthMessage) msg).items = new int[TEPlinth.sizeInv * 3];
|
||||
for (int i = 0; i < ((TEPlinthMessage) msg).items.length; i++)
|
||||
{
|
||||
((TEPlinthMessage)msg).items[i] = dat.readInt();
|
||||
((TEPlinthMessage) msg).items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
((TESocketMessage)msg).x = dat.readInt();
|
||||
((TESocketMessage)msg).y = dat.readInt();
|
||||
((TESocketMessage)msg).z = dat.readInt();
|
||||
((TESocketMessage) msg).x = dat.readInt();
|
||||
((TESocketMessage) msg).y = dat.readInt();
|
||||
((TESocketMessage) msg).z = dat.readInt();
|
||||
|
||||
boolean hasStacks3 = dat.readBoolean();
|
||||
|
||||
((TESocketMessage)msg).items = new int[TESocket.sizeInv*3];
|
||||
((TESocketMessage) msg).items = new int[TESocket.sizeInv * 3];
|
||||
if (hasStacks3)
|
||||
{
|
||||
((TESocketMessage)msg).items = new int[TESocket.sizeInv*3];
|
||||
for (int i = 0; i < ((TESocketMessage)msg).items.length; i++)
|
||||
((TESocketMessage) msg).items = new int[TESocket.sizeInv * 3];
|
||||
for (int i = 0; i < ((TESocketMessage) msg).items.length; i++)
|
||||
{
|
||||
((TESocketMessage)msg).items[i] = dat.readInt();
|
||||
((TESocketMessage) msg).items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 5:
|
||||
((TETeleposerMessage)msg).x = dat.readInt();
|
||||
((TETeleposerMessage)msg).y = dat.readInt();
|
||||
((TETeleposerMessage)msg).z = dat.readInt();
|
||||
((TETeleposerMessage) msg).x = dat.readInt();
|
||||
((TETeleposerMessage) msg).y = dat.readInt();
|
||||
((TETeleposerMessage) msg).z = dat.readInt();
|
||||
|
||||
boolean hasStacks4 = dat.readBoolean();
|
||||
|
||||
((TETeleposerMessage)msg).items = new int[TETeleposer.sizeInv*3];
|
||||
((TETeleposerMessage) msg).items = new int[TETeleposer.sizeInv * 3];
|
||||
if (hasStacks4)
|
||||
{
|
||||
((TETeleposerMessage)msg).items = new int[TETeleposer.sizeInv*3];
|
||||
for (int i = 0; i < ((TETeleposerMessage)msg).items.length; i++)
|
||||
((TETeleposerMessage) msg).items = new int[TETeleposer.sizeInv * 3];
|
||||
for (int i = 0; i < ((TETeleposerMessage) msg).items.length; i++)
|
||||
{
|
||||
((TETeleposerMessage)msg).items[i] = dat.readInt();
|
||||
((TETeleposerMessage) msg).items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 6:
|
||||
((TEWritingTableMessage)msg).x = dat.readInt();
|
||||
((TEWritingTableMessage)msg).y = dat.readInt();
|
||||
((TEWritingTableMessage)msg).z = dat.readInt();
|
||||
((TEWritingTableMessage) msg).x = dat.readInt();
|
||||
((TEWritingTableMessage) msg).y = dat.readInt();
|
||||
((TEWritingTableMessage) msg).z = dat.readInt();
|
||||
|
||||
boolean hasStacks5 = dat.readBoolean();
|
||||
|
||||
((TEWritingTableMessage)msg).items = new int[TEWritingTable.sizeInv*3];
|
||||
((TEWritingTableMessage) msg).items = new int[TEWritingTable.sizeInv * 3];
|
||||
if (hasStacks5)
|
||||
{
|
||||
((TEWritingTableMessage)msg).items = new int[TEWritingTable.sizeInv*3];
|
||||
for (int i = 0; i < ((TEWritingTableMessage)msg).items.length; i++)
|
||||
((TEWritingTableMessage) msg).items = new int[TEWritingTable.sizeInv * 3];
|
||||
for (int i = 0; i < ((TEWritingTableMessage) msg).items.length; i++)
|
||||
{
|
||||
((TEWritingTableMessage)msg).items[i] = dat.readInt();
|
||||
((TEWritingTableMessage) msg).items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -743,29 +733,29 @@ public enum NewPacketHandler
|
|||
str = str + dat.readChar();
|
||||
}
|
||||
|
||||
((ParticleMessage)msg).particle = str;
|
||||
((ParticleMessage) msg).particle = str;
|
||||
|
||||
((ParticleMessage)msg).xCoord = dat.readDouble();
|
||||
((ParticleMessage)msg).yCoord = dat.readDouble();
|
||||
((ParticleMessage)msg).zCoord = dat.readDouble();
|
||||
((ParticleMessage) msg).xCoord = dat.readDouble();
|
||||
((ParticleMessage) msg).yCoord = dat.readDouble();
|
||||
((ParticleMessage) msg).zCoord = dat.readDouble();
|
||||
|
||||
((ParticleMessage)msg).xVel = dat.readDouble();
|
||||
((ParticleMessage)msg).yVel = dat.readDouble();
|
||||
((ParticleMessage)msg).zVel = dat.readDouble();
|
||||
((ParticleMessage) msg).xVel = dat.readDouble();
|
||||
((ParticleMessage) msg).yVel = dat.readDouble();
|
||||
((ParticleMessage) msg).zVel = dat.readDouble();
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
((VelocityMessage)msg).xVel = dat.readDouble();
|
||||
((VelocityMessage)msg).yVel = dat.readDouble();
|
||||
((VelocityMessage)msg).zVel = dat.readDouble();
|
||||
((VelocityMessage) msg).xVel = dat.readDouble();
|
||||
((VelocityMessage) msg).yVel = dat.readDouble();
|
||||
((VelocityMessage) msg).zVel = dat.readDouble();
|
||||
|
||||
break;
|
||||
|
||||
case 9:
|
||||
((TEMasterStoneMessage)msg).x = dat.readInt();
|
||||
((TEMasterStoneMessage)msg).y = dat.readInt();
|
||||
((TEMasterStoneMessage)msg).z = dat.readInt();
|
||||
((TEMasterStoneMessage) msg).x = dat.readInt();
|
||||
((TEMasterStoneMessage) msg).y = dat.readInt();
|
||||
((TEMasterStoneMessage) msg).z = dat.readInt();
|
||||
|
||||
int ritualStrSize = dat.readInt();
|
||||
String ritual = "";
|
||||
|
@ -775,26 +765,26 @@ public enum NewPacketHandler
|
|||
ritual = ritual + dat.readChar();
|
||||
}
|
||||
|
||||
((TEMasterStoneMessage)msg).ritual = ritual;
|
||||
((TEMasterStoneMessage)msg).isRunning = dat.readBoolean();
|
||||
((TEMasterStoneMessage) msg).ritual = ritual;
|
||||
((TEMasterStoneMessage) msg).isRunning = dat.readBoolean();
|
||||
|
||||
break;
|
||||
|
||||
case 10:
|
||||
((TEReagentConduitMessage)msg).x = dat.readInt();
|
||||
((TEReagentConduitMessage)msg).y = dat.readInt();
|
||||
((TEReagentConduitMessage)msg).z = dat.readInt();
|
||||
((TEReagentConduitMessage) msg).x = dat.readInt();
|
||||
((TEReagentConduitMessage) msg).y = dat.readInt();
|
||||
((TEReagentConduitMessage) msg).z = dat.readInt();
|
||||
|
||||
int listSize = dat.readInt();
|
||||
|
||||
List<ColourAndCoords> list = new LinkedList();
|
||||
|
||||
for(int i=0; i < listSize; i++)
|
||||
for (int i = 0; i < listSize; i++)
|
||||
{
|
||||
list.add(new ColourAndCoords(dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt()));
|
||||
}
|
||||
|
||||
((TEReagentConduitMessage)msg).destinationList = list;
|
||||
((TEReagentConduitMessage) msg).destinationList = list;
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1,966 +0,0 @@
|
|||
package WayofTime.alchemicalWizardry.common;
|
||||
|
||||
import ibxm.Player;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEOrientable;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESocket;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
import com.google.common.io.ByteStreams;
|
||||
import com.jcraft.jogg.Packet;
|
||||
|
||||
public class PacketHandler //implements IPacketHandler
|
||||
{
|
||||
// @Override
|
||||
// public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player)
|
||||
// {
|
||||
// if (packet.channel.equals("BloodAltar"))
|
||||
// {
|
||||
// ByteArrayDataInput dat = ByteStreams.newDataInput(packet.data);
|
||||
// int x = dat.readInt();
|
||||
// int y = dat.readInt();
|
||||
// int z = dat.readInt();
|
||||
// boolean hasStacks = dat.readByte() != 0;
|
||||
// int[] items = new int[0];
|
||||
//
|
||||
// if (hasStacks)
|
||||
// {
|
||||
// items = new int[1 * 3];
|
||||
//
|
||||
// for (int i = 0; i < items.length; i++)
|
||||
// {
|
||||
// items[i] = dat.readInt();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// int fluidIDMain = dat.readInt();
|
||||
// int fluidAmountMain = dat.readInt();
|
||||
// int fluidIDOutput = dat.readInt();
|
||||
// int fluidAmountOutput = dat.readInt();
|
||||
// int fluidIDInput = dat.readInt();
|
||||
// int fluidAmountInput = dat.readInt();
|
||||
// int capacity = dat.readInt();
|
||||
// World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
// TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||
//
|
||||
// if (tileEntity instanceof TEAltar)
|
||||
// {
|
||||
// TEAltar tileEntityAltar = (TEAltar) tileEntity;
|
||||
// FluidStack flMain = new FluidStack(fluidIDMain, fluidAmountMain);
|
||||
// FluidStack flOutput = new FluidStack(fluidIDOutput, fluidAmountOutput);
|
||||
// FluidStack flInput = new FluidStack(fluidIDInput, fluidAmountInput);
|
||||
// tileEntityAltar.handlePacketData(items, flMain, flOutput, flInput, capacity);
|
||||
// }
|
||||
// } else if (packet.channel.equals("FallReset"))
|
||||
// {
|
||||
// if (player instanceof EntityPlayer)
|
||||
// {
|
||||
// ((EntityPlayer) player).fallDistance = 0;
|
||||
// }
|
||||
// } else if (packet.channel.equals("particle"))
|
||||
// {
|
||||
// ByteArrayInputStream bin = new ByteArrayInputStream(packet.data);
|
||||
// DataInputStream din = new DataInputStream(bin);
|
||||
// Random rand = new Random();
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// double x = din.readDouble();
|
||||
// double y = din.readDouble();
|
||||
// double z = din.readDouble();
|
||||
// short particleType = din.readShort();
|
||||
// World world = ((EntityPlayer) player).worldObj;
|
||||
//
|
||||
// if (particleType == 1)
|
||||
// {
|
||||
// world.spawnParticle("mobSpell", x + 0.5D + rand.nextGaussian() / 8, y + 1.1D, z + 0.5D + rand.nextGaussian() / 8, 0.5117D, 0.0117D, 0.0117D);
|
||||
// }
|
||||
//
|
||||
// if (particleType == 2)
|
||||
// {
|
||||
// world.spawnParticle("reddust", x + 0.5D + rand.nextGaussian() / 8, y + 1.1D, z + 0.5D + rand.nextGaussian() / 8, 0.82D, 0.941D, 0.91D);
|
||||
// }
|
||||
//
|
||||
// if (particleType == 3)
|
||||
// {
|
||||
// world.spawnParticle("mobSpell", x + 0.5D + rand.nextGaussian() / 8, y + 1.1D, z + 0.5D + rand.nextGaussian() / 8, 1.0D, 0.371D, 0.371D);
|
||||
// }
|
||||
//
|
||||
// if (particleType == 4)
|
||||
// {
|
||||
// float f = (float) 1.0F;
|
||||
// float f1 = f * 0.6F + 0.4F;
|
||||
// float f2 = f * f * 0.7F - 0.5F;
|
||||
// float f3 = f * f * 0.6F - 0.7F;
|
||||
//
|
||||
// for (int l = 0; l < 8; ++l)
|
||||
// {
|
||||
// world.spawnParticle("reddust", x + Math.random() - Math.random(), y + Math.random() - Math.random(), z + Math.random() - Math.random(), f1, f2, f3);
|
||||
// }
|
||||
// }
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// } else if (packet.channel.equals("CustomParticle"))
|
||||
// {
|
||||
// ByteArrayInputStream bin = new ByteArrayInputStream(packet.data);
|
||||
// DataInputStream din = new DataInputStream(bin);
|
||||
// Random rand = new Random();
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// World world = ((EntityPlayer) player).worldObj;
|
||||
// int size = din.readInt();
|
||||
// String str = "";
|
||||
//
|
||||
// for (int i = 0; i < size; i++)
|
||||
// {
|
||||
// str = str + din.readChar();
|
||||
// }
|
||||
//
|
||||
// double x = din.readDouble();
|
||||
// double y = din.readDouble();
|
||||
// double z = din.readDouble();
|
||||
// double xVel = din.readDouble();
|
||||
// double yVel = din.readDouble();
|
||||
// double zVel = din.readDouble();
|
||||
// world.spawnParticle(str, x, y, z, xVel, yVel, zVel);
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// } else if (packet.channel.equals("SetLifeEssence")) //Sets the data for the character
|
||||
// {
|
||||
// ByteArrayInputStream bin = new ByteArrayInputStream(packet.data);
|
||||
// DataInputStream din = new DataInputStream(bin);
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// EntityPlayer user = (EntityPlayer) player;
|
||||
// int length = din.readInt();
|
||||
// String ownerName = "";
|
||||
//
|
||||
// for (int i = 0; i < length; i++)
|
||||
// {
|
||||
// ownerName = ownerName + din.readChar();
|
||||
// }
|
||||
//
|
||||
// int addedEssence = din.readInt();
|
||||
// int maxEssence = din.readInt();
|
||||
// World world = MinecraftServer.getServer().worldServers[0];
|
||||
// LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
//
|
||||
// if (data == null)
|
||||
// {
|
||||
// data = new LifeEssenceNetwork(ownerName);
|
||||
// world.setItemData(ownerName, data);
|
||||
// }
|
||||
//
|
||||
// if (addedEssence > 0)
|
||||
// {
|
||||
// if (data.currentEssence < maxEssence)
|
||||
// {
|
||||
// data.currentEssence = Math.min(maxEssence, data.currentEssence + addedEssence);
|
||||
// data.markDirty();
|
||||
// }
|
||||
//
|
||||
// if (!user.capabilities.isCreativeMode)
|
||||
// {
|
||||
// for (int i = 0; i < ((addedEssence + 99) / 100); i++)
|
||||
// {
|
||||
// //player.setEntityHealth((player.getHealth()-1));
|
||||
// user.setHealth((user.getHealth() - 1));
|
||||
//
|
||||
// if (user.getHealth() <= 0.5f)
|
||||
// {
|
||||
// //user.inventory.dropAllItems();
|
||||
// user.onDeath(DamageSource.generic);
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// } else
|
||||
// {
|
||||
// int removedEssence = -addedEssence;
|
||||
//
|
||||
// if ((data.currentEssence - removedEssence) >= 0)
|
||||
// {
|
||||
// data.currentEssence -= removedEssence;
|
||||
// data.markDirty();
|
||||
// } else
|
||||
// {
|
||||
// if (removedEssence >= 100)
|
||||
// {
|
||||
// for (int i = 0; i < ((removedEssence + 99) / 100); i++)
|
||||
// {
|
||||
// //player.setEntityHealth((player.getHealth()-1));
|
||||
// user.setHealth((user.getHealth() - 1));
|
||||
//
|
||||
// if (user.getHealth() <= 0.5f)
|
||||
// {
|
||||
// //user.inventory.dropAllItems();
|
||||
// user.onDeath(DamageSource.generic);
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// } else
|
||||
// {
|
||||
// if (user.worldObj.rand.nextInt(100) <= removedEssence)
|
||||
// {
|
||||
// user.setHealth((user.getHealth() - 1));
|
||||
//
|
||||
// if (user.getHealth() <= 0.5f)
|
||||
// {
|
||||
// //user.inventory.dropAllItems();
|
||||
// user.onDeath(DamageSource.generic);
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //PacketDispatcher.sendPacketToPlayer(PacketHandler.getPacket(ownerName), (Player)user);
|
||||
//// data.currentEssence = addedEssence;
|
||||
//// data.markDirty();
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// } else if (packet.channel.equals("InfiniteLPPath"))
|
||||
// {
|
||||
// ByteArrayInputStream bin = new ByteArrayInputStream(packet.data);
|
||||
// DataInputStream din = new DataInputStream(bin);
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// EntityPlayer user = (EntityPlayer) player;
|
||||
// int length = din.readInt();
|
||||
// String ownerName = "";
|
||||
//
|
||||
// for (int i = 0; i < length; i++)
|
||||
// {
|
||||
// ownerName = ownerName + din.readChar();
|
||||
// }
|
||||
//
|
||||
// boolean fill = din.readBoolean();
|
||||
// World world = MinecraftServer.getServer().worldServers[0];
|
||||
// LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
//
|
||||
// if (data == null)
|
||||
// {
|
||||
// data = new LifeEssenceNetwork(ownerName);
|
||||
// world.setItemData(ownerName, data);
|
||||
// }
|
||||
//
|
||||
// if (fill)
|
||||
// {
|
||||
// data.currentEssence += 1000000;
|
||||
// data.markDirty();
|
||||
// } else
|
||||
// {
|
||||
// data.currentEssence = 0;
|
||||
// data.markDirty();
|
||||
// }
|
||||
//
|
||||
// //PacketDispatcher.sendPacketToPlayer(PacketHandler.getPacket(ownerName), (Player)user);
|
||||
//// data.currentEssence = addedEssence;
|
||||
//// data.markDirty();
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// } else if (packet.channel.equals("GetLifeEssence"))
|
||||
// {
|
||||
// ByteArrayInputStream bin = new ByteArrayInputStream(packet.data);
|
||||
// DataInputStream din = new DataInputStream(bin);
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// int length = din.readInt();
|
||||
// String ownerName = "";
|
||||
//
|
||||
// for (int i = 0; i < length; i++)
|
||||
// {
|
||||
// ownerName = ownerName + din.readChar();
|
||||
// }
|
||||
//
|
||||
// World world = MinecraftServer.getServer().worldServers[0];
|
||||
// LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
//
|
||||
// if (data == null)
|
||||
// {
|
||||
// data = new LifeEssenceNetwork(ownerName);
|
||||
// world.setItemData(ownerName, data);
|
||||
// }
|
||||
//
|
||||
// if (player instanceof EntityPlayer)
|
||||
// {
|
||||
// EntityPlayer owner = (EntityPlayer) player;
|
||||
// ChatMessageComponent chatmessagecomponent = new ChatMessageComponent();
|
||||
// //chatmessagecomponent.func_111072_b("Current Essence: " + data.currentEssence + "LP");
|
||||
// chatmessagecomponent.addText("Current Essence: " + data.currentEssence + "LP");
|
||||
// owner.sendChatToPlayer(chatmessagecomponent);
|
||||
// }
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// } else if (packet.channel.equals("GetAltarEssence"))
|
||||
// {
|
||||
// ByteArrayInputStream bin = new ByteArrayInputStream(packet.data);
|
||||
// DataInputStream din = new DataInputStream(bin);
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// int x = din.readInt();
|
||||
// int y = din.readInt();
|
||||
// int z = din.readInt();
|
||||
//
|
||||
// if (player instanceof EntityPlayer)
|
||||
// {
|
||||
// EntityPlayer owner = (EntityPlayer) player;
|
||||
// World world = owner.worldObj;
|
||||
// TEAltar tileEntity = (TEAltar) world.getBlockTileEntity(x, y, z);
|
||||
//
|
||||
// if (tileEntity != null)
|
||||
// {
|
||||
// int level = UpgradedAltars.isAltarValid(world, x, y, z);
|
||||
// ChatMessageComponent chatmessagecomponent = new ChatMessageComponent();
|
||||
// chatmessagecomponent.addText("Altar's Current Essence: " + tileEntity.getFluidAmount() + "LP" + "\n" + "Altar's Current Tier: " + level + "\nCapacity: " + tileEntity.getCapacity() + "LP");
|
||||
// //chatmessagecomponent.addText();
|
||||
// owner.sendChatToPlayer(chatmessagecomponent);
|
||||
// }
|
||||
// }
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// } else if (packet.channel.equals("TESocket"))
|
||||
// {
|
||||
// ByteArrayDataInput dat = ByteStreams.newDataInput(packet.data);
|
||||
// int x = dat.readInt();
|
||||
// int y = dat.readInt();
|
||||
// int z = dat.readInt();
|
||||
// boolean hasStacks = dat.readByte() != 0;
|
||||
// int[] items = new int[0];
|
||||
//
|
||||
// if (hasStacks)
|
||||
// {
|
||||
// items = new int[1 * 3];
|
||||
//
|
||||
// for (int i = 0; i < items.length; i++)
|
||||
// {
|
||||
// items[i] = dat.readInt();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
// TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||
//
|
||||
// if (tileEntity instanceof TESocket)
|
||||
// {
|
||||
// TESocket tileEntityAltar = (TESocket) tileEntity;
|
||||
// tileEntityAltar.handlePacketData(items);
|
||||
// }
|
||||
// } else if (packet.channel.equals("TEWritingTable"))
|
||||
// {
|
||||
// ByteArrayDataInput dat = ByteStreams.newDataInput(packet.data);
|
||||
// int x = dat.readInt();
|
||||
// int y = dat.readInt();
|
||||
// int z = dat.readInt();
|
||||
// boolean hasStacks = dat.readByte() != 0;
|
||||
// int[] items = new int[0];
|
||||
//
|
||||
// if (hasStacks)
|
||||
// {
|
||||
// items = new int[7 * 3];
|
||||
//
|
||||
// for (int i = 0; i < items.length; i++)
|
||||
// {
|
||||
// items[i] = dat.readInt();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
// TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||
//
|
||||
// if (tileEntity instanceof TEWritingTable)
|
||||
// {
|
||||
// TEWritingTable tileEntityAltar = (TEWritingTable) tileEntity;
|
||||
// tileEntityAltar.handlePacketData(items);
|
||||
// }
|
||||
// } else if (packet.channel.equals("TEOrientor"))
|
||||
// {
|
||||
// ByteArrayDataInput dat = ByteStreams.newDataInput(packet.data);
|
||||
// int x = dat.readInt();
|
||||
// int y = dat.readInt();
|
||||
// int z = dat.readInt();
|
||||
// World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
// TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||
//
|
||||
// if (tileEntity instanceof TEOrientable)
|
||||
// {
|
||||
// TEOrientable tileEntityOrientable = (TEOrientable) tileEntity;
|
||||
// tileEntityOrientable.setInputDirection(ForgeDirection.getOrientation(dat.readInt()));
|
||||
// tileEntityOrientable.setOutputDirection(ForgeDirection.getOrientation(dat.readInt()));
|
||||
// world.markBlockForRenderUpdate(x, y, z);
|
||||
// }
|
||||
// } else if (packet.channel.equals("TEPedestal"))
|
||||
// {
|
||||
// ByteArrayDataInput dat = ByteStreams.newDataInput(packet.data);
|
||||
// int x = dat.readInt();
|
||||
// int y = dat.readInt();
|
||||
// int z = dat.readInt();
|
||||
// boolean hasStacks = dat.readByte() != 0;
|
||||
// int[] items = new int[0];
|
||||
//
|
||||
// if (hasStacks)
|
||||
// {
|
||||
// items = new int[1 * 3];
|
||||
//
|
||||
// for (int i = 0; i < items.length; i++)
|
||||
// {
|
||||
// items[i] = dat.readInt();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
// TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||
//
|
||||
// if (tileEntity instanceof TEPedestal)
|
||||
// {
|
||||
// TEPedestal tileEntityAltar = (TEPedestal) tileEntity;
|
||||
// tileEntityAltar.handlePacketData(items);
|
||||
// }
|
||||
// } else if (packet.channel.equals("TEPlinth"))
|
||||
// {
|
||||
// ByteArrayDataInput dat = ByteStreams.newDataInput(packet.data);
|
||||
// int x = dat.readInt();
|
||||
// int y = dat.readInt();
|
||||
// int z = dat.readInt();
|
||||
// boolean hasStacks = dat.readByte() != 0;
|
||||
// int[] items = new int[0];
|
||||
//
|
||||
// if (hasStacks)
|
||||
// {
|
||||
// items = new int[1 * 3];
|
||||
//
|
||||
// for (int i = 0; i < items.length; i++)
|
||||
// {
|
||||
// items[i] = dat.readInt();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
// TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||
//
|
||||
// if (tileEntity instanceof TEPlinth)
|
||||
// {
|
||||
// TEPlinth tileEntityAltar = (TEPlinth) tileEntity;
|
||||
// tileEntityAltar.handlePacketData(items);
|
||||
// }
|
||||
// } else if (packet.channel.equals("TETeleposer"))
|
||||
// {
|
||||
// ByteArrayDataInput dat = ByteStreams.newDataInput(packet.data);
|
||||
// int x = dat.readInt();
|
||||
// int y = dat.readInt();
|
||||
// int z = dat.readInt();
|
||||
// boolean hasStacks = dat.readByte() != 0;
|
||||
// int[] items = new int[0];
|
||||
//
|
||||
// if (hasStacks)
|
||||
// {
|
||||
// items = new int[1 * 3];
|
||||
//
|
||||
// for (int i = 0; i < items.length; i++)
|
||||
// {
|
||||
// items[i] = dat.readInt();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
// TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||
//
|
||||
// if (tileEntity instanceof TETeleposer)
|
||||
// {
|
||||
// TETeleposer tileEntityAltar = (TETeleposer) tileEntity;
|
||||
// tileEntityAltar.handlePacketData(items);
|
||||
// }
|
||||
// } else if (packet.channel.equals("SetPlayerVel"))
|
||||
// {
|
||||
// ByteArrayDataInput dat = ByteStreams.newDataInput(packet.data);
|
||||
// double xVel = dat.readDouble();
|
||||
// double yVel = dat.readDouble();
|
||||
// double zVel = dat.readDouble();
|
||||
// ((EntityPlayer) player).setVelocity(xVel, yVel, zVel);
|
||||
// } else if (packet.channel.equals("SetPlayerPos"))
|
||||
// {
|
||||
// ByteArrayDataInput dat = ByteStreams.newDataInput(packet.data);
|
||||
// double xVel = dat.readDouble();
|
||||
// double yVel = dat.readDouble();
|
||||
// double zVel = dat.readDouble();
|
||||
// ((EntityPlayer) player).setPosition(xVel, yVel, zVel);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public static Packet getPacket(TEAltar tileEntity)
|
||||
// {
|
||||
// ByteArrayOutputStream bos = new ByteArrayOutputStream(140);
|
||||
// DataOutputStream dos = new DataOutputStream(bos);
|
||||
// int[] items = tileEntity.buildIntDataList();
|
||||
// boolean hasStacks = (items != null);
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// dos.writeInt(tileEntity.xCoord);
|
||||
// dos.writeInt(tileEntity.yCoord);
|
||||
// dos.writeInt(tileEntity.zCoord);
|
||||
// dos.writeByte(hasStacks ? 1 : 0);
|
||||
//
|
||||
// if (hasStacks)
|
||||
// {
|
||||
// for (int i = 0; i < 3; i++)
|
||||
// {
|
||||
// dos.writeInt(items[i]);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// FluidStack flMain = tileEntity.getFluid();
|
||||
//
|
||||
// if (flMain == null)
|
||||
// {
|
||||
// dos.writeInt(AlchemicalWizardry.lifeEssenceFluid.getBlockID());
|
||||
// dos.writeInt(0);
|
||||
// } else
|
||||
// {
|
||||
// dos.writeInt(flMain.fluidID);
|
||||
// dos.writeInt(flMain.amount);
|
||||
// }
|
||||
//
|
||||
// FluidStack flOut = tileEntity.getOutputFluid();
|
||||
//
|
||||
// if (flOut == null)
|
||||
// {
|
||||
// dos.writeInt(AlchemicalWizardry.lifeEssenceFluid.getBlockID());
|
||||
// dos.writeInt(0);
|
||||
// } else
|
||||
// {
|
||||
// dos.writeInt(flOut.fluidID);
|
||||
// dos.writeInt(flOut.amount);
|
||||
// }
|
||||
//
|
||||
// FluidStack flIn = tileEntity.getInputFluid();
|
||||
//
|
||||
// if (flIn == null)
|
||||
// {
|
||||
// dos.writeInt(AlchemicalWizardry.lifeEssenceFluid.getBlockID());
|
||||
// dos.writeInt(0);
|
||||
// } else
|
||||
// {
|
||||
// dos.writeInt(flIn.fluidID);
|
||||
// dos.writeInt(flIn.amount);
|
||||
// }
|
||||
//
|
||||
// dos.writeInt(tileEntity.capacity);
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// Packet250CustomPayload pkt = new Packet250CustomPayload();
|
||||
// pkt.channel = "BloodAltar";
|
||||
// pkt.data = bos.toByteArray();
|
||||
// pkt.length = bos.size();
|
||||
// pkt.isChunkDataPacket = true;
|
||||
// return pkt;
|
||||
// }
|
||||
//
|
||||
// public static Packet getPacket(TESocket tileEntity)
|
||||
// {
|
||||
// ByteArrayOutputStream bos = new ByteArrayOutputStream(140);
|
||||
// DataOutputStream dos = new DataOutputStream(bos);
|
||||
// int[] items = tileEntity.buildIntDataList();
|
||||
// boolean hasStacks = (items != null);
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// dos.writeInt(tileEntity.xCoord);
|
||||
// dos.writeInt(tileEntity.yCoord);
|
||||
// dos.writeInt(tileEntity.zCoord);
|
||||
// dos.writeByte(hasStacks ? 1 : 0);
|
||||
//
|
||||
// if (hasStacks)
|
||||
// {
|
||||
// for (int i = 0; i < 3; i++)
|
||||
// {
|
||||
// dos.writeInt(items[i]);
|
||||
// }
|
||||
// }
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// Packet250CustomPayload pkt = new Packet250CustomPayload();
|
||||
// pkt.channel = "TESocket";
|
||||
// pkt.data = bos.toByteArray();
|
||||
// pkt.length = bos.size();
|
||||
// pkt.isChunkDataPacket = true;
|
||||
// return pkt;
|
||||
// }
|
||||
//
|
||||
// public static Packet getPacket(String ownerName, int addedEssence, int maxEssence)
|
||||
// //Packet to be sent to server to change essence
|
||||
// {
|
||||
// ByteArrayOutputStream bos = new ByteArrayOutputStream(140);
|
||||
// DataOutputStream dos = new DataOutputStream(bos);
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// dos.writeInt(ownerName.length());
|
||||
// dos.writeChars(ownerName);
|
||||
// dos.writeInt(addedEssence);
|
||||
// dos.writeInt(maxEssence); //Used for Blood Orbs, but does nothing for other items
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// Packet250CustomPayload pkt = new Packet250CustomPayload();
|
||||
// pkt.channel = "SetLifeEssence";
|
||||
// pkt.data = bos.toByteArray();
|
||||
// pkt.length = bos.size();
|
||||
// //pkt.isChunkDataPacket = true;
|
||||
// return pkt;
|
||||
// }
|
||||
//
|
||||
// public static Packet getPacket(String ownerName) //stores the current essence in the player's NBT
|
||||
// {
|
||||
// ByteArrayOutputStream bos = new ByteArrayOutputStream(140);
|
||||
// DataOutputStream dos = new DataOutputStream(bos);
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// dos.writeInt(ownerName.length());
|
||||
// dos.writeChars(ownerName);
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// Packet250CustomPayload pkt = new Packet250CustomPayload();
|
||||
// pkt.channel = "GetLifeEssence";
|
||||
// pkt.data = bos.toByteArray();
|
||||
// pkt.length = bos.size();
|
||||
// //pkt.isChunkDataPacket = true;
|
||||
// return pkt;
|
||||
// }
|
||||
//
|
||||
// public static Packet getAltarPacket(int x, int y, int z)
|
||||
// {
|
||||
// ByteArrayOutputStream bos = new ByteArrayOutputStream(140);
|
||||
// DataOutputStream dos = new DataOutputStream(bos);
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// dos.writeInt(x);
|
||||
// dos.writeInt(y);
|
||||
// dos.writeInt(z);
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// Packet250CustomPayload pkt = new Packet250CustomPayload();
|
||||
// pkt.channel = "GetAltarEssence";
|
||||
// pkt.data = bos.toByteArray();
|
||||
// pkt.length = bos.size();
|
||||
// //pkt.isChunkDataPacket = true;
|
||||
// return pkt;
|
||||
// }
|
||||
//
|
||||
// public static Packet getPacket(TEWritingTable tileEntity)
|
||||
// {
|
||||
// // TODO Auto-generated method stub
|
||||
// ByteArrayOutputStream bos = new ByteArrayOutputStream(140);
|
||||
// DataOutputStream dos = new DataOutputStream(bos);
|
||||
// int[] items = tileEntity.buildIntDataList();
|
||||
// boolean hasStacks = (items != null);
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// dos.writeInt(tileEntity.xCoord);
|
||||
// dos.writeInt(tileEntity.yCoord);
|
||||
// dos.writeInt(tileEntity.zCoord);
|
||||
// dos.writeByte(hasStacks ? 1 : 0);
|
||||
//
|
||||
// if (hasStacks)
|
||||
// {
|
||||
// for (int i = 0; i < 3 * 7; i++)
|
||||
// {
|
||||
// dos.writeInt(items[i]);
|
||||
// }
|
||||
// }
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// Packet250CustomPayload pkt = new Packet250CustomPayload();
|
||||
// pkt.channel = "TEWritingTable";
|
||||
// pkt.data = bos.toByteArray();
|
||||
// pkt.length = bos.size();
|
||||
// pkt.isChunkDataPacket = true;
|
||||
// return pkt;
|
||||
// }
|
||||
//
|
||||
// public static Packet getPacket(TEPedestal tileEntity)
|
||||
// {
|
||||
// // TODO Auto-generated method stub
|
||||
// ByteArrayOutputStream bos = new ByteArrayOutputStream(140);
|
||||
// DataOutputStream dos = new DataOutputStream(bos);
|
||||
// int[] items = tileEntity.buildIntDataList();
|
||||
// boolean hasStacks = (items != null);
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// dos.writeInt(tileEntity.xCoord);
|
||||
// dos.writeInt(tileEntity.yCoord);
|
||||
// dos.writeInt(tileEntity.zCoord);
|
||||
// dos.writeByte(hasStacks ? 1 : 0);
|
||||
//
|
||||
// if (hasStacks)
|
||||
// {
|
||||
// for (int i = 0; i < 3 * 1; i++)
|
||||
// {
|
||||
// dos.writeInt(items[i]);
|
||||
// }
|
||||
// }
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// Packet250CustomPayload pkt = new Packet250CustomPayload();
|
||||
// pkt.channel = "TEPedestal";
|
||||
// pkt.data = bos.toByteArray();
|
||||
// pkt.length = bos.size();
|
||||
// pkt.isChunkDataPacket = true;
|
||||
// return pkt;
|
||||
// }
|
||||
//
|
||||
// public static Packet getPacket(TEPlinth tileEntity)
|
||||
// {
|
||||
// // TODO Auto-generated method stub
|
||||
// ByteArrayOutputStream bos = new ByteArrayOutputStream(140);
|
||||
// DataOutputStream dos = new DataOutputStream(bos);
|
||||
// int[] items = tileEntity.buildIntDataList();
|
||||
// boolean hasStacks = (items != null);
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// dos.writeInt(tileEntity.xCoord);
|
||||
// dos.writeInt(tileEntity.yCoord);
|
||||
// dos.writeInt(tileEntity.zCoord);
|
||||
// dos.writeByte(hasStacks ? 1 : 0);
|
||||
//
|
||||
// if (hasStacks)
|
||||
// {
|
||||
// for (int i = 0; i < 3 * 1; i++)
|
||||
// {
|
||||
// dos.writeInt(items[i]);
|
||||
// }
|
||||
// }
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// Packet250CustomPayload pkt = new Packet250CustomPayload();
|
||||
// pkt.channel = "TEPlinth";
|
||||
// pkt.data = bos.toByteArray();
|
||||
// pkt.length = bos.size();
|
||||
// pkt.isChunkDataPacket = true;
|
||||
// return pkt;
|
||||
// }
|
||||
//
|
||||
// public static Packet getPacket(TETeleposer tileEntity)
|
||||
// {
|
||||
// // TODO Auto-generated method stub
|
||||
// ByteArrayOutputStream bos = new ByteArrayOutputStream(140);
|
||||
// DataOutputStream dos = new DataOutputStream(bos);
|
||||
// int[] items = tileEntity.buildIntDataList();
|
||||
// boolean hasStacks = (items != null);
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// dos.writeInt(tileEntity.xCoord);
|
||||
// dos.writeInt(tileEntity.yCoord);
|
||||
// dos.writeInt(tileEntity.zCoord);
|
||||
// dos.writeByte(hasStacks ? 1 : 0);
|
||||
//
|
||||
// if (hasStacks)
|
||||
// {
|
||||
// for (int i = 0; i < 3 * 1; i++)
|
||||
// {
|
||||
// dos.writeInt(items[i]);
|
||||
// }
|
||||
// }
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// Packet250CustomPayload pkt = new Packet250CustomPayload();
|
||||
// pkt.channel = "TETeleposer";
|
||||
// pkt.data = bos.toByteArray();
|
||||
// pkt.length = bos.size();
|
||||
// pkt.isChunkDataPacket = true;
|
||||
// return pkt;
|
||||
// }
|
||||
//
|
||||
// public static Packet getCustomParticlePacket(String str, double x, double y, double z, double xVel, double yVel, double zVel)
|
||||
// {
|
||||
// ByteArrayOutputStream bos = new ByteArrayOutputStream(140);
|
||||
// DataOutputStream dos = new DataOutputStream(bos);
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// dos.writeInt(str.length());
|
||||
// dos.writeChars(str);
|
||||
// dos.writeDouble(x);
|
||||
// dos.writeDouble(y);
|
||||
// dos.writeDouble(z);
|
||||
// dos.writeDouble(xVel);
|
||||
// dos.writeDouble(yVel);
|
||||
// dos.writeDouble(zVel);
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// Packet250CustomPayload pkt = new Packet250CustomPayload();
|
||||
// pkt.channel = "CustomParticle";
|
||||
// pkt.data = bos.toByteArray();
|
||||
// pkt.length = bos.size();
|
||||
// pkt.isChunkDataPacket = false;
|
||||
// return pkt;
|
||||
// }
|
||||
//
|
||||
// public static Packet getPlayerVelocitySettingPacket(double xVel, double yVel, double zVel)
|
||||
// {
|
||||
// ByteArrayOutputStream bos = new ByteArrayOutputStream(140);
|
||||
// DataOutputStream dos = new DataOutputStream(bos);
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// dos.writeDouble(xVel);
|
||||
// dos.writeDouble(yVel);
|
||||
// dos.writeDouble(zVel);
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// Packet250CustomPayload pkt = new Packet250CustomPayload();
|
||||
// pkt.channel = "SetPlayerVel";
|
||||
// pkt.data = bos.toByteArray();
|
||||
// pkt.length = bos.size();
|
||||
// pkt.isChunkDataPacket = false;
|
||||
// return pkt;
|
||||
// }
|
||||
//
|
||||
// public static Packet getPlayerPositionSettingPacket(double xVel, double yVel, double zVel)
|
||||
// {
|
||||
// ByteArrayOutputStream bos = new ByteArrayOutputStream(140);
|
||||
// DataOutputStream dos = new DataOutputStream(bos);
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// dos.writeDouble(xVel);
|
||||
// dos.writeDouble(yVel);
|
||||
// dos.writeDouble(zVel);
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// Packet250CustomPayload pkt = new Packet250CustomPayload();
|
||||
// pkt.channel = "SetPlayerPos";
|
||||
// pkt.data = bos.toByteArray();
|
||||
// pkt.length = bos.size();
|
||||
// pkt.isChunkDataPacket = false;
|
||||
// return pkt;
|
||||
// }
|
||||
//
|
||||
// public static Packet getCreativeCheatPacket(String ownerName, boolean isFill)
|
||||
// {
|
||||
// ByteArrayOutputStream bos = new ByteArrayOutputStream(140);
|
||||
// DataOutputStream dos = new DataOutputStream(bos);
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// dos.writeInt(ownerName.length());
|
||||
// dos.writeChars(ownerName);
|
||||
// dos.writeBoolean(isFill);
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// Packet250CustomPayload pkt = new Packet250CustomPayload();
|
||||
// pkt.channel = "InfiniteLPPath";
|
||||
// pkt.data = bos.toByteArray();
|
||||
// pkt.length = bos.size();
|
||||
// pkt.isChunkDataPacket = false;
|
||||
// return pkt;
|
||||
// }
|
||||
//
|
||||
// public static Packet getBlockOrientationPacket(TEOrientable tileEntity)
|
||||
// {
|
||||
// ByteArrayOutputStream bos = new ByteArrayOutputStream(140);
|
||||
// DataOutputStream dos = new DataOutputStream(bos);
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// dos.writeInt(tileEntity.xCoord);
|
||||
// dos.writeInt(tileEntity.yCoord);
|
||||
// dos.writeInt(tileEntity.zCoord);
|
||||
// dos.writeInt(tileEntity.getIntForForgeDirection(tileEntity.getInputDirection()));
|
||||
// dos.writeInt(tileEntity.getIntForForgeDirection(tileEntity.getOutputDirection()));
|
||||
// } catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// Packet250CustomPayload pkt = new Packet250CustomPayload();
|
||||
// pkt.channel = "TEOrientor";
|
||||
// pkt.data = bos.toByteArray();
|
||||
// pkt.length = bos.size();
|
||||
// pkt.isChunkDataPacket = true;
|
||||
// return pkt;
|
||||
// }
|
||||
}
|
|
@ -1,13 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.alchemy;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper;
|
||||
import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper;
|
||||
import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CombinedPotionRegistry
|
||||
{
|
||||
|
@ -20,9 +20,9 @@ public class CombinedPotionRegistry
|
|||
|
||||
public static boolean isRecipeValid(Potion pot1, Potion pot2)
|
||||
{
|
||||
for(CombinedPotionComponent recipe : potionList)
|
||||
for (CombinedPotionComponent recipe : potionList)
|
||||
{
|
||||
if(recipe.isRecipeValid(pot1, pot2))
|
||||
if (recipe.isRecipeValid(pot1, pot2))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -33,9 +33,9 @@ public class CombinedPotionRegistry
|
|||
|
||||
public static boolean isRecipeValid(int pot1, int pot2)
|
||||
{
|
||||
for(CombinedPotionComponent recipe : potionList)
|
||||
for (CombinedPotionComponent recipe : potionList)
|
||||
{
|
||||
if(recipe.isRecipeValid(pot1, pot2))
|
||||
if (recipe.isRecipeValid(pot1, pot2))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -46,9 +46,9 @@ public class CombinedPotionRegistry
|
|||
|
||||
public static Potion getPotion(Potion pot1, Potion pot2)
|
||||
{
|
||||
for(CombinedPotionComponent recipe : potionList)
|
||||
for (CombinedPotionComponent recipe : potionList)
|
||||
{
|
||||
if(recipe.isRecipeValid(pot1, pot2))
|
||||
if (recipe.isRecipeValid(pot1, pot2))
|
||||
{
|
||||
return recipe.result;
|
||||
}
|
||||
|
@ -59,9 +59,9 @@ public class CombinedPotionRegistry
|
|||
|
||||
public static Potion getPotion(int pot1, int pot2)
|
||||
{
|
||||
for(CombinedPotionComponent recipe : potionList)
|
||||
for (CombinedPotionComponent recipe : potionList)
|
||||
{
|
||||
if(recipe.isRecipeValid(pot1, pot2))
|
||||
if (recipe.isRecipeValid(pot1, pot2))
|
||||
{
|
||||
return recipe.result;
|
||||
}
|
||||
|
@ -72,29 +72,29 @@ public class CombinedPotionRegistry
|
|||
|
||||
public static ItemStack applyPotionEffect(ItemStack stack)
|
||||
{
|
||||
if(stack == null || !(stack.getItem() instanceof AlchemyFlask))
|
||||
if (stack == null || !(stack.getItem() instanceof AlchemyFlask))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
List<AlchemyPotionHelper> list = AlchemyFlask.getEffects(stack);
|
||||
if(list == null)
|
||||
if (list == null)
|
||||
{
|
||||
return stack;
|
||||
}
|
||||
|
||||
boolean isDone = false;
|
||||
|
||||
for(AlchemyPotionHelper helper1 : list)
|
||||
for (AlchemyPotionHelper helper1 : list)
|
||||
{
|
||||
if(isDone)
|
||||
if (isDone)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
for(int i=0; i<list.size(); i++)
|
||||
for (int i = 0; i < list.size(); i++)
|
||||
{
|
||||
if(isDone)
|
||||
if (isDone)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ public class CombinedPotionRegistry
|
|||
|
||||
PotionEffect potEffect = getResultantPotion(helper1, helper2);
|
||||
|
||||
if(potEffect != null)
|
||||
if (potEffect != null)
|
||||
{
|
||||
AlchemyPotionHelper potHelper = new AlchemyPotionHelper(potEffect.getPotionID(), potEffect.getDuration(), 0, potEffect.getAmplifier());
|
||||
|
||||
|
@ -117,7 +117,7 @@ public class CombinedPotionRegistry
|
|||
}
|
||||
}
|
||||
|
||||
if(isDone)
|
||||
if (isDone)
|
||||
{
|
||||
AlchemyFlask.setEffects(stack, list);
|
||||
|
||||
|
@ -129,25 +129,25 @@ public class CombinedPotionRegistry
|
|||
|
||||
public static boolean hasCombinablePotionEffect(ItemStack stack)
|
||||
{
|
||||
if(stack == null || !(stack.getItem() instanceof AlchemyFlask))
|
||||
if (stack == null || !(stack.getItem() instanceof AlchemyFlask))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
List<AlchemyPotionHelper> list = AlchemyFlask.getEffects(stack);
|
||||
if(list == null)
|
||||
if (list == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for(AlchemyPotionHelper helper1 : list)
|
||||
for (AlchemyPotionHelper helper1 : list)
|
||||
{
|
||||
for(AlchemyPotionHelper helper2 : list)
|
||||
for (AlchemyPotionHelper helper2 : list)
|
||||
{
|
||||
int pot1 = helper1.getPotionID();
|
||||
int pot2 = helper2.getPotionID();
|
||||
|
||||
if(isRecipeValid(pot1, pot2))
|
||||
if (isRecipeValid(pot1, pot2))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ public class CombinedPotionRegistry
|
|||
|
||||
public static PotionEffect getResultantPotion(AlchemyPotionHelper potE1, AlchemyPotionHelper potE2)
|
||||
{
|
||||
if(potE1 == null || potE2 == null)
|
||||
if (potE1 == null || potE2 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -167,10 +167,10 @@ public class CombinedPotionRegistry
|
|||
int pot1 = potE1.getPotionID();
|
||||
int pot2 = potE2.getPotionID();
|
||||
|
||||
if(isRecipeValid(pot1, pot2))
|
||||
if (isRecipeValid(pot1, pot2))
|
||||
{
|
||||
int duration = (int)((potE1.getTickDuration()* Math.pow(8.0f / 3.0f, potE1.getdurationFactor()) + potE2.getdurationFactor() * Math.pow(8.0f / 3.0f, potE2.getdurationFactor()))/2.0);
|
||||
int amplifier = (potE1.getConcentration() + potE2.getConcentration())/2;
|
||||
int duration = (int) ((potE1.getTickDuration() * Math.pow(8.0f / 3.0f, potE1.getdurationFactor()) + potE2.getdurationFactor() * Math.pow(8.0f / 3.0f, potE2.getdurationFactor())) / 2.0);
|
||||
int amplifier = (potE1.getConcentration() + potE2.getConcentration()) / 2;
|
||||
|
||||
Potion pot = getPotion(pot1, pot2);
|
||||
|
||||
|
|
|
@ -2,5 +2,4 @@ package WayofTime.alchemicalWizardry.common.alchemy;
|
|||
|
||||
public interface ICombinationalCatalyst
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourComponent;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundArmour;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESocket;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -14,16 +20,9 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourComponent;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundArmour;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESocket;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ArmourForge extends Block
|
||||
{
|
||||
|
@ -39,8 +38,6 @@ public class ArmourForge extends Block
|
|||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setBlockName("armourForge");
|
||||
//setUnlocalizedName("armourForge");
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -160,7 +157,6 @@ public class ArmourForge extends Block
|
|||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
//PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 20, world.provider.dimensionId, TEAltar.getParticlePacket(xCoord, yCoord, zCoord, (short) 1));
|
||||
SpellHelper.sendIndexedParticleToAllAround(world, xCoord, yCoord, zCoord, 20, world.provider.dimensionId, 1, xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -12,10 +14,8 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockAlchemicCalcinator extends BlockContainer
|
||||
{
|
||||
|
@ -125,22 +125,21 @@ public class BlockAlchemicCalcinator extends BlockContainer
|
|||
|
||||
if (playerItem != null)
|
||||
{
|
||||
if(playerItem.getItem() instanceof IReagentManipulator)
|
||||
if (playerItem.getItem() instanceof IReagentManipulator)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(playerItem.getItem() instanceof IBloodOrb)
|
||||
if (playerItem.getItem() instanceof IBloodOrb)
|
||||
{
|
||||
if(tileEntity.getStackInSlot(0) == null)
|
||||
if (tileEntity.getStackInSlot(0) == null)
|
||||
{
|
||||
ItemStack newItem = playerItem.copy();
|
||||
newItem.stackSize = 1;
|
||||
--playerItem.stackSize;
|
||||
tileEntity.setInventorySlotContents(0, newItem);
|
||||
}
|
||||
}
|
||||
else if(tileEntity.getStackInSlot(1) == null)
|
||||
} else if (tileEntity.getStackInSlot(1) == null)
|
||||
{
|
||||
ItemStack newItem = playerItem.copy();
|
||||
newItem.stackSize = 1;
|
||||
|
@ -150,11 +149,11 @@ public class BlockAlchemicCalcinator extends BlockContainer
|
|||
|
||||
} else if (playerItem == null)
|
||||
{
|
||||
if(tileEntity.getStackInSlot(1) != null)
|
||||
if (tileEntity.getStackInSlot(1) != null)
|
||||
{
|
||||
player.inventory.addItemStackToInventory(tileEntity.getStackInSlot(1));
|
||||
tileEntity.setInventorySlotContents(1, null);
|
||||
}else if(tileEntity.getStackInSlot(0) != null)
|
||||
} else if (tileEntity.getStackInSlot(0) != null)
|
||||
{
|
||||
player.inventory.addItemStackToInventory(tileEntity.getStackInSlot(0));
|
||||
tileEntity.setInventorySlotContents(0, null);
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import javax.swing.Icon;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -15,17 +18,9 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockAltar extends BlockContainer
|
||||
{
|
||||
|
@ -45,8 +40,6 @@ public class BlockAltar extends BlockContainer
|
|||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setBlockName("bloodAltar");
|
||||
//setUnlocalizedName("blockAltar");
|
||||
//func_111022_d("AlchemicalWizardry:blocks");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -67,14 +60,8 @@ public class BlockAltar extends BlockContainer
|
|||
{
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
|
||||
case 1:
|
||||
return topIcon;
|
||||
|
||||
//case 2: return sideIcon1;
|
||||
//case 3: return sideIcon1;
|
||||
//case 4: return sideIcon2;
|
||||
//case 5: return sideIcon2;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
|
@ -113,8 +100,6 @@ public class BlockAltar extends BlockContainer
|
|||
{
|
||||
TEAltar tileEntity = (TEAltar) world.getTileEntity(x, y, z);
|
||||
|
||||
// world.scheduleBlockUpdate(x, y, z, this.blockID, 0);
|
||||
|
||||
if (tileEntity == null || player.isSneaking())
|
||||
{
|
||||
return false;
|
||||
|
@ -129,26 +114,24 @@ public class BlockAltar extends BlockContainer
|
|||
if (player.worldObj.isRemote)
|
||||
{
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}else
|
||||
} else
|
||||
{
|
||||
tileEntity.sendChatInfoToPlayer(player);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else if(playerItem.getItem().equals(ModItems.itemSeerSigil))
|
||||
} else if (playerItem.getItem().equals(ModItems.itemSeerSigil))
|
||||
{
|
||||
if (player.worldObj.isRemote)
|
||||
{
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}else
|
||||
} else
|
||||
{
|
||||
tileEntity.sendMoreChatInfoToPlayer(player);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (playerItem.getItem().equals(ModItems.sigilOfHolding))
|
||||
} else if (playerItem.getItem().equals(ModItems.sigilOfHolding))
|
||||
{
|
||||
ItemStack item = ((SigilOfHolding) playerItem.getItem()).getCurrentItem(playerItem);
|
||||
|
||||
|
@ -157,19 +140,18 @@ public class BlockAltar extends BlockContainer
|
|||
if (player.worldObj.isRemote)
|
||||
{
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}else
|
||||
} else
|
||||
{
|
||||
tileEntity.sendChatInfoToPlayer(player);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else if(item !=null && item.getItem().equals(ModItems.itemSeerSigil))
|
||||
} else if (item != null && item.getItem().equals(ModItems.itemSeerSigil))
|
||||
{
|
||||
if (player.worldObj.isRemote)
|
||||
{
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}else
|
||||
} else
|
||||
{
|
||||
tileEntity.sendMoreChatInfoToPlayer(player);
|
||||
}
|
||||
|
@ -183,27 +165,16 @@ public class BlockAltar extends BlockContainer
|
|||
{
|
||||
ItemStack newItem = playerItem.copy();
|
||||
newItem.stackSize = 1;
|
||||
// if(newItem.getMaxDamage()==0)
|
||||
// {
|
||||
// newItem.setItemDamage(0);
|
||||
// }
|
||||
--playerItem.stackSize;
|
||||
tileEntity.setInventorySlotContents(0, newItem);
|
||||
tileEntity.startCycle();
|
||||
} else if (tileEntity.getStackInSlot(0) != null && playerItem == null)
|
||||
{
|
||||
/**stub method
|
||||
* Add the item that is in the slot to the player's inventory, and
|
||||
* then set the slot to null.
|
||||
*/
|
||||
player.inventory.addItemStackToInventory(tileEntity.getStackInSlot(0));
|
||||
tileEntity.setInventorySlotContents(0, null);
|
||||
tileEntity.setActive();
|
||||
}
|
||||
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
//player.openGui(AlchemicalWizardry.instance, 0, world, x, y, z);
|
||||
//PacketDispatcher.sendPacketToServer(tileEntity.getDescriptionPacket());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -294,18 +265,6 @@ public class BlockAltar extends BlockContainer
|
|||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public int isProvidingStrongPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
// {
|
||||
// return 1;
|
||||
// }
|
||||
|
||||
// @Override
|
||||
// public boolean canProvidePower()
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World var1, int var2)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -9,12 +9,9 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class BlockBelljar extends BlockContainer
|
||||
{
|
||||
|
@ -32,54 +29,16 @@ public class BlockBelljar extends BlockContainer
|
|||
{
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if(tile instanceof TEBellJar)
|
||||
if (tile instanceof TEBellJar)
|
||||
{
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
if(tag != null)
|
||||
if (tag != null)
|
||||
{
|
||||
((TEBellJar) tile).readTankNBTOnPlace(tag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void breakBlock(World world, int x, int y, int z, Block par5, int par6)
|
||||
// {
|
||||
// if(world.isRemote)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// TileEntity tile = world.getTileEntity(x, y, z);
|
||||
//
|
||||
// if(tile == null)
|
||||
// {
|
||||
// System.out.println("Tile has been removed already!");
|
||||
// }
|
||||
//
|
||||
// if(tile instanceof TEBellJar)
|
||||
// {
|
||||
// if(((TEBellJar) tile).areTanksEmpty())
|
||||
// {
|
||||
// super.breakBlock(world, x, y, z, par5, par6);
|
||||
// return;
|
||||
// }
|
||||
// System.out.println("Writing...");
|
||||
// ItemStack droppedStack = new ItemStack(ModBlocks.blockCrystalBelljar);
|
||||
// droppedStack.setTagCompound(new NBTTagCompound());
|
||||
//
|
||||
// NBTTagCompound savedTag = droppedStack.getTagCompound();
|
||||
// ((TEBellJar) tile).writeTankNBT(savedTag);
|
||||
//
|
||||
// this.dropBlockAsItem(world, x, y, z, droppedStack);
|
||||
//
|
||||
// world.removeTileEntity(x, y, z);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// super.breakBlock(world, x, y, z, par5, par6);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta)
|
||||
{
|
||||
|
@ -120,7 +79,7 @@ public class BlockBelljar extends BlockContainer
|
|||
public int getComparatorInputOverride(World world, int x, int y, int z, int meta)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if(tile instanceof TEBellJar)
|
||||
if (tile instanceof TEBellJar)
|
||||
{
|
||||
return ((TEBellJar) tile).getRSPowerOutput();
|
||||
}
|
||||
|
@ -131,7 +90,6 @@ public class BlockBelljar extends BlockContainer
|
|||
public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player)
|
||||
{
|
||||
this.dropBlockAsItem(world, x, y, z, meta, 0);
|
||||
|
||||
super.onBlockHarvested(world, x, y, z, meta, player);
|
||||
}
|
||||
|
||||
|
@ -142,11 +100,11 @@ public class BlockBelljar extends BlockContainer
|
|||
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if(tile instanceof TEBellJar)
|
||||
if (tile instanceof TEBellJar)
|
||||
{
|
||||
ItemStack drop = new ItemStack(this);
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
((TEBellJar)tile).writeTankNBT(tag);
|
||||
((TEBellJar) tile).writeTankNBT(tag);
|
||||
drop.stackTagCompound = tag;
|
||||
|
||||
list.add(drop);
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -10,15 +9,15 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockBloodLightSource extends Block
|
||||
{
|
||||
public BlockBloodLightSource()
|
||||
{
|
||||
super(Material.cloth);
|
||||
//setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setBlockName("blockBloodLightSource");
|
||||
}
|
||||
|
||||
|
@ -65,7 +64,6 @@ public class BlockBloodLightSource extends Block
|
|||
public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity)
|
||||
{
|
||||
this.setBlockBounds(0.40F, 0.40F, 0.40F, 0.60F, 0.60F, 0.60F);
|
||||
//super.addCollisionBoxesToList(par1World, par2, par3, par4, par5AxisAlignedBB, par6List, par7Entity);
|
||||
}
|
||||
|
||||
public int quantityDropped(Random par1Random)
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockConduit extends BlockOrientable
|
||||
{
|
||||
|
@ -28,7 +28,6 @@ public class BlockConduit extends BlockOrientable
|
|||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setBlockName("blockConduit");
|
||||
//func_111022_d("AlchemicalWizardry:blocks");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -49,14 +48,8 @@ public class BlockConduit extends BlockOrientable
|
|||
{
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
|
||||
case 1:
|
||||
return topIcon;
|
||||
|
||||
//case 2: return sideIcon1;
|
||||
//case 3: return sideIcon1;
|
||||
//case 4: return sideIcon2;
|
||||
//case 5: return sideIcon2;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
|
@ -65,7 +58,6 @@ public class BlockConduit extends BlockOrientable
|
|||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block par5, int par6)
|
||||
{
|
||||
//dropItems(world, x, y, z);
|
||||
super.breakBlock(world, x, y, z, par5, par6);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEDemonPortal;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEDemonPortal;
|
||||
|
||||
public class BlockDemonPortal extends BlockContainer
|
||||
{
|
||||
|
@ -29,7 +28,7 @@ public class BlockDemonPortal extends BlockContainer
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are)
|
||||
{
|
||||
if(world.isRemote)
|
||||
if (world.isRemote)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.items.BlankSpell;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -9,11 +14,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.items.BlankSpell;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockHomHeart extends BlockContainer
|
||||
{
|
||||
|
@ -47,14 +47,8 @@ public class BlockHomHeart extends BlockContainer
|
|||
{
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
|
||||
case 1:
|
||||
return topIcon;
|
||||
|
||||
//case 2: return sideIcon1;
|
||||
//case 3: return sideIcon1;
|
||||
//case 4: return sideIcon2;
|
||||
//case 5: return sideIcon2;
|
||||
default:
|
||||
return sideIcon;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.items.ActivationCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -8,11 +13,6 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.items.ActivationCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockMasterStone extends BlockContainer
|
||||
{
|
||||
|
@ -23,7 +23,6 @@ public class BlockMasterStone extends BlockContainer
|
|||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setBlockName("blockMasterStone");
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -37,7 +36,7 @@ public class BlockMasterStone extends BlockContainer
|
|||
public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if(tile instanceof TEMasterStone)
|
||||
if (tile instanceof TEMasterStone)
|
||||
{
|
||||
((TEMasterStone) tile).useOnRitualBroken();
|
||||
}
|
||||
|
|
|
@ -1,20 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import javax.swing.Icon;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEOrientable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockOrientable extends BlockContainer
|
||||
{
|
||||
|
@ -24,16 +17,8 @@ public class BlockOrientable extends BlockContainer
|
|||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
//setUnlocalizedName("bloodSocket");
|
||||
//func_111022_d("AlchemicalWizardry:blocks");
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are)
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int dunno)
|
||||
{
|
||||
|
@ -54,37 +39,37 @@ public class BlockOrientable extends BlockContainer
|
|||
|
||||
if (tile instanceof TEOrientable)
|
||||
{
|
||||
TEOrientable newTile = (TEOrientable)tile;
|
||||
if(player.isSneaking())
|
||||
TEOrientable newTile = (TEOrientable) tile;
|
||||
if (player.isSneaking())
|
||||
{
|
||||
int nextSide = TEOrientable.getIntForForgeDirection(newTile.getInputDirection())+1;
|
||||
int nextSide = TEOrientable.getIntForForgeDirection(newTile.getInputDirection()) + 1;
|
||||
|
||||
if(nextSide>5)
|
||||
if (nextSide > 5)
|
||||
{
|
||||
nextSide = 0;
|
||||
}
|
||||
if(ForgeDirection.getOrientation(nextSide)==newTile.getOutputDirection())
|
||||
if (ForgeDirection.getOrientation(nextSide) == newTile.getOutputDirection())
|
||||
{
|
||||
nextSide++;
|
||||
if(nextSide>5)
|
||||
if (nextSide > 5)
|
||||
{
|
||||
nextSide = 0;
|
||||
}
|
||||
}
|
||||
|
||||
newTile.setInputDirection(ForgeDirection.getOrientation(nextSide));
|
||||
}else
|
||||
} else
|
||||
{
|
||||
int nextSide = TEOrientable.getIntForForgeDirection(newTile.getOutputDirection())+1;
|
||||
int nextSide = TEOrientable.getIntForForgeDirection(newTile.getOutputDirection()) + 1;
|
||||
|
||||
if(nextSide>5)
|
||||
if (nextSide > 5)
|
||||
{
|
||||
nextSide = 0;
|
||||
}
|
||||
if(ForgeDirection.getOrientation(nextSide)==newTile.getInputDirection())
|
||||
if (ForgeDirection.getOrientation(nextSide) == newTile.getInputDirection())
|
||||
{
|
||||
nextSide++;
|
||||
if(nextSide>5)
|
||||
if (nextSide > 5)
|
||||
{
|
||||
nextSide = 0;
|
||||
}
|
||||
|
@ -100,79 +85,109 @@ public class BlockOrientable extends BlockContainer
|
|||
|
||||
public int getTextureIndexForSideAndOrientation(int side, ForgeDirection input, ForgeDirection output)
|
||||
{
|
||||
if(ForgeDirection.getOrientation(side) == input)
|
||||
if (ForgeDirection.getOrientation(side) == input)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if(ForgeDirection.getOrientation(side) == output)
|
||||
if (ForgeDirection.getOrientation(side) == output)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if(ForgeDirection.getOrientation(side) == output.getOpposite())
|
||||
if (ForgeDirection.getOrientation(side) == output.getOpposite())
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
|
||||
switch(side)
|
||||
switch (side)
|
||||
{
|
||||
case 0: //BOTTOM
|
||||
switch(output)
|
||||
switch (output)
|
||||
{
|
||||
case NORTH: return 2; //UP
|
||||
case SOUTH: return 3; //DOWN
|
||||
case EAST: return 4; //LEFT
|
||||
case WEST: return 5; //RIGHT
|
||||
default: break;
|
||||
case NORTH:
|
||||
return 2; //UP
|
||||
case SOUTH:
|
||||
return 3; //DOWN
|
||||
case EAST:
|
||||
return 4; //LEFT
|
||||
case WEST:
|
||||
return 5; //RIGHT
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 1: //TOP
|
||||
switch(output)
|
||||
switch (output)
|
||||
{
|
||||
case NORTH: return 2; //UP
|
||||
case SOUTH: return 3; //DOWN
|
||||
case EAST: return 5;
|
||||
case WEST: return 4;
|
||||
default: break;
|
||||
case NORTH:
|
||||
return 2; //UP
|
||||
case SOUTH:
|
||||
return 3; //DOWN
|
||||
case EAST:
|
||||
return 5;
|
||||
case WEST:
|
||||
return 4;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 2: //NORTH
|
||||
switch(output)
|
||||
switch (output)
|
||||
{
|
||||
case DOWN: return 3;
|
||||
case UP: return 2;
|
||||
case EAST: return 4;
|
||||
case WEST: return 5;
|
||||
default: break;
|
||||
case DOWN:
|
||||
return 3;
|
||||
case UP:
|
||||
return 2;
|
||||
case EAST:
|
||||
return 4;
|
||||
case WEST:
|
||||
return 5;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 3: //SOUTH
|
||||
switch(output)
|
||||
switch (output)
|
||||
{
|
||||
case DOWN: return 3;
|
||||
case UP: return 2;
|
||||
case EAST: return 5;
|
||||
case WEST: return 4;
|
||||
default: break;
|
||||
case DOWN:
|
||||
return 3;
|
||||
case UP:
|
||||
return 2;
|
||||
case EAST:
|
||||
return 5;
|
||||
case WEST:
|
||||
return 4;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 4: //WEST
|
||||
switch(output)
|
||||
switch (output)
|
||||
{
|
||||
case DOWN: return 3;
|
||||
case UP: return 2;
|
||||
case NORTH: return 5;
|
||||
case SOUTH: return 4;
|
||||
default: break;
|
||||
case DOWN:
|
||||
return 3;
|
||||
case UP:
|
||||
return 2;
|
||||
case NORTH:
|
||||
return 5;
|
||||
case SOUTH:
|
||||
return 4;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 5: //EAST
|
||||
switch(output)
|
||||
switch (output)
|
||||
{
|
||||
case DOWN: return 3;
|
||||
case UP: return 2;
|
||||
case NORTH: return 4;
|
||||
case SOUTH: return 5;
|
||||
default: break;
|
||||
case DOWN:
|
||||
return 3;
|
||||
case UP:
|
||||
return 2;
|
||||
case NORTH:
|
||||
return 4;
|
||||
case SOUTH:
|
||||
return 5;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -16,10 +18,8 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockPedestal extends BlockContainer
|
||||
{
|
||||
|
@ -39,7 +39,6 @@ public class BlockPedestal extends BlockContainer
|
|||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setBlockName("bloodPedestal");
|
||||
//func_111022_d("AlchemicalWizardry:blocks");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -60,14 +59,8 @@ public class BlockPedestal extends BlockContainer
|
|||
{
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
|
||||
case 1:
|
||||
return topIcon;
|
||||
|
||||
//case 2: return sideIcon1;
|
||||
//case 3: return sideIcon1;
|
||||
//case 4: return sideIcon2;
|
||||
//case 5: return sideIcon2;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
|
@ -93,18 +86,11 @@ public class BlockPedestal extends BlockContainer
|
|||
tileEntity.setInventorySlotContents(0, newItem);
|
||||
} else if (tileEntity.getStackInSlot(0) != null && playerItem == null)
|
||||
{
|
||||
/**stub method
|
||||
* Add the item that is in the slot to the player's inventory, and
|
||||
* then set the slot to null.
|
||||
*/
|
||||
player.inventory.addItemStackToInventory(tileEntity.getStackInSlot(0));
|
||||
tileEntity.setInventorySlotContents(0, null);
|
||||
tileEntity.setActive();
|
||||
}
|
||||
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
//player.openGui(AlchemicalWizardry.instance, 0, world, x, y, z);
|
||||
//PacketDispatcher.sendPacketToServer(tileEntity.getDescriptionPacket());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -16,10 +18,8 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockPlinth extends BlockContainer
|
||||
{
|
||||
|
@ -39,7 +39,6 @@ public class BlockPlinth extends BlockContainer
|
|||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setBlockName("bloodPlinth");
|
||||
//func_111022_d("AlchemicalWizardry:blocks");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -60,14 +59,8 @@ public class BlockPlinth extends BlockContainer
|
|||
{
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
|
||||
case 1:
|
||||
return topIcon;
|
||||
|
||||
//case 2: return sideIcon1;
|
||||
//case 3: return sideIcon1;
|
||||
//case 4: return sideIcon2;
|
||||
//case 5: return sideIcon2;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
|
@ -93,18 +86,11 @@ public class BlockPlinth extends BlockContainer
|
|||
tileEntity.setInventorySlotContents(0, newItem);
|
||||
} else if (tileEntity.getStackInSlot(0) != null && playerItem == null)
|
||||
{
|
||||
/**stub method
|
||||
* Add the item that is in the slot to the player's inventory, and
|
||||
* then set the slot to null.
|
||||
*/
|
||||
player.inventory.addItemStackToInventory(tileEntity.getStackInSlot(0));
|
||||
tileEntity.setInventorySlotContents(0, null);
|
||||
tileEntity.setActive();
|
||||
}
|
||||
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
//player.openGui(AlchemicalWizardry.instance, 0, world, x, y, z);
|
||||
//PacketDispatcher.sendPacketToServer(tileEntity.getDescriptionPacket());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockReagentConduit extends BlockContainer
|
||||
{
|
||||
|
@ -41,22 +41,6 @@ public class BlockReagentConduit extends BlockContainer
|
|||
return true;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// @SideOnly(Side.CLIENT)
|
||||
// public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List)
|
||||
// {
|
||||
// if (this.equals(ModBlocks.blockSpellParadigm))
|
||||
// {
|
||||
// par3List.add(new ItemStack(par1, 1, 0));
|
||||
// par3List.add(new ItemStack(par1, 1, 1));
|
||||
// par3List.add(new ItemStack(par1, 1, 2));
|
||||
// par3List.add(new ItemStack(par1, 1, 3));
|
||||
// } else
|
||||
// {
|
||||
// super.getSubBlocks(par1, par2CreativeTabs, par3List);
|
||||
// }
|
||||
// }
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are)
|
||||
{
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESchematicSaver;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEDemonPortal;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESchematicSaver;
|
||||
|
||||
public class BlockSchematicSaver extends BlockContainer
|
||||
{
|
||||
|
@ -29,7 +28,7 @@ public class BlockSchematicSaver extends BlockContainer
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are)
|
||||
{
|
||||
if(world.isRemote)
|
||||
if (world.isRemote)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESocket;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -14,11 +17,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESocket;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockSocket extends BlockContainer
|
||||
{
|
||||
|
@ -59,14 +59,8 @@ public class BlockSocket extends BlockContainer
|
|||
{
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
|
||||
case 1:
|
||||
return topIcon;
|
||||
|
||||
//case 2: return sideIcon1;
|
||||
//case 3: return sideIcon1;
|
||||
//case 4: return sideIcon2;
|
||||
//case 5: return sideIcon2;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
|
@ -83,7 +77,6 @@ public class BlockSocket extends BlockContainer
|
|||
}
|
||||
|
||||
ItemStack playerItem = player.getCurrentEquippedItem();
|
||||
|
||||
if (tileEntity.getStackInSlot(0) == null && playerItem != null)
|
||||
{
|
||||
if (playerItem.getItem() instanceof ArmourUpgrade)
|
||||
|
@ -95,18 +88,11 @@ public class BlockSocket extends BlockContainer
|
|||
}
|
||||
} else if (tileEntity.getStackInSlot(0) != null && playerItem == null)
|
||||
{
|
||||
/**stub method
|
||||
* Add the item that is in the slot to the player's inventory, and
|
||||
* then set the slot to null.
|
||||
*/
|
||||
player.inventory.addItemStackToInventory(tileEntity.getStackInSlot(0));
|
||||
tileEntity.setInventorySlotContents(0, null);
|
||||
tileEntity.setActive();
|
||||
}
|
||||
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
//player.openGui(AlchemicalWizardry.instance, 0, world, x, y, z);
|
||||
//PacketDispatcher.sendPacketToServer(tileEntity.getDescriptionPacket());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -11,18 +11,17 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockSpectralContainer extends BlockContainer
|
||||
{
|
||||
public BlockSpectralContainer()
|
||||
{
|
||||
super(Material.cloth);
|
||||
//setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setBlockName("blockSpectralContainer");
|
||||
this.setBlockBounds(0,0,0,0,0,0);
|
||||
this.setBlockBounds(0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
@ -9,8 +9,8 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class BlockSpellEffect extends BlockOrientable
|
||||
|
@ -50,7 +50,7 @@ public class BlockSpellEffect extends BlockOrientable
|
|||
{
|
||||
if (this.equals(ModBlocks.blockSpellEffect))
|
||||
{
|
||||
for(int i=0; i<4; i++)
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
par3List.add(new ItemStack(par1, 1, i));
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
@ -9,10 +9,8 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class BlockSpellEnhancement extends BlockOrientable
|
||||
|
@ -52,7 +50,7 @@ public class BlockSpellEnhancement extends BlockOrientable
|
|||
{
|
||||
if (this.equals(ModBlocks.blockSpellEnhancement))
|
||||
{
|
||||
for(int i=0; i<15; i++)
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
par3List.add(new ItemStack(par1, 1, i));
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
@ -9,9 +9,8 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class BlockSpellModifier extends BlockOrientable
|
||||
|
@ -33,7 +32,7 @@ public class BlockSpellModifier extends BlockOrientable
|
|||
{
|
||||
if (this.equals(ModBlocks.blockSpellModifier))
|
||||
{
|
||||
for(int i=0; i<4; i++)
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
par3List.add(new ItemStack(par1, 1, i));
|
||||
}
|
||||
|
|
|
@ -1,26 +1,24 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemComplexSpellCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemComplexSpellCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockSpellParadigm extends BlockOrientable
|
||||
{
|
||||
public static final float minPos = (3f/16f);
|
||||
public static final float maxPos = (13f/16f);
|
||||
public static final float minPos = (3f / 16f);
|
||||
public static final float maxPos = (13f / 16f);
|
||||
|
||||
public BlockSpellParadigm()
|
||||
{
|
||||
|
@ -58,7 +56,7 @@ public class BlockSpellParadigm extends BlockOrientable
|
|||
{
|
||||
ItemStack stack = player.getCurrentEquippedItem();
|
||||
|
||||
if(stack != null && stack.getItem() instanceof ItemComplexSpellCrystal)
|
||||
if (stack != null && stack.getItem() instanceof ItemComplexSpellCrystal)
|
||||
{
|
||||
if (stack.stackTagCompound == null)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.items.TelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.BlockMobSpawner;
|
||||
|
@ -16,11 +19,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.items.TelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockTeleposer extends BlockContainer
|
||||
{
|
||||
|
@ -40,7 +40,6 @@ public class BlockTeleposer extends BlockContainer
|
|||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setBlockName("bloodTeleposer");
|
||||
//func_111022_d("AlchemicalWizardry:blocks");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -61,14 +60,8 @@ public class BlockTeleposer extends BlockContainer
|
|||
{
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
|
||||
case 1:
|
||||
return topIcon;
|
||||
|
||||
//case 2: return sideIcon1;
|
||||
//case 3: return sideIcon1;
|
||||
//case 4: return sideIcon2;
|
||||
//case 5: return sideIcon2;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
|
@ -97,13 +90,7 @@ public class BlockTeleposer extends BlockContainer
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
player.openGui(AlchemicalWizardry.instance, 1, world, x, y, z);
|
||||
// this.swapBlocks(world, x, y+1, z, x, y+2, z);
|
||||
//
|
||||
// world.markBlockForUpdate(x, y, z);
|
||||
//player.openGui(AlchemicalWizardry.instance, 0, world, x, y, z);
|
||||
//PacketDispatcher.sendPacketToServer(tileEntity.getDescriptionPacket());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -216,11 +203,6 @@ public class BlockTeleposer extends BlockContainer
|
|||
}
|
||||
|
||||
//TILES CLEARED
|
||||
// worldF.destroyBlock(xf, yf, zf, false);
|
||||
// worldI.destroyBlock(xi, yi, zi, false);
|
||||
// worldI.setBlockToAir(xi, yi, zi);
|
||||
// worldF.setBlockToAir(xf, yf, zf);
|
||||
|
||||
worldF.setBlock(xf, yf, zf, initialBlock, metaI, 3);
|
||||
|
||||
if (tileEntityI != null)
|
||||
|
@ -230,12 +212,6 @@ public class BlockTeleposer extends BlockContainer
|
|||
newTileEntityI.xCoord = xf;
|
||||
newTileEntityI.yCoord = yf;
|
||||
newTileEntityI.zCoord = zf;
|
||||
|
||||
// TileEntity tile = worldI.getTileEntity(xf, yf, zf);
|
||||
// if(tile instanceof TileMultipart)
|
||||
// {
|
||||
// TileMultipart.createFromNBT(nbttag1);
|
||||
// }
|
||||
}
|
||||
|
||||
worldI.setBlock(xi, yi, zi, finalBlock, metaF, 3);
|
||||
|
@ -247,12 +223,6 @@ public class BlockTeleposer extends BlockContainer
|
|||
newTileEntityF.xCoord = xi;
|
||||
newTileEntityF.yCoord = yi;
|
||||
newTileEntityF.zCoord = zi;
|
||||
|
||||
TileEntity tile = worldI.getTileEntity(xi, yi, zi);
|
||||
// if(tile instanceof TileMultipart)
|
||||
// {
|
||||
// TileMultipart.createFromNBT(nbttag2);
|
||||
// }
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -17,10 +18,9 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockWritingTable extends BlockContainer
|
||||
{
|
||||
|
@ -60,14 +60,8 @@ public class BlockWritingTable extends BlockContainer
|
|||
{
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
|
||||
case 1:
|
||||
return topIcon;
|
||||
|
||||
//case 2: return sideIcon1;
|
||||
//case 3: return sideIcon1;
|
||||
//case 4: return sideIcon2;
|
||||
//case 5: return sideIcon2;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.swing.Icon;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -11,10 +11,8 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BloodRune extends Block
|
||||
{
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class BloodStoneBrick extends Block
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class EfficiencyRune extends BloodRune
|
||||
{
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class EmptySocket extends Block
|
||||
{
|
||||
|
@ -16,7 +16,6 @@ public class EmptySocket extends Block
|
|||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setBlockName("emptySocket");
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -10,12 +14,6 @@ import net.minecraft.init.Blocks;
|
|||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ImperfectRitualStone extends Block
|
||||
{
|
||||
|
@ -26,7 +24,6 @@ public class ImperfectRitualStone extends Block
|
|||
setResistance(5.0F);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setBlockName("imperfectRitualStone");
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -39,8 +36,6 @@ public class ImperfectRitualStone extends Block
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float xOff, float yOff, float zOff)
|
||||
{
|
||||
//ItemStack ist = player.getItemInUse();
|
||||
//if (!world.isRemote)
|
||||
{
|
||||
Block block = world.getBlock(x, y + 1, z);
|
||||
|
||||
|
@ -54,10 +49,6 @@ public class ImperfectRitualStone extends Block
|
|||
if (!world.isRemote)
|
||||
{
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x, y + 2, z));
|
||||
// if (!player.capabilities.isCreativeMode)
|
||||
// {
|
||||
// PacketDispatcher.sendPacketToServer(PacketHandler.getPacket(player.getEntityName(), -5000, 0));
|
||||
// }
|
||||
}
|
||||
|
||||
world.getWorldInfo().setRaining(true);
|
||||
|
@ -78,14 +69,8 @@ public class ImperfectRitualStone extends Block
|
|||
EnergyItems.drainPlayerNetwork(player, 5000);
|
||||
}
|
||||
|
||||
//EntityFallenAngel zomb = new EntityFallenAngel(world);
|
||||
EntityZombie zomb = new EntityZombie(world);
|
||||
zomb.setPosition(x + 0.5, y + 2, z + 0.5);
|
||||
// zomb.setCurrentItemOrArmor(4, new ItemStack(Item.helmetIron.itemID,1,0));
|
||||
// zomb.setCurrentItemOrArmor(3, new ItemStack(Item.plateIron.itemID,1,0));
|
||||
// zomb.setCurrentItemOrArmor(2, new ItemStack(Item.legsIron.itemID,1,0));
|
||||
// zomb.setCurrentItemOrArmor(1, new ItemStack(Item.bootsIron.itemID,1,0));
|
||||
//zomb.setCurrentItemOrArmor(0, new ItemStack(AlchemicalWizardry.energySword.itemID,1,0));
|
||||
zomb.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2000));
|
||||
zomb.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 20000, 7));
|
||||
zomb.addPotionEffect(new PotionEffect(Potion.resistance.id, 20000, 3));
|
||||
|
@ -94,14 +79,10 @@ public class ImperfectRitualStone extends Block
|
|||
{
|
||||
world.spawnEntityInWorld(zomb);
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x, y + 2, z));
|
||||
// if (!player.capabilities.isCreativeMode)
|
||||
// {
|
||||
// PacketDispatcher.sendPacketToServer(PacketHandler.getPacket(player.getEntityName(), -5000, 0));
|
||||
// }
|
||||
}
|
||||
|
||||
return true;
|
||||
} else if (block== Blocks.lapis_block)
|
||||
} else if (block == Blocks.lapis_block)
|
||||
{
|
||||
if (!player.capabilities.isCreativeMode && !world.isRemote)
|
||||
{
|
||||
|
@ -112,10 +93,6 @@ public class ImperfectRitualStone extends Block
|
|||
{
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x, y + 2, z));
|
||||
world.setWorldTime((world.getWorldTime() / 24000) * 24000 + 13800);
|
||||
// if (!player.capabilities.isCreativeMode)
|
||||
// {
|
||||
// PacketDispatcher.sendPacketToServer(PacketHandler.getPacket(player.getEntityName(), -5000, 0));
|
||||
// }
|
||||
}
|
||||
} else if (block == Blocks.bedrock)
|
||||
{
|
||||
|
@ -127,11 +104,6 @@ public class ImperfectRitualStone extends Block
|
|||
if (!world.isRemote)
|
||||
{
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x, y + 2, z));
|
||||
//world.setWorldTime((world.getWorldTime()/24000)*24000+13800);
|
||||
// if (!player.capabilities.isCreativeMode)
|
||||
// {
|
||||
// PacketDispatcher.sendPacketToServer(PacketHandler.getPacket(player.getEntityName(), -5000, 0));
|
||||
// }
|
||||
}
|
||||
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 60 * 20, 1));
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class LargeBloodStoneBrick extends Block
|
||||
{
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.BlockFluidClassic;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class LifeEssenceBlock extends BlockFluidClassic
|
||||
{
|
||||
|
@ -16,8 +16,6 @@ public class LifeEssenceBlock extends BlockFluidClassic
|
|||
{
|
||||
super(AlchemicalWizardry.lifeEssenceFluid, Material.water);
|
||||
AlchemicalWizardry.lifeEssenceFluid.setBlock(this);
|
||||
|
||||
//setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setBlockName("lifeEssenceFluidBlock");
|
||||
}
|
||||
|
||||
|
@ -35,7 +33,6 @@ public class LifeEssenceBlock extends BlockFluidClassic
|
|||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:lifeEssenceStill");
|
||||
AlchemicalWizardry.lifeEssenceFluid.setFlowingIcon(blockIcon);
|
||||
AlchemicalWizardry.lifeEssenceFluid.setStillIcon(blockIcon);
|
||||
//this.getFluid().setIcons(blockIcon);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IRitualStone;
|
||||
import WayofTime.alchemicalWizardry.common.items.ScribeTool;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -8,11 +13,6 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IRitualStone;
|
||||
import WayofTime.alchemicalWizardry.common.items.ScribeTool;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class RitualStone extends Block implements IRitualStone
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class RuneOfSacrifice extends BloodRune
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class RuneOfSelfSacrifice extends BloodRune
|
||||
{
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Facing;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class SpectralBlock extends BlockContainer
|
||||
{
|
||||
|
@ -26,13 +25,6 @@ public class SpectralBlock extends BlockContainer
|
|||
this.setBlockName("spectralBlock");
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public int tickRate(World par1World)
|
||||
// {
|
||||
// return 10;
|
||||
// }
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister)
|
||||
|
@ -83,7 +75,6 @@ public class SpectralBlock extends BlockContainer
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are)
|
||||
{
|
||||
//TEAltar tileEntity = (TEAltar)world.getBlockTileEntity(x, y, z);
|
||||
if (player.isSneaking())
|
||||
{
|
||||
return false;
|
||||
|
@ -95,7 +86,7 @@ public class SpectralBlock extends BlockContainer
|
|||
{
|
||||
if (playerItem.getItem() instanceof ItemBlock)
|
||||
{
|
||||
world.setBlock(x, y, z, ((ItemBlock)(playerItem.getItem())).field_150939_a, playerItem.getItemDamage(), 3);
|
||||
world.setBlock(x, y, z, ((ItemBlock) (playerItem.getItem())).field_150939_a, playerItem.getItemDamage(), 3);
|
||||
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class SpeedRune extends BloodRune
|
||||
{
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.block.BloodRune;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.block.BloodRune;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class UpgradedAltars
|
||||
{
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
package WayofTime.alchemicalWizardry.common.demonVillage;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.Int3;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockStairs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.common.Int3;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class BlockSet
|
||||
{
|
||||
|
@ -38,22 +38,22 @@ public class BlockSet
|
|||
public BlockSet(Block block, int meta)
|
||||
{
|
||||
this(block);
|
||||
for(int i=0; i<metadata.length; i++)
|
||||
for (int i = 0; i < metadata.length; i++)
|
||||
{
|
||||
metadata[i] = meta;
|
||||
}
|
||||
if(block instanceof BlockStairs)
|
||||
if (block instanceof BlockStairs)
|
||||
{
|
||||
int[] northSet = new int[]{2,3,0,1};
|
||||
int[] eastSet = new int[]{1,0,2,3};
|
||||
int[] southSet = new int[]{3,2,1,0};
|
||||
int[] westSet = new int[]{0,1,3,2};
|
||||
int[] northUpSet = new int[]{6,7,4,5};
|
||||
int[] eastUpSet = new int[]{5,4,6,7};
|
||||
int[] southUpSet = new int[]{7,6,5,4};
|
||||
int[] westUpSet = new int[]{4,5,7,6};
|
||||
int[] northSet = new int[]{2, 3, 0, 1};
|
||||
int[] eastSet = new int[]{1, 0, 2, 3};
|
||||
int[] southSet = new int[]{3, 2, 1, 0};
|
||||
int[] westSet = new int[]{0, 1, 3, 2};
|
||||
int[] northUpSet = new int[]{6, 7, 4, 5};
|
||||
int[] eastUpSet = new int[]{5, 4, 6, 7};
|
||||
int[] southUpSet = new int[]{7, 6, 5, 4};
|
||||
int[] westUpSet = new int[]{4, 5, 7, 6};
|
||||
|
||||
switch(meta)
|
||||
switch (meta)
|
||||
{
|
||||
case 0:
|
||||
metadata = westSet;
|
||||
|
@ -103,7 +103,7 @@ public class BlockSet
|
|||
UniqueIdentifier un = GameRegistry.findUniqueIdentifierFor(block);
|
||||
String name = "";
|
||||
|
||||
if(un != null)
|
||||
if (un != null)
|
||||
{
|
||||
name = un.modId + ":" + un.name;
|
||||
}
|
||||
|
@ -121,12 +121,12 @@ public class BlockSet
|
|||
|
||||
public int getMetaForDirection(ForgeDirection dir)
|
||||
{
|
||||
if(metadata.length < 4)
|
||||
if (metadata.length < 4)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch(dir)
|
||||
switch (dir)
|
||||
{
|
||||
case NORTH:
|
||||
return metadata[0];
|
||||
|
@ -144,7 +144,7 @@ public class BlockSet
|
|||
public void buildAtIndex(World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir, int index)
|
||||
{
|
||||
Block block = this.getBlock();
|
||||
if(index >= positions.size() || block == null)
|
||||
if (index >= positions.size() || block == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ public class BlockSet
|
|||
int zOff = position.zCoord;
|
||||
int meta = this.getMetaForDirection(dir);
|
||||
|
||||
switch(dir)
|
||||
switch (dir)
|
||||
{
|
||||
case NORTH:
|
||||
break;
|
||||
|
@ -181,7 +181,7 @@ public class BlockSet
|
|||
|
||||
public void buildAll(World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir)
|
||||
{
|
||||
for(int i=0; i<positions.size(); i++)
|
||||
for (int i = 0; i < positions.size(); i++)
|
||||
{
|
||||
this.buildAtIndex(world, xCoord, yCoord, zCoord, dir, i);
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.demonVillage;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.Int3;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.Int3;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class BuildingSchematic
|
||||
{
|
||||
|
@ -37,9 +37,9 @@ public class BuildingSchematic
|
|||
|
||||
public void addBlockWithMeta(Block block, int meta, int xOffset, int yOffset, int zOffset)
|
||||
{
|
||||
for(BlockSet set : blockList)
|
||||
for (BlockSet set : blockList)
|
||||
{
|
||||
if(set.isContained(block, meta))
|
||||
if (set.isContained(block, meta))
|
||||
{
|
||||
set.addPositionToBlock(xOffset, yOffset, zOffset);
|
||||
return;
|
||||
|
@ -53,7 +53,7 @@ public class BuildingSchematic
|
|||
|
||||
public void buildAll(World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir)
|
||||
{
|
||||
for(BlockSet set : blockList)
|
||||
for (BlockSet set : blockList)
|
||||
{
|
||||
set.buildAll(world, xCoord, yCoord, zCoord, dir);
|
||||
}
|
||||
|
@ -63,14 +63,14 @@ public class BuildingSchematic
|
|||
{
|
||||
GridSpaceHolder holder = new GridSpaceHolder();
|
||||
|
||||
for(BlockSet set : blockList)
|
||||
for (BlockSet set : blockList)
|
||||
{
|
||||
for(Int3 coords : set.getPositions())
|
||||
for (Int3 coords : set.getPositions())
|
||||
{
|
||||
int gridX = (int)((coords.xCoord+2*Math.signum(coords.xCoord))/5);
|
||||
int gridZ = (int)((coords.zCoord+2*Math.signum(coords.zCoord))/5);
|
||||
int gridX = (int) ((coords.xCoord + 2 * Math.signum(coords.xCoord)) / 5);
|
||||
int gridZ = (int) ((coords.zCoord + 2 * Math.signum(coords.zCoord)) / 5);
|
||||
|
||||
holder.setGridSpace(gridX, gridZ, new GridSpace(GridSpace.HOUSE,0));
|
||||
holder.setGridSpace(gridX, gridZ, new GridSpace(GridSpace.HOUSE, 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,8 +79,8 @@ public class BuildingSchematic
|
|||
|
||||
public Int3 getGridSpotOfDoor()
|
||||
{
|
||||
int gridX = (int)((doorX+2*Math.signum(doorX))/5);
|
||||
int gridZ = (int)((doorZ+2*Math.signum(doorZ))/5);
|
||||
int gridX = (int) ((doorX + 2 * Math.signum(doorX)) / 5);
|
||||
int gridZ = (int) ((doorZ + 2 * Math.signum(doorZ)) / 5);
|
||||
|
||||
return new Int3(gridX, doorY, gridZ);
|
||||
}
|
||||
|
@ -89,14 +89,14 @@ public class BuildingSchematic
|
|||
{
|
||||
List<Int3> positionList = new ArrayList();
|
||||
|
||||
for(BlockSet blockSet : blockList)
|
||||
for (BlockSet blockSet : blockList)
|
||||
{
|
||||
for(Int3 pos : blockSet.getPositions())
|
||||
for (Int3 pos : blockSet.getPositions())
|
||||
{
|
||||
int xOff = pos.xCoord;
|
||||
int zOff = pos.zCoord;
|
||||
|
||||
switch(dir)
|
||||
switch (dir)
|
||||
{
|
||||
case SOUTH:
|
||||
xOff *= -1;
|
||||
|
@ -116,7 +116,7 @@ public class BuildingSchematic
|
|||
}
|
||||
|
||||
Int3 nextPos = new Int3(xOff, 0, zOff);
|
||||
if(!positionList.contains(nextPos))
|
||||
if (!positionList.contains(nextPos))
|
||||
{
|
||||
positionList.add(nextPos);
|
||||
}
|
||||
|
@ -132,29 +132,27 @@ public class BuildingSchematic
|
|||
|
||||
List<Int3> positionList = getGriddedPositions(dir);
|
||||
|
||||
for(int i=this.getMinY(); i<=this.getMaxY(); i++)
|
||||
for (int i = this.getMinY(); i <= this.getMaxY(); i++)
|
||||
{
|
||||
for(Int3 pos : positionList)
|
||||
for (Int3 pos : positionList)
|
||||
{
|
||||
Block block = world.getBlock(xCoord + pos.xCoord, yCoord + i, zCoord + pos.zCoord);
|
||||
if(block != ModBlocks.blockDemonPortal)
|
||||
if (block != ModBlocks.blockDemonPortal)
|
||||
{
|
||||
world.setBlockToAir(xCoord + pos.xCoord, yCoord + i, zCoord + pos.zCoord);
|
||||
}
|
||||
}
|
||||
|
||||
//grid.destroyAllInGridSpaces(world, xCoord, yCoord + i, zCoord, dir); //Deprecated method
|
||||
}
|
||||
}
|
||||
|
||||
public int getMinY()
|
||||
{
|
||||
int min = 0;
|
||||
for(BlockSet set : blockList)
|
||||
for (BlockSet set : blockList)
|
||||
{
|
||||
for(Int3 pos : set.getPositions())
|
||||
for (Int3 pos : set.getPositions())
|
||||
{
|
||||
if(pos.yCoord < min)
|
||||
if (pos.yCoord < min)
|
||||
{
|
||||
min = pos.yCoord;
|
||||
}
|
||||
|
@ -167,17 +165,16 @@ public class BuildingSchematic
|
|||
public int getMaxY()
|
||||
{
|
||||
int max = 0;
|
||||
for(BlockSet set : blockList)
|
||||
for (BlockSet set : blockList)
|
||||
{
|
||||
for(Int3 pos : set.getPositions())
|
||||
for (Int3 pos : set.getPositions())
|
||||
{
|
||||
if(pos.yCoord > max)
|
||||
if (pos.yCoord > max)
|
||||
{
|
||||
max = pos.yCoord;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return max;
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.demonVillage;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.Int3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.common.Int3;
|
||||
|
||||
public class DemonBuilding
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ public class DemonBuilding
|
|||
|
||||
public GridSpaceHolder createGSHForSchematic(BuildingSchematic scheme)
|
||||
{
|
||||
switch(this.buildingType)
|
||||
switch (this.buildingType)
|
||||
{
|
||||
case DemonBuilding.BUILDING_HOUSE:
|
||||
return scheme.createGSH();
|
||||
|
@ -60,7 +60,7 @@ public class DemonBuilding
|
|||
{
|
||||
int x = 0;
|
||||
int z = 0;
|
||||
switch(dir)
|
||||
switch (dir)
|
||||
{
|
||||
case SOUTH:
|
||||
x = -doorGridSpace.xCoord;
|
||||
|
@ -89,7 +89,7 @@ public class DemonBuilding
|
|||
int x = doorSpace.xCoord;
|
||||
int z = doorSpace.zCoord;
|
||||
|
||||
switch(sideOfRoad)
|
||||
switch (sideOfRoad)
|
||||
{
|
||||
case SOUTH:
|
||||
z++;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.demonVillage;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.Int3;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.Int3;
|
||||
|
||||
public class DemonVillagePath
|
||||
{
|
||||
|
@ -31,9 +31,9 @@ public class DemonVillagePath
|
|||
int zPos = this.zi;
|
||||
int rad = this.getRoadRadius();
|
||||
|
||||
for(int i=-rad; i<=rad; i++)
|
||||
for (int i = -rad; i <= rad; i++)
|
||||
{
|
||||
this.constructPartialPath(world, clearance, block, meta, xPos-rad*dir.offsetX+i*dir.offsetZ, yPos, zPos-rad*dir.offsetZ+i*dir.offsetX, dir, length+2*rad);
|
||||
this.constructPartialPath(world, clearance, block, meta, xPos - rad * dir.offsetX + i * dir.offsetZ, yPos, zPos - rad * dir.offsetZ + i * dir.offsetX, dir, length + 2 * rad);
|
||||
}
|
||||
|
||||
return this.getFinalLocation(world, clearance);
|
||||
|
@ -45,33 +45,33 @@ public class DemonVillagePath
|
|||
int yPos = yi;
|
||||
int zPos = zi;
|
||||
|
||||
for(int i=0; i<length; i++)
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
int xOffset = i*dir.offsetX;
|
||||
int zOffset = i*dir.offsetZ;
|
||||
int xOffset = i * dir.offsetX;
|
||||
int zOffset = i * dir.offsetZ;
|
||||
|
||||
for(int yOffset=0; yOffset<=clearance; yOffset++)
|
||||
for (int yOffset = 0; yOffset <= clearance; yOffset++)
|
||||
{
|
||||
int sign = 1;
|
||||
|
||||
Block block1 = world.getBlock(xPos + xOffset, yPos + sign*yOffset, zPos + zOffset);
|
||||
Block highBlock1 = world.getBlock(xPos + xOffset, yPos + sign*yOffset + 1, zPos + zOffset);
|
||||
Block block1 = world.getBlock(xPos + xOffset, yPos + sign * yOffset, zPos + zOffset);
|
||||
Block highBlock1 = world.getBlock(xPos + xOffset, yPos + sign * yOffset + 1, zPos + zOffset);
|
||||
|
||||
if(!block1.isReplaceable(world, xPos + xOffset, yPos + sign*yOffset, zPos + zOffset) && this.isBlockReplaceable(block1) && highBlock1.isReplaceable(world, xPos + xOffset, yPos + sign*yOffset + 1, zPos + zOffset))
|
||||
if (!block1.isReplaceable(world, xPos + xOffset, yPos + sign * yOffset, zPos + zOffset) && this.isBlockReplaceable(block1) && highBlock1.isReplaceable(world, xPos + xOffset, yPos + sign * yOffset + 1, zPos + zOffset))
|
||||
{
|
||||
world.setBlock(xPos + xOffset, yPos + sign*yOffset, zPos + zOffset, roadBlock, meta, 3);
|
||||
yPos += sign*yOffset;
|
||||
world.setBlock(xPos + xOffset, yPos + sign * yOffset, zPos + zOffset, roadBlock, meta, 3);
|
||||
yPos += sign * yOffset;
|
||||
break;
|
||||
}else
|
||||
} else
|
||||
{
|
||||
sign = -1;
|
||||
Block block2 = world.getBlock(xPos + xOffset, yPos + sign*yOffset, zPos + zOffset);
|
||||
Block highBlock2 = world.getBlock(xPos + xOffset, yPos + sign*yOffset + 1, zPos + zOffset);
|
||||
Block block2 = world.getBlock(xPos + xOffset, yPos + sign * yOffset, zPos + zOffset);
|
||||
Block highBlock2 = world.getBlock(xPos + xOffset, yPos + sign * yOffset + 1, zPos + zOffset);
|
||||
|
||||
if(!block2.isReplaceable(world, xPos + xOffset, yPos + sign*yOffset, zPos + zOffset) && this.isBlockReplaceable(block1) && highBlock2.isReplaceable(world, xPos + xOffset, yPos + sign*yOffset + 1, zPos + zOffset))
|
||||
if (!block2.isReplaceable(world, xPos + xOffset, yPos + sign * yOffset, zPos + zOffset) && this.isBlockReplaceable(block1) && highBlock2.isReplaceable(world, xPos + xOffset, yPos + sign * yOffset + 1, zPos + zOffset))
|
||||
{
|
||||
world.setBlock(xPos + xOffset, yPos + sign*yOffset, zPos + zOffset, roadBlock, meta, 3);
|
||||
yPos += sign*yOffset;
|
||||
world.setBlock(xPos + xOffset, yPos + sign * yOffset, zPos + zOffset, roadBlock, meta, 3);
|
||||
yPos += sign * yOffset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -85,38 +85,38 @@ public class DemonVillagePath
|
|||
int yPos = yi;
|
||||
int zPos = zi;
|
||||
|
||||
for(int i=0; i<length; i++)
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
int xOffset = i*dir.offsetX;
|
||||
int zOffset = i*dir.offsetZ;
|
||||
int xOffset = i * dir.offsetX;
|
||||
int zOffset = i * dir.offsetZ;
|
||||
|
||||
for(int yOffset=0; yOffset<=clearance; yOffset++)
|
||||
for (int yOffset = 0; yOffset <= clearance; yOffset++)
|
||||
{
|
||||
int sign = 1;
|
||||
|
||||
Block block1 = world.getBlock(xPos + xOffset, yPos + sign*yOffset, zPos + zOffset);
|
||||
Block highBlock1 = world.getBlock(xPos + xOffset, yPos + sign*yOffset + 1, zPos + zOffset);
|
||||
Block block1 = world.getBlock(xPos + xOffset, yPos + sign * yOffset, zPos + zOffset);
|
||||
Block highBlock1 = world.getBlock(xPos + xOffset, yPos + sign * yOffset + 1, zPos + zOffset);
|
||||
|
||||
if(!block1.isReplaceable(world, xPos + xOffset, yPos + sign*yOffset, zPos + zOffset) && this.isBlockReplaceable(block1) && highBlock1.isReplaceable(world, xPos + xOffset, yPos + sign*yOffset + 1, zPos + zOffset))
|
||||
if (!block1.isReplaceable(world, xPos + xOffset, yPos + sign * yOffset, zPos + zOffset) && this.isBlockReplaceable(block1) && highBlock1.isReplaceable(world, xPos + xOffset, yPos + sign * yOffset + 1, zPos + zOffset))
|
||||
{
|
||||
yPos += sign*yOffset;
|
||||
yPos += sign * yOffset;
|
||||
break;
|
||||
}else
|
||||
} else
|
||||
{
|
||||
sign = -1;
|
||||
Block block2 = world.getBlock(xPos + xOffset, yPos + sign*yOffset, zPos + zOffset);
|
||||
Block highBlock2 = world.getBlock(xPos + xOffset, yPos + sign*yOffset + 1, zPos + zOffset);
|
||||
Block block2 = world.getBlock(xPos + xOffset, yPos + sign * yOffset, zPos + zOffset);
|
||||
Block highBlock2 = world.getBlock(xPos + xOffset, yPos + sign * yOffset + 1, zPos + zOffset);
|
||||
|
||||
if(!block2.isReplaceable(world, xPos + xOffset, yPos + sign*yOffset, zPos + zOffset) && this.isBlockReplaceable(block1) && highBlock2.isReplaceable(world, xPos + xOffset, yPos + sign*yOffset + 1, zPos + zOffset))
|
||||
if (!block2.isReplaceable(world, xPos + xOffset, yPos + sign * yOffset, zPos + zOffset) && this.isBlockReplaceable(block1) && highBlock2.isReplaceable(world, xPos + xOffset, yPos + sign * yOffset + 1, zPos + zOffset))
|
||||
{
|
||||
yPos += sign*yOffset;
|
||||
yPos += sign * yOffset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new Int3(xPos,yPos,zPos);
|
||||
return new Int3(xPos, yPos, zPos);
|
||||
}
|
||||
|
||||
public int getRoadRadius()
|
||||
|
@ -126,7 +126,7 @@ public class DemonVillagePath
|
|||
|
||||
public boolean isBlockReplaceable(Block block)
|
||||
{
|
||||
if(block.getMaterial() == Material.leaves || block.getMaterial() == Material.vine)
|
||||
if (block.getMaterial() == Material.leaves || block.getMaterial() == Material.vine)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -22,16 +22,16 @@ public class GridSpaceHolder
|
|||
public void expandAreaInNegX()
|
||||
{
|
||||
GridSpace[][] newGrid = new GridSpace[negXRadius + posXRadius + 2][negZRadius + posZRadius + 1];
|
||||
for(int i=0; i<=negZRadius + posZRadius; i++)
|
||||
for (int i = 0; i <= negZRadius + posZRadius; i++)
|
||||
{
|
||||
newGrid[0][i] = new GridSpace();
|
||||
}
|
||||
|
||||
for(int i=0; i<=negXRadius + posXRadius; i++)
|
||||
for (int i = 0; i <= negXRadius + posXRadius; i++)
|
||||
{
|
||||
for(int j=0; j<=negZRadius + posZRadius; j++)
|
||||
for (int j = 0; j <= negZRadius + posZRadius; j++)
|
||||
{
|
||||
newGrid[i+1][j] = area[i][j];
|
||||
newGrid[i + 1][j] = area[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,14 +43,14 @@ public class GridSpaceHolder
|
|||
{
|
||||
GridSpace[][] newGrid = new GridSpace[negXRadius + posXRadius + 2][negZRadius + posZRadius + 1];
|
||||
|
||||
for(int i=0; i<=negZRadius + posZRadius; i++)
|
||||
for (int i = 0; i <= negZRadius + posZRadius; i++)
|
||||
{
|
||||
newGrid[negXRadius + posXRadius + 1][i] = new GridSpace();
|
||||
}
|
||||
|
||||
for(int i=0; i<=negXRadius + posXRadius; i++)
|
||||
for (int i = 0; i <= negXRadius + posXRadius; i++)
|
||||
{
|
||||
for(int j=0; j<=negZRadius + posZRadius; j++)
|
||||
for (int j = 0; j <= negZRadius + posZRadius; j++)
|
||||
{
|
||||
newGrid[i][j] = area[i][j];
|
||||
}
|
||||
|
@ -66,16 +66,16 @@ public class GridSpaceHolder
|
|||
|
||||
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();
|
||||
}
|
||||
|
||||
for(int i=0; i<=negXRadius + posXRadius; i++)
|
||||
for (int i = 0; i <= negXRadius + posXRadius; i++)
|
||||
{
|
||||
for(int j=0; j<=negZRadius + posZRadius; j++)
|
||||
for (int j = 0; j <= negZRadius + posZRadius; j++)
|
||||
{
|
||||
newGrid[i][j+1] = area[i][j];
|
||||
newGrid[i][j + 1] = area[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,14 +87,14 @@ public class GridSpaceHolder
|
|||
{
|
||||
GridSpace[][] newGrid = new GridSpace[negXRadius + posXRadius + 1][negZRadius + posZRadius + 2];
|
||||
|
||||
for(int i=0; i<=negXRadius + posXRadius; i++)
|
||||
for (int i = 0; i <= negXRadius + posXRadius; i++)
|
||||
{
|
||||
newGrid[i][negZRadius + posZRadius + 1] = new GridSpace();
|
||||
}
|
||||
|
||||
for(int i=0; i<=negXRadius + posXRadius; i++)
|
||||
for (int i = 0; i <= negXRadius + posXRadius; i++)
|
||||
{
|
||||
for(int j=0; j<=negZRadius + posZRadius; j++)
|
||||
for (int j = 0; j <= negZRadius + posZRadius; j++)
|
||||
{
|
||||
newGrid[i][j] = area[i][j];
|
||||
}
|
||||
|
@ -106,10 +106,10 @@ public class GridSpaceHolder
|
|||
|
||||
public GridSpace getGridSpace(int x, int z)
|
||||
{
|
||||
if(x > posXRadius|| x < -negXRadius || z > posZRadius || z < -negZRadius)
|
||||
if (x > posXRadius || x < -negXRadius || z > posZRadius || z < -negZRadius)
|
||||
{
|
||||
return new GridSpace();
|
||||
}else
|
||||
} else
|
||||
{
|
||||
return (area[x + negXRadius][z + negZRadius]);
|
||||
}
|
||||
|
@ -117,27 +117,27 @@ public class GridSpaceHolder
|
|||
|
||||
public void setGridSpace(int x, int z, GridSpace space)
|
||||
{
|
||||
if(x > posXRadius)
|
||||
if (x > posXRadius)
|
||||
{
|
||||
this.expandAreaInPosX();
|
||||
this.setGridSpace(x, z, space);
|
||||
return;
|
||||
}else if(x < -negXRadius)
|
||||
} else if (x < -negXRadius)
|
||||
{
|
||||
this.expandAreaInNegX();
|
||||
this.setGridSpace(x, z, space);
|
||||
return;
|
||||
}else if(z > posZRadius)
|
||||
} else if (z > posZRadius)
|
||||
{
|
||||
this.expandAreaInPosZ();
|
||||
this.setGridSpace(x, z, space);
|
||||
return;
|
||||
}else if(z < -negZRadius)
|
||||
} else if (z < -negZRadius)
|
||||
{
|
||||
this.expandAreaInNegZ();
|
||||
this.setGridSpace(x, z, space);
|
||||
return;
|
||||
}else
|
||||
} else
|
||||
{
|
||||
area[x + negXRadius][z + negZRadius] = space;
|
||||
}
|
||||
|
@ -145,15 +145,15 @@ public class GridSpaceHolder
|
|||
|
||||
public boolean doesContainAll(GridSpaceHolder master, int xInit, int zInit, ForgeDirection dir)
|
||||
{
|
||||
if(master != null)
|
||||
if (master != null)
|
||||
{
|
||||
System.out.println("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++)
|
||||
{
|
||||
GridSpace thisSpace = this.getGridSpace(i, j);
|
||||
if(thisSpace.isEmpty())
|
||||
if (thisSpace.isEmpty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ public class GridSpaceHolder
|
|||
int xOff = 0;
|
||||
int zOff = 0;
|
||||
|
||||
switch(dir)
|
||||
switch (dir)
|
||||
{
|
||||
case SOUTH:
|
||||
xOff = -i;
|
||||
|
@ -182,7 +182,7 @@ public class GridSpaceHolder
|
|||
zOff = j;
|
||||
break;
|
||||
}
|
||||
if(!master.getGridSpace(xInit + xOff, zInit + zOff).isEmpty())
|
||||
if (!master.getGridSpace(xInit + xOff, zInit + zOff).isEmpty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -196,14 +196,14 @@ public class GridSpaceHolder
|
|||
public void setAllGridSpaces(int xInit, int zInit, int yLevel, ForgeDirection dir, int type, GridSpaceHolder master)
|
||||
{
|
||||
System.out.println("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++)
|
||||
{
|
||||
for(int j=-negZRadius; j<=posZRadius; j++)
|
||||
for (int j = -negZRadius; j <= posZRadius; j++)
|
||||
{
|
||||
GridSpace thisSpace = this.getGridSpace(i, j);
|
||||
if(thisSpace.isEmpty())
|
||||
if (thisSpace.isEmpty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ public class GridSpaceHolder
|
|||
int xOff = 0;
|
||||
int zOff = 0;
|
||||
|
||||
switch(dir)
|
||||
switch (dir)
|
||||
{
|
||||
case SOUTH:
|
||||
xOff = -i;
|
||||
|
@ -241,12 +241,12 @@ public class GridSpaceHolder
|
|||
|
||||
public void destroyAllInGridSpaces(World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir)
|
||||
{
|
||||
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++)
|
||||
{
|
||||
GridSpace thisSpace = this.getGridSpace(i, j);
|
||||
if(thisSpace.isEmpty())
|
||||
if (thisSpace.isEmpty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ public class GridSpaceHolder
|
|||
int xOff = 0;
|
||||
int zOff = 0;
|
||||
|
||||
switch(dir)
|
||||
switch (dir)
|
||||
{
|
||||
case SOUTH:
|
||||
xOff = -i;
|
||||
|
@ -274,16 +274,16 @@ public class GridSpaceHolder
|
|||
break;
|
||||
}
|
||||
|
||||
for(int l = -2; l<=2; l++)
|
||||
for (int l = -2; l <= 2; l++)
|
||||
{
|
||||
for(int m = -2; m<=2; m++)
|
||||
for (int m = -2; m <= 2; m++)
|
||||
{
|
||||
Block block = world.getBlock(xCoord + xOff*5 + l, yCoord, zCoord + zOff*5 + m);
|
||||
if(block == ModBlocks.blockDemonPortal)
|
||||
Block block = world.getBlock(xCoord + xOff * 5 + l, yCoord, zCoord + zOff * 5 + m);
|
||||
if (block == ModBlocks.blockDemonPortal)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
world.setBlockToAir(xCoord + xOff*5 + l, yCoord, zCoord + zOff*5 + m);
|
||||
world.setBlockToAir(xCoord + xOff * 5 + l, yCoord, zCoord + zOff * 5 + m);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -293,11 +293,11 @@ public class GridSpaceHolder
|
|||
public int getNumberOfGridSpaces()
|
||||
{
|
||||
int num = 0;
|
||||
for(int i=-this.negXRadius; i<=this.posXRadius; i++)
|
||||
for (int i = -this.negXRadius; i <= this.posXRadius; i++)
|
||||
{
|
||||
for(int j=-this.negZRadius; j<=this.posZRadius; j++)
|
||||
for (int j = -this.negZRadius; j <= this.posZRadius; j++)
|
||||
{
|
||||
if(!this.getGridSpace(i, j).isEmpty())
|
||||
if (!this.getGridSpace(i, j).isEmpty())
|
||||
{
|
||||
num++;
|
||||
}
|
||||
|
|
|
@ -1,18 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
|
@ -20,17 +15,12 @@ import net.minecraft.entity.passive.EntityHorse;
|
|||
import net.minecraft.entity.passive.EntityWolf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.pathfinding.PathEntity;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class EntityBileDemon extends EntityDemon
|
||||
{
|
||||
|
@ -46,22 +36,17 @@ public class EntityBileDemon extends EntityDemon
|
|||
this.setSize(1.3F, 2.0F);
|
||||
this.getNavigator().setAvoidsWater(true);
|
||||
this.tasks.addTask(1, new EntityAISwimming(this));
|
||||
//this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
|
||||
this.tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0D, true));
|
||||
this.tasks.addTask(3, this.aiSit);
|
||||
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
//this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
|
||||
this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
|
||||
//this.tasks.addTask(8, new EntityAIBeg(this, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAILookIdle(this));
|
||||
this.tasks.addTask(4, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
|
||||
this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(7, new EntityAILookIdle(this));
|
||||
this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
|
||||
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
|
||||
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
|
||||
//this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false));
|
||||
this.setTamed(false);
|
||||
attackTimer = 0;
|
||||
//this.isImmuneToFire = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -318,7 +303,7 @@ public class EntityBileDemon extends EntityDemon
|
|||
}
|
||||
}
|
||||
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer)this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
|
@ -375,7 +360,6 @@ public class EntityBileDemon extends EntityDemon
|
|||
public boolean isBreedingItem(ItemStack par1ItemStack)
|
||||
{
|
||||
return false;
|
||||
//return par1ItemStack == null ? false : (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood) ? false : ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -455,7 +439,6 @@ public class EntityBileDemon extends EntityDemon
|
|||
*/
|
||||
protected boolean canDespawn()
|
||||
{
|
||||
//return !this.isTamed() && this.ticksExisted > 2400;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import WayofTime.alchemicalWizardry.ModItems;
|
|||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.block.BlockColored;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -18,7 +17,6 @@ import net.minecraft.entity.passive.EntityHorse;
|
|||
import net.minecraft.entity.passive.EntityWolf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -28,7 +26,6 @@ import net.minecraft.world.World;
|
|||
|
||||
public class EntityBoulderFist extends EntityDemon
|
||||
{
|
||||
//private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 40, 40, 15.0F);
|
||||
private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false);
|
||||
|
||||
private static float maxTamedHealth = 60.0F;
|
||||
|
@ -44,25 +41,20 @@ public class EntityBoulderFist extends EntityDemon
|
|||
this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
|
||||
this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true));
|
||||
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
//this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
|
||||
this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
|
||||
//this.tasks.addTask(8, new EntityAIBeg(this, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAILookIdle(this));
|
||||
this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
|
||||
this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(8, new EntityAILookIdle(this));
|
||||
this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
|
||||
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
|
||||
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
|
||||
this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false));
|
||||
this.setAggro(false);
|
||||
//this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false));
|
||||
this.setTamed(false);
|
||||
|
||||
if (par1World != null && !par1World.isRemote)
|
||||
{
|
||||
this.setCombatTask();
|
||||
}
|
||||
|
||||
//this.isImmuneToFire = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -80,8 +72,6 @@ public class EntityBoulderFist extends EntityDemon
|
|||
{
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.maxUntamedHealth);
|
||||
}
|
||||
|
||||
//this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -121,7 +111,6 @@ public class EntityBoulderFist extends EntityDemon
|
|||
super.entityInit();
|
||||
this.dataWatcher.addObject(18, new Float(this.getHealth()));
|
||||
this.dataWatcher.addObject(19, new Byte((byte) 0));
|
||||
//this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -300,7 +289,7 @@ public class EntityBoulderFist extends EntityDemon
|
|||
}
|
||||
}
|
||||
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer)this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
|
@ -358,7 +347,6 @@ public class EntityBoulderFist extends EntityDemon
|
|||
public boolean isBreedingItem(ItemStack par1ItemStack)
|
||||
{
|
||||
return false;
|
||||
//return par1ItemStack == null ? false : (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood) ? false : ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -438,7 +426,6 @@ public class EntityBoulderFist extends EntityDemon
|
|||
*/
|
||||
protected boolean canDespawn()
|
||||
{
|
||||
//return !this.isTamed() && this.ticksExisted > 2400;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.IDemon;
|
||||
import WayofTime.alchemicalWizardry.common.items.DemonPlacer;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.passive.EntityTameable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.IDemon;
|
||||
import WayofTime.alchemicalWizardry.common.items.DemonPlacer;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class EntityDemon extends EntityTameable implements IDemon
|
||||
{
|
||||
|
@ -51,9 +51,9 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
{
|
||||
ItemStack drop = new ItemStack(ModItems.demonPlacer, 1, this.getDemonID());
|
||||
|
||||
if((this.getOwner() instanceof EntityPlayer))
|
||||
if ((this.getOwner() instanceof EntityPlayer))
|
||||
{
|
||||
DemonPlacer.setOwnerName(drop, SpellHelper.getUsername((EntityPlayer)this.getOwner()));
|
||||
DemonPlacer.setOwnerName(drop, SpellHelper.getUsername((EntityPlayer) this.getOwner()));
|
||||
}
|
||||
|
||||
if (this.hasCustomNameTag())
|
||||
|
|
|
@ -5,9 +5,7 @@ import WayofTime.alchemicalWizardry.ModItems;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockColored;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
|
@ -15,7 +13,6 @@ import net.minecraft.entity.monster.EntityCreeper;
|
|||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.entity.passive.EntityWolf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -30,7 +27,6 @@ import java.util.List;
|
|||
|
||||
public class EntityElemental extends EntityDemon
|
||||
{
|
||||
//private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 40, 40, 15.0F);
|
||||
private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false);
|
||||
|
||||
private static float maxTamedHealth = 100.0F;
|
||||
|
@ -41,15 +37,12 @@ public class EntityElemental extends EntityDemon
|
|||
super(par1World, demonID);
|
||||
this.setSize(0.5F, 1.0F);
|
||||
this.setAggro(false);
|
||||
//this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false));
|
||||
this.setTamed(false);
|
||||
|
||||
if (par1World != null && !par1World.isRemote)
|
||||
{
|
||||
this.setCombatTask();
|
||||
}
|
||||
|
||||
//this.isImmuneToFire = true;
|
||||
}
|
||||
|
||||
public int courseChangeCooldown;
|
||||
|
@ -68,11 +61,6 @@ public class EntityElemental extends EntityDemon
|
|||
/**
|
||||
* The explosion radius of spawned fireballs.
|
||||
*/
|
||||
//private int explosionStrength = 1;
|
||||
//
|
||||
// private int heightOffsetUpdateTime;
|
||||
// private float heightOffset = 0.5F;
|
||||
// private int field_70846_g;
|
||||
protected void dropFewItems(boolean par1, int par2)
|
||||
{
|
||||
if (worldObj.rand.nextFloat() < (1 - Math.pow(0.6f, par2 + 1)))
|
||||
|
@ -174,12 +162,6 @@ public class EntityElemental extends EntityDemon
|
|||
|
||||
protected void updateEntityActionState()
|
||||
{
|
||||
// if (!this.worldObj.isRemote && this.worldObj.difficultySetting == 0)
|
||||
// {
|
||||
// this.setDead();
|
||||
// }
|
||||
|
||||
//this.despawnEntity();
|
||||
if (this.getHealth() <= this.getMaxHealth() / 2.0f && worldObj.rand.nextInt(200) == 0)
|
||||
{
|
||||
this.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionReciprocation.id, 100, 1));
|
||||
|
@ -265,10 +247,6 @@ public class EntityElemental extends EntityDemon
|
|||
{
|
||||
if (Math.sqrt(d5 * d5 + d6 * d6 + d7 * d7) < 4)
|
||||
{
|
||||
// if (this.attackCounter == 10)
|
||||
// {
|
||||
// this.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1007, (int)this.posX, (int)this.posY, (int)this.posZ, 0);
|
||||
// }
|
||||
++this.attackCounter;
|
||||
|
||||
if (this.attackCounter >= 10)
|
||||
|
@ -369,8 +347,6 @@ public class EntityElemental extends EntityDemon
|
|||
{
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.maxUntamedHealth);
|
||||
}
|
||||
|
||||
//this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -410,7 +386,6 @@ public class EntityElemental extends EntityDemon
|
|||
super.entityInit();
|
||||
this.dataWatcher.addObject(18, new Float(this.getHealth()));
|
||||
this.dataWatcher.addObject(19, new Byte((byte) 0));
|
||||
//this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1)));
|
||||
this.dataWatcher.addObject(25, Byte.valueOf((byte) 0));
|
||||
}
|
||||
|
||||
|
@ -546,7 +521,6 @@ public class EntityElemental extends EntityDemon
|
|||
public boolean isBreedingItem(ItemStack par1ItemStack)
|
||||
{
|
||||
return false;
|
||||
//return par1ItemStack == null ? false : (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood) ? false : ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -602,7 +576,6 @@ public class EntityElemental extends EntityDemon
|
|||
*/
|
||||
protected boolean canDespawn()
|
||||
{
|
||||
//return !this.isTamed() && this.ticksExisted > 2400;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -622,7 +595,6 @@ public class EntityElemental extends EntityDemon
|
|||
}
|
||||
|
||||
return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame();
|
||||
//return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer)par2EntityLivingBase).func_96122_a((EntityPlayer)par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse)par1EntityLivingBase).func_110248_bS();
|
||||
} else
|
||||
{
|
||||
return false;
|
||||
|
@ -636,7 +608,6 @@ public class EntityElemental extends EntityDemon
|
|||
public void setCombatTask()
|
||||
{
|
||||
this.tasks.removeTask(this.aiAttackOnCollide);
|
||||
//this.tasks.removeTask(this.aiArrowAttack);
|
||||
ItemStack itemstack = this.getHeldItem();
|
||||
this.tasks.addTask(4, this.aiAttackOnCollide);
|
||||
}
|
||||
|
@ -708,7 +679,7 @@ public class EntityElemental extends EntityDemon
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getTotalArmorValue() //TODO
|
||||
public int getTotalArmorValue()
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
|
|
@ -1,21 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import net.minecraft.block.BlockColored;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IRangedAttackMob;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIArrowAttack;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
|
@ -29,11 +20,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.pathfinding.PathEntity;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob
|
||||
{
|
||||
|
@ -50,20 +36,15 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob
|
|||
this.getNavigator().setAvoidsWater(true);
|
||||
this.tasks.addTask(1, new EntityAISwimming(this));
|
||||
this.tasks.addTask(2, this.aiSit);
|
||||
//this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
|
||||
//this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true));
|
||||
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
//this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
|
||||
this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
|
||||
//this.tasks.addTask(8, new EntityAIBeg(this, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAILookIdle(this));
|
||||
this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
this.tasks.addTask(4, new EntityAIWander(this, 1.0D));
|
||||
this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(6, new EntityAILookIdle(this));
|
||||
this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
|
||||
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
|
||||
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
|
||||
this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false));
|
||||
this.setAggro(false);
|
||||
//this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false));
|
||||
this.setTamed(false);
|
||||
|
||||
if (par1World != null && !par1World.isRemote)
|
||||
|
@ -89,8 +70,6 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob
|
|||
{
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.maxUntamedHealth);
|
||||
}
|
||||
|
||||
//this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -130,7 +109,6 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob
|
|||
super.entityInit();
|
||||
this.dataWatcher.addObject(18, new Float(this.getHealth()));
|
||||
this.dataWatcher.addObject(19, new Byte((byte) 0));
|
||||
//this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -309,7 +287,7 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob
|
|||
}
|
||||
}
|
||||
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer)this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
|
|
|
@ -1,21 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import net.minecraft.block.BlockColored;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IRangedAttackMob;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIArrowAttack;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
|
@ -30,11 +21,6 @@ import net.minecraft.pathfinding.PathEntity;
|
|||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
||||
{
|
||||
|
@ -48,31 +34,23 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
|||
{
|
||||
super(par1World, AlchemicalWizardry.entityIceDemonID);
|
||||
this.setSize(0.5F, 2.0F);
|
||||
//this.getNavigator().setAvoidsWater(true);
|
||||
this.tasks.addTask(1, new EntityAISwimming(this));
|
||||
this.tasks.addTask(2, this.aiSit);
|
||||
//this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
|
||||
//this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true));
|
||||
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
//this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
|
||||
this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
|
||||
//this.tasks.addTask(8, new EntityAIBeg(this, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAILookIdle(this));
|
||||
this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
this.tasks.addTask(4, new EntityAIWander(this, 1.0D));
|
||||
this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(6, new EntityAILookIdle(this));
|
||||
this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
|
||||
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
|
||||
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
|
||||
this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false));
|
||||
this.setAggro(false);
|
||||
//this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false));
|
||||
this.setTamed(false);
|
||||
|
||||
if (par1World != null && !par1World.isRemote)
|
||||
{
|
||||
this.setCombatTask();
|
||||
}
|
||||
|
||||
//this.isImmuneToFire = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -90,8 +68,6 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
|||
{
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.maxUntamedHealth);
|
||||
}
|
||||
|
||||
//this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -131,7 +107,6 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
|||
super.entityInit();
|
||||
this.dataWatcher.addObject(18, new Float(this.getHealth()));
|
||||
this.dataWatcher.addObject(19, new Byte((byte) 0));
|
||||
//this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -213,9 +188,9 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
|||
|
||||
Vec3 blockVector = SpellHelper.getEntityBlockVector(this);
|
||||
|
||||
int xCoord = (int)(blockVector.xCoord);
|
||||
int yCoord = (int)(blockVector.yCoord);
|
||||
int zCoord = (int)(blockVector.zCoord);
|
||||
int xCoord = (int) (blockVector.xCoord);
|
||||
int yCoord = (int) (blockVector.yCoord);
|
||||
int zCoord = (int) (blockVector.zCoord);
|
||||
|
||||
for (int i = -range; i <= range; i++)
|
||||
{
|
||||
|
@ -330,7 +305,7 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
|||
}
|
||||
}
|
||||
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer)this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
|
@ -388,7 +363,6 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
|||
public boolean isBreedingItem(ItemStack par1ItemStack)
|
||||
{
|
||||
return false;
|
||||
//return par1ItemStack == null ? false : (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood) ? false : ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -468,7 +442,6 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
|||
*/
|
||||
protected boolean canDespawn()
|
||||
{
|
||||
//return !this.isTamed() && this.ticksExisted > 2400;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
|||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.block.BlockColored;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -17,7 +16,6 @@ import net.minecraft.entity.passive.EntityHorse;
|
|||
import net.minecraft.entity.passive.EntityWolf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -40,15 +38,12 @@ public class EntityLowerGuardian extends EntityDemon
|
|||
this.setSize(0.7F, 1.8F);
|
||||
this.getNavigator().setAvoidsWater(true);
|
||||
this.tasks.addTask(1, new EntityAISwimming(this));
|
||||
//this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
|
||||
this.tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0D, true));
|
||||
this.tasks.addTask(3, this.aiSit);
|
||||
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
//this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
|
||||
this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
|
||||
//this.tasks.addTask(8, new EntityAIBeg(this, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAILookIdle(this));
|
||||
this.tasks.addTask(4, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
|
||||
this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(7, new EntityAILookIdle(this));
|
||||
this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
|
||||
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
|
||||
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
|
||||
|
@ -56,8 +51,6 @@ public class EntityLowerGuardian extends EntityDemon
|
|||
this.setAggro(false);
|
||||
this.setTamed(false);
|
||||
attackTimer = 0;
|
||||
//isAggro = false;
|
||||
//this.isImmuneToFire = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -75,8 +68,6 @@ public class EntityLowerGuardian extends EntityDemon
|
|||
{
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.maxUntamedHealth);
|
||||
}
|
||||
|
||||
//this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -116,7 +107,6 @@ public class EntityLowerGuardian extends EntityDemon
|
|||
super.entityInit();
|
||||
this.dataWatcher.addObject(18, new Float(this.getHealth()));
|
||||
this.dataWatcher.addObject(19, new Byte((byte) 0));
|
||||
//this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -316,7 +306,7 @@ public class EntityLowerGuardian extends EntityDemon
|
|||
}
|
||||
}
|
||||
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer)this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
|
@ -374,7 +364,6 @@ public class EntityLowerGuardian extends EntityDemon
|
|||
public boolean isBreedingItem(ItemStack par1ItemStack)
|
||||
{
|
||||
return false;
|
||||
//return par1ItemStack == null ? false : (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood) ? false : ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -454,7 +443,6 @@ public class EntityLowerGuardian extends EntityDemon
|
|||
*/
|
||||
protected boolean canDespawn()
|
||||
{
|
||||
//return !this.isTamed() && this.ticksExisted > 2400;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import WayofTime.alchemicalWizardry.ModItems;
|
|||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.block.BlockColored;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -18,7 +17,6 @@ import net.minecraft.entity.passive.EntityHorse;
|
|||
import net.minecraft.entity.passive.EntityWolf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -28,7 +26,6 @@ import net.minecraft.world.World;
|
|||
|
||||
public class EntityShade extends EntityDemon
|
||||
{
|
||||
//private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 40, 40, 15.0F);
|
||||
private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false);
|
||||
|
||||
private static float maxTamedHealth = 50.0F;
|
||||
|
@ -41,28 +38,22 @@ public class EntityShade extends EntityDemon
|
|||
this.getNavigator().setAvoidsWater(true);
|
||||
this.tasks.addTask(1, new EntityAISwimming(this));
|
||||
this.tasks.addTask(2, this.aiSit);
|
||||
//this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
|
||||
this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true));
|
||||
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
//this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
|
||||
this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
|
||||
//this.tasks.addTask(8, new EntityAIBeg(this, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAILookIdle(this));
|
||||
this.tasks.addTask(3, new EntityAIAttackOnCollide(this, 1.0D, true));
|
||||
this.tasks.addTask(4, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
|
||||
this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(7, new EntityAILookIdle(this));
|
||||
this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
|
||||
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
|
||||
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
|
||||
this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false));
|
||||
this.setAggro(false);
|
||||
//this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false));
|
||||
this.setTamed(false);
|
||||
|
||||
if (par1World != null && !par1World.isRemote)
|
||||
{
|
||||
this.setCombatTask();
|
||||
}
|
||||
|
||||
//this.isImmuneToFire = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -80,8 +71,6 @@ public class EntityShade extends EntityDemon
|
|||
{
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.maxUntamedHealth);
|
||||
}
|
||||
|
||||
//this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -121,7 +110,6 @@ public class EntityShade extends EntityDemon
|
|||
super.entityInit();
|
||||
this.dataWatcher.addObject(18, new Float(this.getHealth()));
|
||||
this.dataWatcher.addObject(19, new Byte((byte) 0));
|
||||
//this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -300,7 +288,7 @@ public class EntityShade extends EntityDemon
|
|||
}
|
||||
}
|
||||
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer)this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
|
@ -358,7 +346,6 @@ public class EntityShade extends EntityDemon
|
|||
public boolean isBreedingItem(ItemStack par1ItemStack)
|
||||
{
|
||||
return false;
|
||||
//return par1ItemStack == null ? false : (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood) ? false : ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -438,7 +425,6 @@ public class EntityShade extends EntityDemon
|
|||
*/
|
||||
protected boolean canDespawn()
|
||||
{
|
||||
//return !this.isTamed() && this.ticksExisted > 2400;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,20 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IRangedAttackMob;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIArrowAttack;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
|
@ -28,11 +20,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.pathfinding.PathEntity;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackMob
|
||||
{
|
||||
|
@ -49,28 +36,21 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM
|
|||
this.getNavigator().setAvoidsWater(true);
|
||||
this.tasks.addTask(1, new EntityAISwimming(this));
|
||||
this.tasks.addTask(2, this.aiSit);
|
||||
//this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
|
||||
//this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true));
|
||||
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
//this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
|
||||
this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
|
||||
//this.tasks.addTask(8, new EntityAIBeg(this, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAILookIdle(this));
|
||||
this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
this.tasks.addTask(4, new EntityAIWander(this, 1.0D));
|
||||
this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(5, new EntityAILookIdle(this));
|
||||
this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
|
||||
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
|
||||
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
|
||||
this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false));
|
||||
this.setAggro(false);
|
||||
//this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false));
|
||||
this.setTamed(false);
|
||||
|
||||
if (par1World != null && !par1World.isRemote)
|
||||
{
|
||||
this.setCombatTask();
|
||||
}
|
||||
|
||||
//this.isImmuneToFire = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -88,8 +68,6 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM
|
|||
{
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.maxUntamedHealth);
|
||||
}
|
||||
|
||||
//this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -129,7 +107,6 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM
|
|||
super.entityInit();
|
||||
this.dataWatcher.addObject(18, new Float(this.getHealth()));
|
||||
this.dataWatcher.addObject(19, new Byte((byte) 0));
|
||||
//this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -307,7 +284,7 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM
|
|||
}
|
||||
}
|
||||
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer)this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
|
@ -365,7 +342,6 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM
|
|||
public boolean isBreedingItem(ItemStack par1ItemStack)
|
||||
{
|
||||
return false;
|
||||
//return par1ItemStack == null ? false : (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood) ? false : ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -445,7 +421,6 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM
|
|||
*/
|
||||
protected boolean canDespawn()
|
||||
{
|
||||
//return !this.isTamed() && this.ticksExisted > 2400;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,21 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import net.minecraft.block.BlockColored;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IRangedAttackMob;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIArrowAttack;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
|
@ -23,18 +14,12 @@ import net.minecraft.entity.passive.EntityHorse;
|
|||
import net.minecraft.entity.passive.EntityWolf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.pathfinding.PathEntity;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackMob
|
||||
{
|
||||
|
@ -51,20 +36,15 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM
|
|||
this.getNavigator().setAvoidsWater(true);
|
||||
this.tasks.addTask(1, new EntityAISwimming(this));
|
||||
this.tasks.addTask(2, this.aiSit);
|
||||
//this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
|
||||
//this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true));
|
||||
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
//this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
|
||||
this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
|
||||
//this.tasks.addTask(8, new EntityAIBeg(this, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAILookIdle(this));
|
||||
this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
this.tasks.addTask(4, new EntityAIWander(this, 1.0D));
|
||||
this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(6, new EntityAILookIdle(this));
|
||||
this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
|
||||
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
|
||||
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
|
||||
this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false));
|
||||
this.setAggro(false);
|
||||
//this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false));
|
||||
this.setTamed(false);
|
||||
|
||||
if (par1World != null && !par1World.isRemote)
|
||||
|
@ -131,7 +111,6 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM
|
|||
super.entityInit();
|
||||
this.dataWatcher.addObject(18, new Float(this.getHealth()));
|
||||
this.dataWatcher.addObject(19, new Byte((byte) 0));
|
||||
//this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -309,7 +288,7 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM
|
|||
}
|
||||
}
|
||||
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer)this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
|
@ -367,7 +346,6 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM
|
|||
public boolean isBreedingItem(ItemStack par1ItemStack)
|
||||
{
|
||||
return false;
|
||||
//return par1ItemStack == null ? false : (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood) ? false : ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -447,7 +425,6 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM
|
|||
*/
|
||||
protected boolean canDespawn()
|
||||
{
|
||||
//return !this.isTamed() && this.ticksExisted > 2400;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.projectile;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.registry.IThrowableEntity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -11,15 +11,11 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.registry.IThrowableEntity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
//Shamelessly ripped off from x3n0ph0b3
|
||||
public class EnergyBlastProjectile extends Entity implements IProjectile, IThrowableEntity
|
||||
|
@ -252,8 +248,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
|
|||
|
||||
if (var18.equals(Block.getBlockById(inTile)) && var19 == inData)
|
||||
{
|
||||
// this.groundImpact();
|
||||
// this.setDead();
|
||||
}
|
||||
} else
|
||||
{
|
||||
|
@ -261,7 +255,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
|
|||
|
||||
if (ticksInAir > 1 && ticksInAir < 3)
|
||||
{
|
||||
//worldObj.spawnParticle("flame", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0D, 0D, 0D);
|
||||
for (int particles = 0; particles < 3; particles++)
|
||||
{
|
||||
this.doFiringParticles();
|
||||
|
@ -328,7 +321,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
|
|||
posZ += motionZ;
|
||||
MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ);
|
||||
this.setPosition(posX, posY, posZ);
|
||||
//this.doBlockCollisions();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -457,12 +449,10 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
|
|||
this.setDead();
|
||||
} else
|
||||
{
|
||||
//doDamage(8 + d6(), mop);
|
||||
if (mop instanceof EntityLivingBase)
|
||||
{
|
||||
((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60, 2));
|
||||
}
|
||||
|
||||
doDamage(projectileDamage, mop);
|
||||
worldObj.createExplosion(shootingEntity, this.posX, this.posY, this.posZ, (float) (0.1), true);
|
||||
}
|
||||
|
@ -519,8 +509,8 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
|
|||
@Override
|
||||
public void setThrower(Entity entity)
|
||||
{
|
||||
if(entity instanceof EntityLivingBase)
|
||||
this.shootingEntity = (EntityLivingBase)entity;
|
||||
if (entity instanceof EntityLivingBase)
|
||||
this.shootingEntity = (EntityLivingBase) entity;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.projectile;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
|
||||
|
||||
public class EntityBloodLightProjectile extends EnergyBlastProjectile
|
||||
|
@ -90,8 +89,6 @@ public class EntityBloodLightProjectile extends EnergyBlastProjectile
|
|||
{
|
||||
this.worldObj.setBlock(blockX + 1, blockY, blockZ, ModBlocks.blockBloodLight);
|
||||
}
|
||||
|
||||
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
|
||||
}
|
||||
|
||||
this.setDead();
|
||||
|
@ -106,18 +103,11 @@ public class EntityBloodLightProjectile extends EnergyBlastProjectile
|
|||
this.setDead();
|
||||
} else
|
||||
{
|
||||
//doDamage(8 + d6(), mop);
|
||||
if (mop instanceof EntityLivingBase)
|
||||
{
|
||||
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
|
||||
|
||||
((EntityLivingBase) mop).setRevengeTarget(shootingEntity);
|
||||
|
||||
doDamage(1, mop);
|
||||
|
||||
}
|
||||
|
||||
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
|
||||
}
|
||||
|
||||
if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ))
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue