diff --git a/projects/pswg/src/main/java/com/parzivail/pswg/Client.java b/projects/pswg/src/main/java/com/parzivail/pswg/Client.java index bf8d69258..c7ca5e7c5 100644 --- a/projects/pswg/src/main/java/com/parzivail/pswg/Client.java +++ b/projects/pswg/src/main/java/com/parzivail/pswg/Client.java @@ -252,9 +252,9 @@ public void onInitializeClient() ModelRegistry.registerConnected(SwgBlocks.Panel.BlackImperialPanelSectional, true, true, true, null, Resources.id("block/black_imperial_panel_blank")); ModelRegistry.registerConnected(SwgBlocks.Panel.BlackImperialPanelSectional1, true, true, true, null, Resources.id("block/black_imperial_panel_blank")); ModelRegistry.registerConnected(SwgBlocks.Panel.BlackImperialPanelSectional2, true, true, true, null, Resources.id("block/black_imperial_panel_blank")); - ModelRegistry.registerConnected(SwgBlocks.Panel.GrayImperialPanelSectional, true, true, true, null, Resources.id("block/gray_imperial_panel_blank")); - ModelRegistry.registerConnected(SwgBlocks.Panel.GrayImperialPanelSectional1, true, true, true, null, Resources.id("block/gray_imperial_panel_blank")); - ModelRegistry.registerConnected(SwgBlocks.Panel.GrayImperialPanelSectional2, true, true, true, null, Resources.id("block/gray_imperial_panel_blank")); + ModelRegistry.registerConnected(SwgBlocks.Panel.GrayImperialPanelSectional, true, true, true, null, Resources.id("block/gray_imperial_panel_borderless")); + ModelRegistry.registerConnected(SwgBlocks.Panel.GrayImperialPanelSectional1, true, true, true, null, Resources.id("block/gray_imperial_panel_borderless")); + ModelRegistry.registerConnected(SwgBlocks.Panel.GrayImperialPanelSectional2, true, true, true, null, Resources.id("block/gray_imperial_panel_borderless")); ModelRegistry.registerConnected(SwgBlocks.Panel.LightGrayImperialPanelSectional, true, true, true, null, Resources.id("block/light_gray_imperial_panel_blank")); ModelRegistry.registerConnected(SwgBlocks.Panel.LightGrayImperialPanelSectional1, true, true, true, null, Resources.id("block/light_gray_imperial_panel_blank")); ModelRegistry.registerConnected(SwgBlocks.Panel.LightGrayImperialPanelSectional2, true, true, true, null, Resources.id("block/light_gray_imperial_panel_blank")); diff --git a/projects/pswg/src/main/java/com/parzivail/pswg/client/render/entity/MannequinEntityRenderer.java b/projects/pswg/src/main/java/com/parzivail/pswg/client/render/entity/MannequinEntityRenderer.java index 326962179..e75b9b6b5 100644 --- a/projects/pswg/src/main/java/com/parzivail/pswg/client/render/entity/MannequinEntityRenderer.java +++ b/projects/pswg/src/main/java/com/parzivail/pswg/client/render/entity/MannequinEntityRenderer.java @@ -114,11 +114,14 @@ public void render(LivingEntity livingEntity, float f, float tickDelta, MatrixSt var speciesStr = mannequin.getSpecies(); var species = SwgSpeciesRegistry.deserialize(speciesStr); - var renderer = renderers.get(species.getModel().toString()); - - if (renderer instanceof PlayerSpeciesModelRenderer perwm) + if (species != null) { - model = (BipedEntityModel)perwm.getModel(); + var renderer = renderers.get(species.getModel().toString()); + + if (renderer instanceof PlayerSpeciesModelRenderer perwm) + { + model = (BipedEntityModel)perwm.getModel(); + } } } @@ -132,9 +135,14 @@ public void render(LivingEntity livingEntity, float f, float tickDelta, MatrixSt return; matrixStack.push(); + + this.model.sneaking = false; this.model.handSwingProgress = this.getHandSwingProgress(livingEntity, tickDelta); this.model.riding = livingEntity.hasVehicle(); this.model.child = livingEntity.isBaby(); + + this.model.setAngles(livingEntity, 0, 0, 0, 0, 0); + float bodyYaw = MathHelper.lerpAngleDegrees(tickDelta, livingEntity.prevBodyYaw, livingEntity.bodyYaw); float headYaw = MathHelper.lerpAngleDegrees(tickDelta, livingEntity.prevHeadYaw, livingEntity.headYaw); float headYawDelta = headYaw - bodyYaw; @@ -230,7 +238,8 @@ public Identifier getTexture(LivingEntity mannequin) { var speciesStr = mannequinEntity.getSpecies(); var species = SwgSpeciesRegistry.deserialize(speciesStr); - return SwgSpeciesRenderer.getTexture(mannequin, species); + if (species != null) + return SwgSpeciesRenderer.getTexture(mannequin, species); } return TEXTURE; } diff --git a/projects/pswg/src/main/java/com/parzivail/pswg/client/render/player/PlayerSpeciesModelRenderer.java b/projects/pswg/src/main/java/com/parzivail/pswg/client/render/player/PlayerSpeciesModelRenderer.java index 8102ff5cd..6c521bf56 100644 --- a/projects/pswg/src/main/java/com/parzivail/pswg/client/render/player/PlayerSpeciesModelRenderer.java +++ b/projects/pswg/src/main/java/com/parzivail/pswg/client/render/player/PlayerSpeciesModelRenderer.java @@ -176,6 +176,9 @@ public void renderWithOverrides(SwgSpecies species, Identifier texture, Abstract overrideSpecies = species; overrideTexture = texture; + this.model.sneaking = false; + this.model.setAngles(abstractClientPlayerEntity, 0, 0, 0, 0, 0); + this.render(abstractClientPlayerEntity, yaw, tickDelta, matrixStack, vertexConsumerProvider, i); overrideSpecies = null;