• 0

    posted a message on Naruto Mod (long overdue)

    Hey, so I am making a Minecraft naruto mod because of the very few naruto mods that have been created, most are not kept up to date / haven't released their full versions. Hopefully, I will keep you guys updated here and on this the mod's discord server where you can suggest things to be added into the mod. See screenshots of new things added and just hang out. I am coding this with my brother. We are the only two developers of the mod as of now.


    My background: If you're curious I used to code Minecraft mods and plugins a couple of years ago but stopped and decided to pick it up once again with all the things going on in the world right now. As of now, we have a couple of basics items added and great ideas.


    I don't really know what else to say here but we would love to hear your suggestions and answer your questions.

    Be sure to join the discord server: https://discord.gg/3z4tEFw

    Posted in: WIP Mods
  • 0

    posted a message on Custom Entity Spawn & movement

    No, I'm not very familiar with setting up packets for mods.

    Posted in: Modification Development
  • 0

    posted a message on Stringed Custom Keybinds

    Ah okay, I'll try it out thank you

    Posted in: Modification Development
  • 0

    posted a message on Custom Entity Spawn & movement

    Oh crap, on the a key click, which is client side... In the original post I meant I want to spawn a custom entity at a location or more specific at the player's location (the one who hit the key). I'm missing something here, I don't get what would change in the code depending on what methods I use to spawn a custom entity like whether a keybind or a gui or a command. By the way, I realize how that sounds but it was not supposed to be mean, I'm generally confused. By the way, nothing at all happens using the original post code. Thanks!

    Posted in: Modification Development
  • 0

    posted a message on Stringed Custom Keybinds

    Okay so here is the full stacktrace:


    [14:38:20] [Client thread/INFO]: [Client thread] Client side modded connection established


    [14:38:29] [Client thread/ERROR]: Exception caught during firing event [email protected]:


    java.lang.NullPointerException


    at me.console_.testmod.StringKeys.clientTick(StringKeys.java:38) ~[StringKeys.class:?]


    at cpw.mods.fml.common.eventhandler.ASMEventHandler_7_Jutsu_clientTick_ClientTickEvent.invoke(.dynamic) ~[?:?]


    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]


    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:140) [EventBus.class:?]


    at cpw.mods.fml.common.FMLCommonHandler.onPostClientTick(FMLCommonHandler.java:330) [FMLCommonHandler.class:?]


    at net.minecraft.client.Minecraft.runTick(Minecraft.java:2064) [Minecraft.class:?]


    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:973) [Minecraft.class:?]


    at net.minecraft.client.Minecraft.run(Minecraft.java:898) [Minecraft.class:?]


    at net.minecraft.client.main.Main.main(SourceFile:148) [Main.class:?]


    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112]


    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_112]


    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112]


    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]


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


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


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


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


    [14:38:29] [Client thread/ERROR]: Index: 1 Listeners:


    [14:38:29] [Client thread/ERROR]: 0: NORMAL


    [14:38:29] [Client thread/ERROR]: 1: ASM: [email protected] clientTick(Lcpw/mods/fml/common/gameevent/TickEvent$ClientTickEvent;)V


    [14:38:30] [Server thread/INFO]: Stopping server


    [14:38:30] [Server thread/INFO]: Saving players


    [14:38:30] [Server thread/INFO]: Saving worlds


    [14:38:30] [Server thread/INFO]: Saving chunks for level 'Naruto Test'/Overworld


    [14:38:30] [Server thread/INFO]: Saving chunks for level 'Naruto Test'/Nether


    [14:38:30] [Server thread/INFO]: Saving chunks for level 'Naruto Test'/The End


    [14:38:31] [Server thread/INFO]: Unloading dimension 0


    [14:38:31] [Server thread/INFO]: Unloading dimension -1


    [14:38:31] [Server thread/INFO]: Unloading dimension 1


    [14:38:31] [Server thread/INFO]: Applying holder lookups


    [14:38:31] [Server thread/INFO]: Holder lookups applied


    [14:38:31] [Client thread/FATAL]: Unreported exception thrown!


    java.lang.NullPointerException


    at me.console_.testmod.StringKeys.clientTick(StringKeys.java:38) ~[StringKeys.class:?]


    at cpw.mods.fml.common.eventhandler.ASMEventHandler_7_Jutsu_clientTick_ClientTickEvent.invoke(.dynamic) ~[?:?]


    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]


    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:140) ~[EventBus.class:?]


    at cpw.mods.fml.common.FMLCommonHandler.onPostClientTick(FMLCommonHandler.java:330) ~[FMLCommonHandler.class:?]


    at net.minecraft.client.Minecraft.runTick(Minecraft.java:2064) ~[Minecraft.class:?]


    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:973) ~[Minecraft.class:?]


    at net.minecraft.client.Minecraft.run(Minecraft.java:898) [Minecraft.class:?]


    at net.minecraft.client.main.Main.main(SourceFile:148) [Main.class:?]


    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112]


    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_112]


    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112]


    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]


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


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


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


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


    [14:38:31] [Client thread/INFO]: [net.minecraft.client.Minecraft:displayCrashReport:349]: ---- Minecraft Crash Report ----


    // I'm sorry, Dave.





    Description: Unexpected error




    java.lang.NullPointerException: Unexpected error


    at me.console_.testmod.StringKeys.clientTick(StringKeys.java:38)


    at cpw.mods.fml.common.eventhandler.ASMEventHandler_7_Jutsu_clientTick_ClientTickEvent.invoke(.dynamic)


    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)


    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:140)


    at cpw.mods.fml.common.FMLCommonHandler.onPostClientTick(FMLCommonHandler.java:330)


    at net.minecraft.client.Minecraft.runTick(Minecraft.java:2064)


    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:973)


    at net.minecraft.client.Minecraft.run(Minecraft.java:898)


    at net.minecraft.client.main.Main.main(SourceFile:148)


    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)


    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)


    at java.lang.reflect.Method.invoke(Method.java:498)


    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)


    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)


    at GradleStart.main(Unknown Source)






    A detailed walkthrough of the error, its code path and all known details is as follows:


    ---------------------------------------------------------------------------------------




    -- Head --


    Stacktrace:


    at me.console_.testmod.StringKeys.clientTick(Jutsu.java:38)


    at cpw.mods.fml.common.eventhandler.ASMEventHandler_7_Jutsu_clientTick_ClientTickEvent.invoke(.dynamic)


    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)


    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:140)


    at cpw.mods.fml.common.FMLCommonHandler.onPostClientTick(FMLCommonHandler.java:330)




    Server brand: fml,forge


    Server type: Integrated singleplayer server


    Stacktrace:


    at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:373)


    at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2444)


    at net.minecraft.client.Minecraft.run(Minecraft.java:927)


    at net.minecraft.client.main.Main.main(SourceFile:148)


    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)


    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)


    at java.lang.reflect.Method.invoke(Method.java:498)


    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)


    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)


    at GradleStart.main(Unknown Source)


    I didn't know which parts are the most important so I left a lot of in.

    Posted in: Modification Development
  • 0

    posted a message on Stringed Custom Keybinds

    Oh okay:


    		if(sign1.isPressed()) {
    			c1 = 40;
    			world.playSound(player.posX, player.posY, player.posZ, "myMod:mySound", 1.0F, 1.0F, false);
    		}


    This was my code and the error that was printed was on the line of the actual "world.playSound". And as I said before the reason I'm so confused is that this works if I were to put it in something like the KeyInputEvent and I defined my variables like this:


    		World world = Minecraft.getMinecraft().theWorld;
    		EntityPlayer player = Minecraft.getMinecraft().thePlayer;


    Which I believe you stated Minecraft.getMinecraft() is Client side, so this should work right?

    Posted in: Modification Development
  • 0

    posted a message on Custom Entity Spawn & movement

    Hmm. so if I were to get something client side like a keybind would this work:


    			String name = player.getDisplayName();
    			EntityPlayer serverSidePlayer = MinecraftServer.getServer().getEntityWorld().getPlayerEntityByName(name);


    Or am I just stupid.

    Posted in: Modification Development
  • 0

    posted a message on Stringed Custom Keybinds

    Hey, sorry to bring this back up. By the way everything worked fine but I was wondering how I would do other things after the counter, for example playing a sound. Every time I add the code to play the sound after the counter, the game crashes. I can play the sound if I put if(key.isPressed() { // play sound} in the KeyInputEvent but then the counter doesn't work. Does anybody know if there is a way around this?

    Posted in: Modification Development
  • 0

    posted a message on Stringed Custom Keybinds

    Thank you so much! That makes sense, now I see why you said I was making keys press at the same time. And just to be clear is this a @SubscribeEvent?

    Posted in: Modification Development
  • 0

    posted a message on Custom Entity Spawn & movement

    Hey, how would I first, spawn my custom entity at a location without a spawn egg and then control it movements, mimicking the players movements?


    When I searched it up, I found the way where you do something like:

    World world = Minecraft.getMinecraft().theWorld;
    EntityPlayer player = Minecraft.getMinecraft().thePlayer;
    
    CustomEntity ent = new CustomEntity(world);
    ent.setPosition(player.playerLocation.posX, player.playerLocation.posY, player.playerLocation.posZ);;
    world.spawnEntityInWorld(ent);
    Posted in: Modification Development
  • 0

    posted a message on Stringed Custom Keybinds

    I'm actually asking a more specific question about what you previously explained. Am I understanding you or is this wrong:


    	int counter;
    	
    	public void clientTick(ClientTickEvent event) {
    		
    		if(KEY1.isPressed()) {
    			counter = 40;
    			counter--;
    			if(KEY2.isPressed() && counter > 0) {
    				counter = 40;
    				counter--;
    				if(KEY3.isPressed() && counter > 0) {
    					// do something
    				}
    			}
    		}
    		
    	}
    Posted in: Modification Development
  • 0

    posted a message on Stringed Custom Keybinds

    Thanks, I never knew you didn't need key events for checking keys and I could check if a key was pressed whenever. Also, I do want to count time in between presses but after a certain time stop the counter. I'm still not sure how exactly I would use ClientTickEvent, does any int inside count as ticks? so I would check if(Y.isPressed) {//start timer //check if U.isPressed && timer < 0}, but not clear on details on how the timer with tick event works.

    Posted in: Modification Development
  • 0

    posted a message on Custom entity rendering

    Hey, how would I render a custom EntityThrowable to act like an arrow in the way that it flies in the air and sticks in block? Thanks in advance.


    Nevermind figured it out. (You have to make the entity extend EntiyArrow)

    Posted in: Modification Development
  • 0

    posted a message on Stringed Custom Keybinds

    Oh, sorry. I'm just confused as to how I would implement the ClientTick event method inside of my other keybinding event. An event inside of event type of thing. Because wouldn't I have to use the KeyInputEvent or i would just have to check if(key.isPressed) inside of the ClientTickEvent method like you previously stated? Also, I'm not very familiar with the ClientTickEvent does any integer automatically convert to ticks within the event? For example if I used counter-- in ClientTickEvent would it go down by ticks (even though thats very unlikely)?

    Posted in: Modification Development
  • 0

    posted a message on Stringed Custom Keybinds

    Haha sorry about that. I don't think I was very clear the first time, I by keys strung together I meant having to press, for example, Y then U then J with a small window interval to hit each key, not strung together as in YUJ all together, my bad.


    I searched how to use PlayerTickEvent, I assume it's going I should count playertickevent because keybinding is client side. Anyway, I'm confused how I would implement it into a pl.ayertickevent into my keyinputevent and I'm not very sure where to start

    Posted in: Modification Development
  • To post a comment, please or register a new account.