mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2024-11-21 11:35:16 +01:00
Update VV API usage
This commit is contained in:
parent
057e892729
commit
0d1c553ee1
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user