Improve compound to new item system.

This commit is contained in:
Brianna 2020-08-26 16:23:46 -05:00
parent bbf48b8545
commit 017d546fce
14 changed files with 14 additions and 42 deletions

View File

@ -17,9 +17,7 @@ public class NBTItemImpl extends NBTCompoundImpl implements NBTItem {
public ItemStack finish() {
if (nmsItem == null) {
net.minecraft.server.v1_10_R1.ItemStack itemStack = CraftItemStack.asNMSCopy(new ItemStack(Material.STONE));
itemStack.setTag(compound);
return CraftItemStack.asBukkitCopy(nmsItem);
return CraftItemStack.asBukkitCopy(net.minecraft.server.v1_10_R1.ItemStack.createStack(compound));
} else {
return CraftItemStack.asBukkitCopy(nmsItem);
}

View File

@ -17,9 +17,7 @@ public class NBTItemImpl extends NBTCompoundImpl implements NBTItem {
public ItemStack finish() {
if (nmsItem == null) {
net.minecraft.server.v1_11_R1.ItemStack itemStack = CraftItemStack.asNMSCopy(new ItemStack(Material.STONE));
itemStack.setTag(compound);
return CraftItemStack.asBukkitCopy(nmsItem);
return CraftItemStack.asBukkitCopy(new net.minecraft.server.v1_11_R1.ItemStack(compound));
} else {
return CraftItemStack.asBukkitCopy(nmsItem);
}

View File

@ -17,9 +17,7 @@ public class NBTItemImpl extends NBTCompoundImpl implements NBTItem {
public ItemStack finish() {
if (nmsItem == null) {
net.minecraft.server.v1_12_R1.ItemStack itemStack = CraftItemStack.asNMSCopy(new ItemStack(Material.STONE));
itemStack.setTag(compound);
return CraftItemStack.asBukkitCopy(nmsItem);
return CraftItemStack.asBukkitCopy(new net.minecraft.server.v1_12_R1.ItemStack(compound));
} else {
return CraftItemStack.asBukkitCopy(nmsItem);
}

View File

@ -17,9 +17,7 @@ public class NBTItemImpl extends NBTCompoundImpl implements NBTItem {
public ItemStack finish() {
if (nmsItem == null) {
net.minecraft.server.v1_13_R1.ItemStack itemStack = CraftItemStack.asNMSCopy(new ItemStack(Material.STONE));
itemStack.setTag(compound);
return CraftItemStack.asBukkitCopy(nmsItem);
return CraftItemStack.asBukkitCopy(net.minecraft.server.v1_13_R1.ItemStack.a(compound));
} else {
return CraftItemStack.asBukkitCopy(nmsItem);
}

View File

@ -17,9 +17,7 @@ public class NBTItemImpl extends NBTCompoundImpl implements NBTItem {
public ItemStack finish() {
if (nmsItem == null) {
net.minecraft.server.v1_13_R2.ItemStack itemStack = CraftItemStack.asNMSCopy(new ItemStack(Material.STONE));
itemStack.setTag(compound);
return CraftItemStack.asBukkitCopy(nmsItem);
return CraftItemStack.asBukkitCopy(net.minecraft.server.v1_13_R2.ItemStack.a(compound));
} else {
return CraftItemStack.asBukkitCopy(nmsItem);
}

View File

@ -17,9 +17,7 @@ public class NBTItemImpl extends NBTCompoundImpl implements NBTItem {
public ItemStack finish() {
if (nmsItem == null) {
net.minecraft.server.v1_14_R1.ItemStack itemStack = CraftItemStack.asNMSCopy(new ItemStack(Material.STONE));
itemStack.setTag(compound);
return CraftItemStack.asBukkitCopy(nmsItem);
return CraftItemStack.asBukkitCopy(net.minecraft.server.v1_14_R1.ItemStack.a(compound));
} else {
return CraftItemStack.asBukkitCopy(nmsItem);
}

View File

@ -17,9 +17,7 @@ public class NBTItemImpl extends NBTCompoundImpl implements NBTItem {
public ItemStack finish() {
if (nmsItem == null) {
net.minecraft.server.v1_15_R1.ItemStack itemStack = CraftItemStack.asNMSCopy(new ItemStack(Material.STONE));
itemStack.setTag(compound);
return CraftItemStack.asBukkitCopy(nmsItem);
return CraftItemStack.asBukkitCopy(net.minecraft.server.v1_15_R1.ItemStack.a(compound));
} else {
return CraftItemStack.asBukkitCopy(nmsItem);
}

View File

@ -17,9 +17,7 @@ public class NBTItemImpl extends NBTCompoundImpl implements NBTItem {
public ItemStack finish() {
if (nmsItem == null) {
net.minecraft.server.v1_16_R1.ItemStack itemStack = CraftItemStack.asNMSCopy(new ItemStack(Material.STONE));
itemStack.setTag(compound);
return CraftItemStack.asBukkitCopy(nmsItem);
return CraftItemStack.asBukkitCopy(net.minecraft.server.v1_16_R1.ItemStack.a(compound));
} else {
return CraftItemStack.asBukkitCopy(nmsItem);
}

View File

@ -18,9 +18,7 @@ public class NBTItemImpl extends NBTCompoundImpl implements NBTItem {
public ItemStack finish() {
if (nmsItem == null) {
net.minecraft.server.v1_16_R2.ItemStack itemStack = CraftItemStack.asNMSCopy(new ItemStack(Material.STONE));
itemStack.setTag(compound);
return CraftItemStack.asBukkitCopy(nmsItem);
return CraftItemStack.asBukkitCopy(net.minecraft.server.v1_16_R2.ItemStack.a(compound));
} else {
return CraftItemStack.asBukkitCopy(nmsItem);
}

View File

@ -17,9 +17,7 @@ public class NBTItemImpl extends NBTCompoundImpl implements NBTItem {
public ItemStack finish() {
if (nmsItem == null) {
net.minecraft.server.v1_8_R1.ItemStack itemStack = CraftItemStack.asNMSCopy(new ItemStack(Material.STONE));
itemStack.setTag(compound);
return CraftItemStack.asBukkitCopy(nmsItem);
return CraftItemStack.asBukkitCopy(net.minecraft.server.v1_8_R1.ItemStack.createStack(compound));
} else {
return CraftItemStack.asBukkitCopy(nmsItem);
}

View File

@ -17,9 +17,7 @@ public class NBTItemImpl extends NBTCompoundImpl implements NBTItem {
public ItemStack finish() {
if (nmsItem == null) {
net.minecraft.server.v1_8_R2.ItemStack itemStack = CraftItemStack.asNMSCopy(new ItemStack(Material.STONE));
itemStack.setTag(compound);
return CraftItemStack.asBukkitCopy(nmsItem);
return CraftItemStack.asBukkitCopy(net.minecraft.server.v1_8_R2.ItemStack.createStack(compound));
} else {
return CraftItemStack.asBukkitCopy(nmsItem);
}

View File

@ -17,9 +17,7 @@ public class NBTItemImpl extends NBTCompoundImpl implements NBTItem {
public ItemStack finish() {
if (nmsItem == null) {
net.minecraft.server.v1_8_R3.ItemStack itemStack = CraftItemStack.asNMSCopy(new ItemStack(Material.STONE));
itemStack.setTag(compound);
return CraftItemStack.asBukkitCopy(nmsItem);
return CraftItemStack.asBukkitCopy(net.minecraft.server.v1_8_R3.ItemStack.createStack(compound));
} else {
return CraftItemStack.asBukkitCopy(nmsItem);
}

View File

@ -17,9 +17,7 @@ public class NBTItemImpl extends NBTCompoundImpl implements NBTItem {
public ItemStack finish() {
if (nmsItem == null) {
net.minecraft.server.v1_9_R1.ItemStack itemStack = CraftItemStack.asNMSCopy(new ItemStack(Material.STONE));
itemStack.setTag(compound);
return CraftItemStack.asBukkitCopy(nmsItem);
return CraftItemStack.asBukkitCopy(net.minecraft.server.v1_9_R1.ItemStack.createStack(compound));
} else {
return CraftItemStack.asBukkitCopy(nmsItem);
}

View File

@ -17,9 +17,7 @@ public class NBTItemImpl extends NBTCompoundImpl implements NBTItem {
public ItemStack finish() {
if (nmsItem == null) {
net.minecraft.server.v1_9_R2.ItemStack itemStack = CraftItemStack.asNMSCopy(new ItemStack(Material.STONE));
itemStack.setTag(compound);
return CraftItemStack.asBukkitCopy(nmsItem);
return CraftItemStack.asBukkitCopy(net.minecraft.server.v1_9_R2.ItemStack.createStack(compound));
} else {
return CraftItemStack.asBukkitCopy(nmsItem);
}