Update VV API usage

This commit is contained in:
FlorianMichael 2024-06-01 00:34:15 +02:00
parent 057e892729
commit 0d1c553ee1
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126
11 changed files with 23 additions and 23 deletions

View File

@ -45,16 +45,16 @@ public class VFHandItemProvider extends HandItemProvider {
if (info.isClientSide()) {
return getClientItem();
} else if ((serverItem = serverPlayers.get(info.getProtocolInfo().getUuid())) != null) {
return new DataItem(serverItem);
return serverItem.copy();
}
return super.getHandItem(info);
}
private Item getClientItem() {
if (clientItem == null) {
return new DataItem(0, (byte) 0, (short) 0, null);
return new DataItem(0, (byte) 0, null);
}
return new DataItem(clientItem);
return clientItem.copy();
}
@Environment(EnvType.CLIENT)

View File

@ -46,9 +46,9 @@ public class VFHandItemProvider extends HandItemProvider
private Item getClientItem() {
if (clientItem == null) {
return new DataItem(0, (byte) 0, (short) 0, null);
return new DataItem(0, (byte) 0, null);
}
return new DataItem(clientItem);
return clientItem.copy();
}
@Environment(EnvType.CLIENT)

View File

@ -45,9 +45,9 @@ public class VFHandItemProvider extends HandItemProvider {
private Item getClientItem() {
if (clientItem == null) {
return new DataItem(0, (byte) 0, (short) 0, null);
return new DataItem(0, (byte) 0, null);
}
return new DataItem(clientItem);
return clientItem.copy();
}
@Environment(EnvType.CLIENT)

View File

@ -45,9 +45,9 @@ public class VFHandItemProvider extends HandItemProvider {
private Item getClientItem() {
if (clientItem == null) {
return new DataItem(0, (byte) 0, (short) 0, null);
return new DataItem(0, (byte) 0, null);
}
return new DataItem(clientItem);
return clientItem.copy();
}
@Environment(EnvType.CLIENT)

View File

@ -45,9 +45,9 @@ public class VFHandItemProvider extends HandItemProvider {
private Item getClientItem() {
if (clientItem == null) {
return new DataItem(0, (byte) 0, (short) 0, null);
return new DataItem(0, (byte) 0, null);
}
return new DataItem(clientItem);
return clientItem.copy();
}
@Environment(EnvType.CLIENT)

View File

@ -45,9 +45,9 @@ public class VFHandItemProvider extends HandItemProvider {
private Item getClientItem() {
if (clientItem == null) {
return new DataItem(0, (byte) 0, (short) 0, null);
return new DataItem(0, (byte) 0, null);
}
return new DataItem(clientItem);
return clientItem.copy();
}
@Environment(EnvType.CLIENT)

View File

@ -45,9 +45,9 @@ public class VFHandItemProvider extends HandItemProvider {
private Item getClientItem() {
if (clientItem == null) {
return new DataItem(0, (byte) 0, (short) 0, null);
return new DataItem(0, (byte) 0, null);
}
return new DataItem(clientItem);
return clientItem.copy();
}
@Environment(EnvType.CLIENT)

View File

@ -45,9 +45,9 @@ public class VFHandItemProvider extends HandItemProvider {
private Item getClientItem() {
if (clientItem == null) {
return new DataItem(0, (byte) 0, (short) 0, null);
return new DataItem(0, (byte) 0, null);
}
return new DataItem(clientItem);
return clientItem.copy();
}
@Environment(EnvType.CLIENT)

View File

@ -45,9 +45,9 @@ public class VFHandItemProvider extends HandItemProvider {
private Item getClientItem() {
if (clientItem == null) {
return new DataItem(0, (byte) 0, (short) 0, null);
return new DataItem(0, (byte) 0, null);
}
return new DataItem(clientItem);
return clientItem.copy();
}
@Environment(EnvType.CLIENT)

View File

@ -45,9 +45,9 @@ public class VFHandItemProvider extends HandItemProvider {
private Item getClientItem() {
if (clientItem == null) {
return new DataItem(0, (byte) 0, (short) 0, null);
return new DataItem(0, (byte) 0, null);
}
return new DataItem(clientItem);
return clientItem.copy();
}
@Environment(EnvType.CLIENT)

View File

@ -45,7 +45,7 @@ public class VFHandItemProvider extends HandItemProvider {
if (info.isClientSide()) {
return getClientItem();
} else if ((serverItem = serverPlayers.get(info.getProtocolInfo().getUuid())) != null) {
return new DataItem(serverItem);
return serverItem.copy();
}
return super.getHandItem(info);
}
@ -54,7 +54,7 @@ public class VFHandItemProvider extends HandItemProvider {
if (clientItem == null) {
return new DataItem(0, (byte) 0, (short) 0, null);
}
return new DataItem(clientItem);
return clientItem.copy();
}
@Environment(EnvType.CLIENT)