Replace 0 count in item hovers
This commit is contained in:
2 files changed
+5
-5
No files matched your search
+1
-1
@@ -47,7 +47,7 @@ public final class EntityDataTypes26_1 extends AbstractEntityDataTypes {
|
||||
public final EntityDataType optionalBlockStateType = add(15, Types.VAR_INT);
|
||||
public final EntityDataType particleType;
|
||||
public final EntityDataType particlesType;
|
||||
public final EntityDataType villagerDatatType = add(18, Types.VILLAGER_DATA);
|
||||
public final EntityDataType villagerDataType = add(18, Types.VILLAGER_DATA);
|
||||
public final EntityDataType optionalVarIntType = add(19, Types.OPTIONAL_VAR_INT);
|
||||
public final EntityDataType poseType = add(20, Types.VAR_INT);
|
||||
public final EntityDataType catVariantType = add(21, Types.VAR_INT);
|
||||
|
||||
+4
-4
@@ -32,10 +32,10 @@ public final class ComponentRewriter26_1 extends NBTComponentRewriter<Clientboun
|
||||
@Override
|
||||
protected void handleShowItem(final UserConnection connection, final CompoundTag itemTag, final CompoundTag componentsTag) {
|
||||
super.handleShowItem(connection, itemTag, componentsTag);
|
||||
if (componentsTag == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove or update data from componentsTag
|
||||
final int count = itemTag.getInt("count");
|
||||
if (count == 0) {
|
||||
itemTag.putInt("count", 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user