Add note to Random Armor Trim indicating it does not drop Netherite Upgrade template

This commit is contained in:
thedarkcolour 2024-06-08 13:42:48 -07:00
parent 0b3deeca85
commit bcc67f56ba
No known key found for this signature in database
GPG Key ID: 6599A8E0516C8F38
6 changed files with 20 additions and 6 deletions

View File

@ -1,2 +1,2 @@
// 1.20.1 2024-04-20T15:13:41.4429506 ModKit Language: en_us for mod 'exdeorum'
760daccf3437be3aadf5d4a9ba00363f1ded5430 assets/exdeorum/lang/en_us.json
// 1.20.1 2024-06-08T13:01:18.8550278 ModKit Language: en_us for mod 'exdeorum'
471aa53a5fdaafa9b4b4e2e4c8d72341afd6c154 assets/exdeorum/lang/en_us.json

View File

@ -275,6 +275,7 @@
"item.exdeorum.porcelain_water_bucket": "Porcelain Water Bucket",
"item.exdeorum.porcelain_witch_water_bucket": "Porcelain Witch Water Bucket",
"item.exdeorum.random_armor_trim": "Random Armor Trim",
"item.exdeorum.random_armor_trim.no_upgrade": "Note: Does not drop Netherite Upgrade template",
"item.exdeorum.random_pottery_sherd": "Random Pottery Sherd",
"item.exdeorum.sculk_core": "Sculk Core",
"item.exdeorum.silk_worm": "Silk Worm",

View File

@ -338,7 +338,7 @@ public abstract class AbstractCrucibleBlockEntity extends EBlockEntity {
level.getLightEngine().checkBlock(crucible.worldPosition);
crucible.needsLightUpdate = false;
}
// Update twice per tick
// Update twice per second
if (!level.isClientSide) {
var tank = crucible.tank;

View File

@ -33,6 +33,9 @@ public class TranslationKeys {
// Blocks
public static final String INFESTED_LEAVES_FULLY_INFESTED = "block." + ExDeorum.ID + ".infested_leaves.fully_infested";
// Items
public static final String RANDOM_TRIM_DOES_NOT_CONTAIN_UPGRADE = "item." + ExDeorum.ID + ".random_armor_trim.no_upgrade";
// Advancements
public static final String ROOT_ADVANCEMENT_TITLE = "advancements." + ExDeorum.ID + ".core.root.title";
public static final String ROOT_ADVANCEMENT_DESCRIPTION = "advancements." + ExDeorum.ID + ".core.root.description";

View File

@ -19,8 +19,10 @@
package thedarkcolour.exdeorum.item;
import com.google.common.collect.Lists;
import net.minecraft.ChatFormatting;
import net.minecraft.Util;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.network.chat.Component;
import net.minecraft.tags.ItemTags;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResultHolder;
@ -28,7 +30,10 @@ import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.Level;
import org.jetbrains.annotations.Nullable;
import thedarkcolour.exdeorum.data.TranslationKeys;
import java.util.ArrayList;
import java.util.List;
@ -73,7 +78,7 @@ public abstract class RandomResultItem extends Item {
}
}
public static class RandomSandyArmorTrim extends RandomResultItem {
public static class RandomArmorTrim extends RandomResultItem {
public static final List<Item> POSSIBLE_TRIMS = Lists.newArrayList(
Items.WAYFINDER_ARMOR_TRIM_SMITHING_TEMPLATE,
Items.SHAPER_ARMOR_TRIM_SMITHING_TEMPLATE,
@ -89,7 +94,7 @@ public abstract class RandomResultItem extends Item {
Items.WILD_ARMOR_TRIM_SMITHING_TEMPLATE
);
public RandomSandyArmorTrim(Properties properties) {
public RandomArmorTrim(Properties properties) {
super(properties);
}
@ -97,5 +102,10 @@ public abstract class RandomResultItem extends Item {
protected List<Item> getPossibilities() {
return POSSIBLE_TRIMS;
}
@Override
public void appendHoverText(ItemStack pStack, @Nullable Level pLevel, List<Component> tooltip, TooltipFlag pIsAdvanced) {
tooltip.add(Component.translatable(TranslationKeys.RANDOM_TRIM_DOES_NOT_CONTAIN_UPGRADE).withStyle(ChatFormatting.DARK_GRAY));
}
}
}

View File

@ -118,7 +118,7 @@ public class EItems {
public static final RegistryObject<Item> CRIMSON_NYLIUM_SPORES = ITEMS.register("crimson_nylium_spores", () -> new NyliumSpreaderItem(props(), Blocks.CRIMSON_NYLIUM::defaultBlockState));
public static final RegistryObject<Item> SCULK_CORE = ITEMS.register("sculk_core", () -> new SculkCoreItem(props().stacksTo(1)));
public static final RegistryObject<Item> RANDOM_POTTERY_SHERD = ITEMS.register("random_pottery_sherd", () -> new RandomResultItem.RandomSherd(props()));
public static final RegistryObject<Item> RANDOM_ARMOR_TRIM = ITEMS.register("random_armor_trim", () -> new RandomResultItem.RandomSandyArmorTrim(props()));
public static final RegistryObject<Item> RANDOM_ARMOR_TRIM = ITEMS.register("random_armor_trim", () -> new RandomResultItem.RandomArmorTrim(props()));
public static final RegistryObject<Item> WOOD_CHIPPINGS = registerSimpleItem("wood_chippings");
// Buckets