1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-24 07:56:54 +00:00

Remove redundant helper method from datagen

Vanilla has had an equivalent method for a few years now!
This commit is contained in:
Jonathan Coates 2024-06-14 22:12:16 +01:00
parent 1944995c33
commit 9fbb1070ef
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06

View File

@ -36,13 +36,13 @@ public final class ItemModelProvider {
}
private static void registerPocketComputer(ItemModelGenerators generators, ResourceLocation id, boolean off) {
createFlatItem(generators, addSuffix(id, "_blinking"),
createFlatItem(generators, id.withSuffix("_blinking"),
new ResourceLocation(ComputerCraftAPI.MOD_ID, "item/pocket_computer_blink"),
id,
new ResourceLocation(ComputerCraftAPI.MOD_ID, "item/pocket_computer_light")
);
createFlatItem(generators, addSuffix(id, "_on"),
createFlatItem(generators, id.withSuffix("_on"),
new ResourceLocation(ComputerCraftAPI.MOD_ID, "item/pocket_computer_on"),
id,
new ResourceLocation(ComputerCraftAPI.MOD_ID, "item/pocket_computer_light")
@ -94,8 +94,4 @@ public final class ItemModelProvider {
new ModelTemplate(Optional.of(new ResourceLocation("item/generated")), Optional.empty(), slots)
.create(model, mapping, generators.output);
}
private static ResourceLocation addSuffix(ResourceLocation location, String suffix) {
return new ResourceLocation(location.getNamespace(), location.getPath() + suffix);
}
}