forked from hannibal002/SkyHanni
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Armor Hider in Custom Wardrobe (hannibal002#2449)
Co-authored-by: ItsEmpa <[email protected]>
- Loading branch information
Showing
5 changed files
with
27 additions
and
28 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
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,20 @@ | ||
package at.hannibal2.skyhanni.utils | ||
|
||
import net.minecraft.client.Minecraft | ||
import net.minecraft.client.entity.EntityOtherPlayerMP | ||
import net.minecraft.client.resources.DefaultPlayerSkin | ||
import net.minecraft.entity.player.EnumPlayerModelParts | ||
import net.minecraft.scoreboard.ScorePlayerTeam | ||
|
||
class FakePlayer : EntityOtherPlayerMP(Minecraft.getMinecraft().theWorld, Minecraft.getMinecraft().thePlayer.gameProfile) { | ||
|
||
override fun getLocationSkin() = | ||
Minecraft.getMinecraft().thePlayer.locationSkin ?: DefaultPlayerSkin.getDefaultSkin(Minecraft.getMinecraft().thePlayer.uniqueID) | ||
|
||
override fun getTeam() = object : ScorePlayerTeam(null, null) { | ||
override fun getNameTagVisibility() = EnumVisible.NEVER | ||
} | ||
|
||
override fun isWearing(part: EnumPlayerModelParts): Boolean = | ||
Minecraft.getMinecraft().thePlayer.isWearing(part) && part != EnumPlayerModelParts.CAPE | ||
} |