mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-20 03:59:38 +00:00
Fix toCommandString output
Update MCItemStack's toString function to output the stack size in addition to the ID and NBT data
This commit is contained in:
1 parent
e5b27c19b7
commit
f11531fc5c
3 files changed
+9
-8
No files matched your search
@@ -20,6 +20,6 @@ public class BrewingRecipe implements IBrewingRecipe {
|
||||
|
||||
@Override
|
||||
public String toCommandString() {
|
||||
return String.format("brewing.add(%s, %s, %s", output, input, ingredient);
|
||||
return String.format("brewing.add(%s, %s, %s)", output, input, ingredient);
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ public class FurnaceRecipe implements IFurnaceRecipe {
|
||||
|
||||
@Override
|
||||
public String toCommandString() {
|
||||
return String.format("furnace.addRecipe(%s, %s, %s", output, input, xp);
|
||||
return String.format("furnace.addRecipe(%s, %s, %s)", output, input, xp);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -103,7 +103,7 @@ public class MCItemStack implements IItemStack {
|
||||
public void setDisplayName(String name) {
|
||||
MineTweakerAPI.apply(new SetTranslationAction(getName() + ".name", name));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void setMaxDamage(int damage) {
|
||||
@@ -224,7 +224,7 @@ public class MCItemStack implements IItemStack {
|
||||
@Override
|
||||
public IItemStack removeTag(String tag) {
|
||||
ItemStack result = new ItemStack(stack.getItem(), stack.stackSize, stack.getItemDamage());
|
||||
|
||||
|
||||
if (tag == null) {
|
||||
result.stackTagCompound = null;
|
||||
} else {
|
||||
@@ -404,10 +404,11 @@ public class MCItemStack implements IItemStack {
|
||||
result.append(")");
|
||||
}
|
||||
|
||||
if (stack.stackSize > 1) {
|
||||
result.append(" * ");
|
||||
result.append(stack.stackSize);
|
||||
}
|
||||
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user