mirror of
https://github.com/xSquishyLiam/mc-GeyserModelEnginePackGenerator-extension.git
synced 2025-12-19 23:09:16 +00:00
fix part vis
This commit is contained in:
@@ -20,6 +20,8 @@ public class RenderController {
|
|||||||
|
|
||||||
// look, I'm fine with your other code and stuff, but I ain't using templates for JSON lmao
|
// look, I'm fine with your other code and stuff, but I ain't using templates for JSON lmao
|
||||||
public String generate() {
|
public String generate() {
|
||||||
|
List<String> se = new ArrayList<>(bones.keySet());
|
||||||
|
Collections.sort(se);
|
||||||
JsonObject root = new JsonObject();
|
JsonObject root = new JsonObject();
|
||||||
root.addProperty("format_version", "1.8.0");
|
root.addProperty("format_version", "1.8.0");
|
||||||
|
|
||||||
@@ -118,12 +120,12 @@ public class RenderController {
|
|||||||
uvAllBones.add(uvBone.toLowerCase());
|
uvAllBones.add(uvBone.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (String boneName : sorted) {
|
for (String boneName : sorted) {
|
||||||
boneName = originalId.get(boneName);
|
boneName = originalId.get(boneName);
|
||||||
JsonObject visibilityItem = new JsonObject();
|
JsonObject visibilityItem = new JsonObject();
|
||||||
Bone bone = bones.get(boneName);
|
Bone bone = bones.get(boneName);
|
||||||
boolean uvParent = false;
|
boolean uvParent = false;
|
||||||
|
|
||||||
for (Bone child : bone.getAllChildren()) {
|
for (Bone child : bone.getAllChildren()) {
|
||||||
if (child.getName().startsWith("uv_")) {
|
if (child.getName().startsWith("uv_")) {
|
||||||
if (uvAllBones.contains(child.getName())) {
|
if (uvAllBones.contains(child.getName())) {
|
||||||
@@ -132,6 +134,16 @@ public class RenderController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for (Map.Entry<String, Set<String>> entry : entity.getModelConfig().bingingBones.entrySet()) {
|
||||||
|
if (entry.getKey().equals(key)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (entry.getValue().stream().anyMatch(boneName::equalsIgnoreCase)) {
|
||||||
|
uvParent = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!processedBones.contains(bone) && (uvParent || uvAllBones.contains(boneName) || uvBonesId.contains("*"))) {
|
if (!processedBones.contains(bone) && (uvParent || uvAllBones.contains(boneName) || uvBonesId.contains("*"))) {
|
||||||
int index = i;
|
int index = i;
|
||||||
if (boneName.startsWith("uv_")) {
|
if (boneName.startsWith("uv_")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user