Mega_jeux

Bugs with tooltip

Oct 23rd, 2023
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. package fr.exillium.exilliummodv1.init.items;
  2.  
  3. import fr.exillium.exilliummodv1.ExilliumMod;
  4. import fr.exillium.exilliummodv1.init.addInformation;
  5. import fr.exillium.exilliummodv1.init.tabs.forguitab;
  6. import net.minecraft.client.util.ITooltipFlag;
  7. import net.minecraft.item.Item;
  8. import net.minecraft.item.ItemStack;
  9. import net.minecraft.item.Rarity;
  10. import net.minecraft.util.text.ITextComponent;
  11. import net.minecraft.util.text.StringTextComponent;
  12. import net.minecraft.world.World;
  13. import net.minecraftforge.fml.RegistryObject;
  14. import net.minecraftforge.registries.DeferredRegister;
  15. import net.minecraftforge.registries.ForgeRegistries;
  16.  
  17. import javax.annotation.Nullable;
  18. import java.util.List;
  19.  
  20. public class BronzeClassementItem extends Item{
  21. public BronzeClassementItem(Properties properties) {
  22. super(properties);
  23. }
  24.  
  25. public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, ExilliumMod.MODID);
  26.  
  27. public static final RegistryObject<Item> BRONZE_CLASSEMENT = ITEMS.register("bronze_classement", () -> new Item(new Item.Properties().stacksTo(64).tab(forguitab.FORGUI_TAB).rarity(Rarity.EPIC)));
  28.  
  29.  
  30. @Override
  31. public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
  32. super.addInformation(stack, worldIn, tooltip, flagIn);
  33. tooltip.add(new StringTextComponent("Votre texte ici"));
  34. }
  35. }
  36.  
Advertisement
Add Comment
Please, Sign In to add comment