mappings. More colors and materials
This commit is contained in:
1 parent
94b47c1272
commit
d48896ad8b
25 files changed
+174
-154
No files matched your search
@@ -4,7 +4,7 @@ import carpet.CarpetSettings;
|
||||
import net.minecraft.block.AbstractCauldronBlock;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.ShulkerBoxBlock;
|
||||
import net.minecraft.class_5620;
|
||||
import net.minecraft.block.cauldron.CauldronBehavior;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -19,13 +19,13 @@ import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
@Mixin(AbstractCauldronBlock.class)
|
||||
public class AbstractCauldronBlock_stackableSBoxesMixin
|
||||
{
|
||||
@Redirect(method = "onUse", at = @At(value = "INVOKE", target = "Lnet/minecraft/class_5620;interact(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/ActionResult;"))
|
||||
private ActionResult wrapInteractor(class_5620 class_5620, BlockState blockState, World world, BlockPos blockPos, PlayerEntity playerEntity, Hand hand, ItemStack itemStack)
|
||||
@Redirect(method = "onUse", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/cauldron/CauldronBehavior;interact(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/ActionResult;"))
|
||||
private ActionResult wrapInteractor(CauldronBehavior cauldronBehavior, BlockState blockState, World world, BlockPos blockPos, PlayerEntity playerEntity, Hand hand, ItemStack itemStack)
|
||||
{
|
||||
int count = -1;
|
||||
if (CarpetSettings.stackableShulkerBoxes && itemStack.getItem() instanceof BlockItem && ((BlockItem)itemStack.getItem()).getBlock() instanceof ShulkerBoxBlock)
|
||||
count = itemStack.getCount();
|
||||
ActionResult result = class_5620.interact(blockState, world, blockPos, playerEntity, hand, itemStack);
|
||||
ActionResult result = cauldronBehavior.interact(blockState, world, blockPos, playerEntity, hand, itemStack);
|
||||
if (count > 0 && result.isAccepted())
|
||||
{
|
||||
ItemStack current = playerEntity.getStackInHand(hand);
|
||||
|
||||
Reference in new issue
Block a user