Getting the EntityLiving handler back in place
This commit is contained in:
parent
7683a035e6
commit
12062a21a4
|
@ -1,5 +1,6 @@
|
|||
package ee3.common;
|
||||
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.Init;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
|
@ -13,6 +14,7 @@ import cpw.mods.fml.common.network.NetworkMod;
|
|||
import ee3.common.core.CommonProxy;
|
||||
import ee3.common.core.handlers.AddonHandler;
|
||||
import ee3.common.core.handlers.ConfigurationHandler;
|
||||
import ee3.common.core.handlers.EntityLivingHandler;
|
||||
import ee3.common.lib.Reference;
|
||||
import ee3.common.network.PacketHandler;
|
||||
|
||||
|
@ -50,7 +52,12 @@ public class EquivalentExchange3 {
|
|||
}
|
||||
|
||||
@Init
|
||||
public void load(FMLInitializationEvent event) { }
|
||||
public void load(FMLInitializationEvent event) {
|
||||
|
||||
// Register the EntityLiving Handler
|
||||
MinecraftForge.EVENT_BUS.register(new EntityLivingHandler());
|
||||
|
||||
}
|
||||
|
||||
@PostInit
|
||||
public void modsLoaded(FMLPostInitializationEvent event) {
|
||||
|
|
37
ee3_common/ee3/common/core/handlers/EntityLivingHandler.java
Normal file
37
ee3_common/ee3/common/core/handlers/EntityLivingHandler.java
Normal file
|
@ -0,0 +1,37 @@
|
|||
package ee3.common.core.handlers;
|
||||
|
||||
import net.minecraft.src.EntityLiving;
|
||||
import net.minecraft.src.Potion;
|
||||
import net.minecraft.src.PotionEffect;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
||||
|
||||
public class EntityLivingHandler {
|
||||
|
||||
@ForgeSubscribe
|
||||
public void onEntityLivingUpdate(LivingUpdateEvent event) {
|
||||
EntityLiving entity = event.entityLiving;
|
||||
|
||||
/*
|
||||
* Commented out temporarily while we get mod blocks added back in
|
||||
*
|
||||
if (entity.worldObj.getWorldTime() % 4 == 0) {
|
||||
System.out.println(entity.toString());
|
||||
|
||||
if (Helper.handleRedWaterDetection(entity)) {
|
||||
entity.addPotionEffect(new PotionEffect(Potion.weakness.id, Reference.BLOCK_RED_WATER_EFFECT_DURATION_MODIFIER * Reference.BLOCK_RED_WATER_EFFECT_DURATION_BASE * Reference.SECOND_IN_TICKS, 0));
|
||||
entity.addPotionEffect(new PotionEffect(Potion.poison.id, Reference.BLOCK_RED_WATER_EFFECT_DURATION_MODIFIER * Reference.BLOCK_RED_WATER_EFFECT_DURATION_BASE * Reference.SECOND_IN_TICKS, 0));
|
||||
entity.addPotionEffect(new PotionEffect(Potion.blindness.id, Reference.BLOCK_RED_WATER_EFFECT_DURATION_MODIFIER * Reference.BLOCK_RED_WATER_EFFECT_DURATION_BASE * Reference.SECOND_IN_TICKS, 0));
|
||||
entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, Reference.BLOCK_RED_WATER_EFFECT_DURATION_MODIFIER * Reference.BLOCK_RED_WATER_EFFECT_DURATION_BASE * Reference.SECOND_IN_TICKS, 0));
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
public void onEntityLivingDeath(LivingDeathEvent event) {
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue