F04 : riptide seulement pendant la vrille ou 2 s apres le relachement du trident
Tenir un trident Impulsion ne releve plus le seuil vanilla ni n'exempte le mouvement. Nouveau core/RiptideSuivi, evenement LivingEntityUseItemEvent.Stop, 104 tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cette révision appartient à :
1 Parent
f69348b08b
révision
f151ab5a5d
6 fichiers modifiés
+166
-44
Aucun fichier ne correspond à votre recherche
@@ -13,6 +13,7 @@ import net.minecraft.world.phys.Vec3;
|
||||
import net.neoforged.bus.api.SubscribeEvent;
|
||||
import net.neoforged.neoforge.common.util.FakePlayer;
|
||||
import net.neoforged.neoforge.event.entity.living.LivingDamageEvent;
|
||||
import net.neoforged.neoforge.event.entity.living.LivingEntityUseItemEvent;
|
||||
import net.neoforged.neoforge.event.entity.player.AttackEntityEvent;
|
||||
import net.neoforged.neoforge.event.entity.player.PlayerEvent;
|
||||
import net.neoforged.neoforge.event.server.ServerStartingEvent;
|
||||
@@ -79,6 +80,14 @@ public final class GardeEvents {
|
||||
}
|
||||
}
|
||||
|
||||
/** F04 : seul un trident Impulsion relâché après charge ouvre la tolérance riptide (pas le trident tenu). */
|
||||
@SubscribeEvent
|
||||
public static void onRelache(LivingEntityUseItemEvent.Stop event) {
|
||||
if (event.getEntity() instanceof ServerPlayer p && !(p instanceof FakePlayer)) {
|
||||
Garde.noterRelache(p, event.getItem(), event.getDuration());
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onDegats(LivingDamageEvent.Post event) {
|
||||
if (event.getEntity() instanceof ServerPlayer p) Garde.noterRecul(p);
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur