Skip to content

Commit 64099d9

Browse files
committed
Zero is valid id
1 parent f807757 commit 64099d9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/org/spongepowered/common/world/schematic/PaletteWrapper.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ public Optional<PaletteReference<T, R>> get(int id) {
7979
@Override
8080
public OptionalInt get(T type) {
8181
final var id = this.proxy.getId((NT) type);
82-
if (id <= 0) {
83-
return OptionalInt.empty();
82+
if (id >= 0) {
83+
return OptionalInt.of(id);
8484
}
85-
return OptionalInt.of(id);
85+
return OptionalInt.empty();
8686
}
8787

8888
@SuppressWarnings("unchecked")

src/mixins/java/org/spongepowered/common/mixin/api/minecraft/world/level/chunk/ChunkAccessMixin_API.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
import net.minecraft.world.level.LevelHeightAccessor;
3030
import net.minecraft.world.level.block.Block;
3131
import net.minecraft.world.level.chunk.ChunkAccess;
32-
import net.minecraft.world.level.chunk.ChunkStatus;
3332
import net.minecraft.world.level.chunk.LevelChunkSection;
33+
import net.minecraft.world.level.chunk.status.ChunkStatus;
3434
import net.minecraft.world.level.levelgen.Heightmap;
3535
import org.spongepowered.api.block.BlockState;
3636
import org.spongepowered.api.block.BlockType;

0 commit comments

Comments
 (0)