优化哨兵的准星

This commit is contained in:
Atsuishio 2025-04-26 14:32:54 +08:00 committed by Light_Quanta
parent 336239836b
commit 310d243dec
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959
6 changed files with 12 additions and 24 deletions

View file

@ -63,9 +63,6 @@ public class SentinelItemModel extends GeoModel<SentinelItem> {
scope.setScaleZ(1f - (0.8f * (float) zp));
cb.setRotZ((float) (cb.getRotZ() + times * 10 * ClientEventHandler.chamberRot));
GeoBone holo = getAnimationProcessor().getBone("holo");
holo.setPosY(0.09f);
var data = GunData.from(stack);
shen.setPosX((float) (0.95f * ClientEventHandler.recoilHorizon * fpz * fp));

View file

@ -2,7 +2,6 @@ package com.atsuishio.superbwarfare.client.renderer.item;
import com.atsuishio.superbwarfare.client.AnimationHelper;
import com.atsuishio.superbwarfare.client.model.item.SentinelItemModel;
import com.atsuishio.superbwarfare.event.ClientEventHandler;
import com.atsuishio.superbwarfare.item.gun.GunItem;
import com.atsuishio.superbwarfare.item.gun.sniper.SentinelItem;
import com.mojang.blaze3d.vertex.PoseStack;
@ -81,12 +80,6 @@ public class SentinelItemRenderer extends GeoItemRenderer<SentinelItem> {
ItemStack itemStack = player.getMainHandItem();
if (!(itemStack.getItem() instanceof GunItem)) return;
AnimationHelper.handleShootFlare(name, stack, itemStack, bone, buffer, packedLightIn, 0, 0, 1.53125, 0.6);
if (name.equals("holo")) {
bone.setHidden(ClientEventHandler.zoomPos < 0.7 || !ClientEventHandler.zoom);
}
var cap = itemStack.getCapability(Capabilities.EnergyStorage.ITEM);
var flag = cap != null && cap.getEnergyStored() > 0;
@ -94,6 +87,9 @@ public class SentinelItemRenderer extends GeoItemRenderer<SentinelItem> {
bone.setHidden(!flag);
}
AnimationHelper.handleZoomCrossHair(currentBuffer, renderType, name, stack, bone, buffer, packedLightIn, 0, 0.265, -0.05, 0.075f, 255, 0, 0, 255, "apex_3x", false);
AnimationHelper.handleShootFlare(name, stack, itemStack, bone, buffer, packedLightIn, 0, 0, 1.53125, 0.6);
if (renderingArms) {
AnimationHelper.renderArms(mc, player, this.transformType, stack, name, bone, SCALE_RECIPROCAL, this.currentBuffer, type, packedLightIn, true, true);
}

View file

@ -45,6 +45,15 @@
"pivot": [0, 0, 7]
},
{
"name": "cross",
"parent": "0",
"pivot": [
0,
4.10312,
-100
]
},
{
"name": "flare",
"parent": "0",
"pivot": [0, 1.35156, -24.5]
@ -6009,20 +6018,6 @@
"parent": "0",
"pivot": [-0.00223, 0.07256, 0.13692]
},
{
"name": "holo",
"parent": "scope2",
"pivot": [0.49609, 4.50312, 2],
"cubes": [
{
"origin": [-0.6, 3.77876, 1.3],
"size": [1.2, 0.38, 0],
"uv": {
"south": {"uv": [58.0127, 79.31592], "uv_size": [69.7373, 22.375]}
}
}
]
},
{
"name": "ammobar",
"parent": "scope2",

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 85 KiB