Skip to content

Commit 22025a3

Browse files
authored
Merge pull request #13 from GeyserExtensionists/willem
Willem's Fork
2 parents 5c62516 + 80f4c5d commit 22025a3

18 files changed

+1130
-493
lines changed

README.md

Lines changed: 40 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,67 @@
1-
# GeyserModelEngine 自定义实体分支
1+
# GeyserModelEngine
2+
# About
23

3-
> GitHub仓库:[https://github.com/zimzaza4/GeyserModelEngine/tree/custom-entity](https://github.com/zimzaza4/GeyserModelEngine/tree/custom-entity)
4+
Thanks to [Willem](https://github.com/OmeWillem/GeyserUtils) for adding the following features:
5+
- Part Visibility
6+
- Color support
7+
- Scaling support
8+
- & more
49

5-
> [Discord](https://discord.gg/NNNaUdAbpP)
6-
---
10+
# How To Install
711

8-
🌏 Language 🌏
12+
Download the following plugins according to what server software you use.
913

10-
[[English](README_EN.md)] [[简体中文](README.md)] [欢迎贡献更多语言]
11-
12-
---
13-
14-
# 这个跟主分支有什么区别?
15-
16-
跟主分支不同的是,这个是真正的自定义实体!!!🎉🎉🎉
17-
18-
而主分支是给BE生成个史蒂夫发送4d皮肤给be玩家,支持原版Geyser
19-
20-
只需要往资源包里塞动画文件即可,可以有效防止那些进服下个资源包就跑白嫖你模型的贼,但同时限制也挺多😥
21-
22-
总之两者各有各优势,根据各服务器情况选择
23-
24-
---
25-
26-
# 如何安装
27-
28-
根据服务端版本下载以下插件
29-
30-
| 插件 | 链接 | 作用 |
14+
| plugins | Link | effect |
3115
| :--- | :---- | :--- |
32-
| GeyserUtils | [Github](https://github.com/zimzaza4/GeyserUtils) | 让你的Geyser支持调用一些BE的东西 |
33-
| GeyserModelEngine | [Github](https://github.com/zimzaza4/GeyserModelEngine) | 你猜 |
34-
| GeyserModelEnginePackGenerator | [Github](https://github.com/zimzaza4/GeyserModelEnginePackGenerator) | 帮你自动转换模型生成资源包 |
35-
36-
下载完后,将`GeyserModelEngine` `Geyser自定义实体分支`放入插件文件夹
37-
38-
根据服务端版本把`geyserutils-spigot`/`velocity`/`bungeecord`放入插件文件夹
39-
40-
`GeyserModelEnginePackGenerator` `geyserutils-geyser`放入geyser的扩展文件夹
16+
| GeyserUtils | [Github](https://github.com/OmeWillem/GeyserUtils) | Get your Geyser to support calling some BE stuff |
17+
| GeyserModelEngine | [Github](https://github.com/OmeWillem/GeyserModelEngine) | Make your bedrock support MEG4 |
18+
| GeyserModelEnginePackGenerator | [Github](https://github.com/OmeWillem/GeyserModelEnginePackGenerator) | Help you automatically transform the model to generate resource packs |
4119

42-
先启动服务器生成相关配置文件,之后关闭服务器就安装好了
20+
- Put `GeyserModelEngine` in the plugins folder (only Spigot or forks of Spigot supported)
21+
- Put either `geyserutils-spigot` in your plugins folder aswell (`geyserutils-velocity` in your Velocity plugins folder if you use it)
22+
- Put `GeyserModelEnginePackGenerator` and `geyserutils-geyser` into `plugins/[Geyser-Folder]/extensions`
4323

44-
当然,先别急着用,现在你还得接着读下去
24+
Start the server to generate the relevant configuration files, and then shut down the server to convert any models.
4525

46-
---
26+
# Convert Models
4727

48-
# 转换模型📦
28+
`GeyserModelEnginePackGenerator` is capable of generating models all by itself. After generating it will also apply this pack automatically.
4929

50-
现在`GeyserModelEnginePackGenerator`长大了学会自己转换模型生成资源包了
51-
52-
我们来到以下路径 `plugins/Geyser-Spigot/extensions/geysermodelenginepackgenerator/input/`
53-
54-
在此目录创建一个文件夹名为模型的ID,比如我有个模型id为`parry_knight`,那就命名为`parry_knight`
30+
- First go to `plugins/[Geyser-Folder]/extensions/geysermodelenginepackgenerator/input/`
31+
- Create a folder in this directory with the ID of the model. (this is the same name as your model within ModelEngine 4.)
5532

5633
<img src="docsimg/example.jpg" width="500">
5734

58-
> 每个模型都要有独立的模型文件夹
35+
> Each model should have a separate model folder
5936
60-
新版本BlockBench 导出的基岩版模型format_version 是1.21.0
61-
需要手动改成1.12.0
62-
否则你的客户端看不到模型
37+
- Now use BlockBench and convert your model to a Bedrock Entity, this will allow you to export the Bedrock Geometry and Animations.
38+
- Put the geometry, animations and texture file in this folder you've made.
6339

64-
我们将模型、动画和纹理全部原封不动丢进这个文件夹
40+
> The new version of BlockBench exports the bedrock model format_version as `1.21.0`.
41+
> You need to change it to `1.12.0` manually.
42+
> Otherwise your client will NOT see the model.
6543
6644
<img src="docsimg/example1.jpg" width="500">
6745

68-
重启服务器或者重载geyser让他开始生成资源包
69-
70-
来到`plugins/Geyser-Spigot/extensions/geysermodelenginepackgenerator`目录
71-
72-
这里你会看见多了个`generated_pack.zip`,那就说明打包好了
46+
- Restart the server or reload geyser to start generating the resource pack.
47+
- Go to `plugins/[Geyser-Folder]/extensions/geysermodelenginepackgenerator`, and you should see your pack generated!
7348

7449
<img src="docsimg/example2.jpg" width="500">
7550

76-
最后一步,重载Geyser或者重启服务器加载资源包
77-
78-
现在可以用基岩版进服下载资源包看看是否正常生效了
79-
80-
---
81-
82-
# 注意事项❗
83-
84-
* `geysermodelenginepackgenerator`是检测模型的数量有变更才会执行转换打包指令,想重新生成资源包建议先删掉`generated_pack.zip`然后重启服务器重新生成资源包。记得改uuid或版本号!!!
85-
* 在新版本中不用把这个包丢进`geyser/packs`目录,他会自己加载上
86-
87-
---
88-
89-
# 完结🤗
90-
91-
恭喜你现在学会如何使用了😎有BUG或建议请发Issues
92-
93-
---
51+
- Final step, reload Geyser or restart the server to load the resource pack.
52+
- Congratulations, you've completed this tutorial!
9453

95-
# 当前限制💢
54+
# Tips
9655

97-
* 不支持多纹理
98-
* 头部旋转跟JE不太同步
99-
* 待挖掘
56+
* 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.
57+
* You do not have to manually put the pack into the packs folder of Geyser, the extension is capable of loading the pack itself.
10058

101-
---
59+
# Current issues
10260

103-
# 常见问题❓
61+
* Multi-textures are not supported
62+
* Please report any bugs (discord: https://discord.gg/NNNaUdAbpP)
10463

105-
### 召唤模型后召唤的并非模型而是史蒂夫?
64+
# FAQ
10665

107-
如果你确定你根据上面的教程一步一步做了,可能是这个模型的问题?
66+
### Where can I contact you?
67+
You can contact me on our Discord: https://discord.gg/NNNaUdAbpP

README_EN.md

Lines changed: 0 additions & 83 deletions
This file was deleted.
4.67 KB
Binary file not shown.

src/main/java/re/imc/geysermodelengine/GeyserModelEngine.java

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import org.bukkit.entity.EntityType;
1717
import org.bukkit.entity.Player;
1818
import org.bukkit.plugin.java.JavaPlugin;
19-
import re.imc.geysermodelengine.listener.AddEntityPacketListener;
2019
import re.imc.geysermodelengine.listener.ModelListener;
2120
import re.imc.geysermodelengine.listener.MountPacketListener;
2221
import re.imc.geysermodelengine.model.ModelEntity;
@@ -35,7 +34,7 @@ public final class GeyserModelEngine extends JavaPlugin {
3534
private static boolean alwaysSendSkin;
3635

3736
@Getter
38-
private int skinSendDelay;
37+
private int sendDelay;
3938

4039
@Getter
4140
private int viewDistance;
@@ -46,16 +45,6 @@ public final class GeyserModelEngine extends JavaPlugin {
4645
@Getter
4746
private Cache<Player, Boolean> joinedPlayer;
4847

49-
@Getter
50-
@Setter
51-
private boolean spawningModelEntity = false;
52-
53-
54-
@Getter
55-
@Setter
56-
private ModelEntity currentModel = null;
57-
58-
5948
@Getter
6049
private int joinSendDelay;
6150

@@ -72,8 +61,8 @@ public void onEnable() {
7261
// Plugin startup logic
7362
saveDefaultConfig();
7463
// alwaysSendSkin = getConfig().getBoolean("always-send-skin");
75-
skinSendDelay = getConfig().getInt("skin-send-delay", 0);
76-
viewDistance = getConfig().getInt("skin-view-distance", 60);
64+
sendDelay = getConfig().getInt("data-send-delay", 0);
65+
viewDistance = getConfig().getInt("entity-view-distance", 60);
7766
debug = getConfig().getBoolean("debug", false);
7867
modelEntityType = EntityType.valueOf(getConfig().getString("model-entity-type", "BAT"));
7968
joinSendDelay = getConfig().getInt("join-send-delay", 20);
@@ -82,7 +71,7 @@ public void onEnable() {
8271
.expireAfterWrite(joinSendDelay * 50L, TimeUnit.MILLISECONDS).build();
8372
}
8473
instance = this;
85-
ProtocolLibrary.getProtocolManager().addPacketListener(new AddEntityPacketListener());
74+
// ProtocolLibrary.getProtocolManager().addPacketListener(new AddEntityPacketListener());
8675
ProtocolLibrary.getProtocolManager().addPacketListener(new MountPacketListener());
8776

8877
Bukkit.getPluginManager().registerEvents(new ModelListener(), this);

src/main/java/re/imc/geysermodelengine/listener/AddEntityPacketListener.java

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)