1.7.10 moving forward to v1.1.0!
This commit is contained in:
parent
1778cfa737
commit
a92efa364d
51 changed files with 849 additions and 175 deletions
|
@ -130,6 +130,7 @@ 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;
|
||||
|
@ -187,6 +188,7 @@ public class AlchemicalWizardry
|
|||
public static boolean isForestryLoaded;
|
||||
|
||||
public static boolean wimpySettings;
|
||||
public static boolean respawnWithLowerHealth;
|
||||
|
||||
public static CreativeTabs tabBloodMagic = new CreativeTabs("tabBloodMagic")
|
||||
{
|
||||
|
@ -335,8 +337,9 @@ public class AlchemicalWizardry
|
|||
RecipeSorter.INSTANCE.register("AWWayofTime:shapedorb", ShapedBloodOrbRecipe.class, Category.SHAPED, "before:minecraft:shapeless");
|
||||
RecipeSorter.INSTANCE.register("AWWayofTime:shapelessorb", ShapelessBloodOrbRecipe.class, Category.SHAPELESS, "after:minecraft:shapeless");
|
||||
|
||||
//FMLCommonHandler.instance().bus().register(new AlchemicalWizardryEventHooks());
|
||||
MinecraftForge.EVENT_BUS.register(new AlchemicalWizardryEventHooks());
|
||||
Object eventHook = new AlchemicalWizardryEventHooks();
|
||||
FMLCommonHandler.instance().bus().register(eventHook);
|
||||
MinecraftForge.EVENT_BUS.register(eventHook);
|
||||
NewPacketHandler.INSTANCE.ordinal();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
|
@ -64,7 +62,8 @@ public class BloodMagicConfiguration
|
|||
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.respawnWithLowerHealth = config.get("WimpySettings", "RespawnWithLowerHealth", true).getBoolean(true);
|
||||
|
||||
} catch (Exception e)
|
||||
{
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ public class HarvestRegistry
|
|||
|
||||
for(IHarvestHandler handler : handlerList)
|
||||
{
|
||||
if(handler.canHandleBlock(block) && handler.harvestAndPlant(world, xCoord, yCoord, zCoord, block, meta))
|
||||
if(handler.harvestAndPlant(world, xCoord, yCoord, zCoord, block, meta))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -6,11 +6,16 @@ import net.minecraftforge.common.IPlantable;
|
|||
|
||||
public interface IHarvestHandler
|
||||
{
|
||||
public boolean canHandleBlock(Block block);
|
||||
|
||||
public int getHarvestMeta(Block block);
|
||||
|
||||
/**
|
||||
* A handler that is used to harvest and replant the block at the specified location
|
||||
*
|
||||
* @param world
|
||||
* @param xCoord
|
||||
* @param yCoord
|
||||
* @param zCoord
|
||||
* @param block block at this given location
|
||||
* @param meta meta at this given location
|
||||
* @return true if successfully harvested, false if not
|
||||
*/
|
||||
public boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta);
|
||||
|
||||
public IPlantable getSeedItem(Block block);
|
||||
}
|
||||
|
|
|
@ -25,10 +25,7 @@ import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjecti
|
|||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.common.ObfuscationReflectionHelper;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.Type;
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent;
|
||||
|
||||
public class AlchemicalWizardryEventHooks
|
||||
{
|
||||
|
@ -36,6 +33,15 @@ public class AlchemicalWizardryEventHooks
|
|||
public static Map<String,Boolean> playerBoostStepHeight = new HashMap();
|
||||
public static List<String> playersWith1Step = new ArrayList();
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerRespawnEvent(PlayerRespawnEvent event)
|
||||
{
|
||||
if(AlchemicalWizardry.respawnWithLowerHealth)
|
||||
{
|
||||
event.player.setHealth(6);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onLivingJumpEvent(LivingJumpEvent event)
|
||||
{
|
||||
|
|
|
@ -14,13 +14,11 @@ import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler;
|
|||
|
||||
public class BloodMagicHarvestHandler implements IHarvestHandler
|
||||
{
|
||||
@Override
|
||||
public boolean canHandleBlock(Block block)
|
||||
{
|
||||
return block == Blocks.wheat || block == Blocks.carrots || block == Blocks.potatoes || block == Blocks.nether_wart;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHarvestMeta(Block block)
|
||||
{
|
||||
if(block == Blocks.wheat)
|
||||
|
@ -105,7 +103,6 @@ public class BloodMagicHarvestHandler implements IHarvestHandler
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPlantable getSeedItem(Block block)
|
||||
{
|
||||
if(block == Blocks.wheat)
|
||||
|
|
|
@ -14,18 +14,11 @@ import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler;
|
|||
|
||||
public class GourdHarvestHandler implements IHarvestHandler
|
||||
{
|
||||
@Override
|
||||
public boolean canHandleBlock(Block block)
|
||||
{
|
||||
return block == Blocks.melon_block || block == Blocks.pumpkin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHarvestMeta(Block block)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta)
|
||||
{
|
||||
|
@ -47,12 +40,6 @@ public class GourdHarvestHandler implements IHarvestHandler
|
|||
world.spawnEntityInWorld(itemEnt);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPlantable getSeedItem(Block block)
|
||||
{
|
||||
return null;
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue