From e6f4beb5bc0f5d48eb4a718cea34e27812a6d433 Mon Sep 17 00:00:00 2001 From: zimzaza4 <3625282098@qq.com> Date: Sun, 27 Oct 2024 18:18:58 +0800 Subject: [PATCH] update README.md --- README.md | 15 ++++++++++----- .../imc/geysermodelengine/model/EntityTask.java | 5 +---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7578557..27398b6 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Download the following plugins according to what server software you use. Start the server to generate the relevant configuration files, and then shut down the server to convert any models. # Convert Models +This is old method to convert model: `GeyserModelEnginePackGenerator` is capable of generating models all by itself. After generating it will also apply this pack automatically. @@ -38,10 +39,6 @@ Start the server to generate the relevant configuration files, and then shut dow - Now use BlockBench and convert your model to a Bedrock Entity, this will allow you to export the Bedrock Geometry and Animations. - Put the geometry, animations and texture file in this folder you've made. -> The new version of BlockBench exports the bedrock model format_version as `1.21.0`. -> You need to change it to `1.12.0` manually. -> Otherwise your client will NOT see the model. - - Restart the server or reload geyser to start generating the resource pack. @@ -52,14 +49,22 @@ Start the server to generate the relevant configuration files, and then shut dow - Final step, reload Geyser or restart the server to load the resource pack. - Congratulations, you've completed this tutorial! +# Model Packer + +This is new way to convert model +- Firstly, install [packer plugin](https://github.com/GeyserExtensionists/GeyserModelEngineBlockbenchPacker) for your blockbench. +- Then, open your bbmodel, go `File -> Export -> Export GeyserModelEngine Model`, you will get a zip, just unzip it to `input` folder. + # Tips * Pay attention! The pack only regenerates when the number of models changes, you can technically speaking remove the generated_pack folder to force a reload aswell. * You do not have to manually put the pack into the packs folder of Geyser, the extension is capable of loading the pack itself. +* Choose a right texture when use the packer. # Current issues -* Multi-textures are not supported +* Multi-textures and Animated textures need use [a blockbench plugin] (https://github.com/GeyserExtensionists/GeyserModelEngineBlockbenchPacker) to export + * Please report any bugs # FAQ diff --git a/src/main/java/re/imc/geysermodelengine/model/EntityTask.java b/src/main/java/re/imc/geysermodelengine/model/EntityTask.java index 8421ab0..e20133b 100644 --- a/src/main/java/re/imc/geysermodelengine/model/EntityTask.java +++ b/src/main/java/re/imc/geysermodelengine/model/EntityTask.java @@ -3,9 +3,7 @@ package re.imc.geysermodelengine.model; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import com.ticxo.modelengine.api.animation.BlueprintAnimation; -import com.ticxo.modelengine.api.animation.ModelState; import com.ticxo.modelengine.api.animation.handler.AnimationHandler; -import com.ticxo.modelengine.api.animation.property.IAnimationProperty; import com.ticxo.modelengine.api.entity.CullType; import com.ticxo.modelengine.api.model.ActiveModel; import com.ticxo.modelengine.api.model.ModeledEntity; @@ -221,6 +219,7 @@ public class EntityTask { }); // } + AnimationHandler handler = model.getActiveModel().getAnimationHandler(); Set priority = model.getActiveModel().getBlueprint().getAnimationDescendingPriority(); for (String animId : priority) { @@ -289,8 +288,6 @@ public class EntityTask { //System.out.println(boneUpdates); //System.out.println(intUpdates); - - for (Player player : players) { EntityUtils.sendIntProperties(player, entity, intUpdates); }