-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: send block updates when chunk post-processing
Fixes #222
- Loading branch information
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
c2me-notickvd/src/main/java/com/ishland/c2me/notickvd/mixin/MixinWorldChunk.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.ishland.c2me.notickvd.mixin; | ||
|
||
import net.minecraft.block.Block; | ||
import net.minecraft.world.chunk.WorldChunk; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.ModifyArg; | ||
|
||
@Mixin(WorldChunk.class) | ||
public class MixinWorldChunk { | ||
|
||
@ModifyArg(method = "runPostProcessing", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;setBlockState(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;I)Z")) | ||
private int notifyListenersWhenPostProcessing(int flags) { | ||
// if (true) return flags; | ||
flags &= ~Block.NO_REDRAW; // clear NO_REDRAW | ||
flags |= Block.NOTIFY_LISTENERS; // set NOTIFY_LISTENERS | ||
return flags; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters