mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-14 21:13:54 +00:00
Make it actually load into an IDE on latest FG
This commit is contained in:
@ -30,6 +30,7 @@ import com.sk89q.worldedit.util.Location;
|
||||
import com.sk89q.worldedit.world.NullWorld;
|
||||
import com.sk89q.worldedit.world.entity.EntityTypes;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
@ -48,11 +49,11 @@ class ForgeEntity implements Entity {
|
||||
public BaseEntity getState() {
|
||||
net.minecraft.entity.Entity entity = entityRef.get();
|
||||
if (entity != null) {
|
||||
String id = entity.getType().getRegistryName().toString();
|
||||
ResourceLocation id = entity.getType().getRegistryName();
|
||||
if (id != null) {
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
entity.writeWithoutTypeId(tag);
|
||||
return new BaseEntity(EntityTypes.get(id), NBTConverter.fromNative(tag));
|
||||
return new BaseEntity(EntityTypes.get(id.toString()), NBTConverter.fromNative(tag));
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user