Skip to content

Commit

Permalink
1.21 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fayer3 committed Sep 25, 2024
1 parent 9b9a785 commit b619c40
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public void setupAnim(T pEntity, float pLimbSwing, float pLimbSwingAmount, float
}

// remove entity scale from that
float scale = 1.0F / ScaleHelper.getEntityScale(pEntity, Minecraft.getInstance().getFrameTime());
float scale = 1.0F / ScaleHelper.getEntityScale(pEntity, Minecraft.getInstance().getTimer().getGameTimeDeltaPartialTick(false));
Vec3 vec3 = rotinfo.leftArmPos.scale(scale);
Vec3 vec32 = rotinfo.rightArmPos.scale(scale);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public void preTick() {
this.worldScale = rawWorldScale;

// scale world with player size
this.worldScale *= ScaleHelper.getEntityScale(mc.player, mc.getFrameTime());
this.worldScale *= ScaleHelper.getEntityScale(mc.player, mc.getTimer().getGameTimeDeltaPartialTick(false));
// limit scale
if (this.worldScale > 100F) {
this.worldScale = 100F;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void doProcess(LocalPlayer player) {
this.lastcanDraw = this.canDraw;

// this is meant to be relative to the base Bb height, not the scaled one
this.maxDraw = (double) this.mc.player.getBbHeight() * 0.22D / ScaleHelper.getEntityBbScale(player, mc.getFrameTime());
this.maxDraw = (double) this.mc.player.getBbHeight() * 0.22D / ScaleHelper.getEntityBbScale(player, mc.getTimer().getGameTimeDeltaPartialTick(false));

Vec3 vec3 = vrdata.getController(0).getPosition();
Vec3 vec31 = vrdata.getController(1).getPosition();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void reset(LocalPlayer player) {
}

public void doProcess(LocalPlayer player) {
float scaleMultiplier = 1.0F / ScaleHelper.getEntityScale(player, mc.getFrameTime());
float scaleMultiplier = 1.0F / ScaleHelper.getEntityScale(player, mc.getTimer().getGameTimeDeltaPartialTick(false));
this.crawling = this.dh.vr.hmdPivotHistory.averagePosition(0.2F).y * (double) this.dh.vrPlayer.worldScale * scaleMultiplier + (double) 0.1F < (double) this.dh.vrSettings.crawlThreshold;
this.updateState(player);
}
Expand Down

0 comments on commit b619c40

Please sign in to comment.