Skip to content

Commit 7cc8078

Browse files
Get fabric 1.21.3 building
1 parent d8bab05 commit 7cc8078

File tree

7 files changed

+8
-63
lines changed

7 files changed

+8
-63
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@
3737
/fabric-1.16.1_server.launch
3838
/fabric-1.16.2_client.launch
3939
/fabric-1.16.2_server.launch
40+

bukkit-helper/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/.project
2+
/.settings/
13
/target/
24
/build/
35
/bin/

bukkit-helper/.project

-40
This file was deleted.

bukkit-helper/.settings/org.eclipse.jdt.core.prefs

-19
This file was deleted.

fabric-1.21.3/src/main/java/org/dynmap/fabric_1_21_3/DynmapPlugin.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public void initializeBlockStates() {
163163
}
164164
statename += p.getName() + "=" + bs.get(p).toString();
165165
}
166-
int lightAtten = bs.isOpaqueFullCube(EmptyBlockView.INSTANCE, BlockPos.ORIGIN) ? 15 : (bs.isTransparent(EmptyBlockView.INSTANCE, BlockPos.ORIGIN) ? 0 : 1);
166+
int lightAtten = bs.isOpaqueFullCube() ? 15 : (bs.isTransparent() ? 0 : 1);
167167
//Log.info("statename=" + bn + "[" + statename + "], lightAtten=" + lightAtten);
168168
// Fill in base attributes
169169
bld.setBaseState(basebs).setStateIndex(idx - baseidx).setBlockName(bn).setStateName(statename).setLegacyBlockID(idx).setAttenuatesLight(lightAtten);

fabric-1.21.3/src/main/java/org/dynmap/fabric_1_21_3/FabricMapChunkCache.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
import net.minecraft.util.math.ChunkPos;
99
import net.minecraft.util.math.MathHelper;
1010
import net.minecraft.util.math.WordPackedArray;
11-
import net.minecraft.world.ChunkSerializer;
1211
import net.minecraft.world.World;
1312
import net.minecraft.world.biome.Biome;
1413
import net.minecraft.world.biome.BiomeEffects;
1514
import net.minecraft.world.chunk.ChunkManager;
1615
import net.minecraft.world.chunk.ChunkStatus;
16+
import net.minecraft.world.chunk.SerializedChunk;
1717

1818
import org.dynmap.DynmapChunk;
1919
import org.dynmap.DynmapCore;
@@ -66,7 +66,8 @@ protected GenericChunk getLoadedChunk(DynmapChunk chunk) {
6666
if (cps.isChunkLoaded(chunk.x, chunk.z)) {
6767
NbtCompound nbt = null;
6868
try {
69-
nbt = ChunkSerializer.serialize((ServerWorld) w, cps.getWorldChunk(chunk.x, chunk.z, false));
69+
SerializedChunk sc = SerializedChunk.fromChunk((ServerWorld) w, cps.getWorldChunk(chunk.x, chunk.z, false));
70+
nbt = sc.serialize();
7071
} catch (NullPointerException e) {
7172
// TODO: find out why this is happening and why it only seems to happen since 1.16.2
7273
Log.severe("ChunkSerializer.serialize threw a NullPointerException", e);

fabric-1.21.3/src/main/java/org/dynmap/fabric_1_21_3/FabricServer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class FabricServer extends DynmapServerInterface {
6060
public FabricServer(DynmapPlugin plugin, MinecraftServer server) {
6161
this.plugin = plugin;
6262
this.server = server;
63-
this.biomeRegistry = server.getRegistryManager().get(RegistryKeys.BIOME);
63+
this.biomeRegistry = server.getRegistryManager().getOrThrow(RegistryKeys.BIOME);
6464
}
6565

6666
private Optional<GameProfile> getProfileByName(String player) {

0 commit comments

Comments
 (0)