summaryrefslogtreecommitdiff
path: root/src/main/java/gmail/Lance5057/events/TDEventHandler.java
diff options
context:
space:
mode:
authorLance5057 <Lance5057@gmail.com>2015-10-05 00:02:32 -0500
committerLance5057 <Lance5057@gmail.com>2015-10-15 04:54:18 -0500
commitd67ec64707414df6f78f45ec1710b4ec3fc1ef66 (patch)
tree6a926cb12990aa88cb62e8ec099045f5b54fd8b1 /src/main/java/gmail/Lance5057/events/TDEventHandler.java
parentadefc630eb6876c19660c4f51876cc9bf00d78f0 (diff)
Refactor and Compartmentalize all the codes!
Diffstat (limited to 'src/main/java/gmail/Lance5057/events/TDEventHandler.java')
-rw-r--r--src/main/java/gmail/Lance5057/events/TDEventHandler.java84
1 files changed, 0 insertions, 84 deletions
diff --git a/src/main/java/gmail/Lance5057/events/TDEventHandler.java b/src/main/java/gmail/Lance5057/events/TDEventHandler.java
deleted file mode 100644
index bd46ed9..0000000
--- a/src/main/java/gmail/Lance5057/events/TDEventHandler.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package gmail.Lance5057.events;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.projectile.EntityFireball;
-import net.minecraft.entity.projectile.EntityLargeFireball;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.potion.Potion;
-import net.minecraft.potion.PotionEffect;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.Vec3;
-import net.minecraftforge.common.MinecraftForge;
-import mods.battlegear2.api.PlayerEventChild.ShieldBlockEvent;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-
-public class TDEventHandler {
-
- public TDEventHandler() {
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- @SubscribeEvent
- public void TD_ShieldBlock(ShieldBlockEvent event)
- {
- NBTTagCompound tags = event.shield.getTagCompound().getCompoundTag("InfiTool");
-
- if (!tags.getBoolean("Broken"))
- {
- event.getPlayer().addChatComponentMessage(new ChatComponentText("Pow!"));
-
- if(tags.hasKey("Crest of Mirrors"))
- {
- Entity test = event.source.getSourceOfDamage();
-
-
- if(event.source.getSourceOfDamage() instanceof EntityLargeFireball ||
- event.source.getSourceOfDamage() instanceof EntityFireball )
- {
- EntityFireball ent = (EntityFireball) event.source.getSourceOfDamage();
- //EntityFireball newEnt = new EntityFireball();
- Vec3 playerlook = event.getPlayer().getLookVec();
-
- //ent.attackEntityFrom(, 1);
-
-
- //ent.setBeenAttacked();
-
- ent.motionX = playerlook.xCoord;
- ent.motionY = playerlook.yCoord;
- ent.motionZ = playerlook.zCoord;
- ent.accelerationX = ent.motionX * 0.1D;
- ent.accelerationY = ent.motionY * 0.1D;
- ent.accelerationZ = ent.motionZ * 0.1D;
-
- ent.shootingEntity = event.getPlayer();
-
- ent.motionX += ent.accelerationX*2;
- ent.motionY += ent.accelerationY*2;
- ent.motionZ += ent.accelerationZ*2;
-
- //ent.
-
- ent.setDead();
-
- event.getPlayer().addChatComponentMessage(new ChatComponentText("Nom"));
- }
- }
-
- if(tags.hasKey("Crest of Legends"))
- {
- event.getPlayer().addPotionEffect(new PotionEffect(Potion.fireResistance.getId(),4,30));
- event.getPlayer().addPotionEffect(new PotionEffect(Potion.moveSpeed.getId(),4,30));
- event.getPlayer().addPotionEffect(new PotionEffect(Potion.resistance.getId(),4,30));
- }
-
- if(tags.hasKey("Crest of Vampires"))
- {
- event.getPlayer().heal(event.ammount/tags.getInteger("Crest of Vampires"));
- }
- }
- }
-}