Remove unnecessary local capture (#3858)

This commit is contained in:
Fx Morin 2024-06-17 13:09:43 -04:00 committed by GitHub
parent cb5ced13ef
commit a4aac4205b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -45,7 +45,7 @@ abstract class WorldChunkMixin {
public abstract World getWorld(); public abstract World getWorld();
@Inject(method = "setBlockEntity", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/entity/BlockEntity;markRemoved()V")) @Inject(method = "setBlockEntity", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/entity/BlockEntity;markRemoved()V"))
private void onLoadBlockEntity(BlockEntity blockEntity, CallbackInfo ci, @Local(ordinal = 1) BlockEntity removedBlockEntity) { private void onLoadBlockEntity(BlockEntity blockEntity, CallbackInfo ci) {
if (this.getWorld() instanceof ServerWorld) { if (this.getWorld() instanceof ServerWorld) {
ServerBlockEntityEvents.BLOCK_ENTITY_LOAD.invoker().onLoad(blockEntity, (ServerWorld) this.getWorld()); ServerBlockEntityEvents.BLOCK_ENTITY_LOAD.invoker().onLoad(blockEntity, (ServerWorld) this.getWorld());
} else if (this.getWorld() instanceof ClientWorld) { } else if (this.getWorld() instanceof ClientWorld) {