mappings
This commit is contained in:
1 parent
6108cdce23
commit
257aca4254
4 files changed
+13
-14
No files matched your search
@@ -3,13 +3,12 @@ package carpet.mixins;
|
||||
import carpet.utils.WoolTool;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.CarpetBlock;
|
||||
import net.minecraft.class_5815;
|
||||
import net.minecraft.block.DyedCarpetBlock;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
||||
@Mixin(class_5815.class) // WoolCarpetBlock
|
||||
@Mixin(DyedCarpetBlock.class) // WoolCarpetBlock
|
||||
public abstract class CarpetBlockMixin extends Block
|
||||
{
|
||||
|
||||
@@ -23,7 +22,7 @@ public abstract class CarpetBlockMixin extends Block
|
||||
BlockState state = super.getPlacementState(context);
|
||||
if (context.getPlayer() != null && !context.getWorld().isClient)
|
||||
{ // getColor()
|
||||
WoolTool.carpetPlacedAction(((class_5815)(Object)this).method_33635(), context.getPlayer(), context.getBlockPos(), (ServerWorld) context.getWorld());
|
||||
WoolTool.carpetPlacedAction(((DyedCarpetBlock)(Object)this).getDyeColor(), context.getPlayer(), context.getBlockPos(), (ServerWorld) context.getWorld());
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public abstract class ContainerMixin
|
||||
|
||||
@Shadow @Final public DefaultedList<Slot> slots;
|
||||
|
||||
@Inject( method = "removeStack", at = @At(value = "HEAD"), cancellable = true)
|
||||
@Inject( method = "internalOnSlotClick", at = @At(value = "HEAD"), cancellable = true)
|
||||
private void onThrowClick( int slotId, int clickData, SlotActionType actionType, PlayerEntity playerEntity, CallbackInfoReturnable<ItemStack> cir)
|
||||
{
|
||||
if (actionType == SlotActionType.THROW && CarpetSettings.ctrlQCraftingFix && playerEntity.getInventory().getCursorStack().isEmpty() && slotId >= 0)
|
||||
|
||||
Reference in new issue
Block a user