use of org.spongepowered.common.interfaces.IMixinNextTickListEntry in project SpongeCommon by SpongePowered.
the class MixinWorldServer method onCreateScheduledBlockUpdate.
/*@Redirect(method = "updateBlockTick",
at = @At(value = "INVOKE", target = "Lnet/minecraft/world/NextTickListEntry;setPriority(I)V"))
private void onUpdateScheduledBlock(NextTickListEntry sbu, int priority) {
this.onCreateScheduledBlockUpdate(sbu, priority);
}*/
@// really scheduleUpdate
Redirect(// really scheduleUpdate
method = "updateBlockTick", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/NextTickListEntry;setPriority(I)V"))
private void onCreateScheduledBlockUpdate(NextTickListEntry sbu, int priority) {
final PhaseTracker phaseTracker = PhaseTracker.getInstance();
final IPhaseState phaseState = phaseTracker.getCurrentState();
if (phaseState.ignoresScheduledUpdates()) {
this.tmpScheduledObj = sbu;
return;
}
sbu.setPriority(priority);
((IMixinNextTickListEntry) sbu).setWorld((WorldServer) (Object) this);
this.tmpScheduledObj = sbu;
}
Aggregations