mapping
This commit is contained in:
1 parent
26a038041e
commit
bd637d5d6b
3 files changed
+8
-8
No files matched your search
+2
-2
@@ -5,8 +5,8 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
# check these on https://fabricmc.net/use
|
# check these on https://fabricmc.net/use
|
||||||
# or better: https://modmuss50.me/fabric.html
|
# or better: https://modmuss50.me/fabric.html
|
||||||
minecraft_version=1.15.2
|
minecraft_version=1.15.2
|
||||||
yarn_mappings=1.15.2+build.1
|
yarn_mappings=1.15.2+build.7
|
||||||
loader_version=0.7.5+build.178
|
loader_version=0.7.6+build.180
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.3.7+v200127
|
mod_version = 1.3.7+v200127
|
||||||
|
|||||||
@@ -19,19 +19,19 @@ import java.util.List;
|
|||||||
@Mixin(Container.class)
|
@Mixin(Container.class)
|
||||||
public abstract class ContainerMixin
|
public abstract class ContainerMixin
|
||||||
{
|
{
|
||||||
@Shadow @Final public List<Slot> slotList;
|
@Shadow @Final public List<Slot> slots;
|
||||||
|
|
||||||
@Shadow public abstract ItemStack onSlotClick(int int_1, int int_2, SlotActionType slotActionType_1, PlayerEntity playerEntity_1);
|
@Shadow public abstract ItemStack onSlotClick(int int_1, int int_2, SlotActionType slotActionType_1, PlayerEntity playerEntity_1);
|
||||||
|
|
||||||
@Shadow public abstract void sendContentUpdates();
|
@Shadow public abstract void sendContentUpdates();
|
||||||
|
|
||||||
@Inject( method = "onSlotClick", at = @At(value = "HEAD"), cancellable = true)
|
@Inject( method = "onSlotClick", at = @At(value = "HEAD"), cancellable = true)
|
||||||
private void onThrowClick( int slotId, int clickData, SlotActionType actionType, PlayerEntity playerEntity, CallbackInfoReturnable<ItemStack> cir)
|
private void onThrowClick( int slotId, int clickData, SlotActionType actionType, PlayerEntity playerEntity, CallbackInfoReturnable<ItemStack> cir)
|
||||||
{
|
{
|
||||||
if (actionType == SlotActionType.THROW && CarpetSettings.ctrlQCraftingFix && playerEntity.inventory.getCursorStack().isEmpty() && slotId >= 0)
|
if (actionType == SlotActionType.THROW && CarpetSettings.ctrlQCraftingFix && playerEntity.inventory.getCursorStack().isEmpty() && slotId >= 0)
|
||||||
{
|
{
|
||||||
ItemStack itemStack_1 = ItemStack.EMPTY;
|
ItemStack itemStack_1 = ItemStack.EMPTY;
|
||||||
Slot slot_4 = slotList.get(slotId);
|
Slot slot_4 = slots.get(slotId);
|
||||||
if (slot_4 != null && slot_4.hasStack() && slot_4.canTakeItems(playerEntity))
|
if (slot_4 != null && slot_4.hasStack() && slot_4.canTakeItems(playerEntity))
|
||||||
{
|
{
|
||||||
if(slotId == 0 && clickData == 1)
|
if(slotId == 0 && clickData == 1)
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ import net.minecraft.block.CommandBlock;
|
|||||||
import net.minecraft.block.JigsawBlock;
|
import net.minecraft.block.JigsawBlock;
|
||||||
import net.minecraft.block.StructureBlock;
|
import net.minecraft.block.StructureBlock;
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
import net.minecraft.client.network.packet.GuiSlotUpdateS2CPacket;
|
import net.minecraft.client.network.packet.ContainerSlotUpdateS2CPacket;
|
||||||
import net.minecraft.client.network.packet.PlaySoundIdS2CPacket;
|
import net.minecraft.client.network.packet.PlaySoundIdS2CPacket;
|
||||||
import net.minecraft.command.arguments.ItemStackArgument;
|
import net.minecraft.command.arguments.ItemStackArgument;
|
||||||
import net.minecraft.command.arguments.ParticleArgumentType;
|
import net.minecraft.command.arguments.ParticleArgumentType;
|
||||||
@@ -1890,7 +1890,7 @@ public class CarpetExpression
|
|||||||
if (inventory.owner instanceof ServerPlayerEntity && !inventory.isEnder)
|
if (inventory.owner instanceof ServerPlayerEntity && !inventory.isEnder)
|
||||||
{
|
{
|
||||||
ServerPlayerEntity player = (ServerPlayerEntity) inventory.owner;
|
ServerPlayerEntity player = (ServerPlayerEntity) inventory.owner;
|
||||||
player.networkHandler.sendPacket(new GuiSlotUpdateS2CPacket(
|
player.networkHandler.sendPacket(new ContainerSlotUpdateS2CPacket(
|
||||||
-2,
|
-2,
|
||||||
int_1,
|
int_1,
|
||||||
inventory.inventory.getInvStack(int_1)
|
inventory.inventory.getInvStack(int_1)
|
||||||
|
|||||||
Reference in new issue
Block a user