Jump to content

[1.7.10] Is there a way to make an item totally inaccessible to the player?


Recommended Posts

Posted

I have a few technical blocks and items in my mod that I would like to prevent from being spawnable via mods like NEI and ideally via commands as well. Is there any way to make this possible?

Posted

Not setting them on some Creative Tab will make them invisible to NEI but they would still be able to get them using the /give command.

 

What you can do is not register the items on the public version of your mod.

 

Perhaps you can have a variable like "HiddenItems = true" and leave it like that for when you compile the Mod for your testings and when you going to compile the version for distribution, set that to "false"

 

I think that could work.

 

 

Posted

I've done all that - they still appear in NEI.

 

public static boolean hiddenItems = true; // Set to false when making the public compile

if (hiddenItems == true) { GameRegistry.registerItem(name, "Name"); } else { }

 

If you don't register the item, it shouldn't show.

Posted

So I've looked at ScratchForFun's tutorial on the NEI API and did everything as he did - but I get an error.

 

[20:35:25] [main/WARN] [FML]: The coremod codechicken.nei.asm.NEICorePlugin does not have a MCVersion annotation, it may cause issues with this version of Minecraft

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: java.lang.NoClassDefFoundError: codechicken/lib/asm/ASMInit

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at codechicken.nei.asm.NEICorePlugin.<init>(NEICorePlugin.java:18)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.Constructor.newInstance(Unknown Source)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.Class.newInstance(Unknown Source)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.relauncher.CoreModManager.loadCoreMod(CoreModManager.java:458)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.relauncher.CoreModManager.handleLaunch(CoreModManager.java:212)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.relauncher.FMLLaunchHandler.setupHome(FMLLaunchHandler.java:90)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.relauncher.FMLLaunchHandler.setupClient(FMLLaunchHandler.java:67)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.relauncher.FMLLaunchHandler.configureForClientLaunch(FMLLaunchHandler.java:34)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.launcher.FMLTweaker.injectIntoClassLoader(FMLTweaker.java:126)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.launchwrapper.Launch.launch(Launch.java:115)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at GradleStart.main(Unknown Source)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: Caused by: java.lang.ClassNotFoundException: codechicken.lib.asm.ASMInit

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.ClassLoader.loadClass(Unknown Source)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.ClassLoader.loadClass(Unknown Source)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: ... 16 more

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: Caused by: java.lang.NullPointerException

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: ... 18 more

[20:35:25] [main/ERROR] [FML]: An error occurred trying to configure the minecraft home at C:\Users\finneyt\Documents\My Games\forge-1.7.10-10.13.2.1291-src\eclipse\. for Forge Mod Loader

java.lang.NoClassDefFoundError: codechicken/lib/asm/ASMInit

at codechicken.nei.asm.NEICorePlugin.<init>(NEICorePlugin.java:18) ~[NotEnoughItems-1.7.10-1.0.3.74-dev.jar:?]

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_45]

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_45]

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_45]

at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_45]

at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_45]

at cpw.mods.fml.relauncher.CoreModManager.loadCoreMod(CoreModManager.java:458) ~[forgeSrc-1.7.10-10.13.2.1291.jar:?]

at cpw.mods.fml.relauncher.CoreModManager.handleLaunch(CoreModManager.java:212) ~[forgeSrc-1.7.10-10.13.2.1291.jar:?]

at cpw.mods.fml.relauncher.FMLLaunchHandler.setupHome(FMLLaunchHandler.java:90) [forgeSrc-1.7.10-10.13.2.1291.jar:?]

at cpw.mods.fml.relauncher.FMLLaunchHandler.setupClient(FMLLaunchHandler.java:67) [forgeSrc-1.7.10-10.13.2.1291.jar:?]

at cpw.mods.fml.relauncher.FMLLaunchHandler.configureForClientLaunch(FMLLaunchHandler.java:34) [forgeSrc-1.7.10-10.13.2.1291.jar:?]

at cpw.mods.fml.common.launcher.FMLTweaker.injectIntoClassLoader(FMLTweaker.java:126) [forgeSrc-1.7.10-10.13.2.1291.jar:?]

at net.minecraft.launchwrapper.Launch.launch(Launch.java:115) [launchwrapper-1.11.jar:?]

at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]

at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]

at GradleStart.main(Unknown Source) [start/:?]

Caused by: java.lang.ClassNotFoundException: codechicken.lib.asm.ASMInit

at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.11.jar:?]

