Fix wrong patches for water lily placing (#82)
This commit is contained in:
parent
36f8c76dc6
commit
e4ee5b7894
@ -6,6 +6,7 @@ import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.BlockItemUseContext;
|
||||
import net.minecraft.item.LilyPadItem;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.state.Property;
|
||||
import net.minecraft.state.StateContainer;
|
||||
@ -41,8 +42,10 @@ public abstract class BlockItemMixin {
|
||||
@Inject(method = "tryPlace", locals = LocalCapture.CAPTURE_FAILHARD,
|
||||
at = @At(value = "INVOKE", shift = At.Shift.AFTER, target = "Lnet/minecraft/item/BlockItem;getStateForPlacement(Lnet/minecraft/item/BlockItemUseContext;)Lnet/minecraft/block/BlockState;"))
|
||||
private void arclight$prePlaceLilypad(BlockItemUseContext context, CallbackInfoReturnable<ActionResultType> cir, BlockItemUseContext context1) {
|
||||
if ((Object) this instanceof LilyPadItem) {
|
||||
this.arclight$state = CraftBlockState.getBlockState(context1.getWorld(), context1.getPos());
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "tryPlace", locals = LocalCapture.CAPTURE_FAILHARD, cancellable = true,
|
||||
at = @At(value = "INVOKE", shift = At.Shift.AFTER, target = "Lnet/minecraft/block/Block;onBlockPlacedBy(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;)V"))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user