[Bug] CurioBaseItem::getName causes not able to request irons_jwewels items by stock keeper from Create mod
MoePus opened this issue ยท 0 comments
Observed behaviour
The iron ring here would be cleared by the stock keeper
Releated issue: Creators-of-Create/Create#7964
Expected behaviour
Could request irons_jwewels items by stock keeper
Steps to reproduce
- Make 2 iron rings by JewelCrafting Station
- Build up a Create stock system and put the iron rings into the storage
- Request a iron ring by the stock keeper (Right click the blaze burner to start a request)
- The iron ring would be cleared by the stock keeper
@@ -76,14 +76,14 @@ public class CurioBaseItem extends Item implements ICurioItem {
return shiftTooltip;
}
@Override
public Component getName(ItemStack itemStack) {
- if (!itemStack.has(DataComponents.ITEM_NAME)) {
- itemStack.set(DataComponents.ITEM_NAME, JewelryData.get(itemStack).getItemName());
- }
- return Optional.ofNullable(itemStack.get(DataComponents.ITEM_NAME)).orElse(super.getName(itemStack));
+// if (!itemStack.has(DataComponents.ITEM_NAME)) {
+// itemStack.set(DataComponents.ITEM_NAME, JewelryData.get(itemStack).getItemName());
+// }
+ return Optional.ofNullable(itemStack.get(DataComponents.ITEM_NAME)).orElse(JewelryData.get(itemStack).getItemName());
}
public static List<Component> getShiftDescription(PatternDefinition pattern, Map<Holder<PartDefinition>, Holder<MaterialDefinition>> parts, Optional<List<Integer>> materialCost) {
List<Component> components = new ArrayList<>();
for (int i = 0; i < pattern.partTemplate().size(); i++) {
would fix this issue
Server Type
Single Player
Crashlog
No response
Mod version
1.21.1-1.5.2
Forge version
Neoforge 1.21.1 152
Other mods
Create 6.0.6
Crashlog Check
- I understand if this is a crashbug and I did not attach a crashlog, this will not be handled