at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_45]

at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_45]

... 16 more

Caused by: java.lang.NullPointerException

at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.11.jar:?]

at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_45]

at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_45]

... 16 more

Exception in thread "main" [20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: java.lang.NoClassDefFoundError: codechicken/lib/asm/ASMInit

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at codechicken.nei.asm.NEICorePlugin.<init>(NEICorePlugin.java:18)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.Constructor.newInstance(Unknown Source)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.Class.newInstance(Unknown Source)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.relauncher.CoreModManager.loadCoreMod(CoreModManager.java:458)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.relauncher.CoreModManager.handleLaunch(CoreModManager.java:212)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.relauncher.FMLLaunchHandler.setupHome(FMLLaunchHandler.java:90)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.relauncher.FMLLaunchHandler.setupClient(FMLLaunchHandler.java:67)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.relauncher.FMLLaunchHandler.configureForClientLaunch(FMLLaunchHandler.java:34)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.launcher.FMLTweaker.injectIntoClassLoader(FMLTweaker.java:126)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.launchwrapper.Launch.launch(Launch.java:115)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at GradleStart.main(Unknown Source)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: Caused by: java.lang.ClassNotFoundException: codechicken.lib.asm.ASMInit

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.ClassLoader.loadClass(Unknown Source)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.ClassLoader.loadClass(Unknown Source)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: ... 16 more

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: Caused by: java.lang.NullPointerException

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)

[20:35:25] [main/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: ... 18 more

 

I have the dev & source versions of CCC and NEI, set up the build paths, got them in the mods folder, but nothing's working. Checked the source code and the class it's looking for doesn't seem to be there. Do I need a different version or something?

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I have used mixins once before, and it was with @At RETURN, so it worked fine. Now im trying to use it as INVOKE, and the compilation is successful, but the client crashes almost on startup (just a couple seconds after running runClient)   Im trying to inject the method finishConversion inside the ZombieVillager class. This is my Mixin class important stuff:   import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.monster.ZombieVillager; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(ZombieVillager.class) public class ZombieVillagerCures { @Inject(method = "finishConversion", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/world/entity/LivingEntity;addEffect(Lnet/minecraft/world/effect/MobEffectInstance;)Z")) private void addZombieVillagerCuredAmmount(ServerLevel level, CallbackInfo info) { System.out.println("The Mixin Worked!!! " + level); } // Lnet/minecraft/world/entity/LivingEntity;addEffect(Lnet/minecraft/world/effect/MobEffectInstance;)Z } I'm sure the issue lies in the @At cuz other @At values work fine. Its probably the fully qualified name thing. idk how to get it in VS code
    • I'm wayy less skilled than you i bet, but maybe u could try to just convert one into the other?
    • wildbackport is not working
    • Through Betafort Recovery, Bitcoin scam victims can retrieve their money. I recommend Betafort Recovery to anyone who has fallen victim to a scam and has been looking for methods and techniques to recover their lost cryptocurrency or wallets. Betafort Recovery is a reliable cryptocurrency recovery firm that assists victims in recovering their stolen cryptocurrency and offers secure solutions to protect your wallets from online scammers. I must admit that I was deeply melancholy and had given up on life until these experts could restore my $23,400 to my wallet. If you've lost your cryptocurrency and you are helpless about it, contact Betafort Recovery to get your money back. One key aspect that makes Betafort Recovery stand out is its focus on providing secure solutions to protect wallets from online scammers. It's not just about recovering lost funds; it's also about preventing future incidents and ensuring that clients' digital assets are safeguarded against potential threats. This proactive approach demonstrates their commitment to the long-term financial security of their clients. Furthermore, for individuals who have lost their cryptocurrency and are feeling helpless, reaching out to Betafort Recovery could be a turning point in their situation. The reassurance that they are legitimate for seeking help and recovering lost funds can provide much-needed relief and a sense of empowerment. Betafort Recovery as a reliable cryptocurrency recovery firm is certainly well-founded. Their ability to assist scam victims in recovering stolen cryptocurrency, their focus on providing secure solutions, and their commitment to supporting clients through challenging situations make them a valuable resource for individuals navigating the complex world of digital currencies. If you or someone you know has fallen victim to a cryptocurrency scam, contacting Betafort Recovery could be the first step towards reclaiming lost funds and regaining peace of mind.  
    • Idk how i didn't notice that, but I deleted it and fixed some other issues and now I get this https://mclo.gs/YsWacqq
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.