-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Vanity Slots compat for BedrockCapeRenderer (#645)
Signed-off-by: unilock <[email protected]>
- Loading branch information
Showing
4 changed files
with
23 additions
and
2 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
18 changes: 18 additions & 0 deletions
18
src/main/java/de/dafuqs/spectrum/compat/vanityslots/VanitySlotsCompat.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,18 @@ | ||
package de.dafuqs.spectrum.compat.vanityslots; | ||
|
||
import gay.nyako.vanityslots.*; | ||
import net.fabricmc.loader.api.*; | ||
import net.minecraft.entity.*; | ||
import net.minecraft.item.*; | ||
|
||
public class VanitySlotsCompat { | ||
public static final boolean IS_VANITY_SLOTS_PRESENT = FabricLoader.getInstance().isModLoaded("vanityslots"); | ||
|
||
public static ItemStack getEquippedStack(LivingEntity entity, EquipmentSlot slot) { | ||
if (VanitySlotsCompat.IS_VANITY_SLOTS_PRESENT) { | ||
return VanitySlots.getEquippedStack(entity, slot); | ||
} else { | ||
return entity.getEquippedStack(slot); | ||
} | ||
} | ||
} |
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