December 6, 20195 yr 20 minutes ago, plugsmustard said: could you give me a little more descriptions if possible what part do you not understand?
December 6, 20195 yr Author Just now, loordgek said: what part do you not understand? you said get the pos from the packet buffer. how exactly do i do that?
December 6, 20195 yr 18 minutes ago, plugsmustard said: you said get the pos from the packet buffer. how exactly do i do that? Well, you're doing it here. But you should actually be writing a pos there, not reading one. 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.
December 6, 20195 yr Author 40 minutes ago, Draco18s said: Well, you're doing it here. But you should actually be writing a pos there, not reading one. buf.writeBlockPos(pos); <- this pos isn't right is it? it looks like other examples i've seen, but it's telling me to access it in a static way, which fucks with the other pos. any advice? Edited December 6, 20195 yr by plugsmustard
December 6, 20195 yr 25 minutes ago, plugsmustard said: but it's telling me to access it in a static way, which fucks with the other pos. any advice? Look at the parameters that are passed to you. 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.
December 6, 20195 yr Author 7 minutes ago, Draco18s said: Look at the parameters that are passed to you. these ones? public static void encode(PacketButtonClicked msg, PacketBuffer buf) { buf.writeBlockPos(pos); }
December 6, 20195 yr Yes. You're trying to write to the buffer, so what's the other one? Edited December 6, 20195 yr by Draco18s 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.
December 6, 20195 yr Author 32 minutes ago, Draco18s said: Yes. You're trying to write to the buffer, so what's the other one? for starters, are those the corrects parameters i should have there? edit: never mind, i think i got it.....? https://github.com/drmdgg/marijuanacraft1.14.4/blob/a246b0229e61058b95672d7f4813b5c3deb28229/src/main/java/drmdgg/marijuanacraft/network/PacketButtonClicked.java#L24 Edited December 6, 20195 yr by plugsmustard
December 6, 20195 yr Good. Now fix these two lines.https://github.com/drmdgg/marijuanacraft1.14.4/blob/a246b0229e61058b95672d7f4813b5c3deb28229/src/main/java/drmdgg/marijuanacraft/network/PacketButtonClicked.java#L28-L29 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.
December 6, 20195 yr Author 5 minutes ago, Draco18s said: Good. Now fix these two lines.https://github.com/drmdgg/marijuanacraft1.14.4/blob/a246b0229e61058b95672d7f4813b5c3deb28229/src/main/java/drmdgg/marijuanacraft/network/PacketButtonClicked.java#L28-L29 what exactly is wrong with them. i was told to return a new packet? Edited December 6, 20195 yr by plugsmustard
December 6, 20195 yr Author 4 minutes ago, loordgek said: return new PacketButtonClicked(buf.readBlockPos()); thank you. is that all i need to put in those methods because i am still getting errors in the packet handler class public static void Register() { int MId = 0; INSTANCE.registerMessage(MId++, PacketButtonClicked.class, PacketButtonClicked::encode, PacketButtonClicked::decode, PacketButtonClicked.Handler::handle); }
December 6, 20195 yr Author 2 minutes ago, loordgek said: what does the error say, mouse over the error and the IDE tells whats wrong The method registerMessage(int, Class<MSG>, BiConsumer<MSG,PacketBuffer>, Function<PacketBuffer,MSG>, BiConsumer<MSG,Supplier<NetworkEvent.Context>>) in the type SimpleChannel is not applicable for the arguments (int, Class<PacketButtonClicked>, PacketButtonClicked::encode, PacketButtonClicked::decode, PacketButtonClicked.Handler::handle) there's also errors over each portion "The type PacketButtonClicked does not define encode(MSG, PacketBuffer) that is applicable here" Edited December 6, 20195 yr by plugsmustard
December 6, 20195 yr Both encode and decode need to be static. 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.
December 6, 20195 yr Author 2 minutes ago, Draco18s said: Both encode and decode need to be static. encode was, decode was not. made them static, but nothing changed
December 6, 20195 yr Push your changes to your repository. Only thing I can find out of place at the moment is this line: https://github.com/drmdgg/marijuanacraft1.14.4/blob/master/src/main/java/drmdgg/marijuanacraft/network/PacketHandler.java#L36 Which should be generic: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/network/PacketHandler.java#L45 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.
December 6, 20195 yr Author 3 minutes ago, Draco18s said: Push your changes to your repository. Only thing I can find out of place at the moment is this line: https://github.com/drmdgg/marijuanacraft1.14.4/blob/master/src/main/java/drmdgg/marijuanacraft/network/PacketHandler.java#L36 Which should be generic: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/network/PacketHandler.java#L45 https://github.com/drmdgg/marijuanacraft1.14.4/blob/c4986b9a05326b9a17776e6000bf7e40957b3253/src/main/java/drmdgg/marijuanacraft/network/PacketHandler.java#L36 the line with errors :https://github.com/drmdgg/marijuanacraft1.14.4/blob/c4986b9a05326b9a17776e6000bf7e40957b3253/src/main/java/drmdgg/marijuanacraft/network/PacketHandler.java#L32
December 6, 20195 yr Still not static:https://github.com/drmdgg/marijuanacraft1.14.4/blob/c4986b9a05326b9a17776e6000bf7e40957b3253/src/main/java/drmdgg/marijuanacraft/network/PacketButtonClicked.java#L27 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.
December 6, 20195 yr Author 2 minutes ago, Draco18s said: Still not static:https://github.com/drmdgg/marijuanacraft1.14.4/blob/c4986b9a05326b9a17776e6000bf7e40957b3253/src/main/java/drmdgg/marijuanacraft/network/PacketButtonClicked.java#L27 werid, i fixed that a while ago: https://github.com/drmdgg/marijuanacraft1.14.4/blob/b9dabc49d8731443f42a680138ad3159e63d5bfb/src/main/java/drmdgg/marijuanacraft/network/PacketButtonClicked.java#L27
December 6, 20195 yr You linked to a specific commit, so when I looked at it, it was the old commit where it wasn't changed. As far as I can tell, it should work. Can you post a screenshot of the error? As for what you put here, you put the code that does whatever you want the button to do. 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.
December 6, 20195 yr Author 2 minutes ago, Draco18s said: You linked to a specific commit, so when I looked at it, it was the old commit where it wasn't changed. As far as I can tell, it should work. Can you post a screenshot of the error?
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.