Browse Source

Actually fix #24

master
Robotia 9 years ago
parent
commit
553ab507d6
  1. 8
      patches/net/minecraftforge/event/world/ExplosionEvent.java.patch

8
patches/net/minecraftforge/event/world/ExplosionEvent.java.patch

@ -9,7 +9,7 @@
import cpw.mods.fml.common.eventhandler.Cancelable; import cpw.mods.fml.common.eventhandler.Cancelable;
import cpw.mods.fml.common.eventhandler.Event; import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
@@ -39,10 +39,36 @@ @@ -39,10 +39,32 @@
@Cancelable @Cancelable
public static class Start extends ExplosionEvent public static class Start extends ExplosionEvent
{ {
@ -27,10 +27,6 @@
+ public boolean isCanceled() + public boolean isCanceled()
+ { + {
+ Entity p_72885_1_ = explosion.exploder; + Entity p_72885_1_ = explosion.exploder;
+ System.out.println("Entity considers exploding @ " + p_72885_1_.posX +", "+p_72885_1_.posY+","+p_72885_1_.posZ);
+// System.out.println("CHECK" + super.isCanceled() + "," + this.event.isCancelled());
+ if(!(super.isCanceled() || this.event.isCancelled())) System.out.println("W00t explode!");
+ else System.out.println("Aww nogo!");
+ return super.isCanceled() || this.event.isCancelled(); + return super.isCanceled() || this.event.isCancelled();
} }
+ @Override + @Override
@ -46,7 +42,7 @@
} }
/** ExplosionEvent.Detonate is fired once the explosion has a list of affected blocks and entities. These lists can be modified to change the outcome.<br> /** ExplosionEvent.Detonate is fired once the explosion has a list of affected blocks and entities. These lists can be modified to change the outcome.<br>
@@ -73,4 +99,4 @@ @@ -73,4 +95,4 @@
return entityList; return entityList;
} }
} }

Loading…
Cancel
Save