-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
actually fix syncing to client (please)
- Loading branch information
Showing
5 changed files
with
38 additions
and
48 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
29 changes: 29 additions & 0 deletions
29
src/main/java/gregtech/mixins/minecraft/ContainerMixin.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,29 @@ | ||
package gregtech.mixins.minecraft; | ||
|
||
import gregtech.api.items.toolitem.ItemGTToolbelt; | ||
|
||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.inventory.ClickType; | ||
import net.minecraft.inventory.Container; | ||
import net.minecraft.item.ItemStack; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@Mixin(Container.class) | ||
public abstract class ContainerMixin { | ||
|
||
@Inject(method = "slotClick", | ||
at = @At(value = "INVOKE", | ||
target = "Lnet/minecraft/item/ItemStack;splitStack(I)Lnet/minecraft/item/ItemStack;", | ||
ordinal = 1)) | ||
private void setPlayer(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player, | ||
CallbackInfoReturnable<ItemStack> cir) { | ||
var playerStack = player.inventory.getItemStack(); | ||
if (playerStack.getItem() instanceof ItemGTToolbelt) { | ||
ItemGTToolbelt.setCraftingSlot(slotId, player); | ||
} | ||
} | ||
} |
41 changes: 0 additions & 41 deletions
41
src/main/java/gregtech/mixins/minecraft/NetworkHandlerMixin.java
This file was deleted.
Oops, something went wrong.
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