|
23 | 23 | import net.minecraft.world.phys.HitResult; |
24 | 24 | import net.minecraft.world.phys.Vec3; |
25 | 25 | import org.vivecraft.client.VivecraftVRMod; |
26 | | -import org.vivecraft.client.Xplat; |
27 | 26 | import org.vivecraft.client.network.ClientNetworking; |
| 27 | +import org.vivecraft.client_vr.utils.ScaleHelper; |
28 | 28 | import org.vivecraft.client_vr.ClientDataHolderVR; |
29 | 29 | import org.vivecraft.client_vr.ItemTags; |
30 | 30 | import org.vivecraft.client_vr.MethodHolder; |
|
39 | 39 | import org.vivecraft.client_vr.render.RenderPass; |
40 | 40 | import org.vivecraft.client_vr.settings.VRSettings; |
41 | 41 | import org.vivecraft.common.VRServerPerms; |
42 | | -import org.vivecraft.mod_compat_vr.pehkui.PehkuiHelper; |
43 | 42 |
|
44 | 43 | import java.util.ArrayList; |
45 | 44 | import java.util.Random; |
@@ -147,16 +146,14 @@ public void preTick() { |
147 | 146 |
|
148 | 147 | this.worldScale = rawWorldScale; |
149 | 148 |
|
150 | | - if (Xplat.isModLoaded("pehkui")) { |
151 | | - // scale world with player size |
152 | | - this.worldScale *= PehkuiHelper.getPlayerScale(mc.player, mc.getFrameTime()); |
153 | | - // limit scale |
154 | | - if (this.worldScale > 100F) { |
155 | | - this.worldScale = 100F; |
156 | | - } else if (this.worldScale < 0.025F) //minClip + player position indicator offset |
157 | | - { |
158 | | - this.worldScale = 0.025F; |
159 | | - } |
| 149 | + // scale world with player size |
| 150 | + this.worldScale *= ScaleHelper.getEntityScale(mc.player, mc.getFrameTime()); |
| 151 | + // limit scale |
| 152 | + if (this.worldScale > 100F) { |
| 153 | + this.worldScale = 100F; |
| 154 | + } else if (this.worldScale < 0.025F) //minClip + player position indicator offset |
| 155 | + { |
| 156 | + this.worldScale = 0.025F; |
160 | 157 | } |
161 | 158 |
|
162 | 159 | // check that nobody tries to bypass the server set worldscale limit it with a runtime worldscale |
|
0 commit comments