mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-02 05:21:47 +01:00
Update maven pom plugin version and trial a microoptimisation for players
This commit is contained in:
parent
b6eb42e07f
commit
d7ce79fe85
@ -127,7 +127,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.10.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>1.8</source>
|
||||||
<target>1.8</target>
|
<target>1.8</target>
|
||||||
@ -143,7 +143,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.2.1</version>
|
<version>3.3.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
@ -179,10 +179,11 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>3.1.1</version>
|
<version>3.4.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>8</source>
|
<source>11</source>
|
||||||
<author>false</author>
|
<author>false</author>
|
||||||
|
<failOnError>false</failOnError>
|
||||||
<doclint>none</doclint>
|
<doclint>none</doclint>
|
||||||
<links>
|
<links>
|
||||||
<link>https://hub.spigotmc.org/javadocs/spigot</link>
|
<link>https://hub.spigotmc.org/javadocs/spigot</link>
|
||||||
|
@ -312,8 +312,9 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
if (!enabled)
|
if (!enabled) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
Bukkit.getPluginManager().callEvent(new CitizensDisableEvent());
|
Bukkit.getPluginManager().callEvent(new CitizensDisableEvent());
|
||||||
Editor.leaveAll();
|
Editor.leaveAll();
|
||||||
despawnNPCs(saveOnDisable);
|
despawnNPCs(saveOnDisable);
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.10.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>1.8</source>
|
||||||
<target>1.8</target>
|
<target>1.8</target>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.2.1</version>
|
<version>3.3.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.10.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>1.8</source>
|
||||||
<target>1.8</target>
|
<target>1.8</target>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.2.1</version>
|
<version>3.3.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.10.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>1.8</source>
|
||||||
<target>1.8</target>
|
<target>1.8</target>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.2.1</version>
|
<version>3.3.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.10.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>1.8</source>
|
||||||
<target>1.8</target>
|
<target>1.8</target>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.2.1</version>
|
<version>3.3.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.10.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>1.8</source>
|
||||||
<target>1.8</target>
|
<target>1.8</target>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.2.1</version>
|
<version>3.3.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.10.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>1.8</source>
|
||||||
<target>1.8</target>
|
<target>1.8</target>
|
||||||
@ -61,7 +61,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.2.1</version>
|
<version>3.3.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.10.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>1.8</source>
|
||||||
<target>1.8</target>
|
<target>1.8</target>
|
||||||
@ -61,7 +61,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.2.1</version>
|
<version>3.3.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.10.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>1.8</source>
|
||||||
<target>1.8</target>
|
<target>1.8</target>
|
||||||
@ -96,7 +96,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.2.1</version>
|
<version>3.3.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
|
@ -65,7 +65,6 @@ public class AxolotlController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
this.oldMoveController = this.moveControl;
|
this.oldMoveController = this.moveControl;
|
||||||
this.moveControl = new MoveControl(this);
|
this.moveControl = new MoveControl(this);
|
||||||
this.getAttribute(Attributes.MOVEMENT_SPEED)
|
this.getAttribute(Attributes.MOVEMENT_SPEED)
|
||||||
|
@ -50,7 +50,6 @@ public class BatController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
setFlying(false);
|
setFlying(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,9 +49,6 @@ public class BeeController extends MobEntityController {
|
|||||||
public EntityBeeNPC(EntityType<? extends Bee> types, Level level, NPC npc) {
|
public EntityBeeNPC(EntityType<? extends Bee> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -49,9 +49,6 @@ public class BlazeController extends MobEntityController {
|
|||||||
public EntityBlazeNPC(EntityType<? extends Blaze> types, Level level, NPC npc) {
|
public EntityBlazeNPC(EntityType<? extends Blaze> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,9 +54,6 @@ public class CatController extends MobEntityController {
|
|||||||
public EntityCatNPC(EntityType<? extends Cat> types, Level level, NPC npc) {
|
public EntityCatNPC(EntityType<? extends Cat> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -52,9 +52,6 @@ public class CaveSpiderController extends MobEntityController {
|
|||||||
public EntityCaveSpiderNPC(EntityType<? extends CaveSpider> types, Level level, NPC npc) {
|
public EntityCaveSpiderNPC(EntityType<? extends CaveSpider> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,9 +54,6 @@ public class ChickenController extends MobEntityController {
|
|||||||
public EntityChickenNPC(EntityType<? extends Chicken> types, Level level, NPC npc) {
|
public EntityChickenNPC(EntityType<? extends Chicken> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -61,7 +61,6 @@ public class CodController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
this.oldMoveController = this.moveControl;
|
this.oldMoveController = this.moveControl;
|
||||||
this.moveControl = new MoveControl(this);
|
this.moveControl = new MoveControl(this);
|
||||||
}
|
}
|
||||||
|
@ -59,9 +59,6 @@ public class CowController extends MobEntityController {
|
|||||||
public EntityCowNPC(EntityType<? extends Cow> types, Level level, NPC npc) {
|
public EntityCowNPC(EntityType<? extends Cow> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -55,9 +55,6 @@ public class CreeperController extends MobEntityController {
|
|||||||
public EntityCreeperNPC(EntityType<? extends Creeper> types, Level level, NPC npc) {
|
public EntityCreeperNPC(EntityType<? extends Creeper> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -57,7 +57,6 @@ public class DolphinController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
this.oldMoveController = this.moveControl;
|
this.oldMoveController = this.moveControl;
|
||||||
this.moveControl = new MoveControl(this);
|
this.moveControl = new MoveControl(this);
|
||||||
this.getAttribute(Attributes.MOVEMENT_SPEED)
|
this.getAttribute(Attributes.MOVEMENT_SPEED)
|
||||||
|
@ -52,9 +52,6 @@ public class DrownedController extends MobEntityController {
|
|||||||
public EntityDrownedNPC(EntityType<? extends Drowned> types, Level level, NPC npc) {
|
public EntityDrownedNPC(EntityType<? extends Drowned> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -50,9 +50,6 @@ public class EnderDragonController extends MobEntityController {
|
|||||||
public EntityEnderDragonNPC(EntityType<? extends EnderDragon> types, Level level, NPC npc) {
|
public EntityEnderDragonNPC(EntityType<? extends EnderDragon> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -55,9 +55,6 @@ public class EndermanController extends MobEntityController {
|
|||||||
public EntityEndermanNPC(EntityType<? extends EnderMan> types, Level level, NPC npc) {
|
public EntityEndermanNPC(EntityType<? extends EnderMan> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -52,9 +52,6 @@ public class EndermiteController extends MobEntityController {
|
|||||||
public EntityEndermiteNPC(EntityType<? extends Endermite> types, Level level, NPC npc) {
|
public EntityEndermiteNPC(EntityType<? extends Endermite> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class EvokerController extends MobEntityController {
|
|||||||
public EntityEvokerNPC(EntityType<? extends Evoker> types, Level level, NPC npc) {
|
public EntityEvokerNPC(EntityType<? extends Evoker> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -48,9 +48,6 @@ public class FoxController extends MobEntityController {
|
|||||||
public EntityFoxNPC(EntityType<? extends Fox> types, Level level, NPC npc) {
|
public EntityFoxNPC(EntityType<? extends Fox> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -43,9 +43,6 @@ public class GhastController extends MobEntityController {
|
|||||||
public EntityGhastNPC(EntityType<? extends Ghast> types, Level level, NPC npc) {
|
public EntityGhastNPC(EntityType<? extends Ghast> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class GiantController extends MobEntityController {
|
|||||||
public EntityGiantNPC(EntityType<? extends Giant> types, Level level, NPC npc) {
|
public EntityGiantNPC(EntityType<? extends Giant> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class GlowSquidController extends MobEntityController {
|
|||||||
public EntityGlowSquidNPC(EntityType<? extends GlowSquid> types, Level level, NPC npc) {
|
public EntityGlowSquidNPC(EntityType<? extends GlowSquid> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -48,9 +48,6 @@ public class GoatController extends MobEntityController {
|
|||||||
public EntityGoatNPC(EntityType<? extends Goat> types, Level level, NPC npc) {
|
public EntityGoatNPC(EntityType<? extends Goat> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class GuardianController extends MobEntityController {
|
|||||||
public EntityGuardianNPC(EntityType<? extends Guardian> types, Level level, NPC npc) {
|
public EntityGuardianNPC(EntityType<? extends Guardian> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class GuardianElderController extends MobEntityController {
|
|||||||
public EntityGuardianElderNPC(EntityType<? extends ElderGuardian> types, Level level, NPC npc) {
|
public EntityGuardianElderNPC(EntityType<? extends ElderGuardian> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class HoglinController extends MobEntityController {
|
|||||||
public EntityHoglinNPC(EntityType<? extends Hoglin> types, Level level, NPC npc) {
|
public EntityHoglinNPC(EntityType<? extends Hoglin> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -62,7 +62,6 @@ public class HorseController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
org.bukkit.entity.Horse horse = (org.bukkit.entity.Horse) getBukkitEntity();
|
org.bukkit.entity.Horse horse = (org.bukkit.entity.Horse) getBukkitEntity();
|
||||||
horse.setDomestication(horse.getMaxDomestication());
|
horse.setDomestication(horse.getMaxDomestication());
|
||||||
baseMovementSpeed = this.getAttribute(Attributes.MOVEMENT_SPEED).getValue();
|
baseMovementSpeed = this.getAttribute(Attributes.MOVEMENT_SPEED).getValue();
|
||||||
|
@ -62,7 +62,6 @@ public class HorseDonkeyController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
((org.bukkit.entity.Donkey) getBukkitEntity())
|
((org.bukkit.entity.Donkey) getBukkitEntity())
|
||||||
.setDomestication(((org.bukkit.entity.Donkey) getBukkitEntity()).getMaxDomestication());
|
.setDomestication(((org.bukkit.entity.Donkey) getBukkitEntity()).getMaxDomestication());
|
||||||
baseMovementSpeed = this.getAttribute(Attributes.MOVEMENT_SPEED).getValue();
|
baseMovementSpeed = this.getAttribute(Attributes.MOVEMENT_SPEED).getValue();
|
||||||
|
@ -62,7 +62,6 @@ public class HorseMuleController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
((org.bukkit.entity.Mule) getBukkitEntity())
|
((org.bukkit.entity.Mule) getBukkitEntity())
|
||||||
.setDomestication(((org.bukkit.entity.Mule) getBukkitEntity()).getMaxDomestication());
|
.setDomestication(((org.bukkit.entity.Mule) getBukkitEntity()).getMaxDomestication());
|
||||||
baseMovementSpeed = this.getAttribute(Attributes.MOVEMENT_SPEED).getValue();
|
baseMovementSpeed = this.getAttribute(Attributes.MOVEMENT_SPEED).getValue();
|
||||||
|
@ -62,7 +62,6 @@ public class HorseSkeletonController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
((org.bukkit.entity.SkeletonHorse) getBukkitEntity())
|
((org.bukkit.entity.SkeletonHorse) getBukkitEntity())
|
||||||
.setDomestication(((org.bukkit.entity.SkeletonHorse) getBukkitEntity()).getMaxDomestication());
|
.setDomestication(((org.bukkit.entity.SkeletonHorse) getBukkitEntity()).getMaxDomestication());
|
||||||
baseMovementSpeed = this.getAttribute(Attributes.MOVEMENT_SPEED).getValue();
|
baseMovementSpeed = this.getAttribute(Attributes.MOVEMENT_SPEED).getValue();
|
||||||
|
@ -62,7 +62,6 @@ public class HorseZombieController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
((org.bukkit.entity.ZombieHorse) getBukkitEntity())
|
((org.bukkit.entity.ZombieHorse) getBukkitEntity())
|
||||||
.setDomestication(((org.bukkit.entity.ZombieHorse) getBukkitEntity()).getMaxDomestication());
|
.setDomestication(((org.bukkit.entity.ZombieHorse) getBukkitEntity()).getMaxDomestication());
|
||||||
baseMovementSpeed = this.getAttribute(Attributes.MOVEMENT_SPEED).getValue();
|
baseMovementSpeed = this.getAttribute(Attributes.MOVEMENT_SPEED).getValue();
|
||||||
|
@ -46,9 +46,6 @@ public class IllusionerController extends MobEntityController {
|
|||||||
public EntityIllusionerNPC(EntityType<? extends Illusioner> types, Level level, NPC npc) {
|
public EntityIllusionerNPC(EntityType<? extends Illusioner> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class IronGolemController extends MobEntityController {
|
|||||||
public EntityIronGolemNPC(EntityType<? extends IronGolem> types, Level level, NPC npc) {
|
public EntityIronGolemNPC(EntityType<? extends IronGolem> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -58,7 +58,6 @@ public class LlamaController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
((org.bukkit.entity.Llama) getBukkitEntity())
|
((org.bukkit.entity.Llama) getBukkitEntity())
|
||||||
.setDomestication(((org.bukkit.entity.Llama) getBukkitEntity()).getMaxDomestication());
|
.setDomestication(((org.bukkit.entity.Llama) getBukkitEntity()).getMaxDomestication());
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,6 @@ public class MagmaCubeController extends MobEntityController {
|
|||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
setSize(3, true);
|
setSize(3, true);
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
this.oldMoveController = this.moveControl;
|
this.oldMoveController = this.moveControl;
|
||||||
this.moveControl = new PlayerMoveControl(this);
|
this.moveControl = new PlayerMoveControl(this);
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl;
|
|||||||
import net.citizensnpcs.npc.AbstractEntityController;
|
import net.citizensnpcs.npc.AbstractEntityController;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
|
import net.minecraft.world.entity.Mob;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
|
|
||||||
public abstract class MobEntityController extends AbstractEntityController {
|
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(),
|
net.minecraft.world.entity.Entity entity = createEntityFromClass(type, ((CraftWorld) at.getWorld()).getHandle(),
|
||||||
npc);
|
npc);
|
||||||
entity.absMoveTo(at.getX(), at.getY(), at.getZ(), at.getYaw(), at.getPitch());
|
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
|
// entity.onGround isn't updated right away - we approximate here so
|
||||||
// that things like pathfinding still work *immediately* after spawn.
|
// that things like pathfinding still work *immediately* after spawn.
|
||||||
org.bukkit.Material beneath = at.getBlock().getRelative(BlockFace.DOWN).getType();
|
org.bukkit.Material beneath = at.getBlock().getRelative(BlockFace.DOWN).getType();
|
||||||
|
@ -51,9 +51,6 @@ public class MushroomCowController extends MobEntityController {
|
|||||||
public EntityMushroomCowNPC(EntityType<? extends MushroomCow> types, Level level, NPC npc) {
|
public EntityMushroomCowNPC(EntityType<? extends MushroomCow> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -49,9 +49,6 @@ public class OcelotController extends MobEntityController {
|
|||||||
public EntityOcelotNPC(EntityType<? extends Ocelot> types, Level level, NPC npc) {
|
public EntityOcelotNPC(EntityType<? extends Ocelot> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -48,9 +48,6 @@ public class PandaController extends MobEntityController {
|
|||||||
public EntityPandaNPC(EntityType<? extends Panda> types, Level level, NPC npc) {
|
public EntityPandaNPC(EntityType<? extends Panda> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class ParrotController extends MobEntityController {
|
|||||||
public EntityParrotNPC(EntityType<? extends Parrot> types, Level level, NPC npc) {
|
public EntityParrotNPC(EntityType<? extends Parrot> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -56,7 +56,6 @@ public class PhantomController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
setNoAi(true);
|
setNoAi(true);
|
||||||
this.oldMoveController = this.moveControl;
|
this.oldMoveController = this.moveControl;
|
||||||
this.oldLookController = this.lookControl;
|
this.oldLookController = this.lookControl;
|
||||||
|
@ -50,9 +50,6 @@ public class PigController extends MobEntityController {
|
|||||||
public EntityPigNPC(EntityType<? extends Pig> types, Level level, NPC npc) {
|
public EntityPigNPC(EntityType<? extends Pig> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -47,9 +47,6 @@ public class PigZombieController extends MobEntityController {
|
|||||||
public EntityPigZombieNPC(EntityType<? extends ZombifiedPiglin> types, Level level, NPC npc) {
|
public EntityPigZombieNPC(EntityType<? extends ZombifiedPiglin> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package net.citizensnpcs.nms.v1_17_R1.entity;
|
package net.citizensnpcs.nms.v1_17_R1.entity;
|
||||||
|
|
||||||
import java.util.TreeMap;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_17_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_17_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_17_R1.entity.CraftEntity;
|
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 {
|
public static class EntityPiglinBruteNPC extends PiglinBrute implements NPCHolder {
|
||||||
private TreeMap<?, ?> behaviorMap;
|
|
||||||
private final CitizensNPC npc;
|
private final CitizensNPC npc;
|
||||||
|
|
||||||
public EntityPiglinBruteNPC(EntityType<? extends PiglinBrute> types, Level level) {
|
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) {
|
public EntityPiglinBruteNPC(EntityType<? extends PiglinBrute> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class PiglinController extends MobEntityController {
|
|||||||
public EntityPiglinNPC(EntityType<? extends Piglin> types, Level level, NPC npc) {
|
public EntityPiglinNPC(EntityType<? extends Piglin> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -48,9 +48,6 @@ public class PillagerController extends MobEntityController {
|
|||||||
public EntityPillagerNPC(EntityType<? extends Pillager> types, Level level, NPC npc) {
|
public EntityPillagerNPC(EntityType<? extends Pillager> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -45,9 +45,6 @@ public class PolarBearController extends MobEntityController {
|
|||||||
public EntityPolarBearNPC(EntityType<? extends PolarBear> types, Level level, NPC npc) {
|
public EntityPolarBearNPC(EntityType<? extends PolarBear> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -24,7 +24,6 @@ import net.minecraft.world.damagesource.DamageSource;
|
|||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.EntityDimensions;
|
import net.minecraft.world.entity.EntityDimensions;
|
||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
import net.minecraft.world.entity.MoverType;
|
|
||||||
import net.minecraft.world.entity.Pose;
|
import net.minecraft.world.entity.Pose;
|
||||||
import net.minecraft.world.entity.ai.control.MoveControl;
|
import net.minecraft.world.entity.ai.control.MoveControl;
|
||||||
import net.minecraft.world.entity.animal.Pufferfish;
|
import net.minecraft.world.entity.animal.Pufferfish;
|
||||||
@ -59,7 +58,6 @@ public class PufferFishController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
this.oldMoveController = this.moveControl;
|
this.oldMoveController = this.moveControl;
|
||||||
this.moveControl = new MoveControl(this);
|
this.moveControl = new MoveControl(this);
|
||||||
}
|
}
|
||||||
|
@ -51,9 +51,6 @@ public class RabbitController extends MobEntityController {
|
|||||||
public EntityRabbitNPC(EntityType<? extends Rabbit> types, Level level, NPC npc) {
|
public EntityRabbitNPC(EntityType<? extends Rabbit> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -48,9 +48,6 @@ public class RavagerController extends MobEntityController {
|
|||||||
public EntityRavagerNPC(EntityType<? extends Ravager> types, Level level, NPC npc) {
|
public EntityRavagerNPC(EntityType<? extends Ravager> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -55,7 +55,6 @@ public class SalmonController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
this.oldMoveController = this.moveControl;
|
this.oldMoveController = this.moveControl;
|
||||||
this.moveControl = new MoveControl(this);
|
this.moveControl = new MoveControl(this);
|
||||||
}
|
}
|
||||||
|
@ -49,9 +49,6 @@ public class SheepController extends MobEntityController {
|
|||||||
public EntitySheepNPC(EntityType<? extends Sheep> types, Level level, NPC npc) {
|
public EntitySheepNPC(EntityType<? extends Sheep> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -47,9 +47,6 @@ public class ShulkerController extends MobEntityController {
|
|||||||
public EntityShulkerNPC(EntityType<? extends Shulker> types, Level level, NPC npc) {
|
public EntityShulkerNPC(EntityType<? extends Shulker> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class SilverfishController extends MobEntityController {
|
|||||||
public EntitySilverfishNPC(EntityType<? extends Silverfish> types, Level level, NPC npc) {
|
public EntitySilverfishNPC(EntityType<? extends Silverfish> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class SkeletonController extends MobEntityController {
|
|||||||
public EntitySkeletonNPC(EntityType<? extends Skeleton> types, Level level, NPC npc) {
|
public EntitySkeletonNPC(EntityType<? extends Skeleton> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class SkeletonStrayController extends MobEntityController {
|
|||||||
public EntityStrayNPC(EntityType<? extends Stray> types, Level level, NPC npc) {
|
public EntityStrayNPC(EntityType<? extends Stray> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class SkeletonWitherController extends MobEntityController {
|
|||||||
public EntitySkeletonWitherNPC(EntityType<? extends WitherSkeleton> types, Level level, NPC npc) {
|
public EntitySkeletonWitherNPC(EntityType<? extends WitherSkeleton> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -52,7 +52,6 @@ public class SlimeController extends MobEntityController {
|
|||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
setSize(3, true);
|
setSize(3, true);
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
this.oldMoveController = this.moveControl;
|
this.oldMoveController = this.moveControl;
|
||||||
this.moveControl = new PlayerMoveControl(this);
|
this.moveControl = new PlayerMoveControl(this);
|
||||||
}
|
}
|
||||||
|
@ -47,9 +47,6 @@ public class SnowmanController extends MobEntityController {
|
|||||||
public EntitySnowmanNPC(EntityType<? extends SnowGolem> types, Level level, NPC npc) {
|
public EntitySnowmanNPC(EntityType<? extends SnowGolem> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class SpiderController extends MobEntityController {
|
|||||||
public EntitySpiderNPC(EntityType<? extends Spider> types, Level level, NPC npc) {
|
public EntitySpiderNPC(EntityType<? extends Spider> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class SquidController extends MobEntityController {
|
|||||||
public EntitySquidNPC(EntityType<? extends Squid> types, Level level, NPC npc) {
|
public EntitySquidNPC(EntityType<? extends Squid> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class StriderController extends MobEntityController {
|
|||||||
public EntityStriderNPC(EntityType<? extends Strider> types, Level level, NPC npc) {
|
public EntityStriderNPC(EntityType<? extends Strider> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -58,7 +58,6 @@ public class TraderLlamaController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
((org.bukkit.entity.TraderLlama) getBukkitEntity())
|
((org.bukkit.entity.TraderLlama) getBukkitEntity())
|
||||||
.setDomestication(((org.bukkit.entity.TraderLlama) getBukkitEntity()).getMaxDomestication());
|
.setDomestication(((org.bukkit.entity.TraderLlama) getBukkitEntity()).getMaxDomestication());
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,6 @@ public class TropicalFishController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
this.oldMoveController = this.moveControl;
|
this.oldMoveController = this.moveControl;
|
||||||
this.moveControl = new MoveControl(this);
|
this.moveControl = new MoveControl(this);
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,6 @@ public class TurtleController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
this.oldMoveController = this.moveControl;
|
this.oldMoveController = this.moveControl;
|
||||||
this.oldJumpController = this.jumpControl;
|
this.oldJumpController = this.jumpControl;
|
||||||
this.moveControl = new MoveControl(this);
|
this.moveControl = new MoveControl(this);
|
||||||
|
@ -44,7 +44,6 @@ public class VexController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
setNoGravity(true);
|
setNoGravity(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,6 @@ public class VillagerController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(0.3);
|
getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(0.3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,9 +49,6 @@ public class VindicatorController extends MobEntityController {
|
|||||||
public EntityVindicatorNPC(EntityType<? extends Vindicator> types, Level level, NPC npc) {
|
public EntityVindicatorNPC(EntityType<? extends Vindicator> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -56,9 +56,6 @@ public class WanderingTraderController extends MobEntityController {
|
|||||||
public EntityWanderingTraderNPC(EntityType<? extends WanderingTrader> types, Level level, NPC npc) {
|
public EntityWanderingTraderNPC(EntityType<? extends WanderingTrader> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class WitchController extends MobEntityController {
|
|||||||
public EntityWitchNPC(EntityType<? extends Witch> types, Level level, NPC npc) {
|
public EntityWitchNPC(EntityType<? extends Witch> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -43,9 +43,6 @@ public class WitherController extends MobEntityController {
|
|||||||
public EntityWitherNPC(EntityType<? extends WitherBoss> types, Level level, NPC npc) {
|
public EntityWitherNPC(EntityType<? extends WitherBoss> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -50,9 +50,6 @@ public class WolfController extends MobEntityController {
|
|||||||
public EntityWolfNPC(EntityType<? extends Wolf> types, Level level, NPC npc) {
|
public EntityWolfNPC(EntityType<? extends Wolf> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class ZoglinController extends MobEntityController {
|
|||||||
public EntityZoglinNPC(EntityType<? extends Zoglin> types, Level level, NPC npc) {
|
public EntityZoglinNPC(EntityType<? extends Zoglin> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class ZombieController extends MobEntityController {
|
|||||||
public EntityZombieNPC(EntityType<? extends Zombie> types, Level level, NPC npc) {
|
public EntityZombieNPC(EntityType<? extends Zombie> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class ZombieHuskController extends MobEntityController {
|
|||||||
public EntityZombieHuskNPC(EntityType<? extends Husk> types, Level level, NPC npc) {
|
public EntityZombieHuskNPC(EntityType<? extends Husk> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,9 +46,6 @@ public class ZombieVillagerController extends MobEntityController {
|
|||||||
public EntityZombieVillagerNPC(EntityType<? extends ZombieVillager> types, Level level, NPC npc) {
|
public EntityZombieVillagerNPC(EntityType<? extends ZombieVillager> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.10.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>1.8</source>
|
||||||
<target>1.8</target>
|
<target>1.8</target>
|
||||||
@ -96,7 +96,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.2.1</version>
|
<version>3.3.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
|
@ -65,7 +65,6 @@ public class AxolotlController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
this.oldMoveController = this.moveControl;
|
this.oldMoveController = this.moveControl;
|
||||||
this.moveControl = new MoveControl(this);
|
this.moveControl = new MoveControl(this);
|
||||||
this.getAttribute(Attributes.MOVEMENT_SPEED)
|
this.getAttribute(Attributes.MOVEMENT_SPEED)
|
||||||
|
@ -52,7 +52,6 @@ public class BatController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
setFlying(false);
|
setFlying(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,9 +51,6 @@ public class BeeController extends MobEntityController {
|
|||||||
public EntityBeeNPC(EntityType<? extends Bee> types, Level level, NPC npc) {
|
public EntityBeeNPC(EntityType<? extends Bee> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -51,9 +51,6 @@ public class BlazeController extends MobEntityController {
|
|||||||
public EntityBlazeNPC(EntityType<? extends Blaze> types, Level level, NPC npc) {
|
public EntityBlazeNPC(EntityType<? extends Blaze> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -55,9 +55,6 @@ public class CatController extends MobEntityController {
|
|||||||
public EntityCatNPC(EntityType<? extends Cat> types, Level level, NPC npc) {
|
public EntityCatNPC(EntityType<? extends Cat> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -53,9 +53,6 @@ public class CaveSpiderController extends MobEntityController {
|
|||||||
public EntityCaveSpiderNPC(EntityType<? extends CaveSpider> types, Level level, NPC npc) {
|
public EntityCaveSpiderNPC(EntityType<? extends CaveSpider> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -55,9 +55,6 @@ public class ChickenController extends MobEntityController {
|
|||||||
public EntityChickenNPC(EntityType<? extends Chicken> types, Level level, NPC npc) {
|
public EntityChickenNPC(EntityType<? extends Chicken> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -62,7 +62,6 @@ public class CodController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
this.oldMoveController = this.moveControl;
|
this.oldMoveController = this.moveControl;
|
||||||
this.moveControl = new MoveControl(this);
|
this.moveControl = new MoveControl(this);
|
||||||
}
|
}
|
||||||
|
@ -60,9 +60,6 @@ public class CowController extends MobEntityController {
|
|||||||
public EntityCowNPC(EntityType<? extends Cow> types, Level level, NPC npc) {
|
public EntityCowNPC(EntityType<? extends Cow> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -55,9 +55,6 @@ public class CreeperController extends MobEntityController {
|
|||||||
public EntityCreeperNPC(EntityType<? extends Creeper> types, Level level, NPC npc) {
|
public EntityCreeperNPC(EntityType<? extends Creeper> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -57,7 +57,6 @@ public class DolphinController extends MobEntityController {
|
|||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
this.oldMoveController = this.moveControl;
|
this.oldMoveController = this.moveControl;
|
||||||
this.moveControl = new MoveControl(this);
|
this.moveControl = new MoveControl(this);
|
||||||
this.getAttribute(Attributes.MOVEMENT_SPEED)
|
this.getAttribute(Attributes.MOVEMENT_SPEED)
|
||||||
|
@ -53,9 +53,6 @@ public class DrownedController extends MobEntityController {
|
|||||||
public EntityDrownedNPC(EntityType<? extends Drowned> types, Level level, NPC npc) {
|
public EntityDrownedNPC(EntityType<? extends Drowned> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -52,9 +52,6 @@ public class EnderDragonController extends MobEntityController {
|
|||||||
public EntityEnderDragonNPC(EntityType<? extends EnderDragon> types, Level level, NPC npc) {
|
public EntityEnderDragonNPC(EntityType<? extends EnderDragon> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -56,9 +56,6 @@ public class EndermanController extends MobEntityController {
|
|||||||
public EntityEndermanNPC(EntityType<? extends EnderMan> types, Level level, NPC npc) {
|
public EntityEndermanNPC(EntityType<? extends EnderMan> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -53,9 +53,6 @@ public class EndermiteController extends MobEntityController {
|
|||||||
public EntityEndermiteNPC(EntityType<? extends Endermite> types, Level level, NPC npc) {
|
public EntityEndermiteNPC(EntityType<? extends Endermite> types, Level level, NPC npc) {
|
||||||
super(types, level);
|
super(types, level);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user