From 1cc779efac1e0c17e44704ffbd91bbfe65bfc33d Mon Sep 17 00:00:00 2001 From: Craig Date: Sun, 14 Jan 2024 23:55:51 +0000 Subject: [PATCH] - Upgrades can now setPosition in the screen with doubles - Tidied up translations - Removed Drill recipe --- .../tardis_refined/TardisRefined.java | 1 + .../entity/ControlEntityRenderer.java | 2 +- .../common/capability/upgrades/Upgrade.java | 7 ++-- .../common/entity/ControlEntity.java | 2 -- .../tardis_refined/common/hum/TardisHums.java | 1 + .../tardis_refined/common/items/KeyItem.java | 19 +++++----- .../common/mixin/PortalMixin.java | 7 ++-- .../common/util/TRTeleporter.java | 2 +- .../tardis_refined/constants/ModMessages.java | 3 +- .../constants/NbtConstants.java | 1 + .../registry/fabric/ItemRegistryImpl.java | 4 ++- .../9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e | 4 +-- .../c622617f6fabf890a00b9275cd5f643584a8a2c8 | 4 +-- .../assets/tardis_refined/lang/en_us.json | 1 - .../advancements/recipes/misc/drill.json | 35 ------------------- .../data/tardis_refined/recipes/drill.json | 27 -------------- .../common/data/LangProviderEnglish.java | 6 +--- .../common/data/RecipeProvider.java | 2 +- .../registry/neoforge/ItemRegistryImpl.java | 3 +- 19 files changed, 35 insertions(+), 96 deletions(-) delete mode 100644 forge/src/generated/resources/data/tardis_refined/advancements/recipes/misc/drill.json delete mode 100644 forge/src/generated/resources/data/tardis_refined/recipes/drill.json diff --git a/common/src/main/java/whocraft/tardis_refined/TardisRefined.java b/common/src/main/java/whocraft/tardis_refined/TardisRefined.java index 34cc134d0..553d04e34 100644 --- a/common/src/main/java/whocraft/tardis_refined/TardisRefined.java +++ b/common/src/main/java/whocraft/tardis_refined/TardisRefined.java @@ -30,6 +30,7 @@ public class TardisRefined { public static final boolean KeySummonsItem = false; public static final String MODID = "tardis_refined"; + public static final String NAME = "Tardis Refined"; public static final String PLATFORM_ERROR = "Something has gone critically wrong with platform definitions. Please contact the mod author."; public static final Logger LOGGER = LogUtils.getLogger(); diff --git a/common/src/main/java/whocraft/tardis_refined/client/renderer/entity/ControlEntityRenderer.java b/common/src/main/java/whocraft/tardis_refined/client/renderer/entity/ControlEntityRenderer.java index 4464eacea..36e2162ec 100644 --- a/common/src/main/java/whocraft/tardis_refined/client/renderer/entity/ControlEntityRenderer.java +++ b/common/src/main/java/whocraft/tardis_refined/client/renderer/entity/ControlEntityRenderer.java @@ -44,7 +44,7 @@ public void render(ControlEntity entity, float f, float g, PoseStack poseStack, @Override protected void renderNameTag(ControlEntity entity, Component component, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLightCoords) { - MutableComponent textComponent = Component.literal(component.getString()); + MutableComponent textComponent = component.copy(); textComponent.withStyle(style -> style .applyFormats(ChatFormatting.BOLD, (entity.level().getGameTime() % 60 == 0) ? ChatFormatting.GOLD : ChatFormatting.YELLOW) ); diff --git a/common/src/main/java/whocraft/tardis_refined/common/capability/upgrades/Upgrade.java b/common/src/main/java/whocraft/tardis_refined/common/capability/upgrades/Upgrade.java index 4a60cceed..51ebf9bee 100644 --- a/common/src/main/java/whocraft/tardis_refined/common/capability/upgrades/Upgrade.java +++ b/common/src/main/java/whocraft/tardis_refined/common/capability/upgrades/Upgrade.java @@ -5,6 +5,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; import net.minecraft.world.phys.Vec2; +import net.minecraft.world.phys.Vec3; import org.jetbrains.annotations.Nullable; import whocraft.tardis_refined.common.capability.TardisLevelOperator; @@ -19,7 +20,7 @@ public class Upgrade { private final UpgradeType upgradeType; private int cost = 1; private boolean posSet = false; - private int posX = 0, posY = 0; + private double posX = 0, posY = 0; private final Supplier icon; public enum UpgradeType { @@ -82,11 +83,11 @@ public Upgrade setPosition(int x, int y) { } @Nullable - public Vec2 getScreenPosition() { + public Vec3 getScreenPosition() { if (!this.posSet) { return null; } - return new Vec2(this.posX, this.posY); + return new Vec3(this.posX, this.posY, 0); } @Nullable diff --git a/common/src/main/java/whocraft/tardis_refined/common/entity/ControlEntity.java b/common/src/main/java/whocraft/tardis_refined/common/entity/ControlEntity.java index bb82b777d..32f74002f 100644 --- a/common/src/main/java/whocraft/tardis_refined/common/entity/ControlEntity.java +++ b/common/src/main/java/whocraft/tardis_refined/common/entity/ControlEntity.java @@ -290,8 +290,6 @@ private void handleLeftClick(Player player, ServerLevel serverLevel){ } else { UpgradeHandler upgradeHandler = cap.getUpgradeHandler(); upgradeHandler.addUpgradeXP(5); - upgradeHandler.setUpgradePoints(50000); - serverLevel.addParticle(ParticleTypes.HEART, consoleBlockPos.getX() + 0.5, consoleBlockPos.getY() + 2, consoleBlockPos.getZ() + 0.5, 0, 0.5, 0); } }); diff --git a/common/src/main/java/whocraft/tardis_refined/common/hum/TardisHums.java b/common/src/main/java/whocraft/tardis_refined/common/hum/TardisHums.java index bf40d9469..0073606ff 100644 --- a/common/src/main/java/whocraft/tardis_refined/common/hum/TardisHums.java +++ b/common/src/main/java/whocraft/tardis_refined/common/hum/TardisHums.java @@ -54,6 +54,7 @@ private static void addDefaultHum(HumEntry hum) { DEFAULT_HUMS.put(hum.getIdentifier(), hum); } + /** * Gets a default HumEntry added by Tardis Refined. Useful as a fallback entry. */ diff --git a/common/src/main/java/whocraft/tardis_refined/common/items/KeyItem.java b/common/src/main/java/whocraft/tardis_refined/common/items/KeyItem.java index 4daec836e..e5da112e7 100644 --- a/common/src/main/java/whocraft/tardis_refined/common/items/KeyItem.java +++ b/common/src/main/java/whocraft/tardis_refined/common/items/KeyItem.java @@ -30,6 +30,7 @@ import whocraft.tardis_refined.common.util.Platform; import whocraft.tardis_refined.common.util.PlayerUtil; import whocraft.tardis_refined.constants.ModMessages; +import whocraft.tardis_refined.constants.NbtConstants; import java.util.ArrayList; import java.util.Collections; @@ -58,16 +59,16 @@ public static ItemStack addTardis(ItemStack itemStack, ResourceKey levelR StringTag dim = StringTag.valueOf(levelResourceKey.location().toString()); ListTag keychain; - if (!itemtag.contains("keychain", CompoundTag.TAG_LIST)) { + if (!itemtag.contains(NbtConstants.KEYCHAIN, CompoundTag.TAG_LIST)) { // Create a new keychain tag and add it to the itemtag object keychain = new ListTag(); - itemtag.put("keychain", keychain); + itemtag.put(NbtConstants.KEYCHAIN, keychain); } else { // Get the existing keychain tag from the itemtag object - keychain = itemtag.getList("keychain", Tag.TAG_STRING); + keychain = itemtag.getList(NbtConstants.KEYCHAIN, Tag.TAG_STRING); } - // Add dim to the keychain, whether or not it already exists in the keychain + // Add dim to the keychain, whether it already exists in the keychain keychain.add(dim); itemStack.setTag(itemtag); @@ -77,13 +78,13 @@ public static ItemStack addTardis(ItemStack itemStack, ResourceKey levelR public static void setKeychain(ItemStack itemStack, ArrayList> levels) { CompoundTag nbt = itemStack.getOrCreateTag(); ListTag keychain; - if (!nbt.contains("keychain", CompoundTag.TAG_LIST)) { + if (!nbt.contains(NbtConstants.KEYCHAIN, CompoundTag.TAG_LIST)) { // Create a new keychain tag and add it to the itemtag object keychain = new ListTag(); - nbt.put("keychain", keychain); + nbt.put(NbtConstants.KEYCHAIN, keychain); } else { // Get the existing keychain tag from the itemtag object - keychain = nbt.getList("keychain", Tag.TAG_STRING); + keychain = nbt.getList(NbtConstants.KEYCHAIN, Tag.TAG_STRING); } keychain.clear(); @@ -99,11 +100,11 @@ public static ArrayList> getKeychain(ItemStack itemStack) { CompoundTag nbt = itemStack.getOrCreateTag(); - if (!nbt.contains("keychain")) { + if (!nbt.contains(NbtConstants.KEYCHAIN)) { return new ArrayList<>(); } - ListTag keychain = nbt.getList("keychain", Tag.TAG_STRING); + ListTag keychain = nbt.getList(NbtConstants.KEYCHAIN, Tag.TAG_STRING); ArrayList> levels = new ArrayList<>(); diff --git a/common/src/main/java/whocraft/tardis_refined/common/mixin/PortalMixin.java b/common/src/main/java/whocraft/tardis_refined/common/mixin/PortalMixin.java index f498f8405..1de577711 100644 --- a/common/src/main/java/whocraft/tardis_refined/common/mixin/PortalMixin.java +++ b/common/src/main/java/whocraft/tardis_refined/common/mixin/PortalMixin.java @@ -11,6 +11,7 @@ import whocraft.tardis_refined.common.capability.TardisLevelOperator; import whocraft.tardis_refined.compat.portals.ImmersivePortals; import whocraft.tardis_refined.compat.portals.TardisPortalData; +import whocraft.tardis_refined.constants.NbtConstants; import java.util.UUID; @@ -48,14 +49,14 @@ private void onTick(CallbackInfo ci) { @Inject(method = "addAdditionalSaveData", at = @At(value = "INVOKE", target = "Lqouteall/q_misc_util/my_util/SignalBiArged;emit(Ljava/lang/Object;Ljava/lang/Object;)V", shift = At.Shift.AFTER), remap = true) private void addTARDISData(CompoundTag compoundTag, CallbackInfo ci) { if (tardisID != null) { - compoundTag.putUUID("tardis_id", tardisID); + compoundTag.putUUID(NbtConstants.TARDIS_ID, tardisID); } } @Inject(method = "readAdditionalSaveData", at = @At(value = "INVOKE", target = "Lqouteall/q_misc_util/my_util/SignalBiArged;emit(Ljava/lang/Object;Ljava/lang/Object;)V", shift = At.Shift.AFTER), remap = true) private void readTARDISData(CompoundTag compoundTag, CallbackInfo ci) { - if (compoundTag.contains("tardis_id")) { - tardisID = compoundTag.getUUID("tardis_id"); + if (compoundTag.contains(NbtConstants.TARDIS_ID)) { + tardisID = compoundTag.getUUID(NbtConstants.TARDIS_ID); } } } diff --git a/common/src/main/java/whocraft/tardis_refined/common/util/TRTeleporter.java b/common/src/main/java/whocraft/tardis_refined/common/util/TRTeleporter.java index d8eabd372..3230ecf70 100644 --- a/common/src/main/java/whocraft/tardis_refined/common/util/TRTeleporter.java +++ b/common/src/main/java/whocraft/tardis_refined/common/util/TRTeleporter.java @@ -123,7 +123,7 @@ public static boolean safetyCheck(Entity pEntity, ServerLevel destination, doubl int zRound = (int) pZ; BlockPos blockpos = new BlockPos(xRound, yRound, zRound); - if (teleportedEntities.size() != 0){ + if (!teleportedEntities.isEmpty()){ if (teleportedEntities.contains(pEntity)){ //If we are calling this method by itself such as teleporting passengers, check if we have already teleported the entity return false; } diff --git a/common/src/main/java/whocraft/tardis_refined/constants/ModMessages.java b/common/src/main/java/whocraft/tardis_refined/constants/ModMessages.java index 48b99edd6..966d50298 100644 --- a/common/src/main/java/whocraft/tardis_refined/constants/ModMessages.java +++ b/common/src/main/java/whocraft/tardis_refined/constants/ModMessages.java @@ -6,10 +6,11 @@ public class ModMessages { /* Related Links*/ - public static String GITHUB_RELEASE_PAGE = "https://github.com/CommandrMoose/TardisRefined/releases"; + public static String GITHUB_RELEASE_PAGE = "https://github.com/Suff99/TardisRefined/releases"; /*Item Special cases*/ public static String ITEM_KEYCHAIN = "item."+ TardisRefined.MODID + ".keychain"; + public static String ITEM_GROUP = "itemGroup."+ TardisRefined.MODID; /*Messages*/ public static String MSG_EXTERIOR_COOLDOWN = message("exterior_cooldown"); diff --git a/common/src/main/java/whocraft/tardis_refined/constants/NbtConstants.java b/common/src/main/java/whocraft/tardis_refined/constants/NbtConstants.java index c79897b99..dcf00beed 100644 --- a/common/src/main/java/whocraft/tardis_refined/constants/NbtConstants.java +++ b/common/src/main/java/whocraft/tardis_refined/constants/NbtConstants.java @@ -68,6 +68,7 @@ public class NbtConstants { public static final String LOCATION_ROTATION = "_location_rotation"; public static final String LOCATION_DIMENSION_MODID = "_location_dimension_id"; public static final String LOCATION_DIMENSION_PATH = "_location_dimension_path"; + public static final String KEYCHAIN = "keychain"; public static TardisNavLocation getTardisNavLocation(CompoundTag tag, String prefix, TardisLevelOperator operator) { diff --git a/fabric/src/main/java/whocraft/tardis_refined/registry/fabric/ItemRegistryImpl.java b/fabric/src/main/java/whocraft/tardis_refined/registry/fabric/ItemRegistryImpl.java index ad4ad2053..7242287ee 100644 --- a/fabric/src/main/java/whocraft/tardis_refined/registry/fabric/ItemRegistryImpl.java +++ b/fabric/src/main/java/whocraft/tardis_refined/registry/fabric/ItemRegistryImpl.java @@ -5,6 +5,8 @@ import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; +import whocraft.tardis_refined.TardisRefined; +import whocraft.tardis_refined.constants.ModMessages; import whocraft.tardis_refined.registry.BlockRegistry; import whocraft.tardis_refined.registry.ItemRegistry; import whocraft.tardis_refined.registry.RegistrySupplier; @@ -15,7 +17,7 @@ public class ItemRegistryImpl { for (RegistrySupplier item : ItemRegistry.TAB_ITEMS) { entries.accept(item.get()); } - }).title(Component.literal("TARDIS Refined")).build(); + }).title(Component.translatable(ModMessages.ITEM_GROUP)).build(); public static CreativeModeTab getCreativeTab() { return ITEM_GROUP; diff --git a/forge/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e b/forge/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e index 98e8dbb41..c3be9b81b 100644 --- a/forge/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e +++ b/forge/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e @@ -1,7 +1,6 @@ -// 1.20.2 2024-01-01T17:33:21.0627898 Recipes +// 1.20.2 2024-01-14T23:53:42.4627587 Recipes 8719cd0f4220434f5c4e19b250d9baf0b7962d26 data/tardis_refined/advancements/recipes/misc/bulk_head_door.json 8269c68dc027027860af7f3e0ffac15e933a3fe7 data/tardis_refined/advancements/recipes/misc/console_configuration.json -d920b09dc43fa8d136406e6e132abfb8f6edcacc data/tardis_refined/advancements/recipes/misc/drill.json 9ec080eb7996f790d97817418ce0ee1600744ad9 data/tardis_refined/advancements/recipes/misc/flight_detector.json 3517c6c5d953a58d80a1fb7b27b107811b494061 data/tardis_refined/advancements/recipes/misc/landing_pad.json c4dd71075e63198517197c864403feb215e88940 data/tardis_refined/advancements/recipes/misc/pattern_manipulator.json @@ -10,7 +9,6 @@ c4dd25640e0a886e45c91898700a2c35fdb92074 data/tardis_refined/advancements/recipe 7dee5b3df1d2cbe4c056edfcb5aab5054102a4ac data/tardis_refined/advancements/recipes/misc/terraformer.json d400b9f20cbd1dc0bc11a850635fa28b966ff7d5 data/tardis_refined/recipes/bulk_head_door.json 4666b8617b9a065d2c926af0f7fb6821ed0c1b20 data/tardis_refined/recipes/console_configuration.json -d1e2989b203305af597e11a55886a4758c149e8d data/tardis_refined/recipes/drill.json aeff2b97cf7999f3ce94958e601a9de47a063e64 data/tardis_refined/recipes/flight_detector.json abf11434010283396343e74ef6aec49e1c020d50 data/tardis_refined/recipes/landing_pad.json 35b8e0b89942aac1d2f8d6f5d967e521f7660d95 data/tardis_refined/recipes/pattern_manipulator.json diff --git a/forge/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 b/forge/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 index b23cf3133..431c6785f 100644 --- a/forge/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 +++ b/forge/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 @@ -1,2 +1,2 @@ -// 1.20.2 2024-01-04T14:11:23.4542146 Languages: en_us -915e4cb02a088556cc10e98579c2d3af6b233d85 assets/tardis_refined/lang/en_us.json +// 1.20.2 2024-01-11T20:27:20.9453178 Languages: en_us +d823821308366c43506d49e6b70cbd3f33be891c assets/tardis_refined/lang/en_us.json diff --git a/forge/src/generated/resources/assets/tardis_refined/lang/en_us.json b/forge/src/generated/resources/assets/tardis_refined/lang/en_us.json index 80d88b5c7..922d598a2 100644 --- a/forge/src/generated/resources/assets/tardis_refined/lang/en_us.json +++ b/forge/src/generated/resources/assets/tardis_refined/lang/en_us.json @@ -57,7 +57,6 @@ "item.tardis_refined.pattern_manipulator": "Pattern Manipulator", "item.tardis_refined.tardis_key": "Tardis Key", "itemGroup.tardis_refined": "Tardis Refined", - "itemGroup.tardis_refined.tardis_refined": "Tardis Refined", "message.tardis_refined.exterior_cooldown": "You must wait %s seconds", "message.tardis_refined.key_bound": "Key Bound to %s", "message.tardis_refined.key_cycled": "Main: %s", diff --git a/forge/src/generated/resources/data/tardis_refined/advancements/recipes/misc/drill.json b/forge/src/generated/resources/data/tardis_refined/advancements/recipes/misc/drill.json deleted file mode 100644 index 16c3f4c83..000000000 --- a/forge/src/generated/resources/data/tardis_refined/advancements/recipes/misc/drill.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "criteria": { - "has_crafting_table": { - "conditions": { - "items": [ - { - "items": [ - "minecraft:redstone" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "tardis_refined:drill" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_the_recipe", - "has_crafting_table" - ] - ], - "rewards": { - "recipes": [ - "tardis_refined:drill" - ] - }, - "sends_telemetry_event": false -} \ No newline at end of file diff --git a/forge/src/generated/resources/data/tardis_refined/recipes/drill.json b/forge/src/generated/resources/data/tardis_refined/recipes/drill.json deleted file mode 100644 index 11f13dc20..000000000 --- a/forge/src/generated/resources/data/tardis_refined/recipes/drill.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "category": "misc", - "key": { - "C": { - "item": "minecraft:cobblestone" - }, - "I": { - "item": "minecraft:iron_ingot" - }, - "P": { - "item": "minecraft:iron_pickaxe" - }, - "R": { - "item": "minecraft:redstone" - } - }, - "pattern": [ - " P ", - "PCP", - "IRI" - ], - "result": { - "item": "tardis_refined:drill" - }, - "show_notification": true -} \ No newline at end of file diff --git a/forge/src/main/java/whocraft/tardis_refined/common/data/LangProviderEnglish.java b/forge/src/main/java/whocraft/tardis_refined/common/data/LangProviderEnglish.java index 9eefe4972..dddf408a7 100644 --- a/forge/src/main/java/whocraft/tardis_refined/common/data/LangProviderEnglish.java +++ b/forge/src/main/java/whocraft/tardis_refined/common/data/LangProviderEnglish.java @@ -63,6 +63,7 @@ protected void addTranslations() { add(ItemRegistry.KEY.get(), "Tardis Key"); add(ItemRegistry.DRILL.get(), "Growth Drill"); add(ModMessages.ITEM_KEYCHAIN, "Tardis Keyset"); + add(ModMessages.ITEM_GROUP, "Tardis Refined"); /*Entity*/ add(EntityRegistry.CONTROL_ENTITY.get(), "Generic Control"); @@ -111,11 +112,6 @@ protected void addTranslations() { add(ModMessages.CMD_ARG_DESKTOP_INVALID, "Invalid Desktop of ID %s"); add(ModMessages.CMD_ARG_SHELL_INVALID, "Invalid Shell of ID %s"); - - /*Creative Tab*/ - add("itemGroup.tardis_refined.tardis_refined", "Tardis Refined"); - add("itemGroup.tardis_refined", "Tardis Refined"); - /*GUI*/ add(ModMessages.UI_MONITOR_MAIN_TITLE, "COMPUTER BANK"); add(ModMessages.UI_MONITOR_WAYPOINTS, "WAYPOINTS"); diff --git a/forge/src/main/java/whocraft/tardis_refined/common/data/RecipeProvider.java b/forge/src/main/java/whocraft/tardis_refined/common/data/RecipeProvider.java index e836680b9..f819fe41a 100644 --- a/forge/src/main/java/whocraft/tardis_refined/common/data/RecipeProvider.java +++ b/forge/src/main/java/whocraft/tardis_refined/common/data/RecipeProvider.java @@ -27,7 +27,7 @@ protected void buildRecipes(RecipeOutput consumer) { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, BlockRegistry.BULK_HEAD_DOOR.get()).pattern(" L ").pattern("PDP").pattern("RDR").define('L', Blocks.REDSTONE_LAMP).define('P', Blocks.PISTON).define('D', Blocks.IRON_DOOR).define('R', Blocks.REDSTONE_WIRE).unlockedBy("has_crafting_table", has(Blocks.TARGET)).save(consumer); ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ItemRegistry.PATTERN_MANIPULATOR.get()).pattern("RCL").pattern("EAE").pattern(" S ").define('S', Items.STICK).define('E', Items.REDSTONE).define('A', Items.IRON_INGOT).define('R', Items.RED_DYE).define('C', Items.GREEN_DYE).define('L', Items.LAPIS_LAZULI).unlockedBy("has_crafting_table", has(BlockRegistry.CONSOLE_CONFIGURATION_BLOCK.get())).save(consumer); - ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ItemRegistry.DRILL.get()).pattern(" P ").pattern("PCP").pattern("IRI").define('P', Items.IRON_PICKAXE).define('R', Items.REDSTONE).define('I', Items.IRON_INGOT).define('C', Items.COBBLESTONE).unlockedBy("has_crafting_table", has(Items.REDSTONE)).save(consumer); + // Commented because it really has no use anymore; ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ItemRegistry.DRILL.get()).pattern(" P ").pattern("PCP").pattern("IRI").define('P', Items.IRON_PICKAXE).define('R', Items.REDSTONE).define('I', Items.IRON_INGOT).define('C', Items.COBBLESTONE).unlockedBy("has_crafting_table", has(Items.REDSTONE)).save(consumer); ShapedRecipeBuilder.shaped(RecipeCategory.MISC, BlockRegistry.FLIGHT_DETECTOR.get()).pattern("G G").pattern("IDI").pattern("III").define('G', Items.GOLD_INGOT).define('I', Items.IRON_INGOT).define('D', Blocks.DAYLIGHT_DETECTOR).unlockedBy("has_daylight_detector", has(Blocks.DAYLIGHT_DETECTOR)).save(consumer); ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ItemRegistry.KEY.get()).requires(Items.IRON_INGOT).requires(Items.TRIPWIRE_HOOK).unlockedBy("has_crafting_table", has(Blocks.TRIPWIRE_HOOK)).save(consumer); diff --git a/forge/src/main/java/whocraft/tardis_refined/registry/neoforge/ItemRegistryImpl.java b/forge/src/main/java/whocraft/tardis_refined/registry/neoforge/ItemRegistryImpl.java index cdeffaa6f..5936fab3a 100644 --- a/forge/src/main/java/whocraft/tardis_refined/registry/neoforge/ItemRegistryImpl.java +++ b/forge/src/main/java/whocraft/tardis_refined/registry/neoforge/ItemRegistryImpl.java @@ -3,11 +3,12 @@ import net.minecraft.network.chat.Component; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.ItemStack; +import whocraft.tardis_refined.constants.ModMessages; import whocraft.tardis_refined.registry.BlockRegistry; public class ItemRegistryImpl { public static CreativeModeTab getCreativeTab() { - return CreativeModeTab.builder().title(Component.translatable("Tardis Refined")).icon(() -> new ItemStack(BlockRegistry.GLOBAL_CONSOLE_BLOCK.get())).build(); + return CreativeModeTab.builder().title(Component.translatable(ModMessages.ITEM_GROUP)).icon(() -> new ItemStack(BlockRegistry.GLOBAL_CONSOLE_BLOCK.get())).build(); } } \ No newline at end of file