lol stupid mojang 23w40a

This commit is contained in:
gnembon committed 2023-10-04 23:24:08 +02:00
1 parent b0dafd6e3f
commit 83940f50b3
4 files changed
+8 -8

No files matched your search

@@ -23,7 +23,7 @@ import net.minecraft.world.level.block.state.BlockState;
public abstract class SaplingBlock_desertShrubsMixin
{
@Inject(method = "advanceTree", at = @At(value = "INVOKE", shift = At.Shift.BEFORE,
target = "Lnet/minecraft/world/level/block/grower/AbstractTreeGrower;growTree(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/level/chunk/ChunkGenerator;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/util/RandomSource;)Z"),
target = "Lnet/minecraft/world/level/block/grower/TreeGrower;growTree(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/level/chunk/ChunkGenerator;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/util/RandomSource;)Z"),
cancellable = true)
private void onGenerate(ServerLevel level, BlockPos pos, BlockState blockState, RandomSource random, CallbackInfo ci)
{
@@ -40,13 +40,13 @@ public class ServerPlayerGameMode_scarpetEventsMixin implements ServerPlayerInte
@Inject(method = "destroyBlock", locals = LocalCapture.CAPTURE_FAILHARD, cancellable = true, at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/level/block/Block;playerWillDestroy(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/entity/player/Player;)V",
target = "Lnet/minecraft/server/level/ServerLevel;removeBlock(Lnet/minecraft/core/BlockPos;Z)Z",
shift = At.Shift.BEFORE
))
private void onBlockBroken(BlockPos blockPos_1, CallbackInfoReturnable<Boolean> cir, BlockState blockState_1, BlockEntity be, Block b)
private void onBlockBroken(final BlockPos blockPos, final CallbackInfoReturnable<Boolean> cir, final BlockEntity blockEntity, final Block block, final BlockState blockState)
{
if(PLAYER_BREAK_BLOCK.onBlockBroken(player, blockPos_1, blockState_1)) {
this.level.sendBlockUpdated(blockPos_1, blockState_1, blockState_1, 3);
if(PLAYER_BREAK_BLOCK.onBlockBroken(player, blockPos, blockState)) {
this.level.sendBlockUpdated(blockPos, blockState, blockState, 3);
cir.setReturnValue(false);
cir.cancel();
}