调整雷达模型和tool方法

This commit is contained in:
17146 2024-12-21 01:08:42 +08:00
parent 051ce0e14b
commit 442a42bf41
8 changed files with 1008 additions and 1109 deletions

View file

@ -627,7 +627,7 @@ public class FuMO25Model<T extends Entity> extends EntityModel<T> {
@Override @Override
public void renderToBuffer(PoseStack poseStack, VertexConsumer vertexConsumer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) { public void renderToBuffer(PoseStack poseStack, VertexConsumer vertexConsumer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) {
poseStack.pushPose(); poseStack.pushPose();
poseStack.scale(0.15f, 0.15f, 0.15f); poseStack.scale(0.3f, 0.3f, 0.3f);
poseStack.mulPose(Axis.XN.rotation(180.0f * Mth.DEG_TO_RAD)); poseStack.mulPose(Axis.XN.rotation(180.0f * Mth.DEG_TO_RAD));
yundongjian.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha); yundongjian.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
poseStack.popPose(); poseStack.popPose();

View file

@ -29,7 +29,7 @@ public class FuMO25BlockEntityRenderer implements BlockEntityRenderer<FuMO25Bloc
public void render(FuMO25BlockEntity pBlockEntity, float pPartialTick, PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, int pPackedOverlay) { public void render(FuMO25BlockEntity pBlockEntity, float pPartialTick, PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, int pPackedOverlay) {
pPoseStack.pushPose(); pPoseStack.pushPose();
pPoseStack.translate(0.5f, 1.8f, 0.5f); pPoseStack.translate(0.5f, 2.7f, 0.5f);
VertexConsumer vertexconsumer = ItemRenderer.getFoilBufferDirect(pBuffer, this.model.renderType(TEXTURE), false, false); VertexConsumer vertexconsumer = ItemRenderer.getFoilBufferDirect(pBuffer, this.model.renderType(TEXTURE), false, false);
this.model.render(pPoseStack, vertexconsumer, 0xffffff, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F, true); this.model.render(pPoseStack, vertexconsumer, 0xffffff, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F, true);

View file

@ -129,13 +129,13 @@ public class VehicleHudOverlay {
private static String getVehicleAmmoType(ItemStack stack, IVehicleEntity iVehicle) { private static String getVehicleAmmoType(ItemStack stack, IVehicleEntity iVehicle) {
if (stack.getItem() == ModItems.AP_5_INCHES.get() && iVehicle instanceof ICannonEntity) { if (stack.getItem() == ModItems.AP_5_INCHES.get() && iVehicle instanceof ICannonEntity) {
return Component.translatable("ammotype.superbwarfare.ap").getString(); return Component.translatable("des.superbwarfare.tips.ammo_type.ap").getString();
} }
if (stack.getItem() == ModItems.HE_5_INCHES.get() && iVehicle instanceof ICannonEntity) { if (stack.getItem() == ModItems.HE_5_INCHES.get() && iVehicle instanceof ICannonEntity) {
return Component.translatable("ammotype.superbwarfare.he").getString(); return Component.translatable("des.superbwarfare.tips.ammo_type.he").getString();
} }
if (iVehicle instanceof SpeedboatEntity) { if (iVehicle instanceof SpeedboatEntity) {
return Component.translatable("ammotype.superbwarfare.cal50").getString(); return Component.translatable("des.superbwarfare.tips.ammo_type.cal50").getString();
} }
return ""; return "";
} }

View file

@ -196,27 +196,16 @@ public class GunsTool {
} }
public static void setGunIntTag(ItemStack stack, String name, int num) { public static void setGunIntTag(ItemStack stack, String name, int num) {
if (stack == null) return; CompoundTag tag = stack.getOrCreateTag();
var data = tag.getCompound("GunData");
var tag = stack.getTag(); data.putInt(name, num);
if (tag != null && tag.contains("GunData")) { stack.addTagElement("GunData", data);
tag.getCompound("GunData").putInt(name, num);
stack.addTagElement("GunData", tag);
} else {
CompoundTag newTag = new CompoundTag();
newTag.putInt(name, num);
stack.addTagElement("GunData", newTag);
}
} }
public static int getGunIntTag(ItemStack stack, String name) { public static int getGunIntTag(ItemStack stack, String name) {
if (stack == null) return 0; CompoundTag tag = stack.getOrCreateTag();
var data = tag.getCompound("GunData");
var tag = stack.getTag(); return data.getInt(name);
if (tag != null && tag.contains("GunData")) {
return tag.getCompound("GunData").getInt(name);
}
return 0;
} }
} }

View file

@ -461,7 +461,7 @@
"commands.ammo.no_permission": "Permission denied", "commands.ammo.no_permission": "Permission denied",
"des.superbwarfare.revolver.da": "DA", "des.superbwarfare.revolver.da": "DA",
"des.superbwarfare.revolver.sa": "SA", "des.superbwarfare.revolver.sa": "SA",
"ammotype.superbwarfare.ap": "AP SHELL", "des.superbwarfare.tips.ammo_type.ap": "AP SHELL",
"ammotype.superbwarfare.he": "HE SHELL", "des.superbwarfare.tips.ammo_type.he": "HE SHELL",
"ammotype.superbwarfare.cal50": ".50 BMG" "des.superbwarfare.tips.ammo_type.cal50": ".50 BMG"
} }

View file

@ -460,5 +460,8 @@
"des.superbwarfare.tips.edit": "按下 %1$s 键进行改装", "des.superbwarfare.tips.edit": "按下 %1$s 键进行改装",
"commands.ammo.no_permission": "权限不足", "commands.ammo.no_permission": "权限不足",
"des.superbwarfare.revolver.da": "双动", "des.superbwarfare.revolver.da": "双动",
"des.superbwarfare.revolver.sa": "单动" "des.superbwarfare.revolver.sa": "单动",
"des.superbwarfare.tips.ammo_type.ap": "AP SHELL",
"des.superbwarfare.tips.ammo_type.he": "HE SHELL",
"des.superbwarfare.tips.ammo_type.cal50": ".50 BMG"
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB