Deprecate some items, remove gem requested things

This commit is contained in:
Zontreck 2024-02-15 17:03:46 -07:00
parent 6b9b909644
commit 70a68dd25d
69 changed files with 147 additions and 822 deletions

View file

@ -0,0 +1,46 @@
package dev.zontreck.otemod.items;
import dev.zontreck.libzontreck.util.ChatHelpers;
import net.minecraft.network.chat.Component;
import net.minecraft.world.food.FoodProperties;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.Level;
import java.util.List;
public class DeprecatedItem extends Item
{
public DeprecatedItem()
{
super(new Properties().fireResistant());
}
@Override
public boolean isEdible() {
return true;
}
@Override
public boolean isFoil(ItemStack p_41453_) {
return true;
}
/**
* This is to give a use to an otherwise useless item. The piglins will exchange the item and it gets removed in that way.
* @param stack
* @return
*/
@Override
public boolean isPiglinCurrency(ItemStack stack) {
return true;
}
@Override
public void appendHoverText(ItemStack p_41421_, Level p_41422_, List<Component> p_41423_, TooltipFlag p_41424_) {
p_41423_.add(ChatHelpers.macro("!Dark_Red!This item is deprecated"));
p_41423_.add(ChatHelpers.macro("!Dark_Green!It would appear this item smells faintly of gold. Maybe piglins will accept it?"));
p_41423_.add(ChatHelpers.macro("!Dark_Red!This item is scheduled for removal in a future version. You should use it before it is too late."));
}
}

View file

@ -0,0 +1,26 @@
package dev.zontreck.otemod.items;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.implementation.CreativeModeTabs;
import net.minecraft.world.item.Item;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
public class DeprecatedModItems
{
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, OTEMod.MOD_ID);
public static final RegistryObject<Item> ILUSIUM_ORE = CreativeModeTabs.addToOTEModTab(ITEMS.register("ilusium_ore", () -> new DeprecatedItem()));
public static final RegistryObject<Item> ILUSIUM_ROD = CreativeModeTabs.addToOTEModTab(ITEMS.register("ilusium_rod", () -> new DeprecatedItem()));
public static final RegistryObject<Item> ILUSIUM_INGOT = CreativeModeTabs.addToOTEModTab(ITEMS.register("ilusium_ingot", () -> new DeprecatedItem()));
public static final RegistryObject<Item> AURORA_COMPOUND = CreativeModeTabs.addToOTEModTab(ITEMS.register("aurora_compound", () -> new DeprecatedItem()));
public static void register(IEventBus bus){
ITEMS.register(bus);
}
}

View file

@ -18,7 +18,6 @@ public class ModItems {
public static final RegistryObject<Item> IHAN_CRYSTAL = CreativeModeTabs.addToOTEModTab(ITEMS.register("ihan_crystal", () -> new Item(new Item.Properties())));
public static final RegistryObject<Item> AURORA_COMPOUND = CreativeModeTabs.addToOTEModTab(ITEMS.register("aurora_compound", () -> new Item(new Item.Properties())));
public static final RegistryObject<Item> ETERNIUM_RAW_ORE = CreativeModeTabs.addToOTEModTab(ITEMS.register("eternium_ore", () -> new Item(new Item.Properties())));
@ -58,15 +57,11 @@ public class ModItems {
public static final RegistryObject<Item> POSS_BALL = CreativeModeTabs.addToOTEModTab(ITEMS.register("poss_ball", () -> new PossBallItem(new Item.Properties())));
public static final RegistryObject<Item> ILUSIUM_ORE = CreativeModeTabs.addToOTEModTab(ITEMS.register("ilusium_ore", () -> new Item(new Item.Properties().fireResistant())));
public static final RegistryObject<Item> ILUSIUM_ROD = CreativeModeTabs.addToOTEModTab(ITEMS.register("ilusium_rod", () -> new Item(new Item.Properties().fireResistant())));
//public static final RegistryObject<Item> ILUSIUM_DUST = CreativeModeTabs.addToOTEModTab(ITEMS.register("ilusium_dust", () -> new Item(new Item.Properties().fireResistant())));
public static final RegistryObject<Item> ILUSIUM_INGOT = CreativeModeTabs.addToOTEModTab(ITEMS.register("ilusium_ingot", () -> new Item(new Item.Properties().fireResistant())));
public static final RegistryObject<Item> EMPTY_SPAWN_EGG = CreativeModeTabs.addToOTEModTab(ITEMS.register("empty_spawn_egg", () -> new Item(new Item.Properties())));
public static final RegistryObject<Item> GENERIC_DEPRECATED_ITEM = CreativeModeTabs.addToOTEModTab(ITEMS.register("deprecated", ()->new DeprecatedItem()));
//public static final RegistryObject<Item> POSSUM_SPAWN_EGG = ITEMS.register("possum_spawn_egg", () -> new ForgeSpawnEggItem(ModEntityTypes.POSSUM, 0x938686, 0xc68787, new Item.Properties())));