From 56a6c3cc6385f67130c05d7a667ef41f8409e122 Mon Sep 17 00:00:00 2001 From: Tofaa <82680183+Tofaa2@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:29:47 +0400 Subject: [PATCH 01/13] Fix protocted meta --- .../java/me/tofaa/entitylib/modelengine/ELibBaseEntity.java | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 model-engine-addon/src/main/java/me/tofaa/entitylib/modelengine/ELibBaseEntity.java diff --git a/model-engine-addon/src/main/java/me/tofaa/entitylib/modelengine/ELibBaseEntity.java b/model-engine-addon/src/main/java/me/tofaa/entitylib/modelengine/ELibBaseEntity.java deleted file mode 100644 index 84bebab..0000000 --- a/model-engine-addon/src/main/java/me/tofaa/entitylib/modelengine/ELibBaseEntity.java +++ /dev/null @@ -1,5 +0,0 @@ -package me.tofaa.entitylib.modelengine; - -public class ELibBaseEntity { - -} From aab30e236f7cd4443dea27b5a7bf0af179c7b505 Mon Sep 17 00:00:00 2001 From: Tofaa <82680183+Tofaa2@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:34:36 +0400 Subject: [PATCH 02/13] Fix unused meta data --- .../entitylib/meta/MetaConverterRegistry.java | 6 ++++++ .../meta/projectile/ItemEntityMeta.java | 2 +- .../meta/types/ItemContainerMeta.java | 2 +- .../entitylib/wrapper/WrapperPlayer.java | 10 +++++----- model-engine-addon/build.gradle.kts | 9 +++++++++ .../testentitylib/TestPlayerCommand.java | 20 +++++++++++++++++++ 6 files changed, 42 insertions(+), 7 deletions(-) diff --git a/api/src/main/java/me/tofaa/entitylib/meta/MetaConverterRegistry.java b/api/src/main/java/me/tofaa/entitylib/meta/MetaConverterRegistry.java index fbddb86..bbdbf3f 100644 --- a/api/src/main/java/me/tofaa/entitylib/meta/MetaConverterRegistry.java +++ b/api/src/main/java/me/tofaa/entitylib/meta/MetaConverterRegistry.java @@ -1,6 +1,7 @@ package me.tofaa.entitylib.meta; import com.github.retrooper.packetevents.protocol.entity.type.EntityType; +import com.github.retrooper.packetevents.protocol.entity.type.EntityTypes; import me.tofaa.entitylib.meta.display.BlockDisplayMeta; import me.tofaa.entitylib.meta.display.ItemDisplayMeta; import me.tofaa.entitylib.meta.display.TextDisplayMeta; @@ -82,6 +83,7 @@ final class MetaConverterRegistry { put(ENDERMAN, EndermanMeta.class, EndermanMeta::new); put(ENDERMITE, EndermiteMeta.class, EndermiteMeta::new); put(EVOKER, EvokerMeta.class, EvokerMeta::new); + put(EYE_OF_ENDER, EyeOfEnderMeta.class, EyeOfEnderMeta::new); put(EVOKER_FANGS, EvokerFangsMeta.class, EvokerFangsMeta::new); put(FALLING_BLOCK, FallingBlockMeta.class, FallingBlockMeta::new); put(FIREBALL, LargeFireballMeta.class, LargeFireballMeta::new); // TODO: Verify correctness @@ -104,6 +106,7 @@ final class MetaConverterRegistry { put(IRON_GOLEM, IronGolemMeta.class, IronGolemMeta::new); put(ITEM_DISPLAY, ItemDisplayMeta.class, ItemDisplayMeta::new); put(ITEM_FRAME, ItemFrameMeta.class, ItemFrameMeta::new); + put(ITEM, ItemEntityMeta.class, ItemEntityMeta::new); put(LEASH_KNOT, LeashKnotMeta.class, LeashKnotMeta::new); put(LIGHTNING_BOLT, LightningBoltMeta.class, LightningBoltMeta::new); put(LLAMA, LlamaMeta.class, LlamaMeta::new); @@ -114,6 +117,7 @@ final class MetaConverterRegistry { put(OCELOT, OcelotMeta.class, OcelotMeta::new); put(PAINTING, PaintingMeta.class, PaintingMeta::new); put(PANDA, PandaMeta.class, PandaMeta::new); + put(POTION, ThrownPotionMeta.class, ThrownPotionMeta::new); put(PARROT, ParrotMeta.class, ParrotMeta::new); put(PIG, PigMeta.class, PigMeta::new); put(PIGLIN, PiglinMeta.class, PiglinMeta::new); @@ -128,6 +132,7 @@ final class MetaConverterRegistry { put(RAVAGER, RavagerMeta.class, RavagerMeta::new); put(SALMON, SalmonMeta.class, SalmonMeta::new); put(SHEEP, SheepMeta.class, SheepMeta::new); + put(SNOWBALL, SnowballMeta.class, SnowballMeta::new); put(SHULKER, ShulkerMeta.class, ShulkerMeta::new); put(SHULKER_BULLET, ShulkerBulletMeta.class, ShulkerBulletMeta::new); put(SILVERFISH, SilverfishMeta.class, SilverfishMeta::new); @@ -144,6 +149,7 @@ final class MetaConverterRegistry { put(TADPOLE, LivingEntityMeta.class, LivingEntityMeta::new); // TODO: Implement put(TEXT_DISPLAY, TextDisplayMeta.class, TextDisplayMeta::new); put(THROWN_EXP_BOTTLE, ThrownExpBottleMeta.class, ThrownExpBottleMeta::new); + put(ENDER_PEARL, ThrownEnderPearlMeta.class, ThrownEnderPearlMeta::new); put(TNT_MINECART, TntMinecartMeta.class, TntMinecartMeta::new); put(TRADER_LLAMA, TraderLlamaMeta.class, TraderLlamaMeta::new); put(TRIDENT, ThrownTridentMeta.class, ThrownTridentMeta::new); diff --git a/api/src/main/java/me/tofaa/entitylib/meta/projectile/ItemEntityMeta.java b/api/src/main/java/me/tofaa/entitylib/meta/projectile/ItemEntityMeta.java index f3f884a..d36df98 100644 --- a/api/src/main/java/me/tofaa/entitylib/meta/projectile/ItemEntityMeta.java +++ b/api/src/main/java/me/tofaa/entitylib/meta/projectile/ItemEntityMeta.java @@ -10,7 +10,7 @@ public class ItemEntityMeta extends ItemContainerMeta implements ObjectData { public static final byte OFFSET = ItemContainerMeta.MAX_OFFSET; public static final byte MAX_OFFSET = OFFSET + 0; - protected ItemEntityMeta(int entityId, Metadata metadata) { + public ItemEntityMeta(int entityId, Metadata metadata) { super(entityId, metadata, ItemStack.EMPTY); } diff --git a/api/src/main/java/me/tofaa/entitylib/meta/types/ItemContainerMeta.java b/api/src/main/java/me/tofaa/entitylib/meta/types/ItemContainerMeta.java index 7d0f87b..4feb873 100644 --- a/api/src/main/java/me/tofaa/entitylib/meta/types/ItemContainerMeta.java +++ b/api/src/main/java/me/tofaa/entitylib/meta/types/ItemContainerMeta.java @@ -11,7 +11,7 @@ public abstract class ItemContainerMeta extends EntityMeta { private final ItemStack baseItem; - protected ItemContainerMeta(int entityId, Metadata metadata, ItemStack baseItem) { + public ItemContainerMeta(int entityId, Metadata metadata, ItemStack baseItem) { super(entityId, metadata); this.baseItem = baseItem; } diff --git a/api/src/main/java/me/tofaa/entitylib/wrapper/WrapperPlayer.java b/api/src/main/java/me/tofaa/entitylib/wrapper/WrapperPlayer.java index ff7d510..ad4e0cd 100644 --- a/api/src/main/java/me/tofaa/entitylib/wrapper/WrapperPlayer.java +++ b/api/src/main/java/me/tofaa/entitylib/wrapper/WrapperPlayer.java @@ -40,8 +40,8 @@ public class WrapperPlayer extends WrapperLivingEntity { return profile.getTextureProperties(); } - public WrapperPlayServerPlayerInfoRemove tabListRemovePacket() { - return new WrapperPlayServerPlayerInfoRemove(getUuid()); + public WrapperPlayServerPlayerInfoUpdate tabListRemovePacket() { + return new WrapperPlayServerPlayerInfoUpdate(EnumSet.of(WrapperPlayServerPlayerInfoUpdate.Action.UPDATE_LISTED), createInfo()); } public void setGameMode(GameMode gameMode) { @@ -95,9 +95,9 @@ public class WrapperPlayer extends WrapperLivingEntity { public void setInTablist(boolean tablist) { this.tablist = tablist; sendPacketsToViewersIfSpawned(tabListPacket()); - if (!tablist) { - sendPacketsToViewersIfSpawned(tabListRemovePacket()); - } +// if (!tablist) { +// sendPacketsToViewersIfSpawned(tabListRemovePacket()); +// } } public int getLatency() { diff --git a/model-engine-addon/build.gradle.kts b/model-engine-addon/build.gradle.kts index 763d885..a4bd5c3 100644 --- a/model-engine-addon/build.gradle.kts +++ b/model-engine-addon/build.gradle.kts @@ -7,9 +7,18 @@ repositories { maven { url = uri("https://mvn.lumine.io/repository/maven-public/") } + maven("https://jitpack.io") } dependencies { // compileOnly("com.ticxo.modelengine:ModelEngine:R4.0.4") api(project(":api")) + + implementation("commons-io:commons-io:2.11.0") + implementation("org.zeroturnaround:zt-zip:1.8") + + implementation("javax.json:javax.json-api:1.1.4") + implementation("org.glassfish:javax.json:1.1.4") + + implementation("com.github.hollow-cube.common:mql:2b48ad430f") } diff --git a/test-plugin/src/main/java/me/tofaa/testentitylib/TestPlayerCommand.java b/test-plugin/src/main/java/me/tofaa/testentitylib/TestPlayerCommand.java index a0c828c..2fc1ce4 100644 --- a/test-plugin/src/main/java/me/tofaa/testentitylib/TestPlayerCommand.java +++ b/test-plugin/src/main/java/me/tofaa/testentitylib/TestPlayerCommand.java @@ -20,6 +20,9 @@ import java.util.*; public class TestPlayerCommand extends BukkitCommand { + + private static final char UNICODE_EMPTY = '\u2800'; + private WrapperPlayer p; private SkinFetcher sf; public TestPlayerCommand() { @@ -28,6 +31,22 @@ public class TestPlayerCommand extends BukkitCommand { @Override public boolean execute(@NotNull CommandSender commandSender, @NotNull String s, @NotNull String[] strings) { + Player player = (Player) commandSender; + if (p != null) { + p.setInTablist(!p.isInTablist()); + return true; + } + + p = new WrapperPlayer(new UserProfile(UUID.randomUUID(), "\u2800"), EntityLib.getPlatform().getEntityIdProvider().provide(UUID.randomUUID(), EntityTypes.PLAYER)); + p.setInTablist(true); + p.setTextureProperties(ExtraConversionUtil.getProfileFromBukkitPlayer(player).getTextureProperties()); + p.spawn(SpigotConversionUtil.fromBukkitLocation(player.getLocation())); + p.addViewer(player.getUniqueId()); + player.sendMessage("Entity spawned"); + return true; + } + + private boolean legacyProcess(@NotNull CommandSender commandSender, @NotNull String s, @NotNull String[] strings) { Player player = (Player) commandSender; if (strings.length < 1) { player.sendMessage("Usage: /testplayer "); @@ -92,6 +111,7 @@ public class TestPlayerCommand extends BukkitCommand { return true; } + @NotNull @Override public List tabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args) throws IllegalArgumentException { From 24887cb05a0fe25cf4f3e91960f8349b0005eb5e Mon Sep 17 00:00:00 2001 From: Tofaa <82680183+Tofaa2@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:48:31 +0400 Subject: [PATCH 03/13] remove compileOnlyApi --- api/build.gradle.kts | 4 ++-- common/build.gradle.kts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api/build.gradle.kts b/api/build.gradle.kts index 4ee6acc..43334d1 100644 --- a/api/build.gradle.kts +++ b/api/build.gradle.kts @@ -7,8 +7,8 @@ plugins { dependencies { api(libs.jetbrains.annotations) - compileOnlyApi(libs.bundles.adventure) - compileOnlyApi(libs.packetevents.api) + compileOnly(libs.bundles.adventure) + compileOnly(libs.packetevents.api) } tasks { diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 8a83c9e..7dcdb56 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -5,4 +5,6 @@ plugins { dependencies { api(project(":api")) + compileOnly(libs.bundles.adventure) + compileOnly(libs.packetevents.api) } From 96e1401d0a7770ef7ebfeac8874d5cc2bde86e5b Mon Sep 17 00:00:00 2001 From: Tofaa <82680183+Tofaa2@users.noreply.github.com> Date: Tue, 16 Jul 2024 12:13:11 +0400 Subject: [PATCH 04/13] Fix! --- .../me/tofaa/entitylib/meta/EntityMeta.java | 19 ++++++++++++++++--- .../entitylib/meta/types/PlayerMeta.java | 1 - test-plugin/build.gradle.kts | 1 + 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/me/tofaa/entitylib/meta/EntityMeta.java b/api/src/main/java/me/tofaa/entitylib/meta/EntityMeta.java index 9dfd0a8..287cbf8 100644 --- a/api/src/main/java/me/tofaa/entitylib/meta/EntityMeta.java +++ b/api/src/main/java/me/tofaa/entitylib/meta/EntityMeta.java @@ -1,5 +1,6 @@ package me.tofaa.entitylib.meta; +import com.github.retrooper.packetevents.PacketEvents; import com.github.retrooper.packetevents.manager.server.ServerVersion; import com.github.retrooper.packetevents.manager.server.VersionComparison; import com.github.retrooper.packetevents.protocol.entity.data.EntityData; @@ -203,17 +204,29 @@ public class EntityMeta implements EntityMetadataProvider { } protected static void isVersionNewer(ServerVersion version) { - if (!EntityLib.getApi().getPacketEvents().getServerManager().getVersion().is(VersionComparison.NEWER_THAN, version)) { + if (EntityLib.getOptionalApi().isPresent()) { + if (!EntityLib.getApi().getPacketEvents().getServerManager().getVersion().is(VersionComparison.NEWER_THAN, version)) { + throw new InvalidVersionException("This method is only available for versions newer than " + version.name() + "."); + } + } + if (!PacketEvents.getAPI().getServerManager().getVersion().is(VersionComparison.NEWER_THAN, version)) { throw new InvalidVersionException("This method is only available for versions newer than " + version.name() + "."); } } protected static boolean isVersion(ServerVersion version, VersionComparison comparison) { - return EntityLib.getApi().getPacketEvents().getServerManager().getVersion().is(comparison, version); + if (EntityLib.getOptionalApi().isPresent()) { + + return EntityLib.getApi().getPacketEvents().getServerManager().getVersion().is(comparison, version); + } + return PacketEvents.getAPI().getServerManager().getVersion().is(comparison, version); } protected static boolean isVersion(ServerVersion version) { - return EntityLib.getApi().getPacketEvents().getServerManager().getVersion().is(VersionComparison.EQUALS, version); + if (EntityLib.getOptionalApi().isPresent()) { + return EntityLib.getApi().getPacketEvents().getServerManager().getVersion().is(VersionComparison.EQUALS, version); + } + return PacketEvents.getAPI().getServerManager().getVersion().is(VersionComparison.EQUALS, version); } /** diff --git a/api/src/main/java/me/tofaa/entitylib/meta/types/PlayerMeta.java b/api/src/main/java/me/tofaa/entitylib/meta/types/PlayerMeta.java index 686f4fb..529b0a3 100644 --- a/api/src/main/java/me/tofaa/entitylib/meta/types/PlayerMeta.java +++ b/api/src/main/java/me/tofaa/entitylib/meta/types/PlayerMeta.java @@ -4,7 +4,6 @@ import com.github.retrooper.packetevents.manager.server.ServerVersion; import com.github.retrooper.packetevents.protocol.entity.data.EntityDataTypes; import com.github.retrooper.packetevents.protocol.nbt.NBTCompound; import me.tofaa.entitylib.EntityLib; -import me.tofaa.entitylib.meta.EntityMeta; import me.tofaa.entitylib.meta.Metadata; import org.jetbrains.annotations.Nullable; diff --git a/test-plugin/build.gradle.kts b/test-plugin/build.gradle.kts index 7def317..8d63c5c 100644 --- a/test-plugin/build.gradle.kts +++ b/test-plugin/build.gradle.kts @@ -11,6 +11,7 @@ repositories { dependencies { compileOnly(libs.paper) compileOnly(libs.packetevents.spigot) + implementation("com.github.Tofaa2.EntityLib:spigot:24887cb05a") implementation(project(":platforms:spigot")) } From 266e4e6c4edbe54b78f84364dcf81e5c7ea04c51 Mon Sep 17 00:00:00 2001 From: Tofaa <82680183+Tofaa2@users.noreply.github.com> Date: Fri, 26 Jul 2024 11:38:45 +0400 Subject: [PATCH 05/13] Out of jitpack --- README.md | 12 ++++++------ .../kotlin/entitylib.library-conventions.gradle.kts | 11 +++++++++++ test-plugin/build.gradle.kts | 5 +++-- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d8b97a6..f84637e 100644 --- a/README.md +++ b/README.md @@ -9,31 +9,31 @@ You can easily use EntityLib platformless by using the `api` or `common` module Gradle (Groovy DSL): ```groovy -//https://jitpack.io/#Tofaa2/EntityLib/ +//https://maven.evokegames.gg/#/snapshots/me/tofaa/entitylib repositories { - maven { url 'https://jitpack.io' } + maven { url 'https://maven.evokegames.gg/snapshots' } } dependencies { - implementation 'com.github.Tofaa2.EntityLib::::") + implementation("me.tofaa.entitylib::") } ``` Maven: ```xml - com.github.Tofaa2.EntityLib + me.tofaa.entitylib (platform) (latest-release-version) diff --git a/buildSrc/src/main/kotlin/entitylib.library-conventions.gradle.kts b/buildSrc/src/main/kotlin/entitylib.library-conventions.gradle.kts index 3f5dcfa..45a6ec5 100644 --- a/buildSrc/src/main/kotlin/entitylib.library-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/entitylib.library-conventions.gradle.kts @@ -45,6 +45,17 @@ tasks { } publishing { + + repositories { + maven { + url = uri("https://maven.evokegames.gg/snapshots") + credentials { + username = System.getenv("TYCOONS_REPO_USER") + password = System.getenv("TYCOONS_REPO_PASS") + } + } + } + publications { create("EntityLib") { groupId = project.group as String diff --git a/test-plugin/build.gradle.kts b/test-plugin/build.gradle.kts index 8d63c5c..fe65dd0 100644 --- a/test-plugin/build.gradle.kts +++ b/test-plugin/build.gradle.kts @@ -5,14 +5,15 @@ plugins { } repositories { + maven("https://maven.evokegames.gg/snapshots") maven("https://repo.papermc.io/repository/maven-public/") } dependencies { compileOnly(libs.paper) compileOnly(libs.packetevents.spigot) - implementation("com.github.Tofaa2.EntityLib:spigot:24887cb05a") - implementation(project(":platforms:spigot")) + implementation("me.tofaa.entitylib:spigot:2.4.5-SNAPSHOT") +// implementation(project(":platforms:spigot")) } tasks { From 56f6a5060d82b05092212e5606d3b9ac2ab47d03 Mon Sep 17 00:00:00 2001 From: Bram Date: Sat, 27 Jul 2024 22:40:26 +0900 Subject: [PATCH 06/13] Removed: Old JitPack configuration file --- jitpack.yml | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 jitpack.yml diff --git a/jitpack.yml b/jitpack.yml deleted file mode 100644 index 314c598..0000000 --- a/jitpack.yml +++ /dev/null @@ -1,15 +0,0 @@ -jdk: - - temurin-21 - -stages: - - name: build - - name: publish - depends_on: build - -build: - script: - - ./gradlew build - -publish: - script: - - ./gradlew publishToMavenLocal \ No newline at end of file From f75ecd85ae1ed560c9e3719a9d1210798c323955 Mon Sep 17 00:00:00 2001 From: Bram Date: Sat, 27 Jul 2024 22:56:34 +0900 Subject: [PATCH 07/13] Updated: Gradle to build upon each commit and pull request --- .../{gradle-publish.yml => gradle.yml} | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) rename .github/workflows/{gradle-publish.yml => gradle.yml} (77%) diff --git a/.github/workflows/gradle-publish.yml b/.github/workflows/gradle.yml similarity index 77% rename from .github/workflows/gradle-publish.yml rename to .github/workflows/gradle.yml index cfa4565..8e98047 100644 --- a/.github/workflows/gradle-publish.yml +++ b/.github/workflows/gradle.yml @@ -1,8 +1,10 @@ -name: Gradle Package +name: Build & Upload on: - release: - types: [ created ] + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] jobs: build: @@ -12,15 +14,12 @@ jobs: packages: write steps: - - uses: actions/checkout@v3 - + - uses: actions/checkout@v4 - name: Set up JDK 21 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '21' - distribution: 'adopt' - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file + distribution: 'temurin' - name: Build with Gradle run: chmod +x gradlew && ./gradlew build From 8488b16006c265efc15dd2ff38eb76c60c5642f3 Mon Sep 17 00:00:00 2001 From: Bram Date: Sat, 27 Jul 2024 22:57:48 +0900 Subject: [PATCH 08/13] Fix master branch being called main branch in the build workflow --- .github/workflows/gradle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 8e98047..da8e18a 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -2,9 +2,9 @@ name: Build & Upload on: push: - branches: [ "main" ] + branches: [ "master" ] pull_request: - branches: [ "main" ] + branches: [ "master" ] jobs: build: From f24fdf6383913537db2307ebb0969b9e68178c79 Mon Sep 17 00:00:00 2001 From: Tofaa <82680183+Tofaa2@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:21:49 +0400 Subject: [PATCH 09/13] Fix npe for remove and rotateHead updates yaw and pitch --- .../java/me/tofaa/entitylib/wrapper/WrapperEntity.java | 9 ++++++++- build.gradle.kts | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntity.java b/api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntity.java index 7f56b43..28ee724 100644 --- a/api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntity.java +++ b/api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntity.java @@ -121,7 +121,12 @@ public class WrapperEntity implements Tickable, TrackedEntity { } public void remove() { - parent.removeEntity(this, true); + if (parent != null) { + parent.removeEntity(this, true); + } + else { + despawn(); + } } public void despawn() { @@ -382,6 +387,8 @@ public class WrapperEntity implements Tickable, TrackedEntity { new WrapperPlayServerEntityRotation(entityId, yaw, pitch, onGround), new WrapperPlayServerEntityHeadLook(entityId, yaw) ); + this.location.setYaw(yaw); + this.location.setPitch(pitch); } public void rotateHead(Location location) { diff --git a/build.gradle.kts b/build.gradle.kts index 646d9e5..12a148f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,6 @@ import java.io.ByteArrayOutputStream -val fullVersion = "2.4.5" +val fullVersion = "2.4.7" val snapshot = true group = "me.tofaa.entitylib" From 0356f220cb64fbfab2d4675d31e65101a9cfdce4 Mon Sep 17 00:00:00 2001 From: Tofaa <82680183+Tofaa2@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:24:02 +0400 Subject: [PATCH 10/13] Bump version --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 12a148f..8a70e11 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,6 @@ import java.io.ByteArrayOutputStream -val fullVersion = "2.4.7" +val fullVersion = "2.4.8" val snapshot = true group = "me.tofaa.entitylib" From 5bec1fd1a14da46cca5edd0b67e2f84bb3e5e31b Mon Sep 17 00:00:00 2001 From: Tofaa <82680183+Tofaa2@users.noreply.github.com> Date: Sat, 10 Aug 2024 18:57:41 +0400 Subject: [PATCH 11/13] some isspawned checks --- .../main/java/me/tofaa/entitylib/wrapper/WrapperEntity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntity.java b/api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntity.java index 28ee724..e40db7b 100644 --- a/api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntity.java +++ b/api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntity.java @@ -45,6 +45,7 @@ public class WrapperEntity implements Tickable, TrackedEntity { this.ticking = true; this.viewers = ConcurrentHashMap.newKeySet(); this.passengers = ConcurrentHashMap.newKeySet(); + this.location = new Location(0, 0, 0, 0, 0); } public WrapperEntity(int entityId, EntityType entityType) { @@ -383,7 +384,7 @@ public class WrapperEntity implements Tickable, TrackedEntity { } public void rotateHead(float yaw, float pitch) { - sendPacketsToViewers( + sendPacketsToViewersIfSpawned( new WrapperPlayServerEntityRotation(entityId, yaw, pitch, onGround), new WrapperPlayServerEntityHeadLook(entityId, yaw) ); From 8f2005427580500074063a015a7ed79edfe7217a Mon Sep 17 00:00:00 2001 From: Tofaa <82680183+Tofaa2@users.noreply.github.com> Date: Sun, 11 Aug 2024 14:59:20 +0400 Subject: [PATCH 12/13] bump version --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 8a70e11..ad2b85a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,6 @@ import java.io.ByteArrayOutputStream -val fullVersion = "2.4.8" +val fullVersion = "2.4.9" val snapshot = true group = "me.tofaa.entitylib" From f5c5366240ae838b67524f1d26a9d5a01a7262a9 Mon Sep 17 00:00:00 2001 From: Tofaa <82680183+Tofaa2@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:21:24 +0400 Subject: [PATCH 13/13] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f84637e..aac74e8 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ For general support and reports of bugs, join the [Discord](https://discord.gg/j Currently supported platforms are `spigot` and `velocity` You can easily use EntityLib platformless by using the `api` or `common` module +If you like EntityLib and or want to sponsor me, visit my [ko-fi page](https://ko-fi.com/tofaa) :D Gradle (Groovy DSL): ```groovy