Skip to content

Commit

Permalink
Update to 1.19.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyrofab committed Mar 26, 2023
1 parent 4bdb295 commit f80a7b8
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 21 deletions.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
------------------------------------------------------
Version 0.10.0
------------------------------------------------------
Updated to 1.19.4

------------------------------------------------------
Version 0.9.1
------------------------------------------------------
Expand Down
16 changes: 8 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@ org.gradle.jvmargs=-Xmx3G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version = 1.19.3
quilt_mappings = 23
loader_version=0.18.1-beta.60
minecraft_version = 1.19.4
quilt_mappings = 7
loader_version=0.18.6

# Mod Properties
mod_version = 0.9.1
mod_version = 0.10.0
maven_group = io.github.ladysnake
archives_base_name = locki

# Dependencies
qsl_version = 4.0.0-beta.12
quilted_fabric_api_version = 5.0.0-beta.6+0.74.0
qsl_version = 5.0.0-beta.1
quilted_fabric_api_version = 6.0.0-beta.2+0.76.0
cca_version = 5.1.0
fpa_version=0.2-SNAPSHOT
# V1.2.12
backslot_version=4178145
cloth_config_version=9.0.94
modmenu_version=5.0.2
elmendorf_version=0.9.1
elmendorf_version=0.10.0
# Publishing
owners = Ladysnake
display_name = Locki
license_header = LGPL
gpl_version = 3
curseforge_id = 483059
modrinth_id = qS8U15sj
curseforge_versions = 1.19.3
curseforge_versions = 1.19.4
cf_requirements = qsl
cf_embeddeds = cardinal-components
release_type = beta
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import io.github.ladysnake.locki.InventoryKeeper;
import io.github.ladysnake.locki.impl.PlayerInventoryKeeper;
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
import net.minecraft.network.packet.c2s.play.UpdateSelectedSlotC2SPacket;
import net.minecraft.network.packet.c2s.play.SelectedSlotUpdateC2SPacket;
import net.minecraft.server.network.ServerPlayNetworkHandler;
import net.minecraft.server.network.ServerPlayerEntity;
import org.spongepowered.asm.mixin.Mixin;
Expand All @@ -35,8 +35,8 @@ public abstract class ServerPlayNetworkHandlerMixin {
@Shadow
public ServerPlayerEntity player;

@Inject(method = "onUpdateSelectedSlot", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/packet/c2s/play/UpdateSelectedSlotC2SPacket;getSelectedSlot()I", ordinal = 0))
private void fixSelectedSlot(UpdateSelectedSlotC2SPacket packet, CallbackInfo ci) {
@Inject(method = "onSelectedSlotUpdate", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/packet/c2s/play/SelectedSlotUpdateC2SPacket;getSelectedSlot()I", ordinal = 0))
private void fixSelectedSlot(SelectedSlotUpdateC2SPacket packet, CallbackInfo ci) {
((UpdateSelectedSlotC2SPacketAccessor) packet).locki$setSelectedSlot(PlayerInventoryKeeper.fixSelectedSlot(player, packet.getSelectedSlot()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
*/
package io.github.ladysnake.locki.impl.mixin;

import net.minecraft.network.packet.c2s.play.UpdateSelectedSlotC2SPacket;
import net.minecraft.network.packet.s2c.play.SelectedSlotUpdateS2CPacket;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

@Mixin(UpdateSelectedSlotC2SPacket.class)
@Mixin(SelectedSlotUpdateS2CPacket.class)
public interface UpdateSelectedSlotC2SPacketAccessor {
@Accessor("selectedSlot")
void locki$setSelectedSlot(int selectedSlot);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
*/
package io.github.ladysnake.locki.impl.mixin;

import net.minecraft.network.packet.c2s.play.UpdateSelectedSlotC2SPacket;
import net.minecraft.network.packet.s2c.play.SelectedSlotUpdateS2CPacket;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.Shadow;

@Mixin(UpdateSelectedSlotC2SPacket.class)
@Mixin(SelectedSlotUpdateS2CPacket.class)
public class UpdateSelectedSlotC2SPacketMixin {
@SuppressWarnings("unused") // only there to make selectedSlot mutable - for use by the accessor
@Shadow @Mutable @Final private int selectedSlot;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private int cropHotbar_width(int width) {
@ModifyArg(
method = "renderHotbar",
slice = @Slice(
from = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;defaultBlendFunc()V"),
from = @At(value = "INVOKE", target = "Lnet/minecraft/client/util/math/MatrixStack;pop()V"),
to = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;isEmpty()Z", ordinal = 1)
),
at = @At(value = "INVOKE", target = "Lnet/minecraft/util/collection/DefaultedList;get(I)Ljava/lang/Object;")
Expand All @@ -123,10 +123,10 @@ private int cancelLockedItemRender(int index) {
@ModifyArg(
method = "renderHotbar",
slice = @Slice(
from = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;defaultBlendFunc()V"),
from = @At(value = "INVOKE", target = "Lnet/minecraft/client/util/math/MatrixStack;pop()V"),
to = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;isEmpty()Z", ordinal = 1)
),
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/InGameHud;renderHotbarItem(IIFLnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;I)V")
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/InGameHud;renderHotbarItem(Lnet/minecraft/client/util/math/MatrixStack;IIFLnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;I)V")
)
private ItemStack cancelLockedItemRender(ItemStack stack) {
if (this.cancelNextItem) {
Expand All @@ -138,11 +138,11 @@ private ItemStack cancelLockedItemRender(ItemStack stack) {
@ModifyArg(
method = "renderHotbar",
slice = @Slice(
from = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;defaultBlendFunc()V"),
from = @At(value = "INVOKE", target = "Lnet/minecraft/client/util/math/MatrixStack;pop()V"),
to = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;isEmpty()Z", ordinal = 1)
),
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/InGameHud;renderHotbarItem(IIFLnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;I)V"),
index = 0
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/InGameHud;renderHotbarItem(Lnet/minecraft/client/util/math/MatrixStack;IIFLnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;I)V"),
index = 1
)
private int shiftMainHandItem(int x) {
if (this.renderMainHandOnly && !this.cancelNextItem) {
Expand Down

0 comments on commit f80a7b8

Please sign in to comment.