mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-21 07:59:16 +00:00
3.5.3
This commit is contained in:
@@ -8,7 +8,7 @@ plugins {
|
|||||||
allprojects {
|
allprojects {
|
||||||
|
|
||||||
project.group = "net.momirealms"
|
project.group = "net.momirealms"
|
||||||
project.version = "3.5.2"
|
project.version = "3.5.3"
|
||||||
|
|
||||||
apply<JavaPlugin>()
|
apply<JavaPlugin>()
|
||||||
apply(plugin = "java")
|
apply(plugin = "java")
|
||||||
|
|||||||
Binary file not shown.
@@ -200,7 +200,7 @@ public class BukkitWorldAdaptor extends AbstractWorldAdaptor {
|
|||||||
// load region from local files
|
// load region from local files
|
||||||
try (BufferedInputStream bis = new BufferedInputStream(new FileInputStream(data))) {
|
try (BufferedInputStream bis = new BufferedInputStream(new FileInputStream(data))) {
|
||||||
DataInputStream dataStream = new DataInputStream(bis);
|
DataInputStream dataStream = new DataInputStream(bis);
|
||||||
CRegion region = deserializeRegion(cWorld, dataStream);
|
CRegion region = deserializeRegion(cWorld, dataStream, regionPos);
|
||||||
dataStream.close();
|
dataStream.close();
|
||||||
cWorld.loadRegion(region);
|
cWorld.loadRegion(region);
|
||||||
byte[] bytes = region.getChunkBytes(chunkPos);
|
byte[] bytes = region.getChunkBytes(chunkPos);
|
||||||
@@ -348,7 +348,7 @@ public class BukkitWorldAdaptor extends AbstractWorldAdaptor {
|
|||||||
return outByteStream.toByteArray();
|
return outByteStream.toByteArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
public CRegion deserializeRegion(CWorld world, DataInputStream dataStream) throws IOException {
|
public CRegion deserializeRegion(CWorld world, DataInputStream dataStream, RegionPos pos) throws IOException {
|
||||||
int regionVersion = dataStream.readByte();
|
int regionVersion = dataStream.readByte();
|
||||||
int regionX = dataStream.readInt();
|
int regionX = dataStream.readInt();
|
||||||
int regionZ = dataStream.readInt();
|
int regionZ = dataStream.readInt();
|
||||||
@@ -363,7 +363,7 @@ public class BukkitWorldAdaptor extends AbstractWorldAdaptor {
|
|||||||
dataStream.read(chunkData);
|
dataStream.read(chunkData);
|
||||||
map.put(chunkPos, chunkData);
|
map.put(chunkPos, chunkData);
|
||||||
}
|
}
|
||||||
return new CRegion(world, regionPos, map);
|
return new CRegion(world, pos, map);
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] serialize(SerializableChunk serializableChunk) {
|
public byte[] serialize(SerializableChunk serializableChunk) {
|
||||||
|
|||||||
Reference in New Issue
Block a user