-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
49 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
common/src/main/java/org/vivecraft/client_vr/utils/ScaleHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.vivecraft.client_vr.utils; | ||
|
||
import net.minecraft.world.entity.LivingEntity; | ||
import org.vivecraft.client.Xplat; | ||
import org.vivecraft.mod_compat_vr.pehkui.PehkuiHelper; | ||
|
||
public class ScaleHelper { | ||
|
||
public static float getEntityScale(LivingEntity livingEntity, float tickDelta) { | ||
float scale = livingEntity.getScale(); | ||
if (Xplat.isModLoaded("pehkui")) { | ||
scale *= PehkuiHelper.getEntityScale(livingEntity, tickDelta); | ||
} | ||
return scale; | ||
} | ||
|
||
public static float getEntityBbScale(LivingEntity livingEntity, float tickDelta) { | ||
float scale = livingEntity.getScale(); | ||
if (Xplat.isModLoaded("pehkui")) { | ||
scale *= PehkuiHelper.getEntityBbScale(livingEntity, tickDelta); | ||
} | ||
return scale; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters