Update maven pom plugin version and trial a microoptimisation for players

This commit is contained in:
fullwall 2022-07-22 15:22:55 +08:00
parent b6eb42e07f
commit d7ce79fe85
161 changed files with 42 additions and 395 deletions

View File

@ -127,7 +127,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.10.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
@ -143,7 +143,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>
@ -179,10 +179,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<version>3.4.0</version>
<configuration>
<source>8</source>
<source>11</source>
<author>false</author>
<failOnError>false</failOnError>
<doclint>none</doclint>
<links>
<link>https://hub.spigotmc.org/javadocs/spigot</link>

View File

@ -312,8 +312,9 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
@Override
public void onDisable() {
if (!enabled)
if (!enabled) {
return;
}
Bukkit.getPluginManager().callEvent(new CitizensDisableEvent());
Editor.leaveAll();
despawnNPCs(saveOnDisable);

View File

@ -47,7 +47,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.10.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
@ -63,7 +63,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>

View File

@ -47,7 +47,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.10.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
@ -63,7 +63,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>

View File

@ -47,7 +47,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.10.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
@ -63,7 +63,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>

View File

@ -47,7 +47,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.10.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
@ -63,7 +63,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>

View File

@ -47,7 +47,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.10.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
@ -63,7 +63,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>

View File

@ -45,7 +45,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.10.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
@ -61,7 +61,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>

View File

@ -45,7 +45,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.10.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
@ -61,7 +61,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>

View File

@ -46,7 +46,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.10.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
@ -96,7 +96,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>

View File

@ -65,7 +65,6 @@ public class AxolotlController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
this.oldMoveController = this.moveControl;
this.moveControl = new MoveControl(this);
this.getAttribute(Attributes.MOVEMENT_SPEED)

View File

@ -50,7 +50,6 @@ public class BatController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
setFlying(false);
}
}

View File

