Remove support for pluralisation to match Minecraft and alleviate issues with over-complexity

This commit is contained in:
Matthew Miller
2019-10-27 15:29:40 +10:00
parent 455a40b3fc
commit 0e6037584f
13 changed files with 99 additions and 191 deletions

View File

@ -139,7 +139,7 @@ public class RegionCommands {
BlockVector3 pos2 = cuboidregion.getPos2();
int blocksChanged = editSession.drawLine(pattern, pos1, pos2, thickness, !shell);
actor.printInfo(TranslatableComponent.of(pluraliseI18n("worldedit.line.changed", blocksChanged), TextComponent.of(blocksChanged)));
actor.printInfo(TranslatableComponent.of("worldedit.line.changed", TextComponent.of(blocksChanged)));
return blocksChanged;
}
@ -169,7 +169,7 @@ public class RegionCommands {
int blocksChanged = editSession.drawSpline(pattern, vectors, 0, 0, 0, 10, thickness, !shell);
actor.printInfo(TranslatableComponent.of(pluraliseI18n("worldedit.curve.changed", blocksChanged), TextComponent.of(blocksChanged)));
actor.printInfo(TranslatableComponent.of("worldedit.curve.changed", TextComponent.of(blocksChanged)));
return blocksChanged;
}
@ -189,7 +189,7 @@ public class RegionCommands {
from = new ExistingBlockMask(editSession);
}
int affected = editSession.replaceBlocks(region, from, to);
actor.printInfo(TranslatableComponent.of(pluraliseI18n("worldedit.replace.replaced", affected), TextComponent.of(affected)));
actor.printInfo(TranslatableComponent.of("worldedit.replace.replaced", TextComponent.of(affected)));
return affected;
}
@ -203,7 +203,7 @@ public class RegionCommands {
@Arg(desc = "The pattern of blocks to overlay")
Pattern pattern) throws WorldEditException {
int affected = editSession.overlayCuboidBlocks(region, pattern);
actor.printInfo(TranslatableComponent.of(pluraliseI18n("worldedit.overlay.overlaid", affected), TextComponent.of(affected)));
actor.printInfo(TranslatableComponent.of("worldedit.overlay.overlaid", TextComponent.of(affected)));
return affected;
}
@ -218,7 +218,7 @@ public class RegionCommands {
@Arg(desc = "The pattern of blocks to set")
Pattern pattern) throws WorldEditException {
int affected = editSession.center(region, pattern);
actor.printInfo(TranslatableComponent.of(pluraliseI18n("worldedit.center.changed", affected), TextComponent.of(affected)));
actor.printInfo(TranslatableComponent.of("worldedit.center.changed", TextComponent.of(affected)));
return affected;
}
@ -230,7 +230,7 @@ public class RegionCommands {
@Logging(REGION)
public int naturalize(Actor actor, EditSession editSession, @Selection Region region) throws WorldEditException {
int affected = editSession.naturalizeCuboidBlocks(region);
actor.printInfo(TranslatableComponent.of(pluraliseI18n("worldedit.naturalize.naturalized", affected), TextComponent.of(affected)));
actor.printInfo(TranslatableComponent.of("worldedit.naturalize.naturalized", TextComponent.of(affected)));
return affected;
}
@ -244,7 +244,7 @@ public class RegionCommands {
@Arg(desc = "The pattern of blocks to set")
Pattern pattern) throws WorldEditException {
int affected = editSession.makeWalls(region, pattern);
actor.printInfo(TranslatableComponent.of(pluraliseI18n("worldedit.walls.changed", affected), TextComponent.of(affected)));
actor.printInfo(TranslatableComponent.of("worldedit.walls.changed", TextComponent.of(affected)));
return affected;
}
@ -259,7 +259,7 @@ public class RegionCommands {
@Arg(desc = "The pattern of blocks to set")
Pattern pattern) throws WorldEditException {
int affected = editSession.makeCuboidFaces(region, pattern);
actor.printInfo(TranslatableComponent.of(pluraliseI18n("worldedit.faces.changed", affected), TextComponent.of(affected)));
actor.printInfo(TranslatableComponent.of("worldedit.faces.changed", TextComponent.of(affected)));
return affected;
}
@ -278,7 +278,7 @@ public class RegionCommands {
HeightMap heightMap = new HeightMap(editSession, region, mask);
HeightMapFilter filter = new HeightMapFilter(new GaussianKernel(5, 1.0));
int affected = heightMap.applyFilter(filter, iterations);
actor.printInfo(TranslatableComponent.of(pluraliseI18n("worldedit.smooth.changed", affected), TextComponent.of(affected)));
actor.printInfo(TranslatableComponent.of("worldedit.smooth.changed", TextComponent.of(affected)));
return affected;
}
@ -333,7 +333,7 @@ public class RegionCommands {
}
}
actor.printInfo(TranslatableComponent.of(pluraliseI18n("worldedit.move.moved", affected), TextComponent.of(affected)));
actor.printInfo(TranslatableComponent.of("worldedit.move.moved", TextComponent.of(affected)));
return affected;
}
@ -388,7 +388,7 @@ public class RegionCommands {
}
}
actor.printInfo(TranslatableComponent.of(pluraliseI18n("worldedit.stack.changed", affected), TextComponent.of(affected)));
actor.printInfo(TranslatableComponent.of("worldedit.stack.changed", TextComponent.of(affected)));
return affected;
}
@ -455,7 +455,7 @@ public class RegionCommands {
if (actor instanceof Player) {
((Player) actor).findFreePosition();
}
actor.printInfo(TranslatableComponent.of(pluraliseI18n("worldedit.deform.deformed", affected), TextComponent.of(affected)));
actor.printInfo(TranslatableComponent.of("worldedit.deform.deformed", TextComponent.of(affected)));
return affected;
} catch (ExpressionException e) {
actor.printError(TextComponent.of(e.getMessage()));
@ -479,7 +479,7 @@ public class RegionCommands {
checkCommandArgument(thickness >= 0, "Thickness must be >= 0");
int affected = editSession.hollowOutRegion(region, thickness, pattern);
actor.printInfo(TranslatableComponent.of(pluraliseI18n("worldedit.hollow.changed", affected), TextComponent.of(affected)));
actor.printInfo(TranslatableComponent.of("worldedit.hollow.changed", TextComponent.of(affected)));
return affected;
}
@ -496,7 +496,7 @@ public class RegionCommands {
double density) throws WorldEditException {
checkCommandArgument(0 <= density && density <= 100, "Density must be in [0, 100]");
int affected = editSession.makeForest(region, density / 100, type);
actor.printInfo(TranslatableComponent.of(pluraliseI18n("worldedit.forest.created", affected), TextComponent.of(affected)));
actor.printInfo(TranslatableComponent.of("worldedit.forest.created", TextComponent.of(affected)));
return affected;
}
@ -518,7 +518,7 @@ public class RegionCommands {
Operations.completeLegacy(visitor);
int affected = ground.getAffected();
actor.printInfo(TranslatableComponent.of(pluraliseI18n("worldedit.flora.created", affected), TextComponent.of(affected)));
actor.printInfo(TranslatableComponent.of("worldedit.flora.created", TextComponent.of(affected)));
return affected;
}