From 18c37728018d7a2c135307134b8f0b55b33a75c3 Mon Sep 17 00:00:00 2001 From: LatvianModder Date: Wed, 24 Jul 2024 12:44:44 +0300 Subject: [PATCH] Renamed BuilderBase#generateDataJsons to generateData and generateAssetJsons to generateAssets. Sorry plugin devs, forgot to do that sooner --- src/main/java/dev/latvian/mods/kubejs/block/BlockBuilder.java | 4 ++-- .../java/dev/latvian/mods/kubejs/block/BlockItemBuilder.java | 2 +- .../java/dev/latvian/mods/kubejs/block/DetectorBlock.java | 2 +- .../java/dev/latvian/mods/kubejs/block/SeedItemBuilder.java | 2 +- .../mods/kubejs/block/custom/MultipartShapedBlockBuilder.java | 2 +- .../java/dev/latvian/mods/kubejs/client/ClientAssetPacks.java | 2 +- .../java/dev/latvian/mods/kubejs/fluid/FluidBlockBuilder.java | 2 +- .../dev/latvian/mods/kubejs/fluid/FluidBucketItemBuilder.java | 2 +- src/main/java/dev/latvian/mods/kubejs/item/ItemBuilder.java | 4 ++-- .../java/dev/latvian/mods/kubejs/registry/BuilderBase.java | 4 ++-- .../dev/latvian/mods/kubejs/server/ServerScriptManager.java | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/main/java/dev/latvian/mods/kubejs/block/BlockBuilder.java b/src/main/java/dev/latvian/mods/kubejs/block/BlockBuilder.java index e473a04c0..028232a20 100644 --- a/src/main/java/dev/latvian/mods/kubejs/block/BlockBuilder.java +++ b/src/main/java/dev/latvian/mods/kubejs/block/BlockBuilder.java @@ -180,7 +180,7 @@ public BuilderBase displayName(Component name) { } @Override - public void generateDataJsons(KubeDataGenerator generator) { + public void generateData(KubeDataGenerator generator) { var table = generateLootTable(); if (table != null) { @@ -226,7 +226,7 @@ public LootTable generateLootTable() { } @Override - public void generateAssetJsons(KubeAssetGenerator generator) { + public void generateAssets(KubeAssetGenerator generator) { if (blockstateJson != null) { generator.json(newID("blockstates/", ""), blockstateJson); } else { diff --git a/src/main/java/dev/latvian/mods/kubejs/block/BlockItemBuilder.java b/src/main/java/dev/latvian/mods/kubejs/block/BlockItemBuilder.java index 71645103f..2a5cbce42 100644 --- a/src/main/java/dev/latvian/mods/kubejs/block/BlockItemBuilder.java +++ b/src/main/java/dev/latvian/mods/kubejs/block/BlockItemBuilder.java @@ -24,6 +24,6 @@ public String getTranslationKeyGroup() { } @Override - public void generateAssetJsons(KubeAssetGenerator generator) { + public void generateAssets(KubeAssetGenerator generator) { } } diff --git a/src/main/java/dev/latvian/mods/kubejs/block/DetectorBlock.java b/src/main/java/dev/latvian/mods/kubejs/block/DetectorBlock.java index b3dac1d09..97f4a3bb1 100644 --- a/src/main/java/dev/latvian/mods/kubejs/block/DetectorBlock.java +++ b/src/main/java/dev/latvian/mods/kubejs/block/DetectorBlock.java @@ -46,7 +46,7 @@ public Block createObject() { } @Override - public void generateAssetJsons(KubeAssetGenerator generator) { + public void generateAssets(KubeAssetGenerator generator) { generator.blockState(id, bs -> { bs.simpleVariant("powered=false", "kubejs:block/detector"); bs.simpleVariant("powered=true", "kubejs:block/detector_on"); diff --git a/src/main/java/dev/latvian/mods/kubejs/block/SeedItemBuilder.java b/src/main/java/dev/latvian/mods/kubejs/block/SeedItemBuilder.java index b2d000012..f913c72dc 100644 --- a/src/main/java/dev/latvian/mods/kubejs/block/SeedItemBuilder.java +++ b/src/main/java/dev/latvian/mods/kubejs/block/SeedItemBuilder.java @@ -51,7 +51,7 @@ public Item createObject() { } @Override - public void generateAssetJsons(KubeAssetGenerator generator) { + public void generateAssets(KubeAssetGenerator generator) { if (modelJson != null) { generator.json(KubeAssetGenerator.asItemModelLocation(id), modelJson); return; diff --git a/src/main/java/dev/latvian/mods/kubejs/block/custom/MultipartShapedBlockBuilder.java b/src/main/java/dev/latvian/mods/kubejs/block/custom/MultipartShapedBlockBuilder.java index 4a752f591..af32fe10f 100644 --- a/src/main/java/dev/latvian/mods/kubejs/block/custom/MultipartShapedBlockBuilder.java +++ b/src/main/java/dev/latvian/mods/kubejs/block/custom/MultipartShapedBlockBuilder.java @@ -10,7 +10,7 @@ public MultipartShapedBlockBuilder(ResourceLocation i, String... suffixes) { } @Override - public void generateAssetJsons(KubeAssetGenerator generator) { + public void generateAssets(KubeAssetGenerator generator) { if (blockstateJson != null) { generator.json(newID("blockstates/", ""), blockstateJson); } else { diff --git a/src/main/java/dev/latvian/mods/kubejs/client/ClientAssetPacks.java b/src/main/java/dev/latvian/mods/kubejs/client/ClientAssetPacks.java index 4692b1aa9..2f58b7cd3 100644 --- a/src/main/java/dev/latvian/mods/kubejs/client/ClientAssetPacks.java +++ b/src/main/java/dev/latvian/mods/kubejs/client/ClientAssetPacks.java @@ -56,7 +56,7 @@ public List inject(List original) { internalAssetPack.reset(); for (var builder : RegistryObjectStorage.ALL_BUILDERS) { - builder.generateAssetJsons(internalAssetPack); + builder.generateAssets(internalAssetPack); } KubeJSPlugins.forEachPlugin(internalAssetPack, KubeJSPlugin::generateAssets); diff --git a/src/main/java/dev/latvian/mods/kubejs/fluid/FluidBlockBuilder.java b/src/main/java/dev/latvian/mods/kubejs/fluid/FluidBlockBuilder.java index f1a02fe5e..a3b942090 100644 --- a/src/main/java/dev/latvian/mods/kubejs/fluid/FluidBlockBuilder.java +++ b/src/main/java/dev/latvian/mods/kubejs/fluid/FluidBlockBuilder.java @@ -29,7 +29,7 @@ public Block createObject() { } @Override - public void generateAssetJsons(KubeAssetGenerator generator) { + public void generateAssets(KubeAssetGenerator generator) { generator.blockState(id, m -> m.simpleVariant("", id.getNamespace() + ":block/" + id.getPath())); generator.blockModel(id, m -> { m.parent(""); diff --git a/src/main/java/dev/latvian/mods/kubejs/fluid/FluidBucketItemBuilder.java b/src/main/java/dev/latvian/mods/kubejs/fluid/FluidBucketItemBuilder.java index a560e45bd..03a07349a 100644 --- a/src/main/java/dev/latvian/mods/kubejs/fluid/FluidBucketItemBuilder.java +++ b/src/main/java/dev/latvian/mods/kubejs/fluid/FluidBucketItemBuilder.java @@ -20,7 +20,7 @@ public BucketItem createObject() { } @Override - public void generateAssetJsons(KubeAssetGenerator generator) { + public void generateAssets(KubeAssetGenerator generator) { if (modelJson != null) { generator.json(KubeAssetGenerator.asItemModelLocation(id), modelJson); return; diff --git a/src/main/java/dev/latvian/mods/kubejs/item/ItemBuilder.java b/src/main/java/dev/latvian/mods/kubejs/item/ItemBuilder.java index 48bee5435..774bab26b 100644 --- a/src/main/java/dev/latvian/mods/kubejs/item/ItemBuilder.java +++ b/src/main/java/dev/latvian/mods/kubejs/item/ItemBuilder.java @@ -118,7 +118,7 @@ public Item transformObject(Item obj) { } @Override - public void generateAssetJsons(KubeAssetGenerator generator) { + public void generateAssets(KubeAssetGenerator generator) { if (modelJson != null) { generator.json(KubeAssetGenerator.asItemModelLocation(id), modelJson); return; @@ -131,7 +131,7 @@ public void generateAssetJsons(KubeAssetGenerator generator) { m.parent("minecraft:item/generated"); } - if (textureJson.size() == 0) { + if (textureJson.isEmpty()) { texture(newID("item/", "").toString()); } diff --git a/src/main/java/dev/latvian/mods/kubejs/registry/BuilderBase.java b/src/main/java/dev/latvian/mods/kubejs/registry/BuilderBase.java index 11f733f3e..681c4a62f 100644 --- a/src/main/java/dev/latvian/mods/kubejs/registry/BuilderBase.java +++ b/src/main/java/dev/latvian/mods/kubejs/registry/BuilderBase.java @@ -127,11 +127,11 @@ public ResourceLocation newID(String pre, String post) { } @HideFromJS - public void generateDataJsons(KubeDataGenerator generator) { + public void generateData(KubeDataGenerator generator) { } @HideFromJS - public void generateAssetJsons(KubeAssetGenerator generator) { + public void generateAssets(KubeAssetGenerator generator) { } public String getBuilderTranslationKey() { diff --git a/src/main/java/dev/latvian/mods/kubejs/server/ServerScriptManager.java b/src/main/java/dev/latvian/mods/kubejs/server/ServerScriptManager.java index acb42cd48..9685f0488 100644 --- a/src/main/java/dev/latvian/mods/kubejs/server/ServerScriptManager.java +++ b/src/main/java/dev/latvian/mods/kubejs/server/ServerScriptManager.java @@ -137,7 +137,7 @@ public void add(ResourceKey> registry, BuilderBase @Override public void loadAdditional() { for (var builder : RegistryObjectStorage.ALL_BUILDERS) { - builder.generateDataJsons(internalDataPack); + builder.generateData(internalDataPack); } KubeJSPlugins.forEachPlugin(internalDataPack, KubeJSPlugin::generateData);