Added set uuid option for nbt.

This commit is contained in:
Brianna 2020-08-24 13:42:01 -05:00
parent 186b61fb2a
commit bbc4840adb
15 changed files with 105 additions and 0 deletions

View File

@ -1,5 +1,7 @@
package com.songoda.core.nms.nbt;
import java.util.UUID;
public interface NBTCompound {
NBTCompound set(String tag, String s);
@ -18,6 +20,8 @@ public interface NBTCompound {
NBTCompound set(String tag, int[] i);
NBTCompound set(String tag, UUID u);
NBTCompound remove(String tag);
boolean has(String tag);

View File

@ -6,6 +6,7 @@ import net.minecraft.server.v1_10_R1.NBTCompressedStreamTools;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import java.io.*;
import java.util.UUID;
public abstract class NBTCompoundImpl implements NBTCompound {
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, UUID u) {
compound.a(tag, u);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -6,6 +6,7 @@ import net.minecraft.server.v1_11_R1.NBTCompressedStreamTools;
import net.minecraft.server.v1_11_R1.NBTTagCompound;
import java.io.*;
import java.util.UUID;
public abstract class NBTCompoundImpl implements NBTCompound {
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, UUID u) {
compound.a(tag, u);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -6,6 +6,7 @@ import net.minecraft.server.v1_12_R1.NBTCompressedStreamTools;
import net.minecraft.server.v1_12_R1.NBTTagCompound;
import java.io.*;
import java.util.UUID;
public abstract class NBTCompoundImpl implements NBTCompound {
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, UUID u) {
compound.a(tag, u);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -6,6 +6,7 @@ import net.minecraft.server.v1_13_R1.NBTCompressedStreamTools;
import net.minecraft.server.v1_13_R1.NBTTagCompound;
import java.io.*;
import java.util.UUID;
public abstract class NBTCompoundImpl implements NBTCompound {
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, UUID u) {
compound.a(tag, u);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -6,6 +6,7 @@ import net.minecraft.server.v1_13_R2.NBTCompressedStreamTools;
import net.minecraft.server.v1_13_R2.NBTTagCompound;
import java.io.*;
import java.util.UUID;
public abstract class NBTCompoundImpl implements NBTCompound {
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, UUID u) {
compound.a(tag, u);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -6,6 +6,7 @@ import net.minecraft.server.v1_14_R1.NBTCompressedStreamTools;
import net.minecraft.server.v1_14_R1.NBTTagCompound;
import java.io.*;
import java.util.UUID;
public abstract class NBTCompoundImpl implements NBTCompound {
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, UUID u) {
compound.a(tag, u);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -6,6 +6,7 @@ import net.minecraft.server.v1_15_R1.NBTCompressedStreamTools;
import net.minecraft.server.v1_15_R1.NBTTagCompound;
import java.io.*;
import java.util.UUID;
public abstract class NBTCompoundImpl implements NBTCompound {
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, UUID u) {
compound.a(tag, u);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -6,6 +6,7 @@ import net.minecraft.server.v1_16_R1.NBTCompressedStreamTools;
import net.minecraft.server.v1_16_R1.NBTTagCompound;
import java.io.*;
import java.util.UUID;
public abstract class NBTCompoundImpl implements NBTCompound {
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, UUID u) {
compound.a(tag, u);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -6,6 +6,7 @@ import net.minecraft.server.v1_16_R2.NBTCompressedStreamTools;
import net.minecraft.server.v1_16_R2.NBTTagCompound;
import java.io.*;
import java.util.UUID;
public abstract class NBTCompoundImpl implements NBTCompound {
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, UUID u) {
compound.a(tag, u);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -6,6 +6,7 @@ import net.minecraft.server.v1_8_R1.NBTCompressedStreamTools;
import net.minecraft.server.v1_8_R1.NBTTagCompound;
import java.io.*;
import java.util.UUID;
public abstract class NBTCompoundImpl implements NBTCompound {
@ -67,6 +68,13 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, UUID u) {
set(tag + "Most", u.getMostSignificantBits());
set(tag + "Least", u.getLeastSignificantBits());
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -6,6 +6,7 @@ import net.minecraft.server.v1_8_R2.NBTCompressedStreamTools;
import net.minecraft.server.v1_8_R2.NBTTagCompound;
import java.io.*;
import java.util.UUID;
public abstract class NBTCompoundImpl implements NBTCompound {
@ -67,6 +68,13 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, UUID u) {
set(tag + "Most", u.getMostSignificantBits());
set(tag + "Least", u.getLeastSignificantBits());
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -6,6 +6,7 @@ import net.minecraft.server.v1_8_R3.NBTCompressedStreamTools;
import net.minecraft.server.v1_8_R3.NBTTagCompound;
import java.io.*;
import java.util.UUID;
public abstract class NBTCompoundImpl implements NBTCompound {
@ -67,6 +68,13 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, UUID u) {
set(tag + "Most", u.getMostSignificantBits());
set(tag + "Least", u.getLeastSignificantBits());
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -6,6 +6,7 @@ import net.minecraft.server.v1_9_R1.NBTCompressedStreamTools;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import java.io.*;
import java.util.UUID;
public abstract class NBTCompoundImpl implements NBTCompound {
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, UUID u) {
compound.a(tag, u);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -6,6 +6,7 @@ import net.minecraft.server.v1_9_R2.NBTCompressedStreamTools;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import java.io.*;
import java.util.UUID;
public abstract class NBTCompoundImpl implements NBTCompound {
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, UUID u) {
compound.a(tag, u);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);