Skip to content

Commit

Permalink
Add for 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
dordsor21 committed Sep 20, 2024
1 parent 5554acb commit 875b1db
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ public IBatchProcessor getTickingPostProcessor() {
}

@Override
public PlacementStateProcessor getPlatformPlacementProcessor(Extent extent, BlockTypeMask mask, Region region ) {
public PlacementStateProcessor getPlatformPlacementProcessor(Extent extent, BlockTypeMask mask, Region region) {
return new PaperweightPlacementStateProcessor(extent, mask, region);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -821,8 +821,7 @@ public synchronized <T extends Future<T>> T call(IChunkSet set, Runnable finaliz
if (bitMask == 0 && biomes == null && !lightUpdate) {
callback = null;
} else {
int finalMask = bitMask != 0 ? bitMask : lightUpdate ? set.getBitMask() : 0;
boolean finalLightUpdate = lightUpdate;
final int finalBitMask = bitMask;
callback = () -> {
// Set Modified
nmsChunk.setLightCorrect(true); // Set Modified
Expand All @@ -831,7 +830,7 @@ public synchronized <T extends Future<T>> T call(IChunkSet set, Runnable finaliz
// send to player
if (!set
.getSideEffectSet()
.shouldApply(SideEffect.LIGHTING) || !Settings.settings().LIGHTING.DELAY_PACKET_SENDING || finalMask == 0 && biomes != null) {
.shouldApply(SideEffect.LIGHTING) || !Settings.settings().LIGHTING.DELAY_PACKET_SENDING || finalBitMask == 0 && biomes != null) {
this.send();
}
if (finalizer != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
public class PaperweightLevelProxy extends ServerLevel {

protected ServerLevel serverLevel;
private PaperweightFaweAdapter adapter;
private PaperweightPlacementStateProcessor processor;
private PaperweightFaweAdapter adapter;

@SuppressWarnings("DataFlowIssue")
private PaperweightLevelProxy() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ protected char getStateAtFor(
new BlockHitResult(pos, side, blockPos, false),
side.getOpposite()
));
return newState == null ? BlockTypesCache.ReservedIDs.AIR :
adapter.ibdIDToOrdinal(Block.BLOCK_STATE_REGISTRY.getId(newState));
return newState == null ? BlockTypesCache.ReservedIDs.AIR : adapter.ibdIDToOrdinal(Block.BLOCK_STATE_REGISTRY.getId(
newState));
}

@Override
Expand Down

0 comments on commit 875b1db

Please sign in to comment.