Exemple #1
0
 @SubscribeEvent
 public void breakSpeed(PlayerEvent.BreakSpeed event) {
   if (ExtendedPlayer.get(event.entityPlayer).hasMutagen(MutagenType.GOLD_MUTAGEN)) {
     Mutagen mutagen = ExtendedPlayer.get(event.entityPlayer).getMutagen(MutagenType.GOLD_MUTAGEN);
     event.newSpeed = event.originalSpeed * (1f + 0.15f + 0.15f * mutagen.getAmplifier());
   }
 }
 @SubscribeEvent
 public void onPlayerBreakSpeedEvent(PlayerEvent.BreakSpeed event) {
   if (event.getNewSpeed() > maxBreakSpeed) event.setNewSpeed(maxBreakSpeed);
 }