diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/Language.java b/src/datagen/java/blusunrize/immersiveengineering/data/Language.java index d00a88d2ff..ca159ec15b 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/Language.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/Language.java @@ -202,7 +202,7 @@ private void verify() final var failed = new MutableBoolean(); for(var item : IEItems.REGISTER.getEntries()) if(!item.getKey().location().getPath().startsWith("fake_icon")) - assertMapped(mapData, failed, item.get().getDescriptionId()); + assertMapped(mapData, failed, item.get().getDescriptionId(item.get().getDefaultInstance())); for(var shader : ShaderRegistry.shaderRegistry.keySet()) assertMapped(mapData, failed, ShaderItem.getShaderNameKey(shader)); if(failed.booleanValue()) diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java index 6439e43846..eb74fb3d93 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java @@ -14,6 +14,7 @@ import blusunrize.immersiveengineering.api.energy.ThermoelectricSource; import blusunrize.immersiveengineering.api.energy.WindmillBiome; import blusunrize.immersiveengineering.api.tool.BulletHandler; +import blusunrize.immersiveengineering.api.utils.Color4; import blusunrize.immersiveengineering.api.wires.WireType; import blusunrize.immersiveengineering.common.blocks.metal.WarningSignBlock.WarningSignIcon; import blusunrize.immersiveengineering.common.crafting.GeneratedListRecipe; @@ -217,8 +218,8 @@ private void recipesBlueprint(RecipeOutput out) .build(out, toRL("blueprint/bullet_potion")); ItemStack flare = new ItemStack(BulletHandler.getBulletItem(IEBullets.FLARE), 4); - DataComponentType flareComponent = (DataComponentType)IEDataComponents.getBulletData(BulletHandler.getBullet(IEBullets.FLARE)); - flare.set(flareComponent, 0xcc2e06); + DataComponentType flareComponent = IEDataComponents.getBulletData(IEBullets.FLARE_TYPE); + flare.set(flareComponent, Color4.fromRGB(0xcc2e06)); BlueprintCraftingRecipeBuilder.builder() .category("specialBullet") .output(flare.copy()) @@ -227,7 +228,7 @@ private void recipesBlueprint(RecipeOutput out) .input(IETags.getTagsFor(EnumMetals.ALUMINUM).dust) .input(Tags.Items.DYES_RED) .build(out, toRL("blueprint/bullet_flare_red")); - flare.set(flareComponent, 0x2ca30b); + flare.set(flareComponent, Color4.fromRGB(0x2ca30b)); BlueprintCraftingRecipeBuilder.builder() .category("specialBullet") .output(flare.copy()) @@ -236,7 +237,7 @@ private void recipesBlueprint(RecipeOutput out) .input(IETags.getTagsFor(EnumMetals.ALUMINUM).dust) .input(Tags.Items.DYES_GREEN) .build(out, toRL("blueprint/bullet_flare_green")); - flare.set(flareComponent, 0xffff82); + flare.set(flareComponent, Color4.fromRGB(0xffff82)); BlueprintCraftingRecipeBuilder.builder() .category("specialBullet") .output(flare.copy()) diff --git a/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e b/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e index 9ae272a0ee..b486cd8a20 100644 --- a/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e +++ b/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e @@ -1,4 +1,4 @@ -// 1.21.1 2024-08-31T17:20:57.648285431 Recipes +// 1.21.1 2024-09-29T11:19:48.418278502 Recipes e46a17053b96b7062a3dbf804ed3e25c134fc397 data/immersiveengineering/advancement/recipes/misc/crafting/alloybrick.json 6a92fb93f1478200a7237b19770f94285cc3d955 data/immersiveengineering/advancement/recipes/misc/crafting/alloybrick_from_slab.json bba88ea9b8e42c09c4e5df2344ccef6ad7ed4b8d data/immersiveengineering/advancement/recipes/misc/crafting/alloybrick_to_slab.json @@ -748,9 +748,9 @@ c5e50b660527335388430f0d85408c1e0298b139 data/immersiveengineering/recipe/bluepr a9af1059f66176277bad0898b35a5ef561b7dce4 data/immersiveengineering/recipe/blueprint/bullet_casull.json 01d1ca023a36df9be805019494199688ce109ebf data/immersiveengineering/recipe/blueprint/bullet_dragonsbreath.json c2e5a7d9418b96864e9e79e8440becd653cbf65e data/immersiveengineering/recipe/blueprint/bullet_explosive.json -51e7a2cb0674187a0463d51003bb20c7f830d36d data/immersiveengineering/recipe/blueprint/bullet_flare_green.json +8edf8cd477bd5dd1e5e25f772702eba39c42a6af data/immersiveengineering/recipe/blueprint/bullet_flare_green.json fb730e6457eedbf8068ea40ad85bbd5ab464903f data/immersiveengineering/recipe/blueprint/bullet_flare_red.json -83ac5210ffb78ebe3d6101e265c121878caf00f6 data/immersiveengineering/recipe/blueprint/bullet_flare_yellow.json +f8e8a84d5af4e988d4cdc99d654055b6e98ae8a4 data/immersiveengineering/recipe/blueprint/bullet_flare_yellow.json 58324b605b03c76b4e06157f7a4fc89b1a474c48 data/immersiveengineering/recipe/blueprint/bullet_homing.json 0bfca76f8cf9ca9d49a4515102035720d49b7a69 data/immersiveengineering/recipe/blueprint/bullet_potion.json 937234121b2934a6444a196c1ddeeb87d3749d17 data/immersiveengineering/recipe/blueprint/bullet_silver.json diff --git a/src/generated/resources/data/immersiveengineering/recipe/blueprint/bullet_flare_green.json b/src/generated/resources/data/immersiveengineering/recipe/blueprint/bullet_flare_green.json index 60f3f54267..4a3aafbc18 100644 --- a/src/generated/resources/data/immersiveengineering/recipe/blueprint/bullet_flare_green.json +++ b/src/generated/resources/data/immersiveengineering/recipe/blueprint/bullet_flare_green.json @@ -20,7 +20,12 @@ ], "result": { "components": { - "immersiveengineering:flare": 2925323 + "immersiveengineering:flare": { + "a": 1.0, + "b": 0.043137256, + "g": 0.6392157, + "r": 0.17254902 + } }, "count": 4, "id": "immersiveengineering:bullet_flare" diff --git a/src/generated/resources/data/immersiveengineering/recipe/blueprint/bullet_flare_yellow.json b/src/generated/resources/data/immersiveengineering/recipe/blueprint/bullet_flare_yellow.json index fce103dad4..ecb5f1f985 100644 --- a/src/generated/resources/data/immersiveengineering/recipe/blueprint/bullet_flare_yellow.json +++ b/src/generated/resources/data/immersiveengineering/recipe/blueprint/bullet_flare_yellow.json @@ -20,7 +20,12 @@ ], "result": { "components": { - "immersiveengineering:flare": 16777090 + "immersiveengineering:flare": { + "a": 1.0, + "b": 0.50980395, + "g": 1.0, + "r": 1.0 + } }, "count": 4, "id": "immersiveengineering:bullet_flare" diff --git a/src/main/java/blusunrize/immersiveengineering/common/blocks/BlockItemIE.java b/src/main/java/blusunrize/immersiveengineering/common/blocks/BlockItemIE.java index 19a47c0168..7faad85066 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/blocks/BlockItemIE.java +++ b/src/main/java/blusunrize/immersiveengineering/common/blocks/BlockItemIE.java @@ -50,7 +50,7 @@ public BlockItemIE(Block b) } @Override - public String getDescriptionId(ItemStack stack) + public String getDescriptionId() { return getBlock().getDescriptionId(); } diff --git a/src/main/java/blusunrize/immersiveengineering/common/items/BulletItem.java b/src/main/java/blusunrize/immersiveengineering/common/items/BulletItem.java index c2852b4ec1..c794820f1d 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/items/BulletItem.java +++ b/src/main/java/blusunrize/immersiveengineering/common/items/BulletItem.java @@ -13,7 +13,6 @@ import blusunrize.immersiveengineering.common.items.IEItemInterfaces.IColouredItem; import blusunrize.immersiveengineering.common.register.IEDataComponents; import net.minecraft.core.component.DataComponentType; -import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.player.Player; @@ -22,7 +21,6 @@ import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; -import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.List; @@ -44,18 +42,6 @@ public void appendHoverText(ItemStack stack, TooltipContext ctx, List type.addTooltip(stack.get(component), ctx, list, flag); } - @Nonnull - @Override - public Component getName(@Nonnull ItemStack stack) - { - // TODO fix - String s = "item.immersiveengineering.bullet."; - String key = BuiltInRegistries.ITEM.getKey(this).getPath(); - s += key; - s = type.getTranslationKey(stack.get(component), s); - return Component.translatable(s); - } - @Override public int getColourForIEItem(ItemStack stack, int pass) { diff --git a/src/main/java/blusunrize/immersiveengineering/common/items/EngineersBlueprintItem.java b/src/main/java/blusunrize/immersiveengineering/common/items/EngineersBlueprintItem.java index a0b8c1e3e1..5b4b803b6c 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/items/EngineersBlueprintItem.java +++ b/src/main/java/blusunrize/immersiveengineering/common/items/EngineersBlueprintItem.java @@ -33,13 +33,6 @@ public EngineersBlueprintItem() super(new Properties().stacksTo(1)); } - @Nonnull - @Override - public String getDescriptionId(ItemStack stack) - { - return this.getDescriptionId(); - } - @Override public void appendHoverText(ItemStack stack, TooltipContext ctx, List list, TooltipFlag flag) { diff --git a/src/main/java/blusunrize/immersiveengineering/common/items/LogicCircuitBoardItem.java b/src/main/java/blusunrize/immersiveengineering/common/items/LogicCircuitBoardItem.java index b4d736f071..6b137560b8 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/items/LogicCircuitBoardItem.java +++ b/src/main/java/blusunrize/immersiveengineering/common/items/LogicCircuitBoardItem.java @@ -17,7 +17,6 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; -import javax.annotation.Nonnull; import java.util.List; public class LogicCircuitBoardItem extends IEBaseItem @@ -27,13 +26,6 @@ public LogicCircuitBoardItem() super(new Properties().stacksTo(1)); } - @Nonnull - @Override - public String getDescriptionId(ItemStack stack) - { - return this.getDescriptionId(); - } - @Override public void appendHoverText(ItemStack stack, TooltipContext ctx, List list, TooltipFlag flag) {