plugsmustard
Members-
Posts
89 -
Joined
-
Last visited
Everything posted by plugsmustard
-
what exactly is wrong with them. i was told to return a new packet?
-
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
-
these ones? public static void encode(PacketButtonClicked msg, PacketBuffer buf) { buf.writeBlockPos(pos); }
-
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?
-
you said get the pos from the packet buffer. how exactly do i do that?
-
okay, i think i know what you mean. could you give me a little more descriptions if possible?
-
well thats just fantastic. i THINK i have some of the other parts. but in my packethandler, i'm getting errors on this line due to my encode and decode methods in "PacketButtonClicked" https://github.com/drmdgg/marijuanacraft1.14.4/blob/cf3c6c06d4ac6c8245a386a2159b5ae8284ec25a/src/main/java/drmdgg/marijuanacraft/network/PacketHandler.java#L32 https://github.com/drmdgg/marijuanacraft1.14.4/blob/master/src/main/java/drmdgg/marijuanacraft/network/PacketButtonClicked.java what else should i be adding in there?
-
addButton(new Button(relX + 18, relY + 15, 5, 20, "PURGE", button -> PacketHandler.sendToServer(new PacketButtonClicked(tileEntity.getPos())))); ???? if that's not right, im gonna snap
-
1. maybe for you, i don't get this at the moment and everyone is giving me different ways to do this. 2. changed the name 3. really!? unbelievable 4. ive read all of that like three times now. still don't understand (call me stupid, i dont care. im doing my best to learn as i want to implement buttons on my other GUIs )
-
yes, and that gives me errors. what should i be names then? ButtonClicked or something like that? im assuming im wrong: public Networking(BlockPos pos) { this.pos = pos; } public static void encode(Networking msg, PacketBuffer buf) { buf.readBlockPos(); } not 100% on what you mean by this
-
and really? nothing?
-
people may call you a dick, but i like yer style. and i used yers an example, but mostly went off the simpleImpl stuff i was shown in the docs. i deleted most of what i used from yours just missed that. and i know everything does fuck all right now, i am unsure of what to put in the places where that has already been mentioned. and to be honest. i don't fucking know why the fuck i was doing that with my tile entity in that portion. all i can ask is for help and direction. and you know yer shit!
-
Alirght. I'm a little lost. could you give me a bit more help? here's what i have so far...whether it is correct, im not sure. GUI: https://github.com/drmdgg/marijuanacraft1.14.4/blob/a27ad62dfb81267511d4ab1ecf2eff5b6c6eba58/src/main/java/drmdgg/marijuanacraft/client/gui/GuiVO.java#L79-L86 network: https://github.com/drmdgg/marijuanacraft1.14.4/tree/master/src/main/java/drmdgg/marijuanacraft/network don't be too harsh!
-
alright. where in vanilla are there those examples you mentioned?
-
you mean like the button classes?
-
do you have a small example i can look at then? ive read that entire thing, but i am always unsure
-
in the example i was looking at, that's how they did it. how should i be doing it?
-
my bad...this: addButton(new Button(relX + 18, relY + 15, 5, 20, "PURGE", button -> purge("not sure"))); this "purge" tells me to add a method called purge
-
i was looking at examples, this is what it automatically adds: private Object purge(String string) { return null; } lol, forget it then
-
do i need to make a new class for this gui button (ive seen several examples that do this) here's my code for what i have: addButton(new Button(relX + 18, relY + 15, 5, 20, "PURGE", button -> purge("NOT SURE WHAT TO PUT HERE"))); } public void purge(String id) { return; <-------------NOT SURE WHAT TO PUT HERE } where do i implement the custom packets?
-
do i need to make an entire new class for this one button because i have it in my gui class. and if not, do implement what you just showed me in my "purge" method
-
can someone point me in the right direction. i have a "purge" button on my furnace's GUI, but the "purge" method is something i am unsure of. i looked at various examples, but nothing seemed like it was what i was looking for. i simply want my furnace to be switched on and burn the item when the button is clicked. thanks in advance
-
how about some code? this is what i have so far. where i register effects https://github.com/drmdgg/marijuanacraft1.14.4/blob/61ab35c1a10418fa2fdfe331cf07da1d6a5162a3/src/main/java/drmdgg/marijuanacraft/ModEventSubscriber.java#L36-L41 the effects https://github.com/drmdgg/marijuanacraft1.14.4/tree/master/src/main/java/drmdgg/marijuanacraft/potion
-
did that. what about changing the colour of the screen? is that the same as the problems im facing with the portal warp?
-
well thats shit. where is this rendereing code exactly?