mirror of
https://github.com/xSquishyLiam/mc-GeyserModelEngine-plugin.git
synced 2025-12-19 14:59:19 +00:00
addedd namespace support
This commit is contained in:
3
.idea/workspace.xml
generated
3
.idea/workspace.xml
generated
@@ -5,8 +5,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="ff2e9770-ec88-4715-adeb-b9dbda130e1a" name="Changes" comment="">
|
<list default="true" id="ff2e9770-ec88-4715-adeb-b9dbda130e1a" name="Changes" comment="">
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/re/imc/geysermodelengine/GeyserModelEngine.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/re/imc/geysermodelengine/GeyserModelEngine.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/resources/config.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/config.yml" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package re.imc.geysermodelengine.Events;
|
||||||
|
|
||||||
|
public class GeyserModelEngineModelSpawn {
|
||||||
|
|
||||||
|
//Spawn Event
|
||||||
|
}
|
||||||
@@ -102,8 +102,7 @@ public class EntityTaskRunnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void sendEntityData(ModelEntityData model, Player player, int delay) {
|
public void sendEntityData(ModelEntityData model, Player player, int delay) {
|
||||||
//TODO with ModelEngine, you can define the namespace inside the config, make an option to change it here as well? if i'm right about this
|
EntityUtils.setCustomEntity(player, model.getEntity().getEntityId(), plugin.getConfigManager().getConfig().getString("namespace") + ":" + model.getActiveModel().getBlueprint().getName().toLowerCase());
|
||||||
EntityUtils.setCustomEntity(player, model.getEntity().getEntityId(), "modelengine:" + model.getActiveModel().getBlueprint().getName().toLowerCase());
|
|
||||||
|
|
||||||
plugin.getSchedulerPool().schedule(() -> {
|
plugin.getSchedulerPool().schedule(() -> {
|
||||||
model.getEntity().sendSpawnPacket(Collections.singletonList(player));
|
model.getEntity().sendSpawnPacket(Collections.singletonList(player));
|
||||||
@@ -163,14 +162,15 @@ public class EntityTaskRunnable {
|
|||||||
|
|
||||||
Map<String, Integer> intUpdates = new HashMap<>();
|
Map<String, Integer> intUpdates = new HashMap<>();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
for (Integer integer : booleanPacker.mapBooleansToInts(boneUpdates)) {
|
for (Integer integer : booleanPacker.mapBooleansToInts(boneUpdates)) {
|
||||||
intUpdates.put("modelengine:bone" + i, integer);
|
intUpdates.put(plugin.getConfigManager().getConfig().getString("namespace") + ":bone" + i, integer);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
for (Integer integer : booleanPacker.mapBooleansToInts(animUpdates)) {
|
for (Integer integer : booleanPacker.mapBooleansToInts(animUpdates)) {
|
||||||
intUpdates.put("modelengine:anim" + i, integer);
|
intUpdates.put(plugin.getConfigManager().getConfig().getString("namespace") + ":anim" + i, integer);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
bstats: true
|
bstats: true
|
||||||
|
|
||||||
|
namespace: "modelengine"
|
||||||
data-send-delay: 5
|
data-send-delay: 5
|
||||||
entity-view-distance: 50
|
entity-view-distance: 50
|
||||||
join-send-delay: 20
|
join-send-delay: 20
|
||||||
@@ -8,4 +9,5 @@ thread-pool-size: 4
|
|||||||
model-entity-type: BAT # must be a living entity
|
model-entity-type: BAT # must be a living entity
|
||||||
enable-part-visibility-models:
|
enable-part-visibility-models:
|
||||||
- example
|
- example
|
||||||
|
|
||||||
debug: false
|
debug: false
|
||||||
Reference in New Issue
Block a user