@ -49,9 +49,6 @@ public class BeeController extends MobEntityController {
public EntityBeeNPC(EntityType<? extends Bee> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -49,9 +49,6 @@ public class BlazeController extends MobEntityController {
public EntityBlazeNPC(EntityType<? extends Blaze> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -54,9 +54,6 @@ public class CatController extends MobEntityController {
public EntityCatNPC(EntityType<? extends Cat> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -52,9 +52,6 @@ public class CaveSpiderController extends MobEntityController {
public EntityCaveSpiderNPC(EntityType<? extends CaveSpider> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -54,9 +54,6 @@ public class ChickenController extends MobEntityController {
public EntityChickenNPC(EntityType<? extends Chicken> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -61,7 +61,6 @@ public class CodController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
this.oldMoveController = this.moveControl;
this.moveControl = new MoveControl(this);
}

View File

@ -59,9 +59,6 @@ public class CowController extends MobEntityController {
public EntityCowNPC(EntityType<? extends Cow> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -55,9 +55,6 @@ public class CreeperController extends MobEntityController {
public EntityCreeperNPC(EntityType<? extends Creeper> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -57,7 +57,6 @@ public class DolphinController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
this.oldMoveController = this.moveControl;
this.moveControl = new MoveControl(this);
this.getAttribute(Attributes.MOVEMENT_SPEED)

View File

@ -52,9 +52,6 @@ public class DrownedController extends MobEntityController {
public EntityDrownedNPC(EntityType<? extends Drowned> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -50,9 +50,6 @@ public class EnderDragonController extends MobEntityController {
public EntityEnderDragonNPC(EntityType<? extends EnderDragon> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -55,9 +55,6 @@ public class EndermanController extends MobEntityController {
public EntityEndermanNPC(EntityType<? extends EnderMan> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -52,9 +52,6 @@ public class EndermiteController extends MobEntityController {
public EntityEndermiteNPC(EntityType<? extends Endermite> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class EvokerController extends MobEntityController {
public EntityEvokerNPC(EntityType<? extends Evoker> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -48,9 +48,6 @@ public class FoxController extends MobEntityController {
public EntityFoxNPC(EntityType<? extends Fox> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -43,9 +43,6 @@ public class GhastController extends MobEntityController {
public EntityGhastNPC(EntityType<? extends Ghast> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class GiantController extends MobEntityController {
public EntityGiantNPC(EntityType<? extends Giant> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class GlowSquidController extends MobEntityController {
public EntityGlowSquidNPC(EntityType<? extends GlowSquid> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -48,9 +48,6 @@ public class GoatController extends MobEntityController {
public EntityGoatNPC(EntityType<? extends Goat> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class GuardianController extends MobEntityController {
public EntityGuardianNPC(EntityType<? extends Guardian> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class GuardianElderController extends MobEntityController {
public EntityGuardianElderNPC(EntityType<? extends ElderGuardian> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class HoglinController extends MobEntityController {
public EntityHoglinNPC(EntityType<? extends Hoglin> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -62,7 +62,6 @@ public class HorseController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
org.bukkit.entity.Horse horse = (org.bukkit.entity.Horse) getBukkitEntity();
horse.setDomestication(horse.getMaxDomestication());
baseMovementSpeed = this.getAttribute(Attributes.MOVEMENT_SPEED).getValue();

View File

@ -62,7 +62,6 @@ public class HorseDonkeyController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
((org.bukkit.entity.Donkey) getBukkitEntity())
.setDomestication(((org.bukkit.entity.Donkey) getBukkitEntity()).getMaxDomestication());
baseMovementSpeed = this.getAttribute(Attributes.MOVEMENT_SPEED).getValue();

View File

@ -62,7 +62,6 @@ public class HorseMuleController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
((org.bukkit.entity.Mule) getBukkitEntity())
.setDomestication(((org.bukkit.entity.Mule) getBukkitEntity()).getMaxDomestication());
baseMovementSpeed = this.getAttribute(Attributes.MOVEMENT_SPEED).getValue();

View File

@ -62,7 +62,6 @@ public class HorseSkeletonController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
((org.bukkit.entity.SkeletonHorse) getBukkitEntity())
.setDomestication(((org.bukkit.entity.SkeletonHorse) getBukkitEntity()).getMaxDomestication());
baseMovementSpeed = this.getAttribute(Attributes.MOVEMENT_SPEED).getValue();

View File

@ -62,7 +62,6 @@ public class HorseZombieController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
((org.bukkit.entity.ZombieHorse) getBukkitEntity())
.setDomestication(((org.bukkit.entity.ZombieHorse) getBukkitEntity()).getMaxDomestication());
baseMovementSpeed = this.getAttribute(Attributes.MOVEMENT_SPEED).getValue();

View File

@ -46,9 +46,6 @@ public class IllusionerController extends MobEntityController {
public EntityIllusionerNPC(EntityType<? extends Illusioner> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class IronGolemController extends MobEntityController {
public EntityIronGolemNPC(EntityType<? extends IronGolem> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -58,7 +58,6 @@ public class LlamaController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
((org.bukkit.entity.Llama) getBukkitEntity())
.setDomestication(((org.bukkit.entity.Llama) getBukkitEntity()).getMaxDomestication());
}

View File

@ -52,7 +52,6 @@ public class MagmaCubeController extends MobEntityController {
this.npc = (CitizensNPC) npc;
if (npc != null) {
setSize(3, true);
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
this.oldMoveController = this.moveControl;
this.moveControl = new PlayerMoveControl(this);
}

View File

@ -15,6 +15,7 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl;
import net.citizensnpcs.npc.AbstractEntityController;
import net.citizensnpcs.util.Util;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.level.Level;
public abstract class MobEntityController extends AbstractEntityController {
@ -31,7 +32,9 @@ public abstract class MobEntityController extends AbstractEntityController {
net.minecraft.world.entity.Entity entity = createEntityFromClass(type, ((CraftWorld) at.getWorld()).getHandle(),
npc);
entity.absMoveTo(at.getX(), at.getY(), at.getZ(), at.getYaw(), at.getPitch());
if (entity instanceof Mob) {
NMSImpl.clearGoals(npc, ((Mob) entity).goalSelector, ((Mob) entity).targetSelector);
}
// entity.onGround isn't updated right away - we approximate here so
// that things like pathfinding still work *immediately* after spawn.
org.bukkit.Material beneath = at.getBlock().getRelative(BlockFace.DOWN).getType();

View File

@ -51,9 +51,6 @@ public class MushroomCowController extends MobEntityController {
public EntityMushroomCowNPC(EntityType<? extends MushroomCow> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -49,9 +49,6 @@ public class OcelotController extends MobEntityController {
public EntityOcelotNPC(EntityType<? extends Ocelot> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -48,9 +48,6 @@ public class PandaController extends MobEntityController {
public EntityPandaNPC(EntityType<? extends Panda> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class ParrotController extends MobEntityController {
public EntityParrotNPC(EntityType<? extends Parrot> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -56,7 +56,6 @@ public class PhantomController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
setNoAi(true);
this.oldMoveController = this.moveControl;
this.oldLookController = this.lookControl;

View File

@ -50,9 +50,6 @@ public class PigController extends MobEntityController {
public EntityPigNPC(EntityType<? extends Pig> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -47,9 +47,6 @@ public class PigZombieController extends MobEntityController {
public EntityPigZombieNPC(EntityType<? extends ZombifiedPiglin> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -1,7 +1,5 @@
package net.citizensnpcs.nms.v1_17_R1.entity;
import java.util.TreeMap;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_17_R1.CraftServer;
import org.bukkit.craftbukkit.v1_17_R1.entity.CraftEntity;
@ -39,7 +37,6 @@ public class PiglinBruteController extends MobEntityController {
}
public static class EntityPiglinBruteNPC extends PiglinBrute implements NPCHolder {
private TreeMap<?, ?> behaviorMap;
private final CitizensNPC npc;
public EntityPiglinBruteNPC(EntityType<? extends PiglinBrute> types, Level level) {
@ -49,9 +46,6 @@ public class PiglinBruteController extends MobEntityController {
public EntityPiglinBruteNPC(EntityType<? extends PiglinBrute> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class PiglinController extends MobEntityController {
public EntityPiglinNPC(EntityType<? extends Piglin> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -48,9 +48,6 @@ public class PillagerController extends MobEntityController {
public EntityPillagerNPC(EntityType<? extends Pillager> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -45,9 +45,6 @@ public class PolarBearController extends MobEntityController {
public EntityPolarBearNPC(EntityType<? extends PolarBear> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -24,7 +24,6 @@ import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityDimensions;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.MoverType;
import net.minecraft.world.entity.Pose;
import net.minecraft.world.entity.ai.control.MoveControl;
import net.minecraft.world.entity.animal.Pufferfish;
@ -59,7 +58,6 @@ public class PufferFishController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
this.oldMoveController = this.moveControl;
this.moveControl = new MoveControl(this);
}

View File

@ -51,9 +51,6 @@ public class RabbitController extends MobEntityController {
public EntityRabbitNPC(EntityType<? extends Rabbit> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -48,9 +48,6 @@ public class RavagerController extends MobEntityController {
public EntityRavagerNPC(EntityType<? extends Ravager> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -55,7 +55,6 @@ public class SalmonController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
this.oldMoveController = this.moveControl;
this.moveControl = new MoveControl(this);
}

View File

@ -49,9 +49,6 @@ public class SheepController extends MobEntityController {
public EntitySheepNPC(EntityType<? extends Sheep> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -47,9 +47,6 @@ public class ShulkerController extends MobEntityController {
public EntityShulkerNPC(EntityType<? extends Shulker> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class SilverfishController extends MobEntityController {
public EntitySilverfishNPC(EntityType<? extends Silverfish> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class SkeletonController extends MobEntityController {
public EntitySkeletonNPC(EntityType<? extends Skeleton> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class SkeletonStrayController extends MobEntityController {
public EntityStrayNPC(EntityType<? extends Stray> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class SkeletonWitherController extends MobEntityController {
public EntitySkeletonWitherNPC(EntityType<? extends WitherSkeleton> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -52,7 +52,6 @@ public class SlimeController extends MobEntityController {
this.npc = (CitizensNPC) npc;
if (npc != null) {
setSize(3, true);
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
this.oldMoveController = this.moveControl;
this.moveControl = new PlayerMoveControl(this);
}

View File

@ -47,9 +47,6 @@ public class SnowmanController extends MobEntityController {
public EntitySnowmanNPC(EntityType<? extends SnowGolem> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class SpiderController extends MobEntityController {
public EntitySpiderNPC(EntityType<? extends Spider> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class SquidController extends MobEntityController {
public EntitySquidNPC(EntityType<? extends Squid> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class StriderController extends MobEntityController {
public EntityStriderNPC(EntityType<? extends Strider> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -58,7 +58,6 @@ public class TraderLlamaController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
((org.bukkit.entity.TraderLlama) getBukkitEntity())
.setDomestication(((org.bukkit.entity.TraderLlama) getBukkitEntity()).getMaxDomestication());
}

View File

@ -55,7 +55,6 @@ public class TropicalFishController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
this.oldMoveController = this.moveControl;
this.moveControl = new MoveControl(this);
}

View File

@ -53,7 +53,6 @@ public class TurtleController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
this.oldMoveController = this.moveControl;
this.oldJumpController = this.jumpControl;
this.moveControl = new MoveControl(this);

View File

@ -44,7 +44,6 @@ public class VexController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
setNoGravity(true);
}
}

View File

@ -57,7 +57,6 @@ public class VillagerController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(0.3);
}
}

View File

@ -49,9 +49,6 @@ public class VindicatorController extends MobEntityController {
public EntityVindicatorNPC(EntityType<? extends Vindicator> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -56,9 +56,6 @@ public class WanderingTraderController extends MobEntityController {
public EntityWanderingTraderNPC(EntityType<? extends WanderingTrader> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class WitchController extends MobEntityController {
public EntityWitchNPC(EntityType<? extends Witch> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -43,9 +43,6 @@ public class WitherController extends MobEntityController {
public EntityWitherNPC(EntityType<? extends WitherBoss> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -50,9 +50,6 @@ public class WolfController extends MobEntityController {
public EntityWolfNPC(EntityType<? extends Wolf> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class ZoglinController extends MobEntityController {
public EntityZoglinNPC(EntityType<? extends Zoglin> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class ZombieController extends MobEntityController {
public EntityZombieNPC(EntityType<? extends Zombie> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class ZombieHuskController extends MobEntityController {
public EntityZombieHuskNPC(EntityType<? extends Husk> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,9 +46,6 @@ public class ZombieVillagerController extends MobEntityController {
public EntityZombieVillagerNPC(EntityType<? extends ZombieVillager> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -46,7 +46,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.10.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
@ -96,7 +96,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>

View File

@ -65,7 +65,6 @@ public class AxolotlController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
this.oldMoveController = this.moveControl;
this.moveControl = new MoveControl(this);
this.getAttribute(Attributes.MOVEMENT_SPEED)

View File

@ -52,7 +52,6 @@ public class BatController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
setFlying(false);
}
}

View File

@ -51,9 +51,6 @@ public class BeeController extends MobEntityController {
public EntityBeeNPC(EntityType<? extends Bee> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -51,9 +51,6 @@ public class BlazeController extends MobEntityController {
public EntityBlazeNPC(EntityType<? extends Blaze> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -55,9 +55,6 @@ public class CatController extends MobEntityController {
public EntityCatNPC(EntityType<? extends Cat> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -53,9 +53,6 @@ public class CaveSpiderController extends MobEntityController {
public EntityCaveSpiderNPC(EntityType<? extends CaveSpider> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -55,9 +55,6 @@ public class ChickenController extends MobEntityController {
public EntityChickenNPC(EntityType<? extends Chicken> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -62,7 +62,6 @@ public class CodController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
this.oldMoveController = this.moveControl;
this.moveControl = new MoveControl(this);
}

View File

@ -60,9 +60,6 @@ public class CowController extends MobEntityController {
public EntityCowNPC(EntityType<? extends Cow> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -55,9 +55,6 @@ public class CreeperController extends MobEntityController {
public EntityCreeperNPC(EntityType<? extends Creeper> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -57,7 +57,6 @@ public class DolphinController extends MobEntityController {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
this.oldMoveController = this.moveControl;
this.moveControl = new MoveControl(this);
this.getAttribute(Attributes.MOVEMENT_SPEED)

View File

@ -53,9 +53,6 @@ public class DrownedController extends MobEntityController {
public EntityDrownedNPC(EntityType<? extends Drowned> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -52,9 +52,6 @@ public class EnderDragonController extends MobEntityController {
public EntityEnderDragonNPC(EntityType<? extends EnderDragon> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -56,9 +56,6 @@ public class EndermanController extends MobEntityController {
public EntityEndermanNPC(EntityType<? extends EnderMan> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

View File

@ -53,9 +53,6 @@ public class EndermiteController extends MobEntityController {
public EntityEndermiteNPC(EntityType<? extends Endermite> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
}
}
@Override

Some files were not shown because too many files have changed in this diff Show More