This commit is contained in:
gnembon committed 2025-09-09 18:09:06 +02:00
1 parent 7ee917716f
commit 0a925c833c
6 files changed
+12 -10

No files matched your search

@@ -2,7 +2,7 @@ package carpet.mixins;
import carpet.CarpetSettings;
import carpet.fakes.LevelInterface;
import net.minecraft.world.level.redstone.NeighborUpdater;
import net.minecraft.world.level.redstone.CollectingNeighborUpdater;
import net.minecraft.util.RandomSource;
import net.minecraft.world.level.redstone.Orientation;
import org.spongepowered.asm.mixin.Mixin;
@@ -36,7 +36,7 @@ public class BarrierBlock_updateSuppressionBlockMixin extends Block {
BlockState stateAbove = level.getBlockState(pos.above());
if (stateAbove.is(Blocks.ACTIVATOR_RAIL) && !stateAbove.getValue(PoweredRailBlock.POWERED)) {
level.scheduleTick(pos, this, 1);
NeighborUpdater updater = ((LevelInterface)level).getNeighborUpdater();
CollectingNeighborUpdater updater = ((LevelInterface)level).getNeighborUpdater();
if (updater instanceof CollectingNeighborUpdaterAccessor cnua)
cnua.setCount(cnua.getMaxChainedNeighborUpdates()-CarpetSettings.updateSuppressionBlock);
}
@@ -9,6 +9,7 @@ import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Future;
import java.util.function.Consumer;
import java.util.function.IntFunction;
import java.util.stream.Collectors;
@@ -94,8 +95,8 @@ public abstract class ChunkMap_scarpetChunkCreationMixin implements ThreadedAnvi
@Shadow
protected abstract boolean promoteChunkMap();
@Shadow
protected abstract Iterable<ChunkHolder> getChunks();
//@Shadow
//protected abstract void forEachReadyToSendChunk(Consumer<LevelChunk> consumer); // for getChunks()
@Shadow
@@ -2,7 +2,7 @@ package carpet.mixins;
import carpet.fakes.LevelInterface;
import carpet.utils.CarpetProfiler;
import net.minecraft.world.level.redstone.NeighborUpdater;
import net.minecraft.world.level.redstone.CollectingNeighborUpdater;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@@ -22,7 +22,7 @@ import net.minecraft.world.level.Level;
public abstract class Level_tickMixin implements LevelInterface
{
@Shadow @Final public boolean isClientSide;
@Shadow @Final protected NeighborUpdater neighborUpdater;
@Shadow @Final protected CollectingNeighborUpdater neighborUpdater;
CarpetProfiler.ProfilerToken currentSection;
CarpetProfiler.ProfilerToken entitySection;
@@ -30,7 +30,7 @@ public abstract class Level_tickMixin implements LevelInterface
@Override
@Unique
public NeighborUpdater getNeighborUpdater() {
public CollectingNeighborUpdater getNeighborUpdater() {
return this.neighborUpdater;
}