Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

(1.17.1 Forge) How To Add A New Pickaxe,Axe,Shovel And Hoe


technokraken
 Share

Recommended Posts

here is my script if u wanna see it, u can just send a working one back if u have time, it would be really nice if u could because im pretty new at java scripting

 

Script

package  com.technokraken.ct.citrine;

import com.technokraken.ct.citrine.block.ModBlocks;
import com.technokraken.ct.citrine.item.ModItems;
import com.technokraken.ct.citrine.item.ToolMaterialInit;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.*;
import net.minecraft.world.level.block.Blocks;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.TierSortingRegistry;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.List;

// The value here should match an entry in the META-INF/mods.toml file
@Mod(Citrine.MOD_ID)
public class Citrine {
    public static final String MOD_ID = "ct";

    // Directly reference a log4j logger.
    private static final Logger LOGGER = LogManager.getLogger();

    public Citrine() {
        IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus();

        ModItems.register(eventBus);
        ModBlocks.register(eventBus);

        eventBus.addListener(this::setup);

        MinecraftForge.EVENT_BUS.register(this);
        }

    private void setup(final FMLCommonSetupEvent event)
    {
        TierSortingRegistry.registerTier(BLIZZARDED, Citrine.MOD_ID, 3, 4);

        // some preinit code
        LOGGER.info("HELLO FROM PREINIT");
        LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName());
    }
}
Edited by technokraken
Link to comment
Share on other sites

18 minutes ago, Luis_ST said:
  • your Tier
  • a ResourceLocation the name combined with your mod id
  • a List of Tiers (the Vanilla) which should be lesser than your Tier
  • a List of Tiers (the Vanilla) which should be better than your Tier

do you know basic java, since a String != ResourceLocation and int != List?

Link to comment
Share on other sites

school.png.a58795bbce3dc20cf0860bb3501362fd.png

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • 1st -> https://www.curseforge.com/minecraft/mc-mods/general-disasters-1-0-1-12-2 2nd ->https://minecraftpatch.com/deadly-disasters-415551  
    • help me find in which version my mods work
    • MC Version-1.16.5-(I understand its old but the mods that are important to me haven't been updated to 1.18) Forge Version- 36.2.20 Updated all my mods and my forge version because I was having a problem with lag and now I cant even make a world because it just throws this error at me I think it might be a compatibility but I'm pretty dumb so.......   Debug-https://gist.github.com/keepinitreal247/cf97ca2dede43ce3171fd89a490f20ba
    • Hello, I am having some difficulty loading the mods I want to play with into the game. The mod is question is Litematica, (with malilib), I have downloaded both for 1.18.1 and am using the 1.18.1 Minecraft forge loader. Both mods have been moved into the mods folder but will still not show up under the Mods tab when I load up the game. Both mods have the listed type as "Executable Jar File," so I'm not sure why it isn't working. I have played with mods in different versions of the game, but have cleared them all out as they weren't ones I was using anymore, so I know it has worked before.  Some more information to note: I am trying to to load the mod into a world that I have been playing on for a bit, (solely 1.18, but I have some projects lined up here having a schematic is helpful), but I don't see that as being the reason it isn't working; I have some Vanilla tweaks resource packs loaded onto the same world; I am playing on a laptop, but it serves me well and as I said, mods have worked on it before and some larger modpacks as well, (those have been cleared off my hard drive so storage shouldn't be a problem).  I have tried everything I could think of, but it still hasn't worked: restarting and updating my laptop, signing out and back into the Minecraft launcher, downloading/installing the mods and forge in different orders, clearing out the previously used mods from the mod folder, etc.  Everything I could find online was advice for other versions, so I have no clue where to go from here.  Thank you in advance for your help.
    • Hello, I run a server on Apex and have found that every time we close out of the client and log back in, all our keys bindings are reset. It's terribly annoying. I removed mods one by one and they did not seem to cause the issue. Had tech support check the server, and nothing. It does not occur on my 1.16.5 server (run with forge). I am thinking it is a bug with the current forge. There is no error code I can see, it just resets all the keybindings. Any fixes? 
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.