Initial 1.20.5 update. TODO: refactor NBT to remove JNBT and work with trees instead

This commit is contained in:
fullwall 2024-04-24 05:34:31 +08:00
parent 5533961066
commit 70c40dcb22
178 changed files with 3115 additions and 1932 deletions

View File

@ -4,12 +4,12 @@
<parent>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens-parent</artifactId>
<version>2.0.33-SNAPSHOT</version>
<version>2.0.34-SNAPSHOT</version>
</parent>
<artifactId>citizens-main</artifactId>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<craftbukkit.version>1.20.4-R0.1-SNAPSHOT</craftbukkit.version>
<craftbukkit.version>1.20.5-R0.1-SNAPSHOT</craftbukkit.version>
<placeholderapi.version>2.11.5</placeholderapi.version>
<citizensapi.version>${project.version}</citizensapi.version>
<worldguard.version>7.1.0-SNAPSHOT</worldguard.version>

View File

@ -960,8 +960,11 @@ public class NPCCommands {
max = 1,
flags = "b",
permission = "citizens.npc.endercrystal")
@Requirements(ownership = true, selected = true, types = EntityType.ENDER_CRYSTAL)
@Requirements(ownership = true, selected = true)
public void endercrystal(CommandContext args, CommandSender sender, NPC npc) throws CommandException {
if (!npc.getOrAddTrait(MobType.class).getType().name().equals("END_CRYSTAL")
&& !npc.getOrAddTrait(MobType.class).getType().name().equals("ENDER_CRYSTAL"))
throw new CommandException();
if (args.hasFlag('b')) {
EnderCrystalTrait trait = npc.getOrAddTrait(EnderCrystalTrait.class);
boolean showing = !trait.isShowBase();
@ -1396,8 +1399,9 @@ public class NPCCommands {
public void item(CommandContext args, CommandSender sender, NPC npc, @Arg(1) Material mat, @Arg(2) String modify)
throws CommandException {
EntityType type = npc.getOrAddTrait(MobType.class).getType();
if (!type.name().contains("ITEM_FRAME") && !type.name().contains("ITEM_DISPLAY")
&& !type.name().contains("BLOCK_DISPLAY") && type != EntityType.DROPPED_ITEM
if (!type.name().equals("OMINOUS_ITEM_SPAWNER") && !type.name().contains("ITEM_FRAME")
&& !type.name().contains("ITEM_DISPLAY") && !type.name().contains("BLOCK_DISPLAY")
&& !type.name().equals("DROPPED_ITEM") && !type.name().equals("ITEM")
&& type != EntityType.FALLING_BLOCK)
throw new CommandException(CommandMessages.REQUIREMENTS_INVALID_MOB_TYPE, Util.prettyEnum(type));
ItemStack stack = args.hasFlag('h') ? ((Player) sender).getItemInHand() : new ItemStack(mat, 1);
@ -1745,14 +1749,11 @@ public class NPCCommands {
max = 1,
flags = "",
permission = "citizens.npc.minecart")
@Requirements(
selected = true,
ownership = true,
types = { EntityType.MINECART, EntityType.MINECART_CHEST, EntityType.MINECART_COMMAND,
EntityType.MINECART_FURNACE, EntityType.MINECART_HOPPER, EntityType.MINECART_MOB_SPAWNER,
EntityType.MINECART_TNT })
@Requirements(selected = true, ownership = true)
public void minecart(CommandContext args, CommandSender sender, NPC npc, @Flag("item") String item)
throws CommandException {
if (!npc.getOrAddTrait(MobType.class).getType().name().contains("MINECRAFT"))
throw new CommandUsageException();
if (item != null) {
int data = 0;
if (item.contains(":")) {

View File

@ -85,7 +85,8 @@ public class CitizensNPCRegistry implements NPCRegistry {
@Override
public NPC createNPCUsingItem(EntityType type, String name, ItemStack item) {
NPC npc = createNPC(type, name);
if (type == EntityType.DROPPED_ITEM || type == EntityType.FALLING_BLOCK || type == EntityType.ITEM_FRAME
if (type.name().equals("OMINOUS_ITEM_SPAWNER") || type.name().equals("DROPPED_ITEM")
|| type.name().equals("ITEM") || type == EntityType.FALLING_BLOCK || type == EntityType.ITEM_FRAME
|| type.name().equals("GLOW_ITEM_FRAME") || type.name().equals("ITEM_DISPLAY")
|| type.name().equals("BLOCK_DISPLAY")) {
npc.data().set(NPC.Metadata.ITEM_AMOUNT, item.getAmount());

View File

@ -538,7 +538,7 @@ public class HologramTrait extends Trait {
Material item = SpigotUtil.isUsing1_13API() ? Material.matchMaterial(itemMatcher.group(1), false)
: Material.matchMaterial(itemMatcher.group(1));
ItemStack itemStack = new ItemStack(item, 1);
itemNPC = registry.createNPCUsingItem(EntityType.DROPPED_ITEM, "", itemStack);
itemNPC = registry.createNPCUsingItem(Util.getFallbackEntityType("ITEM", "DROPPED_ITEM"), "", itemStack);
itemNPC.data().setPersistent(NPC.Metadata.NAMEPLATE_VISIBLE, false);
if (itemMatcher.group(2) != null) {
if (itemMatcher.group(2).charAt(1) == '{') {

View File

@ -245,12 +245,6 @@ public class ScoreboardTrait extends Trait {
changed = false;
}
public enum TeamPacketMode {
ADD,
REMOVE,
UPDATE;
}
private static boolean SUPPORT_COLLIDABLE_SETOPTION = true;
private static boolean SUPPORT_GLOWING_COLOR = true;
private static boolean SUPPORT_TAGS = true;

View File

@ -279,7 +279,7 @@ public class ItemAction extends NPCShopAction {
"Compare item similarity", base.compareSimilarity ? ChatColor.GREEN + "On" : ChatColor.RED + "Off");
ctx.getSlot(3 * 9 + 2)
.addClickHandler(InputMenus.toggler(res -> base.compareSimilarity = res, base.compareSimilarity));
ctx.getSlot(3 * 9 + 3).setItemStack(new ItemStack(Material.BOOK), "NBT comparison filter",
ctx.getSlot(3 * 9 + 3).setItemStack(new ItemStack(Material.BOOK), "Component comparison filter",
Joiner.on("\n").join(base.metaFilter));
ctx.getSlot(3 * 9 + 3)
.addClickHandler(event -> ctx.getMenu()

View File

@ -1,7 +1,6 @@
package net.citizensnpcs.trait.versioned;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.MushroomCow;
import org.bukkit.entity.MushroomCow.Variant;
@ -15,6 +14,7 @@ import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.persistence.Persist;
import net.citizensnpcs.api.trait.Trait;
import net.citizensnpcs.api.trait.TraitName;
import net.citizensnpcs.api.trait.trait.MobType;
import net.citizensnpcs.api.util.Messaging;
import net.citizensnpcs.util.Messages;
import net.citizensnpcs.util.Util;
@ -52,13 +52,16 @@ public class MushroomCowTrait extends Trait {
aliases = { "npc" },
usage = "mushroomcow (--variant [variant])",
desc = "",
modifiers = { "mushroomcow" },
modifiers = { "mushroomcow", "mooshroom" },
min = 1,
max = 1,
permission = "citizens.npc.mushroomcow")
@Requirements(selected = true, ownership = true, types = { EntityType.MUSHROOM_COW })
@Requirements(selected = true, ownership = true)
public static void mushroomcow(CommandContext args, CommandSender sender, NPC npc,
@Flag("variant") MushroomCow.Variant variant) throws CommandException {
if (!npc.getOrAddTrait(MobType.class).getType().name().equals("MOOSHROOM")
&& !npc.getOrAddTrait(MobType.class).getType().name().equals("MUSHROOM_COW"))
throw new CommandUsageException();
MushroomCowTrait trait = npc.getOrAddTrait(MushroomCowTrait.class);
boolean hasArg = false;
if (args.hasValueFlag("variant")) {

View File

@ -1,7 +1,6 @@
package net.citizensnpcs.trait.versioned;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Snowman;
import net.citizensnpcs.api.command.Command;
@ -13,6 +12,7 @@ import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.persistence.Persist;
import net.citizensnpcs.api.trait.Trait;
import net.citizensnpcs.api.trait.TraitName;
import net.citizensnpcs.api.trait.trait.MobType;
import net.citizensnpcs.api.util.Messaging;
import net.citizensnpcs.util.Messages;
@ -58,13 +58,16 @@ public class SnowmanTrait extends Trait {
aliases = { "npc" },
usage = "snowman (-d[erp]) (-f[orm snow])",
desc = "",
modifiers = { "snowman" },
modifiers = { "snowman", "snowgolem" },
min = 1,
max = 1,
flags = "df",
permission = "citizens.npc.snowman")
@Requirements(selected = true, ownership = true, types = { EntityType.SNOWMAN })
@Requirements(selected = true, ownership = true)
public static void snowman(CommandContext args, CommandSender sender, NPC npc) throws CommandException {
if (!npc.getOrAddTrait(MobType.class).getType().name().equals("SNOWMAN")
&& !npc.getOrAddTrait(MobType.class).getType().name().equals("SNOW_GOLEM"))
throw new CommandUsageException();
SnowmanTrait trait = npc.getOrAddTrait(SnowmanTrait.class);
boolean hasArg = false;
if (args.hasFlag('d')) {

View File

@ -15,6 +15,7 @@ import net.citizensnpcs.api.npc.MemoryNPCDataStore;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.npc.NPCRegistry;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
/**
* A helper class for storing a number of entity markers. By default an entity marker is a non-persisted EnderSignal.
@ -78,12 +79,6 @@ public class EntityMarkers<T> {
return npc.getEntity();
}
private static EntityType DEFAULT_ENTITY_TYPE = EntityType.ENDER_SIGNAL;
private static final EntityType DEFAULT_ENTITY_TYPE = Util.getFallbackEntityType("SHULKER_BULLET", "ENDER_SIGNAL");
static {
try {
DEFAULT_ENTITY_TYPE = EntityType.valueOf("SHULKER_BULLET");
} catch (IllegalArgumentException e) {
}
}
}

View File

@ -240,6 +240,16 @@ 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;
}
return null;
}
public static Material getFallbackMaterial(String first, String... second) {
try {
return Material.valueOf(first);
@ -274,10 +284,8 @@ public class Util {
}
public static boolean isAlwaysFlyable(EntityType type) {
if (type.name().toLowerCase().equals("vex") || type.name().toLowerCase().equals("parrot")
|| type.name().toLowerCase().equals("allay") || type.name().toLowerCase().equals("bee")
|| type.name().toLowerCase().equals("phantom"))
// 1.8.8 compatibility
if (type.name().equals("VEX") || type.name().equals("PARROT") || type.name().equals("ALLAY")
|| type.name().equals("BEE") || type.name().equals("PHANTOM") || type.name().equals("BREEZE"))
return true;
switch (type) {
case BAT:
@ -339,7 +347,7 @@ public class Util {
toMatch = toMatch.toLowerCase().replace('-', '_').replace(' ', '_');
for (T check : values) {
if (toMatch.equals(check.name().toLowerCase())
|| toMatch.equals("item") && check == EntityType.DROPPED_ITEM)
|| toMatch.equals("item") && check.name().equals("DROPPED_ITEM"))
return check; // check for an exact match first
}
@ -600,6 +608,7 @@ public class Util {
private static final Scoreboard DUMMY_SCOREBOARD = Bukkit.getScoreboardManager().getNewScoreboard();
private static boolean SUPPORTS_BUKKIT_GETENTITY = true;
private static boolean SUPPORTS_ENTITY_CANSEE = true;
private static final DecimalFormat TWO_DIGIT_DECIMAL = new DecimalFormat();
static {

20
pom.xml
View File

@ -6,16 +6,16 @@
<packaging>pom</packaging>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens-parent</artifactId>
<version>2.0.33-SNAPSHOT</version>
<version>2.0.34-SNAPSHOT</version>
<properties>
<BUILD_NUMBER>Unknown</BUILD_NUMBER>
<CITIZENS_VERSION>2.0.33</CITIZENS_VERSION>
<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
<maven-assembly-plugin.version>3.5.0</maven-assembly-plugin.version>
<CITIZENS_VERSION>2.0.34</CITIZENS_VERSION>
<maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
<maven-assembly-plugin.version>3.7.1</maven-assembly-plugin.version>
<maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
<maven-shade-plugin.version>3.4.1</maven-shade-plugin.version>
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
<maven-jar-plugin.version>3.4.1</maven-jar-plugin.version>
<maven-shade-plugin.version>3.5.2</maven-shade-plugin.version>
</properties>
<distributionManagement>
<repository>
@ -44,7 +44,7 @@
<module>v1_16_R3</module>
<module>v1_18_R2</module>
<module>v1_19_R3</module>
<module>v1_20_R3</module>
<module>v1_20_R4</module>
<module>dist</module>
</modules>
</profile>
@ -63,7 +63,7 @@
<module>v1_17_R1</module>
<module>v1_18_R2</module>
<module>v1_19_R3</module>
<module>v1_20_R3</module>
<module>v1_20_R4</module>
<module>dist</module>
</modules>
</profile>
@ -71,7 +71,7 @@
<id>dev</id>
<modules>
<module>main</module>
<module>v1_20_R3</module>
<module>v1_20_R4</module>
<module>dist</module>
</modules>
</profile>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens-parent</artifactId>
<version>2.0.33-SNAPSHOT</version>
<version>2.0.34-SNAPSHOT</version>
</parent>
<artifactId>citizens-v1_10_R1</artifactId>
<properties>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens-parent</artifactId>
<version>2.0.33-SNAPSHOT</version>
<version>2.0.34-SNAPSHOT</version>
</parent>
<artifactId>citizens-v1_11_R1</artifactId>
<properties>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens-parent</artifactId>
<version>2.0.33-SNAPSHOT</version>
<version>2.0.34-SNAPSHOT</version>
</parent>
<artifactId>citizens-v1_12_R1</artifactId>
<properties>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens-parent</artifactId>
<version>2.0.33-SNAPSHOT</version>
<version>2.0.34-SNAPSHOT</version>
</parent>
<artifactId>citizens-v1_13_R2</artifactId>
<properties>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens-parent</artifactId>
<version>2.0.33-SNAPSHOT</version>
<version>2.0.34-SNAPSHOT</version>
</parent>
<artifactId>citizens-v1_14_R1</artifactId>
<properties>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens-parent</artifactId>
<version>2.0.33-SNAPSHOT</version>
<version>2.0.34-SNAPSHOT</version>
</parent>
<artifactId>citizens-v1_15_R1</artifactId>
<properties>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens-parent</artifactId>
<version>2.0.33-SNAPSHOT</version>
<version>2.0.34-SNAPSHOT</version>
</parent>
<artifactId>citizens-v1_16_R3</artifactId>
<properties>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens-parent</artifactId>
<version>2.0.33-SNAPSHOT</version>
<version>2.0.34-SNAPSHOT</version>
</parent>
<artifactId>citizens-v1_17_R1</artifactId>
<properties>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens-parent</artifactId>
<version>2.0.33-SNAPSHOT</version>
<version>2.0.34-SNAPSHOT</version>
</parent>
<artifactId>citizens-v1_18_R2</artifactId>
<properties>

View File

@ -311,26 +311,32 @@ public class CustomEntityRegistry extends DefaultedRegistry implements Supplier<
minecraftClassMap.put(EntityType.BOAT, Boat.class);
minecraftClassMap.put(EntityType.CAT, Cat.class);
minecraftClassMap.put(EntityType.CAVE_SPIDER, CaveSpider.class);
minecraftClassMap.put(EntityType.CHEST_MINECART, MinecartChest.class);
minecraftClassMap.put(EntityType.CHICKEN, Chicken.class);
minecraftClassMap.put(EntityType.COD, Cod.class);
minecraftClassMap.put(EntityType.COMMAND_BLOCK_MINECART, MinecartCommandBlock.class);
minecraftClassMap.put(EntityType.COW, Cow.class);
minecraftClassMap.put(EntityType.CREEPER, Creeper.class);
minecraftClassMap.put(EntityType.DOLPHIN, Dolphin.class);
minecraftClassMap.put(EntityType.DONKEY, Donkey.class);
minecraftClassMap.put(EntityType.DRAGON_FIREBALL, DragonFireball.class);
minecraftClassMap.put(EntityType.DROWNED, Drowned.class);
minecraftClassMap.put(EntityType.EGG, ThrownEgg.class);
minecraftClassMap.put(EntityType.ELDER_GUARDIAN, ElderGuardian.class);
minecraftClassMap.put(EntityType.END_CRYSTAL, EndCrystal.class);
minecraftClassMap.put(EntityType.ENDER_DRAGON, EnderDragon.class);
minecraftClassMap.put(EntityType.ENDER_PEARL, ThrownEnderpearl.class);
minecraftClassMap.put(EntityType.ENDERMAN, EnderMan.class);
minecraftClassMap.put(EntityType.ENDERMITE, Endermite.class);
minecraftClassMap.put(EntityType.EVOKER, Evoker.class);
minecraftClassMap.put(EntityType.EVOKER_FANGS, EvokerFangs.class);
minecraftClassMap.put(EntityType.EXPERIENCE_BOTTLE, ThrownExperienceBottle.class);
minecraftClassMap.put(EntityType.EXPERIENCE_ORB, ExperienceOrb.class);
minecraftClassMap.put(EntityType.EYE_OF_ENDER, EyeOfEnder.class);
minecraftClassMap.put(EntityType.FALLING_BLOCK, FallingBlockEntity.class);
minecraftClassMap.put(EntityType.FIREWORK_ROCKET, FireworkRocketEntity.class);
minecraftClassMap.put(EntityType.FOX, Fox.class);
minecraftClassMap.put(EntityType.FURNACE_MINECART, MinecartFurnace.class);
minecraftClassMap.put(EntityType.GHAST, Ghast.class);
minecraftClassMap.put(EntityType.GIANT, Giant.class);
minecraftClassMap.put(EntityType.GLOW_ITEM_FRAME, GlowItemFrame.class);
@ -338,6 +344,7 @@ public class CustomEntityRegistry extends DefaultedRegistry implements Supplier<
minecraftClassMap.put(EntityType.GOAT, Goat.class);
minecraftClassMap.put(EntityType.GUARDIAN, Guardian.class);
minecraftClassMap.put(EntityType.HOGLIN, Hoglin.class);
minecraftClassMap.put(EntityType.HOPPER_MINECART, MinecartHopper.class);
minecraftClassMap.put(EntityType.HORSE, Horse.class);
minecraftClassMap.put(EntityType.HUSK, Husk.class);
minecraftClassMap.put(EntityType.ILLUSIONER, Illusioner.class);
@ -352,14 +359,8 @@ public class CustomEntityRegistry extends DefaultedRegistry implements Supplier<
minecraftClassMap.put(EntityType.MAGMA_CUBE, MagmaCube.class);
minecraftClassMap.put(EntityType.MARKER, Marker.class);
minecraftClassMap.put(EntityType.MINECART, Minecart.class);
minecraftClassMap.put(EntityType.CHEST_MINECART, MinecartChest.class);
minecraftClassMap.put(EntityType.COMMAND_BLOCK_MINECART, MinecartCommandBlock.class);
minecraftClassMap.put(EntityType.FURNACE_MINECART, MinecartFurnace.class);
minecraftClassMap.put(EntityType.HOPPER_MINECART, MinecartHopper.class);
minecraftClassMap.put(EntityType.SPAWNER_MINECART, MinecartSpawner.class);
minecraftClassMap.put(EntityType.TNT_MINECART, MinecartTNT.class);
minecraftClassMap.put(EntityType.MULE, Mule.class);
minecraftClassMap.put(EntityType.MOOSHROOM, MushroomCow.class);
minecraftClassMap.put(EntityType.MULE, Mule.class);
minecraftClassMap.put(EntityType.OCELOT, Ocelot.class);
minecraftClassMap.put(EntityType.PAINTING, Painting.class);
minecraftClassMap.put(EntityType.PANDA, Panda.class);
@ -370,7 +371,7 @@ public class CustomEntityRegistry extends DefaultedRegistry implements Supplier<
minecraftClassMap.put(EntityType.PIGLIN_BRUTE, PiglinBrute.class);
minecraftClassMap.put(EntityType.PILLAGER, Pillager.class);
minecraftClassMap.put(EntityType.POLAR_BEAR, PolarBear.class);
minecraftClassMap.put(EntityType.TNT, PrimedTnt.class);
minecraftClassMap.put(EntityType.POTION, ThrownPotion.class);
minecraftClassMap.put(EntityType.PUFFERFISH, Pufferfish.class);
minecraftClassMap.put(EntityType.RABBIT, Rabbit.class);
minecraftClassMap.put(EntityType.RAVAGER, Ravager.class);
@ -385,17 +386,16 @@ public class CustomEntityRegistry extends DefaultedRegistry implements Supplier<
minecraftClassMap.put(EntityType.SMALL_FIREBALL, SmallFireball.class);
minecraftClassMap.put(EntityType.SNOW_GOLEM, SnowGolem.class);
minecraftClassMap.put(EntityType.SNOWBALL, Snowball.class);
minecraftClassMap.put(EntityType.SPAWNER_MINECART, MinecartSpawner.class);
minecraftClassMap.put(EntityType.SPECTRAL_ARROW, SpectralArrow.class);
minecraftClassMap.put(EntityType.SPIDER, Spider.class);
minecraftClassMap.put(EntityType.SQUID, Squid.class);
minecraftClassMap.put(EntityType.STRAY, Stray.class);
minecraftClassMap.put(EntityType.STRIDER, Strider.class);
minecraftClassMap.put(EntityType.EGG, ThrownEgg.class);
minecraftClassMap.put(EntityType.ENDER_PEARL, ThrownEnderpearl.class);
minecraftClassMap.put(EntityType.EXPERIENCE_BOTTLE, ThrownExperienceBottle.class);
minecraftClassMap.put(EntityType.POTION, ThrownPotion.class);
minecraftClassMap.put(EntityType.TRIDENT, ThrownTrident.class);
minecraftClassMap.put(EntityType.TNT, PrimedTnt.class);
minecraftClassMap.put(EntityType.TNT_MINECART, MinecartTNT.class);
minecraftClassMap.put(EntityType.TRADER_LLAMA, TraderLlama.class);
minecraftClassMap.put(EntityType.TRIDENT, ThrownTrident.class);
minecraftClassMap.put(EntityType.TROPICAL_FISH, TropicalFish.class);
minecraftClassMap.put(EntityType.TURTLE, Turtle.class);
minecraftClassMap.put(EntityType.VEX, Vex.class);

View File

@ -4,7 +4,7 @@
<parent>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens-parent</artifactId>
<version>2.0.33-SNAPSHOT</version>
<version>2.0.34-SNAPSHOT</version>
</parent>
<artifactId>citizens-v1_19_R3</artifactId>
<properties>

View File

@ -469,9 +469,7 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
}
private static final float EPSILON = 0.003F;
private static final MethodHandle GAMEMODE_SETTING = NMS.getFirstMethodHandle(ServerPlayerGameMode.class, true,
GameType.class, GameType.class);
private static final Location LOADED_LOCATION = new Location(null, 0, 0, 0);
private static int MAX_LENGTH = 0;
}

View File

@ -36,6 +36,7 @@ import net.minecraft.world.entity.Display;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.ExperienceOrb;
import net.minecraft.world.entity.GlowSquid;
import net.minecraft.world.entity.Interaction;
import net.minecraft.world.entity.LightningBolt;
import net.minecraft.world.entity.Marker;
import net.minecraft.world.entity.ambient.Bat;
@ -75,6 +76,7 @@ import net.minecraft.world.entity.animal.horse.Mule;
import net.minecraft.world.entity.animal.horse.SkeletonHorse;
import net.minecraft.world.entity.animal.horse.TraderLlama;
import net.minecraft.world.entity.animal.horse.ZombieHorse;
import net.minecraft.world.entity.animal.sniffer.Sniffer;
import net.minecraft.world.entity.boss.enderdragon.EndCrystal;
import net.minecraft.world.entity.boss.enderdragon.EnderDragon;
import net.minecraft.world.entity.boss.wither.WitherBoss;
@ -353,32 +355,39 @@ public class CustomEntityRegistry extends DefaultedMappedRegistry<EntityType<?>>
minecraftClassMap.put(EntityType.BAT, Bat.class);
minecraftClassMap.put(EntityType.BEE, Bee.class);
minecraftClassMap.put(EntityType.BLAZE, Blaze.class);
minecraftClassMap.put(EntityType.BLOCK_DISPLAY, Display.BlockDisplay.class);
minecraftClassMap.put(EntityType.BOAT, Boat.class);
minecraftClassMap.put(EntityType.CHEST_BOAT, ChestBoat.class);
minecraftClassMap.put(EntityType.CAT, Cat.class);
minecraftClassMap.put(EntityType.CAMEL, Camel.class);
minecraftClassMap.put(EntityType.CAT, Cat.class);
minecraftClassMap.put(EntityType.CAVE_SPIDER, CaveSpider.class);
minecraftClassMap.put(EntityType.CHEST_BOAT, ChestBoat.class);
minecraftClassMap.put(EntityType.CHEST_MINECART, MinecartChest.class);
minecraftClassMap.put(EntityType.CHICKEN, Chicken.class);
minecraftClassMap.put(EntityType.COD, Cod.class);
minecraftClassMap.put(EntityType.COMMAND_BLOCK_MINECART, MinecartCommandBlock.class);
minecraftClassMap.put(EntityType.COW, Cow.class);
minecraftClassMap.put(EntityType.CREEPER, Creeper.class);
minecraftClassMap.put(EntityType.DOLPHIN, Dolphin.class);
minecraftClassMap.put(EntityType.DONKEY, Donkey.class);
minecraftClassMap.put(EntityType.DRAGON_FIREBALL, DragonFireball.class);
minecraftClassMap.put(EntityType.DROWNED, Drowned.class);
minecraftClassMap.put(EntityType.EGG, ThrownEgg.class);
minecraftClassMap.put(EntityType.ELDER_GUARDIAN, ElderGuardian.class);
minecraftClassMap.put(EntityType.END_CRYSTAL, EndCrystal.class);
minecraftClassMap.put(EntityType.ENDER_DRAGON, EnderDragon.class);
minecraftClassMap.put(EntityType.ENDER_PEARL, ThrownEnderpearl.class);
minecraftClassMap.put(EntityType.ENDERMAN, EnderMan.class);
minecraftClassMap.put(EntityType.ENDERMITE, Endermite.class);
minecraftClassMap.put(EntityType.EVOKER, Evoker.class);
minecraftClassMap.put(EntityType.EVOKER_FANGS, EvokerFangs.class);
minecraftClassMap.put(EntityType.EXPERIENCE_BOTTLE, ThrownExperienceBottle.class);
minecraftClassMap.put(EntityType.EXPERIENCE_ORB, ExperienceOrb.class);
minecraftClassMap.put(EntityType.EYE_OF_ENDER, EyeOfEnder.class);
minecraftClassMap.put(EntityType.FALLING_BLOCK, FallingBlockEntity.class);
minecraftClassMap.put(EntityType.FIREWORK_ROCKET, FireworkRocketEntity.class);
minecraftClassMap.put(EntityType.FOX, Fox.class);
minecraftClassMap.put(EntityType.FROG, Frog.class);
minecraftClassMap.put(EntityType.FURNACE_MINECART, MinecartFurnace.class);
minecraftClassMap.put(EntityType.GHAST, Ghast.class);
minecraftClassMap.put(EntityType.GIANT, Giant.class);
minecraftClassMap.put(EntityType.GLOW_ITEM_FRAME, GlowItemFrame.class);
@ -386,11 +395,14 @@ public class CustomEntityRegistry extends DefaultedMappedRegistry<EntityType<?>>
minecraftClassMap.put(EntityType.GOAT, Goat.class);
minecraftClassMap.put(EntityType.GUARDIAN, Guardian.class);
minecraftClassMap.put(EntityType.HOGLIN, Hoglin.class);
minecraftClassMap.put(EntityType.HOPPER_MINECART, MinecartHopper.class);
minecraftClassMap.put(EntityType.HORSE, Horse.class);
minecraftClassMap.put(EntityType.HUSK, Husk.class);
minecraftClassMap.put(EntityType.ILLUSIONER, Illusioner.class);
minecraftClassMap.put(EntityType.INTERACTION, Interaction.class);
minecraftClassMap.put(EntityType.IRON_GOLEM, IronGolem.class);
minecraftClassMap.put(EntityType.ITEM, ItemEntity.class);
minecraftClassMap.put(EntityType.ITEM_DISPLAY, Display.ItemDisplay.class);
minecraftClassMap.put(EntityType.ITEM_FRAME, ItemFrame.class);
minecraftClassMap.put(EntityType.FIREBALL, LargeFireball.class);
minecraftClassMap.put(EntityType.LEASH_KNOT, LeashFenceKnotEntity.class);
@ -400,14 +412,8 @@ public class CustomEntityRegistry extends DefaultedMappedRegistry<EntityType<?>>
minecraftClassMap.put(EntityType.MAGMA_CUBE, MagmaCube.class);
minecraftClassMap.put(EntityType.MARKER, Marker.class);
minecraftClassMap.put(EntityType.MINECART, Minecart.class);
minecraftClassMap.put(EntityType.CHEST_MINECART, MinecartChest.class);
minecraftClassMap.put(EntityType.COMMAND_BLOCK_MINECART, MinecartCommandBlock.class);
minecraftClassMap.put(EntityType.FURNACE_MINECART, MinecartFurnace.class);
minecraftClassMap.put(EntityType.HOPPER_MINECART, MinecartHopper.class);
minecraftClassMap.put(EntityType.SPAWNER_MINECART, MinecartSpawner.class);
minecraftClassMap.put(EntityType.TNT_MINECART, MinecartTNT.class);
minecraftClassMap.put(EntityType.MULE, Mule.class);
minecraftClassMap.put(EntityType.MOOSHROOM, MushroomCow.class);
minecraftClassMap.put(EntityType.MULE, Mule.class);
minecraftClassMap.put(EntityType.OCELOT, Ocelot.class);
minecraftClassMap.put(EntityType.PAINTING, Painting.class);
minecraftClassMap.put(EntityType.PANDA, Panda.class);
@ -418,7 +424,7 @@ public class CustomEntityRegistry extends DefaultedMappedRegistry<EntityType<?>>
minecraftClassMap.put(EntityType.PIGLIN_BRUTE, PiglinBrute.class);
minecraftClassMap.put(EntityType.PILLAGER, Pillager.class);
minecraftClassMap.put(EntityType.POLAR_BEAR, PolarBear.class);
minecraftClassMap.put(EntityType.TNT, PrimedTnt.class);
minecraftClassMap.put(EntityType.POTION, ThrownPotion.class);
minecraftClassMap.put(EntityType.PUFFERFISH, Pufferfish.class);
minecraftClassMap.put(EntityType.RABBIT, Rabbit.class);
minecraftClassMap.put(EntityType.RAVAGER, Ravager.class);
@ -426,30 +432,26 @@ public class CustomEntityRegistry extends DefaultedMappedRegistry<EntityType<?>>
minecraftClassMap.put(EntityType.SHEEP, Sheep.class);
minecraftClassMap.put(EntityType.SHULKER, Shulker.class);
minecraftClassMap.put(EntityType.SHULKER_BULLET, ShulkerBullet.class);
minecraftClassMap.put(EntityType.SNIFFER, net.minecraft.world.entity.animal.sniffer.Sniffer.class);
minecraftClassMap.put(EntityType.BLOCK_DISPLAY, Display.BlockDisplay.class);
minecraftClassMap.put(EntityType.ITEM_DISPLAY, Display.ItemDisplay.class);
minecraftClassMap.put(EntityType.TEXT_DISPLAY, Display.TextDisplay.class);
minecraftClassMap.put(EntityType.INTERACTION, net.minecraft.world.entity.Interaction.class);
minecraftClassMap.put(EntityType.SILVERFISH, Silverfish.class);
minecraftClassMap.put(EntityType.SKELETON, Skeleton.class);
minecraftClassMap.put(EntityType.SKELETON_HORSE, SkeletonHorse.class);
minecraftClassMap.put(EntityType.SLIME, Slime.class);
minecraftClassMap.put(EntityType.SMALL_FIREBALL, SmallFireball.class);
minecraftClassMap.put(EntityType.SNIFFER, Sniffer.class);
minecraftClassMap.put(EntityType.SNOW_GOLEM, SnowGolem.class);
minecraftClassMap.put(EntityType.SNOWBALL, Snowball.class);
minecraftClassMap.put(EntityType.SPAWNER_MINECART, MinecartSpawner.class);
minecraftClassMap.put(EntityType.SPECTRAL_ARROW, SpectralArrow.class);
minecraftClassMap.put(EntityType.SPIDER, Spider.class);
minecraftClassMap.put(EntityType.SQUID, Squid.class);
minecraftClassMap.put(EntityType.STRAY, Stray.class);
minecraftClassMap.put(EntityType.STRIDER, Strider.class);
minecraftClassMap.put(EntityType.TADPOLE, Tadpole.class);
minecraftClassMap.put(EntityType.EGG, ThrownEgg.class);
minecraftClassMap.put(EntityType.ENDER_PEARL, ThrownEnderpearl.class);
minecraftClassMap.put(EntityType.EXPERIENCE_BOTTLE, ThrownExperienceBottle.class);
minecraftClassMap.put(EntityType.POTION, ThrownPotion.class);
minecraftClassMap.put(EntityType.TRIDENT, ThrownTrident.class);
minecraftClassMap.put(EntityType.TEXT_DISPLAY, Display.TextDisplay.class);
minecraftClassMap.put(EntityType.TNT, PrimedTnt.class);
minecraftClassMap.put(EntityType.TNT_MINECART, MinecartTNT.class);
minecraftClassMap.put(EntityType.TRADER_LLAMA, TraderLlama.class);
minecraftClassMap.put(EntityType.TRIDENT, ThrownTrident.class);
minecraftClassMap.put(EntityType.TROPICAL_FISH, TropicalFish.class);
minecraftClassMap.put(EntityType.TURTLE, Turtle.class);
minecraftClassMap.put(EntityType.VEX, Vex.class);

View File

@ -1,565 +0,0 @@
package net.citizensnpcs.nms.v1_20_R3.util;
import java.util.EnumSet;
import java.util.Iterator;
import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
import it.unimi.dsi.fastutil.objects.Object2BooleanMap;
import it.unimi.dsi.fastutil.objects.Object2BooleanOpenHashMap;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.Direction.Axis;
import net.minecraft.tags.BlockTags;
import net.minecraft.tags.FluidTags;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.PathNavigationRegion;
import net.minecraft.world.level.block.BaseRailBlock;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.CampfireBlock;
import net.minecraft.world.level.block.DoorBlock;
import net.minecraft.world.level.block.FenceGateBlock;
import net.minecraft.world.level.block.LeavesBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.level.material.Fluids;
import net.minecraft.world.level.pathfinder.BlockPathTypes;
import net.minecraft.world.level.pathfinder.Node;
import net.minecraft.world.level.pathfinder.PathComputationType;
import net.minecraft.world.level.pathfinder.Target;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
import net.minecraft.world.phys.shapes.VoxelShape;
public class EntityNodeEvaluator extends EntityNodeEvaluatorBase {
private final Object2BooleanMap collisionCache = new Object2BooleanOpenHashMap();
protected float oldWaterCost;
private final Long2ObjectMap pathTypesByPosCache = new Long2ObjectOpenHashMap();
private boolean canReachWithoutCollision(Node var0) {
AABB var1 = this.mob.getBoundingBox();
Vec3 var2 = new Vec3(var0.x - this.mob.getX() + var1.getXsize() / 2.0,
var0.y - this.mob.getY() + var1.getYsize() / 2.0, var0.z - this.mob.getZ() + var1.getZsize() / 2.0);
int var3 = Mth.ceil(var2.length() / var1.getSize());
var2 = var2.scale(1.0F / var3);
for (int var4 = 1; var4 <= var3; ++var4) {
var1 = var1.move(var2);
if (this.hasCollisions(var1))
return false;
}
return true;
}
protected boolean canStartAt(BlockPos var0) {
BlockPathTypes var1 = this.getBlockPathType(this.mob, var0);
return var1 != BlockPathTypes.OPEN && this.mvmt.getPathfindingMalus(var1) >= 0.0F;
}
@Override
public void done() {
this.mvmt.setPathfindingMalus(BlockPathTypes.WATER, this.oldWaterCost);
this.pathTypesByPosCache.clear();
this.collisionCache.clear();
super.done();
}
protected BlockPathTypes evaluateBlockPathType(BlockGetter var0, BlockPos var1, BlockPathTypes var2) {
boolean var3 = this.canPassDoors();
if (var2 == BlockPathTypes.DOOR_WOOD_CLOSED && this.canOpenDoors() && var3) {
var2 = BlockPathTypes.WALKABLE_DOOR;
}
if (var2 == BlockPathTypes.DOOR_OPEN && !var3) {
var2 = BlockPathTypes.BLOCKED;
}
if (var2 == BlockPathTypes.RAIL && !(var0.getBlockState(var1).getBlock() instanceof BaseRailBlock)
&& !(var0.getBlockState(var1.below()).getBlock() instanceof BaseRailBlock)) {
var2 = BlockPathTypes.UNPASSABLE_RAIL;
}
return var2;
}
protected Node findAcceptedNode(int var0, int var1, int var2, int var3, double var4, Direction var6,
BlockPathTypes var7) {
Node var8 = null;
BlockPos.MutableBlockPos var9 = new BlockPos.MutableBlockPos();
double var10 = this.getFloorLevel(var9.set(var0, var1, var2));
if (var10 - var4 > this.getMobJumpHeight()) {
return null;
} else {
BlockPathTypes var12 = this.getCachedBlockType(this.mob, var0, var1, var2);
float var13 = this.mvmt.getPathfindingMalus(var12);
double var14 = this.mob.getBbWidth() / 2.0;
if (var13 >= 0.0F) {
var8 = this.getNodeAndUpdateCostToMax(var0, var1, var2, var12, var13);
}
if (doesBlockHavePartialCollision(var7) && var8 != null && var8.costMalus >= 0.0F
&& !this.canReachWithoutCollision(var8)) {
var8 = null;
}
if (var12 == BlockPathTypes.WALKABLE || this.isAmphibious() && var12 == BlockPathTypes.WATER) {
return var8;
} else {
if ((var8 == null || var8.costMalus < 0.0F) && var3 > 0
&& (var12 != BlockPathTypes.FENCE || this.canWalkOverFences())
&& var12 != BlockPathTypes.UNPASSABLE_RAIL && var12 != BlockPathTypes.TRAPDOOR
&& var12 != BlockPathTypes.POWDER_SNOW) {
var8 = this.findAcceptedNode(var0, var1 + 1, var2, var3 - 1, var4, var6, var7);
if (var8 != null && (var8.type == BlockPathTypes.OPEN || var8.type == BlockPathTypes.WALKABLE)
&& this.mob.getBbWidth() < 1.0F) {
double var16 = var0 - var6.getStepX() + 0.5;
double var18 = var2 - var6.getStepZ() + 0.5;
AABB var20 = new AABB(var16 - var14,
this.getFloorLevel(var9.set(var16, var1 + 1, var18)) + 0.001, var18 - var14,
var16 + var14,
this.mob.getBbHeight() + this
.getFloorLevel(var9.set((double) var8.x, (double) var8.y, (double) var8.z))
- 0.002,
var18 + var14);
if (this.hasCollisions(var20)) {
var8 = null;
}
}
}
if (!this.isAmphibious() && var12 == BlockPathTypes.WATER && !this.canFloat()) {
if (this.getCachedBlockType(this.mob, var0, var1 - 1, var2) != BlockPathTypes.WATER) {
return var8;
}
while (var1 > this.mob.level().getMinBuildHeight()) {
--var1;
var12 = this.getCachedBlockType(this.mob, var0, var1, var2);
if (var12 != BlockPathTypes.WATER) {
return var8;
}
var8 = this.getNodeAndUpdateCostToMax(var0, var1, var2, var12,
this.mvmt.getPathfindingMalus(var12));
}
}
if (var12 == BlockPathTypes.OPEN) {
int var16 = 0;
int var17 = var1;
while (var12 == BlockPathTypes.OPEN) {
--var1;
if (var1 < this.mob.level().getMinBuildHeight()) {
return this.getBlockedNode(var0, var17, var2);
}
if (var16++ >= this.mob.getMaxFallDistance()) {
return this.getBlockedNode(var0, var1, var2);
}
var12 = this.getCachedBlockType(this.mob, var0, var1, var2);
var13 = this.mvmt.getPathfindingMalus(var12);
if (var12 != BlockPathTypes.OPEN && var13 >= 0.0F) {
var8 = this.getNodeAndUpdateCostToMax(var0, var1, var2, var12, var13);
break;
}
if (var13 < 0.0F) {
return this.getBlockedNode(var0, var1, var2);
}
}
}
if (doesBlockHavePartialCollision(var12) && var8 == null) {
var8 = this.getNode(var0, var1, var2);
var8.closed = true;
var8.type = var12;
var8.costMalus = var12.getMalus();
}
return var8;
}
}
}
private Node getBlockedNode(int var0, int var1, int var2) {
Node var3 = this.getNode(var0, var1, var2);
var3.type = BlockPathTypes.BLOCKED;
var3.costMalus = -1.0F;
return var3;
}
@Override
public BlockPathTypes getBlockPathType(BlockGetter var0, int var1, int var2, int var3) {
return getBlockPathTypeStatic(var0, new BlockPos.MutableBlockPos(var1, var2, var3));
}
public BlockPathTypes getBlockPathType(BlockGetter var0, int var1, int var2, int var3, LivingEntity var4) {
EnumSet var5 = EnumSet.noneOf(BlockPathTypes.class);
BlockPathTypes var6 = BlockPathTypes.BLOCKED;
var6 = this.getBlockPathTypes(var0, var1, var2, var3, var5, var6, var4.blockPosition());
if (var5.contains(BlockPathTypes.FENCE))
return BlockPathTypes.FENCE;
else if (var5.contains(BlockPathTypes.UNPASSABLE_RAIL))
return BlockPathTypes.UNPASSABLE_RAIL;
else {
BlockPathTypes var7 = BlockPathTypes.BLOCKED;
Iterator var9 = var5.iterator();
while (var9.hasNext()) {
BlockPathTypes varr9 = (BlockPathTypes) var9.next();
if (mvmt.getPathfindingMalus(varr9) < 0.0F)
return varr9;
if (mvmt.getPathfindingMalus(varr9) >= mvmt.getPathfindingMalus(var7)) {
var7 = varr9;
}
}
if (var6 == BlockPathTypes.OPEN && mvmt.getPathfindingMalus(var7) == 0.0F && this.entityWidth <= 1)
return BlockPathTypes.OPEN;
else
return var7;
}
}
@Override
public BlockPathTypes getBlockPathType(BlockGetter var0, int var1, int var2, int var3, Mob var4) {
EnumSet var5 = EnumSet.noneOf(BlockPathTypes.class);
BlockPathTypes var6 = BlockPathTypes.BLOCKED;
var6 = this.getBlockPathTypes(var0, var1, var2, var3, var5, var6, var4.blockPosition());
if (var5.contains(BlockPathTypes.FENCE))
return BlockPathTypes.FENCE;
else if (var5.contains(BlockPathTypes.UNPASSABLE_RAIL))
return BlockPathTypes.UNPASSABLE_RAIL;
else {
BlockPathTypes var7 = BlockPathTypes.BLOCKED;
Iterator var9 = var5.iterator();
while (var9.hasNext()) {
BlockPathTypes varr9 = (BlockPathTypes) var9.next();
if (mvmt.getPathfindingMalus(varr9) < 0.0F)
return varr9;
if (mvmt.getPathfindingMalus(varr9) >= mvmt.getPathfindingMalus(var7)) {
var7 = varr9;
}
}
if (var6 == BlockPathTypes.OPEN && mvmt.getPathfindingMalus(var7) == 0.0F && this.entityWidth <= 1)
return BlockPathTypes.OPEN;
else
return var7;
}
}
protected BlockPathTypes getBlockPathType(LivingEntity var0, BlockPos var1) {
return this.getCachedBlockType(var0, var1.getX(), var1.getY(), var1.getZ());
}
public BlockPathTypes getBlockPathTypes(BlockGetter var0, int var1, int var2, int var3, EnumSet var4,
BlockPathTypes var5, BlockPos var6) {
for (int var7 = 0; var7 < this.entityWidth; ++var7) {
for (int var8 = 0; var8 < this.entityHeight; ++var8) {
for (int var9 = 0; var9 < this.entityDepth; ++var9) {
int var10 = var7 + var1;
int var11 = var8 + var2;
int var12 = var9 + var3;
BlockPathTypes var13 = this.getBlockPathType(var0, var10, var11, var12);
var13 = this.evaluateBlockPathType(var0, var6, var13);
if (var7 == 0 && var8 == 0 && var9 == 0) {
var5 = var13;
}
var4.add(var13);
}
}
}
return var5;
}
protected BlockPathTypes getCachedBlockType(LivingEntity var0, int var1, int var2, int var3) {
return (BlockPathTypes) this.pathTypesByPosCache.computeIfAbsent(BlockPos.asLong(var1, var2, var3),
var4 -> this.getBlockPathType(this.level, var1, var2, var3, var0));
}
protected double getFloorLevel(BlockPos var0) {
return (this.canFloat() || this.isAmphibious()) && this.level.getFluidState(var0).is(FluidTags.WATER)
? var0.getY() + 0.5
: getFloorLevel(this.level, var0);
}
@Override
public Target getGoal(double var0, double var2, double var4) {
return this.getTargetFromNode(this.getNode(Mth.floor(var0), Mth.floor(var2), Mth.floor(var4)));
}
private double getMobJumpHeight() {
return Math.max(1.125, this.mob.maxUpStep());
}
@Override
public int getNeighbors(Node[] var0, Node var1) {
int var2 = 0;
int var3 = 0;
BlockPathTypes var4 = this.getCachedBlockType(this.mob, var1.x, var1.y + 1, var1.z);
BlockPathTypes var5 = this.getCachedBlockType(this.mob, var1.x, var1.y, var1.z);
if (this.mvmt.getPathfindingMalus(var4) >= 0.0F && var5 != BlockPathTypes.STICKY_HONEY) {
var3 = Mth.floor(Math.max(1.0F, this.mob.maxUpStep()));
}
double var6 = this.getFloorLevel(new BlockPos(var1.x, var1.y, var1.z));
Node var8 = this.findAcceptedNode(var1.x, var1.y, var1.z + 1, var3, var6, Direction.SOUTH, var5);
if (this.isNeighborValid(var8, var1)) {
var0[var2++] = var8;
}
Node var9 = this.findAcceptedNode(var1.x - 1, var1.y, var1.z, var3, var6, Direction.WEST, var5);
if (this.isNeighborValid(var9, var1)) {
var0[var2++] = var9;
}
Node var10 = this.findAcceptedNode(var1.x + 1, var1.y, var1.z, var3, var6, Direction.EAST, var5);
if (this.isNeighborValid(var10, var1)) {
var0[var2++] = var10;
}
Node var11 = this.findAcceptedNode(var1.x, var1.y, var1.z - 1, var3, var6, Direction.NORTH, var5);
if (this.isNeighborValid(var11, var1)) {
var0[var2++] = var11;
}
Node var12 = this.findAcceptedNode(var1.x - 1, var1.y, var1.z - 1, var3, var6, Direction.NORTH, var5);
if (this.isDiagonalValid(var1, var9, var11, var12)) {
var0[var2++] = var12;
}
Node var13 = this.findAcceptedNode(var1.x + 1, var1.y, var1.z - 1, var3, var6, Direction.NORTH, var5);
if (this.isDiagonalValid(var1, var10, var11, var13)) {
var0[var2++] = var13;
}
Node var14 = this.findAcceptedNode(var1.x - 1, var1.y, var1.z + 1, var3, var6, Direction.SOUTH, var5);
if (this.isDiagonalValid(var1, var9, var8, var14)) {
var0[var2++] = var14;
}
Node var15 = this.findAcceptedNode(var1.x + 1, var1.y, var1.z + 1, var3, var6, Direction.SOUTH, var5);
if (this.isDiagonalValid(var1, var10, var8, var15)) {
var0[var2++] = var15;
}
return var2;
}
private Node getNodeAndUpdateCostToMax(int var0, int var1, int var2, BlockPathTypes var3, float var4) {
Node var5 = this.getNode(var0, var1, var2);
var5.type = var3;
var5.costMalus = Math.max(var5.costMalus, var4);
return var5;
}
@Override
public Node getStart() {
BlockPos.MutableBlockPos var1 = new BlockPos.MutableBlockPos();
int var0 = this.mob.getBlockY();
BlockState var2 = this.level.getBlockState(var1.set(this.mob.getX(), var0, this.mob.getZ()));
BlockPos var3;
if (!this.mob.canStandOnFluid(var2.getFluidState())) {
if (this.canFloat() && this.mob.isInWater()) {
while (true) {
if (!var2.is(Blocks.WATER) && var2.getFluidState() != Fluids.WATER.getSource(false)) {
--var0;
break;
}
++var0;
var2 = this.level.getBlockState(var1.set(this.mob.getX(), var0, this.mob.getZ()));
}
} else if (this.mob.onGround()) {
var0 = Mth.floor(this.mob.getY() + 0.5);
} else {
for (var3 = this.mob.blockPosition(); (this.level.getBlockState(var3).isAir()
|| this.level.getBlockState(var3).isPathfindable(this.level, var3, PathComputationType.LAND))
&& var3.getY() > this.mob.level().getMinBuildHeight(); var3 = var3.below()) {
}
var0 = var3.above().getY();
}
} else {
while (true) {
if (!this.mob.canStandOnFluid(var2.getFluidState())) {
--var0;
break;
}
++var0;
var2 = this.level.getBlockState(var1.set(this.mob.getX(), var0, this.mob.getZ()));
}
}
var3 = this.mob.blockPosition();
if (!this.canStartAt(var1.set(var3.getX(), var0, var3.getZ()))) {
AABB var4 = this.mob.getBoundingBox();
if (this.canStartAt(var1.set(var4.minX, var0, var4.minZ))
|| this.canStartAt(var1.set(var4.minX, var0, var4.maxZ))
|| this.canStartAt(var1.set(var4.maxX, var0, var4.minZ))
|| this.canStartAt(var1.set(var4.maxX, var0, var4.maxZ))) {
return this.getStartNode(var1);
}
}
return this.getStartNode(new BlockPos(var3.getX(), var0, var3.getZ()));
}
protected Node getStartNode(BlockPos var0) {
Node var1 = this.getNode(var0);
var1.type = this.getBlockPathType(this.mob, var1.asBlockPos());
var1.costMalus = this.mvmt.getPathfindingMalus(var1.type);
return var1;
}
private boolean hasCollisions(AABB var0) {
return this.collisionCache.computeIfAbsent(var0, var1 -> !this.level.noCollision(this.mob, var0));
}
protected boolean isAmphibious() {
return false;
}
protected boolean isDiagonalValid(Node var0, Node var1, Node var2, Node var3) {
if (var3 != null && var2 != null && var1 != null) {
if (var3.closed) {
return false;
} else if (var2.y <= var0.y && var1.y <= var0.y) {
if (var1.type != BlockPathTypes.WALKABLE_DOOR && var2.type != BlockPathTypes.WALKABLE_DOOR
&& var3.type != BlockPathTypes.WALKABLE_DOOR) {
boolean var4 = var2.type == BlockPathTypes.FENCE && var1.type == BlockPathTypes.FENCE
&& this.mob.getBbWidth() < 0.5;
return var3.costMalus >= 0.0F && (var2.y < var0.y || var2.costMalus >= 0.0F || var4)
&& (var1.y < var0.y || var1.costMalus >= 0.0F || var4);
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
}
protected boolean isNeighborValid(Node var0, Node var1) {
return var0 != null && !var0.closed && (var0.costMalus >= 0.0F || var1.costMalus < 0.0F);
}
@Override
public void prepare(PathNavigationRegion var0, LivingEntity var1) {
super.prepare(var0, var1);
this.oldWaterCost = mvmt.getPathfindingMalus(BlockPathTypes.WATER);
}
@Override
public void prepare(PathNavigationRegion var0, Mob var1) {
super.prepare(var0, var1);
this.oldWaterCost = mvmt.getPathfindingMalus(BlockPathTypes.WATER);
}
public static BlockPathTypes checkNeighbourBlocks(BlockGetter var0, BlockPos.MutableBlockPos var1,
BlockPathTypes var2) {
int var3 = var1.getX();
int var4 = var1.getY();
int var5 = var1.getZ();
for (int var6 = -1; var6 <= 1; ++var6) {
for (int var7 = -1; var7 <= 1; ++var7) {
for (int var8 = -1; var8 <= 1; ++var8) {
if (var6 != 0 || var8 != 0) {
var1.set(var3 + var6, var4 + var7, var5 + var8);
BlockState var9 = var0.getBlockState(var1);
if (var9.is(Blocks.CACTUS) || var9.is(Blocks.SWEET_BERRY_BUSH))
return BlockPathTypes.DANGER_OTHER;
if (isBurningBlock(var9))
return BlockPathTypes.DANGER_FIRE;
if (var0.getFluidState(var1).is(FluidTags.WATER))
return BlockPathTypes.WATER_BORDER;
if (var9.is(Blocks.WITHER_ROSE) || var9.is(Blocks.POINTED_DRIPSTONE))
return BlockPathTypes.DAMAGE_CAUTIOUS;
}
}
}
}
return var2;
}
private static boolean doesBlockHavePartialCollision(BlockPathTypes var0) {
return var0 == BlockPathTypes.FENCE || var0 == BlockPathTypes.DOOR_WOOD_CLOSED
|| var0 == BlockPathTypes.DOOR_IRON_CLOSED;
}
protected static BlockPathTypes getBlockPathTypeRaw(BlockGetter var0, BlockPos var1) {
BlockState var2 = var0.getBlockState(var1);
Block var3 = var2.getBlock();
if (var2.isAir())
return BlockPathTypes.OPEN;
else if (!var2.is(BlockTags.TRAPDOORS) && !var2.is(Blocks.LILY_PAD) && !var2.is(Blocks.BIG_DRIPLEAF)) {
if (var2.is(Blocks.POWDER_SNOW))
return BlockPathTypes.POWDER_SNOW;
else if (!var2.is(Blocks.CACTUS) && !var2.is(Blocks.SWEET_BERRY_BUSH)) {
if (var2.is(Blocks.HONEY_BLOCK))
return BlockPathTypes.STICKY_HONEY;
else if (var2.is(Blocks.COCOA))
return BlockPathTypes.COCOA;
else if (!var2.is(Blocks.WITHER_ROSE) && !var2.is(Blocks.POINTED_DRIPSTONE)) {
FluidState var4 = var0.getFluidState(var1);
if (var4.is(FluidTags.LAVA))
return BlockPathTypes.LAVA;
else if (isBurningBlock(var2))
return BlockPathTypes.DAMAGE_FIRE;
else if (var3 instanceof DoorBlock) {
DoorBlock var5 = (DoorBlock) var3;
if (var2.getValue(DoorBlock.OPEN))
return BlockPathTypes.DOOR_OPEN;
else
return var5.type().canOpenByHand() ? BlockPathTypes.DOOR_WOOD_CLOSED
: BlockPathTypes.DOOR_IRON_CLOSED;
} else if (var3 instanceof BaseRailBlock)
return BlockPathTypes.RAIL;
else if (var3 instanceof LeavesBlock)
return BlockPathTypes.LEAVES;
else if (var2.is(BlockTags.FENCES) || var2.is(BlockTags.WALLS)
|| var3 instanceof FenceGateBlock && !(Boolean) var2.getValue(FenceGateBlock.OPEN))
return BlockPathTypes.FENCE;
else if (!var2.isPathfindable(var0, var1, PathComputationType.LAND))
return BlockPathTypes.BLOCKED;
else
return var4.is(FluidTags.WATER) ? BlockPathTypes.WATER : BlockPathTypes.OPEN;
} else
return BlockPathTypes.DAMAGE_CAUTIOUS;
} else
return BlockPathTypes.DAMAGE_OTHER;
} else
return BlockPathTypes.TRAPDOOR;
}
public static BlockPathTypes getBlockPathTypeStatic(BlockGetter var0, BlockPos.MutableBlockPos var1) {
int var2 = var1.getX();
int var3 = var1.getY();
int var4 = var1.getZ();
BlockPathTypes var5 = getBlockPathTypeRaw(var0, var1);
if (var5 == BlockPathTypes.OPEN && var3 >= var0.getMinBuildHeight() + 1) {
BlockPathTypes var6 = getBlockPathTypeRaw(var0, var1.set(var2, var3 - 1, var4));
var5 = var6 != BlockPathTypes.WALKABLE && var6 != BlockPathTypes.OPEN && var6 != BlockPathTypes.WATER
&& var6 != BlockPathTypes.LAVA ? BlockPathTypes.WALKABLE : BlockPathTypes.OPEN;
if (var6 == BlockPathTypes.DAMAGE_FIRE) {
var5 = BlockPathTypes.DAMAGE_FIRE;
}
if (var6 == BlockPathTypes.DAMAGE_OTHER) {
var5 = BlockPathTypes.DAMAGE_OTHER;
}
if (var6 == BlockPathTypes.STICKY_HONEY) {
var5 = BlockPathTypes.STICKY_HONEY;
}
if (var6 == BlockPathTypes.POWDER_SNOW) {
var5 = BlockPathTypes.DANGER_POWDER_SNOW;
}
if (var6 == BlockPathTypes.DAMAGE_CAUTIOUS) {
var5 = BlockPathTypes.DAMAGE_CAUTIOUS;
}
}
if (var5 == BlockPathTypes.WALKABLE) {
var5 = checkNeighbourBlocks(var0, var1.set(var2, var3, var4), var5);
}
return var5;
}
public static double getFloorLevel(BlockGetter var0, BlockPos var1) {
BlockPos var2 = var1.below();
VoxelShape var3 = var0.getBlockState(var2).getCollisionShape(var0, var2);
return var2.getY() + (var3.isEmpty() ? 0.0 : var3.max(Axis.Y));
}
public static boolean isBurningBlock(BlockState var0) {
return var0.is(BlockTags.FIRE) || var0.is(Blocks.LAVA) || var0.is(Blocks.MAGMA_BLOCK)
|| CampfireBlock.isLitCampfire(var0) || var0.is(Blocks.LAVA_CAULDRON);
}
public static final double SPACE_BETWEEN_WALL_POSTS = 0.5;
}

View File

@ -4,12 +4,12 @@
<parent>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens-parent</artifactId>
<version>2.0.33-SNAPSHOT</version>
<version>2.0.34-SNAPSHOT</version>
</parent>
<artifactId>citizens-v1_20_R3</artifactId>
<artifactId>citizens-v1_20_R4</artifactId>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<craftbukkit.version>1.20.4-R0.1-SNAPSHOT</craftbukkit.version>
<craftbukkit.version>1.20.5-R0.1-SNAPSHOT</craftbukkit.version>
</properties>
<dependencies>
@ -55,7 +55,7 @@
<plugin>
<groupId>net.md-5</groupId>
<artifactId>specialsource-maven-plugin</artifactId>
<version>1.2.4</version>
<version>2.0.2</version>
<executions>
<execution>
<phase>package</phase>

View File

@ -1,18 +1,18 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftAllay;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftAllay;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import com.google.common.collect.Lists;
import com.mojang.datafixers.util.Pair;
import net.citizensnpcs.api.CitizensAPI;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -0,0 +1,225 @@
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftArmadillo;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.syncher.EntityDataAccessor;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.tags.TagKey;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.animal.armadillo.Armadillo;
import net.minecraft.world.entity.vehicle.AbstractMinecart;
import net.minecraft.world.entity.vehicle.Boat;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Fluid;
import net.minecraft.world.level.material.PushReaction;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
public class ArmadilloController extends MobEntityController {
public ArmadilloController() {
super(EntityArmadilloNPC.class);
}
@Override
public org.bukkit.entity.Armadillo getBukkitEntity() {
return (org.bukkit.entity.Armadillo) super.getBukkitEntity();
}
public static class ArmadilloNPC extends CraftArmadillo implements ForwardingNPCHolder {
public ArmadilloNPC(EntityArmadilloNPC entity) {
super((CraftServer) Bukkit.getServer(), entity);
}
}
public static class EntityArmadilloNPC extends Armadillo implements NPCHolder {
private final CitizensNPC npc;
public EntityArmadilloNPC(EntityType<? extends Armadillo> types, Level level) {
this(types, level, null);
}
public EntityArmadilloNPC(EntityType<? extends Armadillo> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
}
@Override
protected boolean canRide(Entity entity) {
if (npc != null && (entity instanceof Boat || entity instanceof AbstractMinecart))
return !npc.isProtected();
return super.canRide(entity);
}
@Override
public boolean causeFallDamage(float f, float f1, DamageSource damagesource) {
if (npc == null || !npc.isFlyable())
return super.causeFallDamage(f, f1, damagesource);
return false;
}
@Override
public void checkDespawn() {
if (npc == null) {
super.checkDespawn();
}
}
@Override
protected void checkFallDamage(double d0, boolean flag, BlockState iblockdata, BlockPos blockposition) {
if (npc == null || !npc.isFlyable()) {
super.checkFallDamage(d0, flag, iblockdata, blockposition);
}
}
@Override
public void customServerAiStep() {
super.customServerAiStep();
if (npc != null) {
NMSImpl.updateMinecraftAIState(npc, this);
npc.update();
}
}
@Override
protected SoundEvent getAmbientSound() {
return NMSImpl.getSoundEffect(npc, super.getAmbientSound(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public CraftEntity getBukkitEntity() {
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
NMSImpl.setBukkitEntity(this, new ArmadilloNPC(this));
}
return super.getBukkitEntity();
}
@Override
protected SoundEvent getDeathSound() {
return NMSImpl.getSoundEffect(npc, super.getDeathSound(), NPC.Metadata.DEATH_SOUND);
}
@Override
protected SoundEvent getHurtSound(DamageSource damagesource) {
return NMSImpl.getSoundEffect(npc, super.getHurtSound(damagesource), NPC.Metadata.HURT_SOUND);
}
@Override
public float getJumpPower() {
return NMS.getJumpPower(npc, super.getJumpPower());
}
@Override
public int getMaxFallDistance() {
return NMS.getFallDistance(npc, super.getMaxFallDistance());
}
@Override
public NPC getNPC() {
return npc;
}
@Override
public PushReaction getPistonPushReaction() {
return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction();
}
@Override
public boolean isLeashed() {
return NMSImpl.isLeashed(npc, super::isLeashed, this);
}
@Override
public boolean isPushable() {
return npc == null ? super.isPushable()
: npc.data().<Boolean> get(NPC.Metadata.COLLIDABLE, !npc.isProtected());
}
@Override
public void knockback(double strength, double dx, double dz) {
NMS.callKnockbackEvent(npc, (float) strength, dx, dz, evt -> super.knockback((float) evt.getStrength(),
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
protected AABB makeBoundingBox() {
return NMSBoundingBox.makeBB(npc, super.makeBoundingBox());
}
@Override
public boolean onClimbable() {
if (npc == null || !npc.isFlyable())
return super.onClimbable();
else
return false;
}
@Override
public void onSyncedDataUpdated(EntityDataAccessor<?> datawatcherobject) {
if (npc == null) {
super.onSyncedDataUpdated(datawatcherobject);
return;
}
NMSImpl.checkAndUpdateHeight(this, datawatcherobject, super::onSyncedDataUpdated);
}
@Override
public void push(Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.push(entity);
if (npc != null) {
Util.callCollisionEvent(npc, entity.getBukkitEntity());
}
}
@Override
public boolean save(CompoundTag save) {
return npc == null ? super.save(save) : false;
}
@Override
public Entity teleportTo(ServerLevel worldserver, Vec3 location) {
if (npc == null)
return super.teleportTo(worldserver, location);
return NMSImpl.teleportAcrossWorld(this, worldserver, location);
}
@Override
public void travel(Vec3 vec3d) {
if (npc == null || !npc.isFlyable()) {
super.travel(vec3d);
} else {
NMSImpl.flyingMoveLogic(this, vec3d);
}
}
@Override
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tagkey, double d0) {
if (npc == null)
return super.updateFluidHeightAndDoFluidPushing(tagkey, d0);
Vec3 old = getDeltaMovement().add(0, 0, 0);
boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0);
if (!npc.isPushableByFluids()) {
setDeltaMovement(old);
}
return res;
}
}
}

View File

@ -1,17 +1,17 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftArmorStand;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftArmorStand;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.event.player.PlayerInteractEntityEvent;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.MobAI;
import net.citizensnpcs.nms.v1_20_R3.util.MobAI.ForwardingMobAI;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.MobAI;
import net.citizensnpcs.nms.v1_20_R4.util.MobAI.ForwardingMobAI;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;

View File

@ -1,16 +1,16 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftAxolotl;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftAxolotl;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import com.mojang.serialization.Dynamic;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftBat;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftBat;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftBee;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftBee;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftBlaze;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftBlaze;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -0,0 +1,225 @@
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftBogged;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.syncher.EntityDataAccessor;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.tags.TagKey;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.monster.Bogged;
import net.minecraft.world.entity.vehicle.AbstractMinecart;
import net.minecraft.world.entity.vehicle.Boat;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Fluid;
import net.minecraft.world.level.material.PushReaction;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
public class BoggedController extends MobEntityController {
public BoggedController() {
super(EntityBoggedNPC.class);
}
@Override
public org.bukkit.entity.Bogged getBukkitEntity() {
return (org.bukkit.entity.Bogged) super.getBukkitEntity();
}
public static class BoggedNPC extends CraftBogged implements ForwardingNPCHolder {
public BoggedNPC(EntityBoggedNPC entity) {
super((CraftServer) Bukkit.getServer(), entity);
}
}
public static class EntityBoggedNPC extends Bogged implements NPCHolder {
private final CitizensNPC npc;
public EntityBoggedNPC(EntityType<? extends Bogged> types, Level level) {
this(types, level, null);
}
public EntityBoggedNPC(EntityType<? extends Bogged> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
}
@Override
protected boolean canRide(Entity entity) {
if (npc != null && (entity instanceof Boat || entity instanceof AbstractMinecart))
return !npc.isProtected();
return super.canRide(entity);
}
@Override
public boolean causeFallDamage(float f, float f1, DamageSource damagesource) {
if (npc == null || !npc.isFlyable())
return super.causeFallDamage(f, f1, damagesource);
return false;
}
@Override
public void checkDespawn() {
if (npc == null) {
super.checkDespawn();
}
}
@Override
protected void checkFallDamage(double d0, boolean flag, BlockState iblockdata, BlockPos blockposition) {
if (npc == null || !npc.isFlyable()) {
super.checkFallDamage(d0, flag, iblockdata, blockposition);
}
}
@Override
public void customServerAiStep() {
super.customServerAiStep();
if (npc != null) {
NMSImpl.updateMinecraftAIState(npc, this);
npc.update();
}
}
@Override
protected SoundEvent getAmbientSound() {
return NMSImpl.getSoundEffect(npc, super.getAmbientSound(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public CraftEntity getBukkitEntity() {
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
NMSImpl.setBukkitEntity(this, new BoggedNPC(this));
}
return super.getBukkitEntity();
}
@Override
protected SoundEvent getDeathSound() {
return NMSImpl.getSoundEffect(npc, super.getDeathSound(), NPC.Metadata.DEATH_SOUND);
}
@Override
protected SoundEvent getHurtSound(DamageSource damagesource) {
return NMSImpl.getSoundEffect(npc, super.getHurtSound(damagesource), NPC.Metadata.HURT_SOUND);
}
@Override
public float getJumpPower() {
return NMS.getJumpPower(npc, super.getJumpPower());
}
@Override
public int getMaxFallDistance() {
return NMS.getFallDistance(npc, super.getMaxFallDistance());
}
@Override
public NPC getNPC() {
return npc;
}
@Override
public PushReaction getPistonPushReaction() {
return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction();
}
@Override
public boolean isLeashed() {
return NMSImpl.isLeashed(npc, super::isLeashed, this);
}
@Override
public boolean isPushable() {
return npc == null ? super.isPushable()
: npc.data().<Boolean> get(NPC.Metadata.COLLIDABLE, !npc.isProtected());
}
@Override
public void knockback(double strength, double dx, double dz) {
NMS.callKnockbackEvent(npc, (float) strength, dx, dz, evt -> super.knockback((float) evt.getStrength(),
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
protected AABB makeBoundingBox() {
return NMSBoundingBox.makeBB(npc, super.makeBoundingBox());
}
@Override
public boolean onClimbable() {
if (npc == null || !npc.isFlyable())
return super.onClimbable();
else
return false;
}
@Override
public void onSyncedDataUpdated(EntityDataAccessor<?> datawatcherobject) {
if (npc == null) {
super.onSyncedDataUpdated(datawatcherobject);
return;
}
NMSImpl.checkAndUpdateHeight(this, datawatcherobject, super::onSyncedDataUpdated);
}
@Override
public void push(Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.push(entity);
if (npc != null) {
Util.callCollisionEvent(npc, entity.getBukkitEntity());
}
}
@Override
public boolean save(CompoundTag save) {
return npc == null ? super.save(save) : false;
}
@Override
public Entity teleportTo(ServerLevel worldserver, Vec3 location) {
if (npc == null)
return super.teleportTo(worldserver, location);
return NMSImpl.teleportAcrossWorld(this, worldserver, location);
}
@Override
public void travel(Vec3 vec3d) {
if (npc == null || !npc.isFlyable()) {
super.travel(vec3d);
} else {
NMSImpl.flyingMoveLogic(this, vec3d);
}
}
@Override
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tagkey, double d0) {
if (npc == null)
return super.updateFluidHeightAndDoFluidPushing(tagkey, d0);
Vec3 old = getDeltaMovement().add(0, 0, 0);
boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0);
if (!npc.isPushableByFluids()) {
setDeltaMovement(old);
}
return res;
}
}
}

View File

@ -0,0 +1,225 @@
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftBreeze;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.syncher.EntityDataAccessor;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.tags.TagKey;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.monster.breeze.Breeze;
import net.minecraft.world.entity.vehicle.AbstractMinecart;
import net.minecraft.world.entity.vehicle.Boat;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Fluid;
import net.minecraft.world.level.material.PushReaction;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
public class BreezeController extends MobEntityController {
public BreezeController() {
super(EntityBreezeNPC.class);
}
@Override
public org.bukkit.entity.Breeze getBukkitEntity() {
return (org.bukkit.entity.Breeze) super.getBukkitEntity();
}
public static class BreezeNPC extends CraftBreeze implements ForwardingNPCHolder {
public BreezeNPC(EntityBreezeNPC entity) {
super((CraftServer) Bukkit.getServer(), entity);
}
}
public static class EntityBreezeNPC extends Breeze implements NPCHolder {
private final CitizensNPC npc;
public EntityBreezeNPC(EntityType<? extends Breeze> types, Level level) {
this(types, level, null);
}
public EntityBreezeNPC(EntityType<? extends Breeze> types, Level level, NPC npc) {
super(types, level);
this.npc = (CitizensNPC) npc;
}
@Override
protected boolean canRide(Entity entity) {
if (npc != null && (entity instanceof Boat || entity instanceof AbstractMinecart))
return !npc.isProtected();
return super.canRide(entity);
}
@Override
public boolean causeFallDamage(float f, float f1, DamageSource damagesource) {
if (npc == null || !npc.isFlyable())
return super.causeFallDamage(f, f1, damagesource);
return false;
}
@Override
public void checkDespawn() {
if (npc == null) {
super.checkDespawn();
}
}
@Override
protected void checkFallDamage(double d0, boolean flag, BlockState iblockdata, BlockPos blockposition) {
if (npc == null || !npc.isFlyable()) {
super.checkFallDamage(d0, flag, iblockdata, blockposition);
}
}
@Override
public void customServerAiStep() {
super.customServerAiStep();
if (npc != null) {
NMSImpl.updateMinecraftAIState(npc, this);
npc.update();
}
}
@Override
protected SoundEvent getAmbientSound() {
return NMSImpl.getSoundEffect(npc, super.getAmbientSound(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public CraftEntity getBukkitEntity() {
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
NMSImpl.setBukkitEntity(this, new BreezeNPC(this));
}
return super.getBukkitEntity();
}
@Override
protected SoundEvent getDeathSound() {
return NMSImpl.getSoundEffect(npc, super.getDeathSound(), NPC.Metadata.DEATH_SOUND);
}
@Override
protected SoundEvent getHurtSound(DamageSource damagesource) {
return NMSImpl.getSoundEffect(npc, super.getHurtSound(damagesource), NPC.Metadata.HURT_SOUND);
}
@Override
public float getJumpPower() {
return NMS.getJumpPower(npc, super.getJumpPower());
}
@Override
public int getMaxFallDistance() {
return NMS.getFallDistance(npc, super.getMaxFallDistance());
}
@Override
public NPC getNPC() {
return npc;
}
@Override
public PushReaction getPistonPushReaction() {
return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction();
}
@Override
public boolean isLeashed() {
return NMSImpl.isLeashed(npc, super::isLeashed, this);
}
@Override
public boolean isPushable() {
return npc == null ? super.isPushable()
: npc.data().<Boolean> get(NPC.Metadata.COLLIDABLE, !npc.isProtected());
}
@Override
public void knockback(double strength, double dx, double dz) {
NMS.callKnockbackEvent(npc, (float) strength, dx, dz, evt -> super.knockback((float) evt.getStrength(),
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
protected AABB makeBoundingBox() {
return NMSBoundingBox.makeBB(npc, super.makeBoundingBox());
}
@Override
public boolean onClimbable() {
if (npc == null || !npc.isFlyable())
return super.onClimbable();
else
return false;
}
@Override
public void onSyncedDataUpdated(EntityDataAccessor<?> datawatcherobject) {
if (npc == null) {
super.onSyncedDataUpdated(datawatcherobject);
return;
}
NMSImpl.checkAndUpdateHeight(this, datawatcherobject, super::onSyncedDataUpdated);
}
@Override
public void push(Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.push(entity);
if (npc != null) {
Util.callCollisionEvent(npc, entity.getBukkitEntity());
}
}
@Override
public boolean save(CompoundTag save) {
return npc == null ? super.save(save) : false;
}
@Override
public Entity teleportTo(ServerLevel worldserver, Vec3 location) {
if (npc == null)
return super.teleportTo(worldserver, location);
return NMSImpl.teleportAcrossWorld(this, worldserver, location);
}
@Override
public void travel(Vec3 vec3d) {
if (npc == null || !npc.isFlyable()) {
super.travel(vec3d);
} else {
NMSImpl.flyingMoveLogic(this, vec3d);
}
}
@Override
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tagkey, double d0) {
if (npc == null)
return super.updateFluidHeightAndDoFluidPushing(tagkey, d0);
Vec3 old = getDeltaMovement().add(0, 0, 0);
boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0);
if (!npc.isPushableByFluids()) {
setDeltaMovement(old);
}
return res;
}
}
}

View File

@ -1,15 +1,15 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftCamel;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftCamel;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.trait.Controllable;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftCat;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftCat;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftCaveSpider;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftCaveSpider;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftChicken;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftChicken;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,15 +1,15 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftCod;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftCod;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.EntityMoveControl;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.EntityMoveControl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftCow;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftCow;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftCreeper;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftCreeper;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftDolphin;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftDolphin;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftDrowned;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftDrowned;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEnderDragon;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEnderDragon;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.trait.versioned.EnderDragonTrait;

View File

@ -1,17 +1,17 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import java.util.Optional;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEnderman;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEnderman;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.event.player.PlayerTeleportEvent;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEndermite;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEndermite;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,12 +1,12 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import java.io.IOException;
import java.lang.invoke.MethodHandle;
import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.metadata.MetadataValue;
import org.bukkit.plugin.Plugin;
@ -18,13 +18,13 @@ import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.npc.NPC.NPCUpdate;
import net.citizensnpcs.api.trait.trait.Inventory;
import net.citizensnpcs.api.util.SpigotUtil;
import net.citizensnpcs.nms.v1_20_R3.network.EmptyConnection;
import net.citizensnpcs.nms.v1_20_R3.network.EmptyPacketListener;
import net.citizensnpcs.nms.v1_20_R3.util.EmptyAdvancementDataPlayer;
import net.citizensnpcs.nms.v1_20_R3.util.EmptyServerStatsCounter;
import net.citizensnpcs.nms.v1_20_R3.util.MobAI;
import net.citizensnpcs.nms.v1_20_R3.util.MobAI.ForwardingMobAI;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.network.EmptyConnection;
import net.citizensnpcs.nms.v1_20_R4.network.EmptyPacketListener;
import net.citizensnpcs.nms.v1_20_R4.util.EmptyAdvancementDataPlayer;
import net.citizensnpcs.nms.v1_20_R4.util.EmptyServerStatsCounter;
import net.citizensnpcs.nms.v1_20_R4.util.MobAI;
import net.citizensnpcs.nms.v1_20_R4.util.MobAI.ForwardingMobAI;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.npc.skin.SkinPacketTracker;
@ -237,7 +237,7 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
try {
EmptyConnection conn = new EmptyConnection(PacketFlow.CLIENTBOUND);
connection = new EmptyPacketListener(minecraftServer, conn, this,
new CommonListenerCookie(getProfile(), 0, clientInfo));
new CommonListenerCookie(getProfile(), 0, clientInfo, false));
} catch (IOException e) {
e.printStackTrace();
}

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEvoker;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEvoker;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,16 +1,16 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import java.lang.invoke.MethodHandle;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftFox;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftFox;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.trait.versioned.FoxTrait;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftFrog;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftFrog;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftGhast;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftGhast;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftGiant;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftGiant;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftGlowSquid;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftGlowSquid;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftGoat;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftGoat;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftGuardian;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftGuardian;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftElderGuardian;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftElderGuardian;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftHoglin;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftHoglin;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,15 +1,15 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftHorse;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftHorse;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.trait.Controllable;

View File

@ -1,15 +1,15 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftDonkey;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftDonkey;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.trait.Controllable;

View File

@ -1,15 +1,15 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftMule;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftMule;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.trait.Controllable;

View File

@ -1,15 +1,15 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftSkeletonHorse;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftSkeletonHorse;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.trait.Controllable;

View File

@ -1,15 +1,15 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftZombieHorse;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftZombieHorse;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.trait.Controllable;

View File

@ -1,10 +1,10 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_20_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_20_R4.CraftWorld;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftIllusioner;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftIllusioner;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftIronGolem;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftIronGolem;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,15 +1,15 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftLlama;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftLlama;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.trait.Controllable;

View File

@ -1,15 +1,15 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftMagmaCube;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftMagmaCube;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.EntityMoveControl;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.EntityMoveControl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,4 +1,4 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import java.lang.reflect.Constructor;
import java.util.Map;
@ -6,13 +6,13 @@ import java.util.WeakHashMap;
import org.bukkit.Location;
import org.bukkit.block.BlockFace;
import org.bukkit.craftbukkit.v1_20_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_20_R4.CraftWorld;
import org.bukkit.entity.Entity;
import net.citizensnpcs.Settings.Setting;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R3.util.PitchableLookControl;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.PitchableLookControl;
import net.citizensnpcs.npc.AbstractEntityController;
import net.citizensnpcs.trait.ScoreboardTrait;
import net.minecraft.world.entity.EntityType;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftMushroomCow;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftMushroomCow;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftOcelot;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftOcelot;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftPanda;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftPanda;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftParrot;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftParrot;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,15 +1,15 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftPhantom;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftPhantom;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.EntityMoveControl;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.EntityMoveControl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;
@ -82,7 +82,7 @@ public class PhantomController extends MobEntityController {
this.lookControl = new LookControl(this);
}
if (npc.isProtected()) {
setSecondsOnFire(0);
igniteForSeconds(0);
}
npc.update();
}

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftPig;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftPig;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftPigZombie;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftPigZombie;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftPiglinBrute;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftPiglinBrute;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftPiglin;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftPiglin;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftPillager;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftPillager;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftPolarBear;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftPolarBear;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,15 +1,15 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftPufferFish;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftPufferFish;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.EntityMoveControl;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.EntityMoveControl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.trait.versioned.PufferFishTrait;
@ -146,10 +146,10 @@ public class PufferFishController extends MobEntityController {
}
@Override
public EntityDimensions getDimensions(Pose entitypose) {
public EntityDimensions getDefaultDimensions(Pose entitypose) {
if (npc == null)
return super.getDimensions(entitypose);
return super.getDimensions(entitypose).scale(1 / s(getPuffState())).scale(0.5F);
return super.getDefaultDimensions(entitypose);
return super.getDefaultDimensions(entitypose).scale(1 / s(getPuffState())).scale(0.5F);
}
@Override

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftRabbit;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftRabbit;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftRavager;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftRavager;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,15 +1,15 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftSalmon;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftSalmon;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.EntityMoveControl;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.EntityMoveControl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftSheep;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftSheep;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftShulker;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftShulker;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftSilverfish;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftSilverfish;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftSkeleton;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftSkeleton;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftStray;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftStray;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftWitherSkeleton;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftWitherSkeleton;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,15 +1,15 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftSlime;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftSlime;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.EntityMoveControl;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.EntityMoveControl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftSniffer;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftSniffer;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftSnowman;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftSnowman;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftSpider;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftSpider;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftSquid;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftSquid;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,14 +1,14 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftStrider;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftStrider;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,15 +1,15 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftTadpole;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftTadpole;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.EntityMoveControl;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.EntityMoveControl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;
@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.tags.ItemTags;
import net.minecraft.tags.TagKey;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
@ -25,7 +26,6 @@ import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.ai.control.MoveControl;
import net.minecraft.world.entity.animal.frog.Frog;
import net.minecraft.world.entity.animal.frog.Tadpole;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.entity.vehicle.AbstractMinecart;
@ -194,7 +194,7 @@ public class TadpoleController extends MobEntityController {
if (npc == null || !npc.isProtected())
return super.mobInteract(entityhuman, enumhand);
ItemStack itemstack = entityhuman.getItemInHand(enumhand);
if ((Frog.TEMPTATION_ITEM.test(itemstack) || itemstack.getItem() == Items.WATER_BUCKET) && isAlive())
if ((itemstack.is(ItemTags.FROG_FOOD) || itemstack.getItem() == Items.WATER_BUCKET) && isAlive())
return InteractionResult.FAIL;
return super.mobInteract(entityhuman, enumhand);
}

View File

@ -1,15 +1,15 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftTraderLlama;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftTraderLlama;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.trait.HorseModifiers;

View File

@ -1,15 +1,15 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftTropicalFish;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftTropicalFish;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.EntityMoveControl;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.EntityMoveControl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

View File

@ -1,15 +1,15 @@
package net.citizensnpcs.nms.v1_20_R3.entity;
package net.citizensnpcs.nms.v1_20_R4.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftTurtle;
import org.bukkit.craftbukkit.v1_20_R4.CraftServer;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_20_R4.entity.CraftTurtle;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_20_R3.util.EntityMoveControl;
import net.citizensnpcs.nms.v1_20_R3.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R3.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R3.util.NMSImpl;
import net.citizensnpcs.nms.v1_20_R4.util.EntityMoveControl;
import net.citizensnpcs.nms.v1_20_R4.util.ForwardingNPCHolder;
import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;

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