File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed
java/com/lambda/mixin/entity
kotlin/com/lambda/util/player Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public class PlayerInventoryMixin {
3838
3939 @ Shadow @ Final public PlayerEntity player ;
4040
41- @ Inject (method = "getMainStacks " , at = @ At (value = "HEAD" ), cancellable = true )
41+ @ Inject (method = "getSelectedStack " , at = @ At (value = "HEAD" ), cancellable = true )
4242 public void handleSpoofedMainHandStack (CallbackInfoReturnable <ItemStack > cir ) {
4343 MinecraftClient mc = MinecraftClient .getInstance ();
4444 ClientPlayerInteractionManager interaction = mc .interactionManager ;
Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ import net.minecraft.item.ItemStack
2323import net.minecraft.screen.slot.SlotActionType
2424
2525object SlotUtils {
26- val ClientPlayerEntity .hotbar: List <ItemStack > get() = inventory.main .slice(0 .. 8 )
27- val ClientPlayerEntity .storage: List <ItemStack > get() = inventory.main .slice(9 .. 35 )
26+ val ClientPlayerEntity .hotbar: List <ItemStack > get() = inventory.mainStacks .slice(0 .. 8 )
27+ val ClientPlayerEntity .storage: List <ItemStack > get() = inventory.mainStacks .slice(9 .. 35 )
2828 val ClientPlayerEntity .equipment: List <ItemStack > get() = inventory.equipment.map.map { it.value }
29- val ClientPlayerEntity .hotbarAndStorage: List <ItemStack > get() = inventory.main
29+ val ClientPlayerEntity .hotbarAndStorage: List <ItemStack > get() = inventory.mainStacks
3030 val ClientPlayerEntity .combined: List <ItemStack > get() = hotbarAndStorage + equipment
3131
3232
Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ accessible field net/minecraft/entity/player/PlayerInventory equipment Lnet/mine
3636accessible method net/minecraft/client/network/ClientPlayerEntity applyMovementSpeedFactors (Lnet/minecraft/util/math/Vec2f;)Lnet/minecraft/util/math/Vec2f;
3737accessible field net/minecraft/entity/EntityEquipment map Ljava/util/EnumMap;
3838accessible method net/minecraft/entity/LivingEntity getHandSwingDuration ()I
39- accessible field net/minecraft/entity/player/PlayerInventory main Lnet/minecraft/util/collection/DefaultedList;
4039
4140# Camera
4241accessible method net/minecraft/client/render/Camera setPos (DDD)V
You can’t perform that action at this time.
0 commit comments