From fd0b2f691081acead7aa380a1db08e9372649359 Mon Sep 17 00:00:00 2001 From: nickid2018 Date: Thu, 5 Sep 2024 14:34:12 +0800 Subject: [PATCH] 23w46a: Potion getName->name --- .../io/github/nickid2018/genwiki/InitializeEnvironment.java | 3 +++ .../nickid2018/genwiki/autovalue/EntityDataExtractor.java | 2 +- .../main/java/net/minecraft/world/item/alchemy/Potion.java | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/github/nickid2018/genwiki/InitializeEnvironment.java b/src/main/java/io/github/nickid2018/genwiki/InitializeEnvironment.java index 22f4451..5c85adc 100644 --- a/src/main/java/io/github/nickid2018/genwiki/InitializeEnvironment.java +++ b/src/main/java/io/github/nickid2018/genwiki/InitializeEnvironment.java @@ -167,6 +167,9 @@ public static void downloadAssetsIndex(File index) throws IOException { } } log.info("Downloading assets..."); + log.info("Following files will be downloaded:"); + for (String name : collectedFiles.keySet()) + log.info("- {}", name); WebUtils.downloadInBatch(collectedFiles); } diff --git a/src/main/java/io/github/nickid2018/genwiki/autovalue/EntityDataExtractor.java b/src/main/java/io/github/nickid2018/genwiki/autovalue/EntityDataExtractor.java index c08bb7d..c327714 100644 --- a/src/main/java/io/github/nickid2018/genwiki/autovalue/EntityDataExtractor.java +++ b/src/main/java/io/github/nickid2018/genwiki/autovalue/EntityDataExtractor.java @@ -117,7 +117,7 @@ public static void extractEntityData(MinecraftServer serverObj) { POTION_EFFECT.put( potionEffectID, - Potion.getName(BuiltInRegistries.POTION.get(potionEffectKey), "") + BuiltInRegistries.POTION.getValue(potionEffectKey).name() ); for (MobEffectInstance effectInstance : potionEffect.getEffects()) { diff --git a/wrapped-mc/src/main/java/net/minecraft/world/item/alchemy/Potion.java b/wrapped-mc/src/main/java/net/minecraft/world/item/alchemy/Potion.java index f6dc1cc..00bb3c7 100644 --- a/wrapped-mc/src/main/java/net/minecraft/world/item/alchemy/Potion.java +++ b/wrapped-mc/src/main/java/net/minecraft/world/item/alchemy/Potion.java @@ -9,8 +9,8 @@ public class Potion { - public static String getName(Optional> optional, String string) { - return SneakyUtil.sneakyNotNull(); + public String name() { + throw new RuntimeException(); } public List getEffects() {