Add tostring handling for components
This commit is contained in:
3 files changed
+12
-1
No files matched your search
@@ -360,7 +360,8 @@ public class ItemStack {
|
||||
String identifier = type == null ? "null" : type.getName().toString();
|
||||
int maxAmount = getType().getMaxAmount();
|
||||
return "ItemStack[type=" + identifier + ", amount=" + amount + "/" + maxAmount
|
||||
+ ", nbt tag names: " + (nbt != null ? nbt.getTagNames() : "[null]") + ", legacyData=" + legacyData + "]";
|
||||
+ ", nbt tag names: " + (nbt != null ? nbt.getTagNames() : "[null]")
|
||||
+ ", legacyData=" + legacyData + ", components=" + components + "]";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
@@ -102,6 +102,11 @@ public class ComponentTypes {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Component[" + this.getName() + "]";
|
||||
}
|
||||
};
|
||||
TYPES_BUILDER.register(COMPONENT_TYPE_MAP, COMPONENT_TYPE_ID_MAP, type);
|
||||
return type;
|
||||
|
||||
+5
@@ -95,4 +95,9 @@ public class PatchableComponentMap implements IComponentMap {
|
||||
public Map<ComponentType<?>, Optional<?>> getPatches() {
|
||||
return this.patches;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PatchableComponentMap{base=" + this.base + ", patches=" + this.patches + '}';
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user