2024/11/02
Fix some little bug Add areaTalk Command
This commit is contained in:
parent
867a79f96b
commit
93e5d73fa4
|
|
@ -54,6 +54,7 @@ runs {
|
|||
client {
|
||||
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
|
||||
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
|
||||
|
||||
}
|
||||
|
||||
server {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class CommonEventHandler {
|
|||
}
|
||||
if (entity instanceof LivingEntity living) {
|
||||
MobEffectInstance effect = living.getEffect(ModEffectRegister.NO_LEASH_EFFECT);
|
||||
if(effect != null && effect.getDuration() > 0){
|
||||
if(effect != null && effect.getDuration() != 0){
|
||||
if (entity instanceof PlayerLeashable player) {
|
||||
if (player.getLeashHolder() != null) {
|
||||
if (player.getLeashHolder() instanceof LeashRopeArrow arrow)
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ public class LeashRopeArrow extends AbstractArrow {
|
|||
hitOnEntityHandler(entity);
|
||||
if(this.getOwner() instanceof LivingEntity livingEntity ) {
|
||||
MobEffectInstance effect = livingEntity.getEffect(ModEffectRegister.NO_LEASH_EFFECT);
|
||||
if(effect != null && effect.getDuration() > 0) {
|
||||
if(effect != null && effect.getDuration() != 0) {
|
||||
this.setOwner(null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ public abstract class MixinPlayer extends LivingEntity implements PlayerLeashabl
|
|||
float leashLengthSelf = iEntityExtension.getLeashLength();
|
||||
leashLength = leashLengthSelf > LeashCommand.MIN_VALUE ? leashLengthSelf : LeashCommand.MIN_VALUE;
|
||||
MobEffectInstance effect = this.getEffect(ModEffectRegister.NO_LEASH_EFFECT);
|
||||
if(effect != null && effect.getDuration() > 0) {
|
||||
if(effect != null && effect.getDuration() != 0) {
|
||||
if (entity instanceof LeashRopeArrow arrow)
|
||||
arrow.setOwner(null);
|
||||
this.dropLeash(true, !(entity instanceof LeashRopeArrow));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user