-
Posts
82 -
Joined
-
Last visited
Everything posted by outflows
-
I'm confused as to how I use the ITextComponent interface within the sendMessage method. Also, an unrelated question, what does the # mean? Does that tell me that I need to use reflection or is it just the same as using a period?
-
So all I need to know is how to send messages to only the client. I've been doing player.addMessage() but that sends it in chat to everyone so I need to figure out how to show the message to just the client. I even made it so that the client messages themselves in order to stop it from being displayed in public chat but what I really want is a message to just be displayed to the client.
-
So what exactly do I put? Nevermind I got it
-
-
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':processResources'. > Could not copy file 'C:\Users\Me\Desktop\Modding\pokalert\src\main\resources\mcmod.info' to 'C:\Users\Rami\Desktop\Modding\pokalert\build\resources\main\mcmod.info'. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 7.935 secs
-
Well I just moved my libs folder where I had the pixelmon jar from pokalert/src/main to just pokalert (the name of my mod) and now I got Could not copy file 'C:\Users\Rami\Desktop\Modding\pokalert\src\main\resources\mcmod.info' to 'C:\Users\Me\Desktop\Modding\pokalert\build\resources\main\mcmod.info'
-
I did gradlew.bat build and got this error: package com.pixelmonmod.pixelmon.entities.pixelmon does not exist
-
I'm not sure how to do this especially considering how pixelmon is closed source
-
bump
-
can you please tell me how to do that while also incorporating the referenced mod into the project so that I don't get the error
-
I exported it from eclipse rather than from the command prompt and now I'm trying to run minecraft and I got an error from my mod saying that Minecraft.getMinecraft() is not a method: PM XRay version: 58 Description: Unexpected error java.lang.NoSuchMethodError: net.minecraft.client.Minecraft.getMinecraft()Lnet/minecraft/client/Minecraft; @SideOnly(Side.CLIENT) @SubscribeEvent public void detectPokemon(TickEvent.ClientTickEvent event) { EntityPlayer player = Minecraft.getMinecraft().player; EntityPlayerSP sp = (EntityPlayerSP)player; World world = Minecraft.getMinecraft().world; It's referring to where I instantiate the player
-
I right clicked on referenced libraries in the IDE and then went to configure build path and added the pixelmon mod jar to the path as an external jar file
-
So I just need to figure out how I can build my mod with certain referenced libraries included. That referenced library being the pixelmon mod. I tried building it normally but ran into an error saying: Execution failed for task ':compileJava'. > Compilation failed; see the compiler error output for details. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. I assume this is because of the referenced libraries or something but I really don't know
-
I can't find any info online about SRG names and the website that they use is down for some reason. I am just really confused right now
-
I'm sorry, I've been trying to learn it but it's not very intuitive for me. Should I be using the ObfuscationReflectionHelper to get the soundhandler as well?
-
This is what I was able to get but it definitely does not work Class mc = Minecraft.class; java.lang.reflect.Method sh = mc.getMethod("getSoundHandler", null); sh.setAccessible(true); SoundHandler soundH = (SoundHandler)sh.invoke(mc, null); ObfuscationReflectionHelper.getPrivateValue(soundH.class, new Object(), "playingSounds");
-
Well I have no idea how to format this tbh. Also, I don't know what SRG means and how to use the helper thing. If you could just at least give me a template for how I could access the playingSounds method that would be awesome
-
It would really help if you could show me how to do it because I am very lost at the moment
-
Hey so I tried using reflection to get the necessary fields and it works the first time to obtain the sndManager object but when I try to use that in order to obtain the playingSounds variable, I end up getting an error because it apparently doesn't exist as an instance variable of the sndManager object. I tried checking to see what fields I get from the sndManager object but none of them were the same as in the SoundManager class. All I remember was that one of the fields was clazz and another was fieldAccessor. I really hope you can help me because I've been stuck on this problem for hours now. Here is my code: SoundHandler sh = Minecraft.getMinecraft().getSoundHandler(); Class cls = sh.getClass(); Class snd = cls.getDeclaredField("sndManager").getClass(); Field ps = snd.getDeclaredField("playingSounds");
-
I'm sorry to keep asking questions but I am thoroughly confused as to how I can use reflection to get these methods. Right now I have: Minecraft mc = Minecraft.getMinecraft(); Method method = mc.getClass().getMethod("sndManager", null);
-
Oh I see, that makes more sense now. Thanks for all the help.
-
So how would I format it so that I don't get the error. Sorry btw I'm really new to modding and I didn't learn any of this in my java class for whatever reason
-
oh, well in that case I cannot find the sndManager method when I do Minecraft.getMinecraft().getSoundHandler().sndManager()
-
For some reason I'm getting an error while trying to call this. I don't know if you meant to put the pound signs there but maybe that's some syntax I'm unfamiliar with. I am also unfamiliar with reflection if you could help me out there too.
-
Do you know how I can get a list of all sounds that are currently playing in the world?