21w05a
This commit is contained in:
1 parent
71a8dcc31e
commit
50eae09c17
5 files changed
+18
-13
No files matched your search
@@ -4,11 +4,12 @@ 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.item.ItemPlacementContext;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
||||
@Mixin(CarpetBlock.class)
|
||||
@Mixin(class_5815.class) // WoolCarpetBlock
|
||||
public abstract class CarpetBlockMixin extends Block
|
||||
{
|
||||
|
||||
@@ -21,8 +22,8 @@ public abstract class CarpetBlockMixin extends Block
|
||||
{
|
||||
BlockState state = super.getPlacementState(context);
|
||||
if (context.getPlayer() != null && !context.getWorld().isClient)
|
||||
{
|
||||
WoolTool.carpetPlacedAction(((CarpetBlock)(Object)this).getColor(), context.getPlayer(), context.getBlockPos(), (ServerWorld) context.getWorld());
|
||||
{ // getColor()
|
||||
WoolTool.carpetPlacedAction(((class_5815)(Object)this).method_33635(), context.getPlayer(), context.getBlockPos(), (ServerWorld) context.getWorld());
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user