More Gadget Collision patches
This commit is contained in:
parent
045445791a
commit
6e32906805
@ -14,7 +14,6 @@ import mineplex.core.common.util.NautHashMap;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.event.GadgetCollideEntityEvent;
|
||||
import mineplex.core.gadget.gadgets.Ammo;
|
||||
import mineplex.core.gadget.types.ItemGadget;
|
||||
|
||||
@ -53,9 +52,8 @@ public class ItemSnowball extends ItemGadget
|
||||
|
||||
if(!_snowballs.containsKey(ball)) return;
|
||||
|
||||
GadgetCollideEntityEvent gevent = new GadgetCollideEntityEvent(_snowballs.remove(ball), this, event.getEntity());
|
||||
if(Manager.collideEvent(_snowballs.remove(ball), this, event.getEntity())) return;
|
||||
|
||||
if(gevent.isCancelled()) return;
|
||||
|
||||
UtilAction.velocity(event.getEntity(), event.getDamager().getVelocity().normalize().add(new Vector(0,0.5,0)).multiply(0.5));
|
||||
event.getDamager().getWorld().playSound(event.getDamager().getLocation(), Sound.STEP_SNOW, 1, 0.5f);
|
||||
|
@ -142,7 +142,7 @@ public class MorphSnowman extends MorphGadget
|
||||
if (!_snowball.containsKey(proj))
|
||||
return;
|
||||
|
||||
if(!Manager.collideEvent(_snowball.remove(proj), this, event.getEntity())) return;
|
||||
if(Manager.collideEvent(_snowball.remove(proj), this, event.getEntity())) return;
|
||||
|
||||
UtilAction.velocity(event.getEntity(), proj.getVelocity().multiply(0.15).add(new Vector(0, 0.15, 0)));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user