mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-27 23:46:01 +00:00
add offhand support via Backhand (up required version to 1.6.9) (#859)
This commit is contained in:
1 parent
208373deaa
commit
6a5d914a43
10 files changed
+86
-16
No files matched your search
@@ -78,9 +78,8 @@ public class HandRenderer {
|
||||
}
|
||||
|
||||
public boolean isHandTranslucent(InteractionHand hand) {
|
||||
// TODO: Offhand
|
||||
// Item item = Minecraft.getMinecraft().thePlayer.getItemBySlot(hand == InteractionHand.OFF_HAND ? EquipmentSlot.OFFHAND : EquipmentSlot.MAINHAND).getItem();
|
||||
ItemStack heldItem = Minecraft.getMinecraft().thePlayer.getHeldItem();
|
||||
ItemStack heldItem = hand.getItemInHand(Minecraft.getMinecraft().thePlayer);
|
||||
|
||||
if (heldItem == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -76,9 +76,8 @@ public final class IdMapUniforms {
|
||||
invalidate();
|
||||
return;
|
||||
}
|
||||
// ItemStack heldStack = player.getItemInHand(hand);
|
||||
// TODO: Offhand
|
||||
ItemStack heldStack = player.getHeldItem();
|
||||
|
||||
ItemStack heldStack = hand.getItemInHand(player);
|
||||
|
||||
if (heldStack == null) {
|
||||
invalidate();
|
||||
@@ -106,9 +105,7 @@ public final class IdMapUniforms {
|
||||
}
|
||||
|
||||
private IrisItemLightProvider applyOldHandLighting(@NotNull EntityPlayer player, IrisItemLightProvider existing) {
|
||||
// TODO: Offhand
|
||||
// ItemStack offHandStack = player.getItemInHand(InteractionHand.OFF_HAND);
|
||||
ItemStack offHandStack = null;
|
||||
ItemStack offHandStack = InteractionHand.OFF_HAND.getItemInHand(player);
|
||||
|
||||
if (offHandStack == null) {
|
||||
return existing;
|
||||
|
||||
Reference in new issue
Block a user