mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-12 04:23:54 +00:00
Various minor
Add entity registry Re-add AbstractLoggingExtent Fill in missing nbt on entity load
This commit is contained in:
@ -21,6 +21,7 @@ package com.boydti.fawe.bukkit.adapter;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import com.boydti.fawe.Fawe;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.sk89q.jnbt.ByteArrayTag;
|
||||
@ -132,7 +133,11 @@ public final class Spigot_v1_13_R1 implements BukkitImplAdapter<NBTBase> {
|
||||
* @param tag the tag
|
||||
*/
|
||||
private static void readTagIntoTileEntity(NBTTagCompound tag, TileEntity tileEntity) {
|
||||
tileEntity.load(tag);
|
||||
try {
|
||||
tileEntity.load(tag);
|
||||
} catch (Throwable e) {
|
||||
Fawe.debug("Invalid tag " + tag + " | " + tileEntity);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -305,6 +310,7 @@ public final class Spigot_v1_13_R1 implements BukkitImplAdapter<NBTBase> {
|
||||
worldServer.addEntity(createdEntity, SpawnReason.CUSTOM);
|
||||
return createdEntity.getBukkitEntity();
|
||||
} else {
|
||||
Fawe.debug("Invalid entity " + state.getType().getId());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ public class BukkitChunk_All extends IntFaweChunk<Chunk, BukkitQueue_All> {
|
||||
float pitch = rotTag.getFloat(1);
|
||||
Location loc = new Location(world, x, y, z, yaw, pitch);
|
||||
Entity created = adapter.createEntity(loc, new BaseEntity(EntityTypes.get(id), tag));
|
||||
if (previous != null) {
|
||||
if (created != null) {
|
||||
UUID uuid = created.getUniqueId();
|
||||
Map<String, Tag> map = ReflectionUtils.getMap(tag.getValue());
|
||||
map.put("UUIDLeast", new LongTag(uuid.getLeastSignificantBits()));
|
||||
@ -220,7 +220,6 @@ public class BukkitChunk_All extends IntFaweChunk<Chunk, BukkitQueue_All> {
|
||||
Location mutableLoc = new Location(world, 0, 0, 0);
|
||||
|
||||
if (!checkTime) {
|
||||
System.out.println("Set " + layer);
|
||||
int index = 0;
|
||||
for (int y = 0; y < 16; y++) {
|
||||
int yy = (layer << 4) + y;
|
||||
|
Reference in New Issue
Block a user