Use new API, fix exp orb NPCs, make old waypoint markers use leash knot instead of eye of ender

This commit is contained in:
fullwall 2024-06-19 22:03:38 +08:00
parent f86b387c82
commit 6eb9ae4235
20 changed files with 60 additions and 29 deletions

View File

@ -48,6 +48,7 @@ import net.citizensnpcs.api.event.CitizensPreReloadEvent;
import net.citizensnpcs.api.event.CitizensReloadEvent;
import net.citizensnpcs.api.event.DespawnReason;
import net.citizensnpcs.api.exception.NPCLoadException;
import net.citizensnpcs.api.npc.MemoryNPCDataStore;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.npc.NPCDataStore;
import net.citizensnpcs.api.npc.NPCRegistry;
@ -85,7 +86,6 @@ import net.milkbowl.vault.economy.Economy;
public class Citizens extends JavaPlugin implements CitizensPlugin {
private final List<NPCRegistry> anonymousRegistries = Lists.newArrayList();
private final List<NPCRegistry> citizensBackedRegistries = Lists.newArrayList();
private final CommandManager commands = new CommandManager();
private Settings config;
private boolean enabled;
@ -148,6 +148,7 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
private StoredShops shops;
private final Map<String, NPCRegistry> storedRegistries = Maps.newHashMap();
private TemplateRegistry templateRegistry;
private NPCRegistry temporaryRegistry;
private CitizensTraitFactory traitFactory;
@Override
@ -157,13 +158,6 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
return anon;
}
@Override
public NPCRegistry createCitizensBackedNPCRegistry(NPCDataStore store) {
CitizensNPCRegistry anon = new CitizensNPCRegistry(store, "anonymous-citizens-" + UUID.randomUUID().toString());
citizensBackedRegistries.add(anon);
return anon;
}
@Override
public NPCRegistry createNamedNPCRegistry(String name, NPCDataStore store) {
NPCRegistry created = new CitizensNPCRegistry(store, name);
@ -180,7 +174,7 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
}
private void despawnNPCs(boolean save) {
for (NPCRegistry registry : Iterables.concat(Arrays.asList(npcRegistry), citizensBackedRegistries)) {
for (NPCRegistry registry : Arrays.asList(npcRegistry, temporaryRegistry)) {
if (registry == null)
continue;
@ -235,7 +229,8 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
@Override
public NPCRegistry next() {
if (stored == null) {
stored = Iterables.concat(storedRegistries.values(), anonymousRegistries, citizensBackedRegistries)
stored = Iterables
.concat(storedRegistries.values(), anonymousRegistries, Arrays.asList(temporaryRegistry))
.iterator();
return npcRegistry;
}
@ -276,6 +271,11 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
return templateRegistry;
}
@Override
public NPCRegistry getTemporaryNPCRegistry() {
return temporaryRegistry;
}
@Override
public TraitFactory getTraitFactory() {
return traitFactory;
@ -391,6 +391,7 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
return;
}
npcRegistry = new CitizensNPCRegistry(saves, "citizens");
npcRegistry = new CitizensNPCRegistry(new MemoryNPCDataStore(), "citizens-temporary");
locationLookup = new LocationLookup(npcRegistry);
locationLookup.runTaskTimer(CitizensAPI.getPlugin(), 0, 5);

View File

@ -130,7 +130,7 @@ public class EventListen implements Listener {
skinUpdateTracker = new SkinUpdateTracker();
try {
Class.forName("org.bukkit.event.world.EntitiesLoadEvent");
Bukkit.getPluginManager().registerEvents(chunkEventListener = new Listener() {
Bukkit.getPluginManager().registerEvents(new Listener() {
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onEntitiesLoad(EntitiesLoadEvent event) {
loadNPCs(event);

View File

@ -189,7 +189,7 @@ public class NPCCommands {
selector = plugin.getNPCSelector();
shops = plugin.getShops();
templateRegistry = plugin.getTemplateRegistry();
temporaryRegistry = CitizensAPI.createCitizensBackedNPCRegistry(new MemoryNPCDataStore());
temporaryRegistry = plugin.getTemporaryNPCRegistry();
history = new CommandHistory(selector);
}
@ -3034,6 +3034,7 @@ public class NPCCommands {
args.getSenderLocation().getWorld().dropItem(args.getSenderLocation(), is);
} else
throw new ServerCommandException();
return;
} else {
if (args.argsLength() != 2) {
Messaging.send(sender, trait.getSkinName());

View File

@ -38,7 +38,6 @@ import net.citizensnpcs.api.CitizensAPI;
import net.citizensnpcs.api.command.Arg.CompletionsProvider;
import net.citizensnpcs.api.command.CommandContext;
import net.citizensnpcs.api.event.NPCEvent;
import net.citizensnpcs.api.npc.MemoryNPCDataStore;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.npc.NPCRegistry;
import net.citizensnpcs.api.persistence.Persist;
@ -67,7 +66,7 @@ public class HologramTrait extends Trait {
private double lineHeight = -1;
private final List<HologramLine> lines = Lists.newArrayList();
private HologramLine nameLine;
private final NPCRegistry registry = CitizensAPI.createCitizensBackedNPCRegistry(new MemoryNPCDataStore());
private final NPCRegistry registry = CitizensAPI.getTemporaryNPCRegistry();
private int t;
@Persist
private int viewRange = -1;
@ -739,8 +738,7 @@ public class HologramTrait extends Trait {
}
protected NPCRegistry registry() {
return registry == null ? registry = CitizensAPI.createCitizensBackedNPCRegistry(new MemoryNPCDataStore())
: registry;
return registry == null ? registry = CitizensAPI.getTemporaryNPCRegistry() : registry;
}
@Override

View File

@ -11,7 +11,6 @@ import com.google.common.collect.Maps;
import net.citizensnpcs.api.CitizensAPI;
import net.citizensnpcs.api.event.SpawnReason;
import net.citizensnpcs.api.npc.MemoryNPCDataStore;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.npc.NPCRegistry;
import net.citizensnpcs.npc.ai.NPCHolder;
@ -22,7 +21,7 @@ import net.citizensnpcs.util.Util;
*/
public class EntityMarkers<T> {
private final Map<T, Entity> markers = Maps.newHashMap();
private final NPCRegistry registry = CitizensAPI.createCitizensBackedNPCRegistry(new MemoryNPCDataStore());
private final NPCRegistry registry = CitizensAPI.getTemporaryNPCRegistry();
private EntityType type;
public EntityMarkers() {
@ -79,6 +78,7 @@ public class EntityMarkers<T> {
return npc.getEntity();
}
private static final EntityType DEFAULT_ENTITY_TYPE = Util.getFallbackEntityType("SHULKER_BULLET", "ENDER_SIGNAL");
private static final EntityType DEFAULT_ENTITY_TYPE = Util.getFallbackEntityType("SHULKER_BULLET", "LEASH_KNOT",
"LEASH_HITCH");
}

View File

@ -102,11 +102,12 @@ public class GuidedWaypointProvider implements EnumerableWaypointProvider {
}
}
private NPC createMarker(Waypoint element) {
Entity entity = markers.createMarker(element, element.getLocation().clone().add(0, 1, 0));
private NPC createMarker(Waypoint waypoint) {
Entity entity = markers.createMarker(waypoint, waypoint.getLocation().clone().add(0, 1, 0));
if (entity == null)
return null;
((NPCHolder) entity).getNPC().data().setPersistent("waypointhashcode", element.hashCode());
NPC npc2 = ((NPCHolder) entity).getNPC();
npc2.data().setPersistent("waypointhashcode", waypoint.hashCode());
return ((NPCHolder) entity).getNPC();
}

View File

@ -242,14 +242,18 @@ public class Util {
return entity instanceof LivingEntity ? ((LivingEntity) entity).getEyeLocation() : entity.getLocation();
}
public static EntityType getFallbackEntityType(String first, String second) {
for (EntityType type : EntityType.values()) {
if (type.name().equals(first))
return type;
if (type.name().equals(second))
return type;
public static EntityType getFallbackEntityType(String first, String... second) {
try {
return EntityType.valueOf(first);
} catch (IllegalArgumentException e) {
for (String s : second) {
try {
return EntityType.valueOf(s);
} catch (IllegalArgumentException iae) {
}
}
return null;
}
return null;
}
public static Material getFallbackMaterial(String first, String... second) {

View File

@ -129,6 +129,7 @@ import net.citizensnpcs.nms.v1_10_R1.entity.nonliving.EggController;
import net.citizensnpcs.nms.v1_10_R1.entity.nonliving.EnderCrystalController;
import net.citizensnpcs.nms.v1_10_R1.entity.nonliving.EnderPearlController;
import net.citizensnpcs.nms.v1_10_R1.entity.nonliving.EnderSignalController;
import net.citizensnpcs.nms.v1_10_R1.entity.nonliving.ExperienceOrbController;
import net.citizensnpcs.nms.v1_10_R1.entity.nonliving.FallingBlockController;
import net.citizensnpcs.nms.v1_10_R1.entity.nonliving.FireworkController;
import net.citizensnpcs.nms.v1_10_R1.entity.nonliving.FishingHookController;
@ -787,6 +788,7 @@ public class NMSImpl implements NMSBridge {
EntityControllers.setEntityControllerForType(EntityType.SPIDER, SpiderController.class);
EntityControllers.setEntityControllerForType(EntityType.SPLASH_POTION, ThrownPotionController.class);
EntityControllers.setEntityControllerForType(EntityType.SQUID, SquidController.class);
EntityControllers.setEntityControllerForType(EntityType.EXPERIENCE_ORB, ExperienceOrbController.class);
EntityControllers.setEntityControllerForType(EntityType.TIPPED_ARROW, TippedArrowController.class);
EntityControllers.setEntityControllerForType(EntityType.THROWN_EXP_BOTTLE, ThrownExpBottleController.class);
EntityControllers.setEntityControllerForType(EntityType.PRIMED_TNT, TNTPrimedController.class);

View File

@ -143,6 +143,7 @@ import net.citizensnpcs.nms.v1_11_R1.entity.nonliving.EnderCrystalController;
import net.citizensnpcs.nms.v1_11_R1.entity.nonliving.EnderPearlController;
import net.citizensnpcs.nms.v1_11_R1.entity.nonliving.EnderSignalController;
import net.citizensnpcs.nms.v1_11_R1.entity.nonliving.EvokerFangsController;
import net.citizensnpcs.nms.v1_11_R1.entity.nonliving.ExperienceOrbController;
import net.citizensnpcs.nms.v1_11_R1.entity.nonliving.FallingBlockController;
import net.citizensnpcs.nms.v1_11_R1.entity.nonliving.FireworkController;
import net.citizensnpcs.nms.v1_11_R1.entity.nonliving.FishingHookController;
@ -836,6 +837,7 @@ public class NMSImpl implements NMSBridge {
EntityControllers.setEntityControllerForType(EntityType.SPIDER, SpiderController.class);
EntityControllers.setEntityControllerForType(EntityType.SPLASH_POTION, ThrownPotionController.class);
EntityControllers.setEntityControllerForType(EntityType.SQUID, SquidController.class);
EntityControllers.setEntityControllerForType(EntityType.EXPERIENCE_ORB, ExperienceOrbController.class);
EntityControllers.setEntityControllerForType(EntityType.TIPPED_ARROW, TippedArrowController.class);
EntityControllers.setEntityControllerForType(EntityType.THROWN_EXP_BOTTLE, ThrownExpBottleController.class);
EntityControllers.setEntityControllerForType(EntityType.PRIMED_TNT, TNTPrimedController.class);

View File

@ -146,6 +146,7 @@ import net.citizensnpcs.nms.v1_12_R1.entity.nonliving.EnderCrystalController;
import net.citizensnpcs.nms.v1_12_R1.entity.nonliving.EnderPearlController;
import net.citizensnpcs.nms.v1_12_R1.entity.nonliving.EnderSignalController;
import net.citizensnpcs.nms.v1_12_R1.entity.nonliving.EvokerFangsController;
import net.citizensnpcs.nms.v1_12_R1.entity.nonliving.ExperienceOrbController;
import net.citizensnpcs.nms.v1_12_R1.entity.nonliving.FallingBlockController;
import net.citizensnpcs.nms.v1_12_R1.entity.nonliving.FireworkController;
import net.citizensnpcs.nms.v1_12_R1.entity.nonliving.FishingHookController;
@ -841,6 +842,7 @@ public class NMSImpl implements NMSBridge {
EntityControllers.setEntityControllerForType(EntityType.SPIDER, SpiderController.class);
EntityControllers.setEntityControllerForType(EntityType.SPLASH_POTION, ThrownPotionController.class);
EntityControllers.setEntityControllerForType(EntityType.SQUID, SquidController.class);
EntityControllers.setEntityControllerForType(EntityType.EXPERIENCE_ORB, ExperienceOrbController.class);
EntityControllers.setEntityControllerForType(EntityType.TIPPED_ARROW, TippedArrowController.class);
EntityControllers.setEntityControllerForType(EntityType.THROWN_EXP_BOTTLE, ThrownExpBottleController.class);
EntityControllers.setEntityControllerForType(EntityType.PRIMED_TNT, TNTPrimedController.class);

View File

@ -154,6 +154,7 @@ import net.citizensnpcs.nms.v1_13_R2.entity.nonliving.EnderCrystalController;
import net.citizensnpcs.nms.v1_13_R2.entity.nonliving.EnderPearlController;
import net.citizensnpcs.nms.v1_13_R2.entity.nonliving.EnderSignalController;
import net.citizensnpcs.nms.v1_13_R2.entity.nonliving.EvokerFangsController;
import net.citizensnpcs.nms.v1_13_R2.entity.nonliving.ExperienceOrbController;
import net.citizensnpcs.nms.v1_13_R2.entity.nonliving.FallingBlockController;
import net.citizensnpcs.nms.v1_13_R2.entity.nonliving.FireworkController;
import net.citizensnpcs.nms.v1_13_R2.entity.nonliving.FishingHookController;
@ -873,6 +874,7 @@ public class NMSImpl implements NMSBridge {
EntityControllers.setEntityControllerForType(EntityType.SPIDER, SpiderController.class);
EntityControllers.setEntityControllerForType(EntityType.SPLASH_POTION, ThrownPotionController.class);
EntityControllers.setEntityControllerForType(EntityType.SQUID, SquidController.class);
EntityControllers.setEntityControllerForType(EntityType.EXPERIENCE_ORB, ExperienceOrbController.class);
EntityControllers.setEntityControllerForType(EntityType.TIPPED_ARROW, TippedArrowController.class);
EntityControllers.setEntityControllerForType(EntityType.THROWN_EXP_BOTTLE, ThrownExpBottleController.class);
EntityControllers.setEntityControllerForType(EntityType.TRIDENT, ThrownTridentController.class);

View File

@ -158,6 +158,7 @@ import net.citizensnpcs.nms.v1_14_R1.entity.nonliving.EnderCrystalController;
import net.citizensnpcs.nms.v1_14_R1.entity.nonliving.EnderPearlController;
import net.citizensnpcs.nms.v1_14_R1.entity.nonliving.EnderSignalController;
import net.citizensnpcs.nms.v1_14_R1.entity.nonliving.EvokerFangsController;
import net.citizensnpcs.nms.v1_14_R1.entity.nonliving.ExperienceOrbController;
import net.citizensnpcs.nms.v1_14_R1.entity.nonliving.FallingBlockController;
import net.citizensnpcs.nms.v1_14_R1.entity.nonliving.FireworkController;
import net.citizensnpcs.nms.v1_14_R1.entity.nonliving.FishingHookController;
@ -943,6 +944,7 @@ public class NMSImpl implements NMSBridge {
EntityControllers.setEntityControllerForType(EntityType.SPIDER, SpiderController.class);
EntityControllers.setEntityControllerForType(EntityType.SPLASH_POTION, ThrownPotionController.class);
EntityControllers.setEntityControllerForType(EntityType.SQUID, SquidController.class);
EntityControllers.setEntityControllerForType(EntityType.EXPERIENCE_ORB, ExperienceOrbController.class);
EntityControllers.setEntityControllerForType(EntityType.SPECTRAL_ARROW, TippedArrowController.class);
EntityControllers.setEntityControllerForType(EntityType.THROWN_EXP_BOTTLE, ThrownExpBottleController.class);
EntityControllers.setEntityControllerForType(EntityType.TRIDENT, ThrownTridentController.class);

View File

@ -159,6 +159,7 @@ import net.citizensnpcs.nms.v1_15_R1.entity.nonliving.EnderCrystalController;
import net.citizensnpcs.nms.v1_15_R1.entity.nonliving.EnderPearlController;
import net.citizensnpcs.nms.v1_15_R1.entity.nonliving.EnderSignalController;
import net.citizensnpcs.nms.v1_15_R1.entity.nonliving.EvokerFangsController;
import net.citizensnpcs.nms.v1_15_R1.entity.nonliving.ExperienceOrbController;
import net.citizensnpcs.nms.v1_15_R1.entity.nonliving.FallingBlockController;
import net.citizensnpcs.nms.v1_15_R1.entity.nonliving.FireworkController;
import net.citizensnpcs.nms.v1_15_R1.entity.nonliving.FishingHookController;
@ -960,6 +961,7 @@ public class NMSImpl implements NMSBridge {
EntityControllers.setEntityControllerForType(EntityType.SPIDER, SpiderController.class);
EntityControllers.setEntityControllerForType(EntityType.SPLASH_POTION, ThrownPotionController.class);
EntityControllers.setEntityControllerForType(EntityType.SQUID, SquidController.class);
EntityControllers.setEntityControllerForType(EntityType.EXPERIENCE_ORB, ExperienceOrbController.class);
EntityControllers.setEntityControllerForType(EntityType.SPECTRAL_ARROW, TippedArrowController.class);
EntityControllers.setEntityControllerForType(EntityType.THROWN_EXP_BOTTLE, ThrownExpBottleController.class);
EntityControllers.setEntityControllerForType(EntityType.TRIDENT, ThrownTridentController.class);

View File

@ -166,6 +166,7 @@ import net.citizensnpcs.nms.v1_16_R3.entity.nonliving.EnderCrystalController;
import net.citizensnpcs.nms.v1_16_R3.entity.nonliving.EnderPearlController;
import net.citizensnpcs.nms.v1_16_R3.entity.nonliving.EnderSignalController;
import net.citizensnpcs.nms.v1_16_R3.entity.nonliving.EvokerFangsController;
import net.citizensnpcs.nms.v1_16_R3.entity.nonliving.ExperienceOrbController;
import net.citizensnpcs.nms.v1_16_R3.entity.nonliving.FallingBlockController;
import net.citizensnpcs.nms.v1_16_R3.entity.nonliving.FireworkController;
import net.citizensnpcs.nms.v1_16_R3.entity.nonliving.FishingHookController;
@ -990,6 +991,7 @@ public class NMSImpl implements NMSBridge {
EntityControllers.setEntityControllerForType(EntityType.SPIDER, SpiderController.class);
EntityControllers.setEntityControllerForType(EntityType.SPLASH_POTION, ThrownPotionController.class);
EntityControllers.setEntityControllerForType(EntityType.SQUID, SquidController.class);
EntityControllers.setEntityControllerForType(EntityType.EXPERIENCE_ORB, ExperienceOrbController.class);
EntityControllers.setEntityControllerForType(EntityType.SPECTRAL_ARROW, TippedArrowController.class);
EntityControllers.setEntityControllerForType(EntityType.THROWN_EXP_BOTTLE, ThrownExpBottleController.class);
EntityControllers.setEntityControllerForType(EntityType.TRIDENT, ThrownTridentController.class);

View File

@ -164,6 +164,7 @@ import net.citizensnpcs.nms.v1_17_R1.entity.nonliving.EnderCrystalController;
import net.citizensnpcs.nms.v1_17_R1.entity.nonliving.EnderPearlController;
import net.citizensnpcs.nms.v1_17_R1.entity.nonliving.EnderSignalController;
import net.citizensnpcs.nms.v1_17_R1.entity.nonliving.EvokerFangsController;
import net.citizensnpcs.nms.v1_17_R1.entity.nonliving.ExperienceOrbController;
import net.citizensnpcs.nms.v1_17_R1.entity.nonliving.FallingBlockController;
import net.citizensnpcs.nms.v1_17_R1.entity.nonliving.FireworkController;
import net.citizensnpcs.nms.v1_17_R1.entity.nonliving.FishingHookController;
@ -998,6 +999,7 @@ public class NMSImpl implements NMSBridge {
EntityControllers.setEntityControllerForType(EntityType.SPIDER, SpiderController.class);
EntityControllers.setEntityControllerForType(EntityType.SPLASH_POTION, ThrownPotionController.class);
EntityControllers.setEntityControllerForType(EntityType.SQUID, SquidController.class);
EntityControllers.setEntityControllerForType(EntityType.EXPERIENCE_ORB, ExperienceOrbController.class);
EntityControllers.setEntityControllerForType(EntityType.GLOW_SQUID, GlowSquidController.class);
EntityControllers.setEntityControllerForType(EntityType.SPECTRAL_ARROW, TippedArrowController.class);
EntityControllers.setEntityControllerForType(EntityType.THROWN_EXP_BOTTLE, ThrownExpBottleController.class);

View File

@ -165,6 +165,7 @@ import net.citizensnpcs.nms.v1_18_R2.entity.nonliving.EnderCrystalController;
import net.citizensnpcs.nms.v1_18_R2.entity.nonliving.EnderPearlController;
import net.citizensnpcs.nms.v1_18_R2.entity.nonliving.EnderSignalController;
import net.citizensnpcs.nms.v1_18_R2.entity.nonliving.EvokerFangsController;
import net.citizensnpcs.nms.v1_18_R2.entity.nonliving.ExperienceOrbController;
import net.citizensnpcs.nms.v1_18_R2.entity.nonliving.FallingBlockController;
import net.citizensnpcs.nms.v1_18_R2.entity.nonliving.FireworkController;
import net.citizensnpcs.nms.v1_18_R2.entity.nonliving.FishingHookController;
@ -1005,6 +1006,7 @@ public class NMSImpl implements NMSBridge {
EntityControllers.setEntityControllerForType(EntityType.SPIDER, SpiderController.class);
EntityControllers.setEntityControllerForType(EntityType.SPLASH_POTION, ThrownPotionController.class);
EntityControllers.setEntityControllerForType(EntityType.SQUID, SquidController.class);
EntityControllers.setEntityControllerForType(EntityType.EXPERIENCE_ORB, ExperienceOrbController.class);
EntityControllers.setEntityControllerForType(EntityType.GLOW_SQUID, GlowSquidController.class);
EntityControllers.setEntityControllerForType(EntityType.SPECTRAL_ARROW, TippedArrowController.class);
EntityControllers.setEntityControllerForType(EntityType.THROWN_EXP_BOTTLE, ThrownExpBottleController.class);

View File

@ -179,6 +179,7 @@ import net.citizensnpcs.nms.v1_19_R3.entity.nonliving.EnderCrystalController;
import net.citizensnpcs.nms.v1_19_R3.entity.nonliving.EnderPearlController;
import net.citizensnpcs.nms.v1_19_R3.entity.nonliving.EnderSignalController;
import net.citizensnpcs.nms.v1_19_R3.entity.nonliving.EvokerFangsController;
import net.citizensnpcs.nms.v1_19_R3.entity.nonliving.ExperienceOrbController;
import net.citizensnpcs.nms.v1_19_R3.entity.nonliving.FallingBlockController;
import net.citizensnpcs.nms.v1_19_R3.entity.nonliving.FireworkController;
import net.citizensnpcs.nms.v1_19_R3.entity.nonliving.FishingHookController;
@ -1080,6 +1081,7 @@ public class NMSImpl implements NMSBridge {
EntityControllers.setEntityControllerForType(EntityType.SPIDER, SpiderController.class);
EntityControllers.setEntityControllerForType(EntityType.SPLASH_POTION, ThrownPotionController.class);
EntityControllers.setEntityControllerForType(EntityType.SQUID, SquidController.class);
EntityControllers.setEntityControllerForType(EntityType.EXPERIENCE_ORB, ExperienceOrbController.class);
EntityControllers.setEntityControllerForType(EntityType.GLOW_SQUID, GlowSquidController.class);
EntityControllers.setEntityControllerForType(EntityType.SPECTRAL_ARROW, TippedArrowController.class);
EntityControllers.setEntityControllerForType(EntityType.THROWN_EXP_BOTTLE, ThrownExpBottleController.class);

View File

@ -172,6 +172,7 @@ import net.citizensnpcs.nms.v1_20_R4.entity.nonliving.EggController;
import net.citizensnpcs.nms.v1_20_R4.entity.nonliving.EnderCrystalController;
import net.citizensnpcs.nms.v1_20_R4.entity.nonliving.EnderPearlController;
import net.citizensnpcs.nms.v1_20_R4.entity.nonliving.EvokerFangsController;
import net.citizensnpcs.nms.v1_20_R4.entity.nonliving.ExperienceOrbController;
import net.citizensnpcs.nms.v1_20_R4.entity.nonliving.EyeOfEnderController;
import net.citizensnpcs.nms.v1_20_R4.entity.nonliving.FallingBlockController;
import net.citizensnpcs.nms.v1_20_R4.entity.nonliving.FireworkController;
@ -996,6 +997,7 @@ public class NMSImpl implements NMSBridge {
EntityControllers.setEntityControllerForType(EntityType.ENDERMITE, EndermiteController.class);
EntityControllers.setEntityControllerForType(EntityType.EVOKER, EvokerController.class);
EntityControllers.setEntityControllerForType(EntityType.EVOKER_FANGS, EvokerFangsController.class);
EntityControllers.setEntityControllerForType(EntityType.EXPERIENCE_ORB, ExperienceOrbController.class);
EntityControllers.setEntityControllerForType(EntityType.EXPERIENCE_BOTTLE, ThrownExpBottleController.class);
EntityControllers.setEntityControllerForType(EntityType.EYE_OF_ENDER, EyeOfEnderController.class);
EntityControllers.setEntityControllerForType(EntityType.FALLING_BLOCK, FallingBlockController.class);

View File

@ -172,6 +172,7 @@ import net.citizensnpcs.nms.v1_21_R1.entity.nonliving.EggController;
import net.citizensnpcs.nms.v1_21_R1.entity.nonliving.EnderCrystalController;
import net.citizensnpcs.nms.v1_21_R1.entity.nonliving.EnderPearlController;
import net.citizensnpcs.nms.v1_21_R1.entity.nonliving.EvokerFangsController;
import net.citizensnpcs.nms.v1_21_R1.entity.nonliving.ExperienceOrbController;
import net.citizensnpcs.nms.v1_21_R1.entity.nonliving.EyeOfEnderController;
import net.citizensnpcs.nms.v1_21_R1.entity.nonliving.FallingBlockController;
import net.citizensnpcs.nms.v1_21_R1.entity.nonliving.FireworkController;
@ -975,6 +976,7 @@ public class NMSImpl implements NMSBridge {
EntityControllers.setEntityControllerForType(EntityType.ENDERMITE, EndermiteController.class);
EntityControllers.setEntityControllerForType(EntityType.EVOKER, EvokerController.class);
EntityControllers.setEntityControllerForType(EntityType.EVOKER_FANGS, EvokerFangsController.class);
EntityControllers.setEntityControllerForType(EntityType.EXPERIENCE_ORB, ExperienceOrbController.class);
EntityControllers.setEntityControllerForType(EntityType.EXPERIENCE_BOTTLE, ThrownExpBottleController.class);
EntityControllers.setEntityControllerForType(EntityType.EYE_OF_ENDER, EyeOfEnderController.class);
EntityControllers.setEntityControllerForType(EntityType.FALLING_BLOCK, FallingBlockController.class);

View File

@ -122,6 +122,7 @@ import net.citizensnpcs.nms.v1_8_R3.entity.nonliving.EggController;
import net.citizensnpcs.nms.v1_8_R3.entity.nonliving.EnderCrystalController;
import net.citizensnpcs.nms.v1_8_R3.entity.nonliving.EnderPearlController;
import net.citizensnpcs.nms.v1_8_R3.entity.nonliving.EnderSignalController;
import net.citizensnpcs.nms.v1_8_R3.entity.nonliving.ExperienceOrbController;
import net.citizensnpcs.nms.v1_8_R3.entity.nonliving.FallingBlockController;
import net.citizensnpcs.nms.v1_8_R3.entity.nonliving.FireworkController;
import net.citizensnpcs.nms.v1_8_R3.entity.nonliving.FishingHookController;
@ -726,6 +727,7 @@ public class NMSImpl implements NMSBridge {
EntityControllers.setEntityControllerForType(EntityType.SNOWMAN, SnowmanController.class);
EntityControllers.setEntityControllerForType(EntityType.SPIDER, SpiderController.class);
EntityControllers.setEntityControllerForType(EntityType.SQUID, SquidController.class);
EntityControllers.setEntityControllerForType(EntityType.EXPERIENCE_ORB, ExperienceOrbController.class);
EntityControllers.setEntityControllerForType(EntityType.THROWN_EXP_BOTTLE, ThrownExpBottleController.class);
EntityControllers.setEntityControllerForType(EntityType.PRIMED_TNT, TNTPrimedController.class);
EntityControllers.setEntityControllerForType(EntityType.VILLAGER, VillagerController.class);