Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

How to use SimpleNetworkWrapper, IMessage and IMessageHandler


Ablaze
 Share

Recommended Posts

Check out diesieben's tutorial here too: http://www.minecraftforge.net/forum/index.php/topic,20135.0.html

 

SimpleNetworkWrapper and what it is

SimpleNetworkWrapper is an FML wrapper around Messages and MessageHandlers, so that Netty can understand your messages and handlers. It is the new way to send packets to players. You could use Netty itself but as cpw said, it can cause lots of problems like memory leaks.

 

Steps to use the SimpleNetworkWrapper

1. Register a SimpleNetworkWrapper and a message

2. Create an IMessage

3. Create an IMessageHandler

4. Send the message

 

Register a SimpleNetworkWrapper

This step is fairly simple.

public static SimpleNetworkWrapper snw; 

in your preInit:
snw = NetworkRegistry.INSTANCE.newSimpleChannel(modid); 
snw.registerMessage(TutorialMessageHandler.class, TutorialMessage.class, 0, Side.CLIENT); 

You need to give the wrapper a String to identify the wrapper. It is a good practice to give it your mod-id so that it is unique for every mod.

 

The parameters for registerMessage() are - a message handler, a message, a discriminator byte (a unique identifier for your messages), the side the handler is on - client or server.

 

Create an IMessage

IMessage is a packet. Your class will be implementing IMessage, and will be implementing some methods.

public class TutorialMessage implements IMessage{
    public int extremelyImportantInteger; 

    public TutorialMessage() {}

    public TutorialMessage(int a) { 
        this.extremelyImportantInteger = a;
    }

    @Override
    public void toBytes(ByteBuf buf) { 
        buf.writeInt(extremelyImportantInteger);
    }

    @Override
    public void fromBytes(ByteBuf buf) { 
        this.extremelyImportantInteger = buf.readInt();
    }

}

We will pretend that extremelyImportantInteger is an extremely important integer to be sent from the client to the server.

 

Yes, you need two constructors. This one will be used by you to initialize your fields, while the other one will be used by Forge to create your packet.

 

Your data will be sent through a ByteBuffer and so you must write your data to it using the write*** methods in the toBytes() method.

 

To read from the buffer, use fromBytes(). You must read data IN THE SAME ORDER as you wrote it!

 

And that is it for your message!

 

Create an IMessageHandler

The IMessageHandler will act as your packet handler. So make sure your class implements this class.

public class TutorialMessageHandler implements IMessageHandler<TutorialMessage, IMessage> { 

    @Override
    public IMessage onMessage(TutorialMessage message, MessageContext ctx) { 
        System.out.println(message.extremelyImportantInteger);
        return null;
    }

}

IMessageHandler<> takes two type parameters - first is the packet you handle and the other one is the packet you return.

 

The handler calls the onMessage() method when it receives the packet.

 

That is it for your handler!

 

Send the message

We got it all working now. Launch Minecraft and it will work fine. But.. you never send a packet! So, wherever you want to send a packet, add this line:

MainFile.snw.sendTo(new TutorialMessage(3), (EntityPlayerMP) entityPlayer); 

 

The sendTo() method takes a packet to be sent and an EntityPlayerMP. The SimpleNetworkWrapper class also has some more cool methods like sendToDimension() but I'll leave that to you for exploring.

 

There you go! Give yourself a pat on the back because you successfully got it working! :D

 

BONUS: Reading and writing strings to and from ByteBufs

If you noticed, there is no ByteBuf.readString() or ByteBuf.writeString("") method. Not to worry! There is a class called ByteBufUtils which you can use to operate on much more complex stuff like ItemStacks and Strings!

So, to write a String -

ByteBufUtils.writeUTF8String(buf, ""); 

and to read

String myString = ByteBufUtils.readUTF8String(buf); 

 

In writeUTF8String(), buf is your ByteBuffer and the other parameter should be obvious.

 

readUTF8String should be quite obvious. buf is your buffer.

 

Thanks to diesieben for telling me about ByteBufUtils.

 

That is it folks! Hope you learnt something from this :)

 

Regards,

Ablaze.

 

Add me on Skype: AblazeTheBest. Send a message saying "#HeyAblaze"

 

Currently: Making a mod!

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

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
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.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • 1.14 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • // You're mean. Time: 12/4/21 11:12 AM Description: Initializing game java.lang.NullPointerException: Initializing game at net.minecraft.client.renderer.entity.EntityRendererManager.handler$zdm000$register(EntityRendererManager.java:528) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:physicsmod.mixins.json:MixinEntityRenderDispatcher,pl:mixin:A,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.entity.EntityRendererManager.func_229087_a_(EntityRendererManager.java) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:physicsmod.mixins.json:MixinEntityRenderDispatcher,pl:mixin:A,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.entity.EntityRendererManager.func_229097_a_(EntityRendererManager.java:75) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:physicsmod.mixins.json:MixinEntityRenderDispatcher,pl:mixin:A,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.entity.EntityRendererManager.<init>(EntityRendererManager.java:187) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:physicsmod.mixins.json:MixinEntityRenderDispatcher,pl:mixin:A,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.<init>(Minecraft.java:465) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:betterendforge.mixins.json:MinecraftMixin,pl:mixin:APP:flywheel.mixins.json:ShaderCloseMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:149) [?:?] {re:classloading,pl:runtimedistcleaner:A} at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] {} at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] {} at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] {} at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] {} at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) [forge-1.16.5-36.2.8.jar:36.2] {} at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$488/1901700557.call(Unknown Source) [forge-1.16.5-36.2.8.jar:36.2] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace: at net.minecraft.client.renderer.entity.EntityRendererManager.handler$zdm000$register(EntityRendererManager.java:528) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:physicsmod.mixins.json:MixinEntityRenderDispatcher,pl:mixin:A,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.entity.EntityRendererManager.func_229087_a_(EntityRendererManager.java) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:physicsmod.mixins.json:MixinEntityRenderDispatcher,pl:mixin:A,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.entity.EntityRendererManager.func_229097_a_(EntityRendererManager.java:75) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:physicsmod.mixins.json:MixinEntityRenderDispatcher,pl:mixin:A,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.entity.EntityRendererManager.<init>(EntityRendererManager.java:187) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:physicsmod.mixins.json:MixinEntityRenderDispatcher,pl:mixin:A,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.<init>(Minecraft.java:465) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:betterendforge.mixins.json:MinecraftMixin,pl:mixin:APP:flywheel.mixins.json:ShaderCloseMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A} -- Initialization -- Details: Stacktrace: at net.minecraft.client.main.Main.main(Main.java:149) [?:?] {re:classloading,pl:runtimedistcleaner:A} at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] {} at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] {} at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] {} at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] {} at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) [forge-1.16.5-36.2.8.jar:36.2] {} at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$488/1901700557.call(Unknown Source) [forge-1.16.5-36.2.8.jar:36.2] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {} -- System Details -- Details: Minecraft Version: 1.16.5 Minecraft Version ID: 1.16.5 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_51, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 12168067592 bytes (11604 MB) / 15502147584 bytes (14784 MB) up to 17179869184 bytes (16384 MB) CPUs: 16 JVM Flags: 10 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -XX:+IgnoreUnrecognizedVMOptions -Xmx16G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M ModLauncher: 8.0.9+86+master.3cf110c ModLauncher launch target: fmlclient ModLauncher naming: srg ModLauncher services: /mixin-0.8.4.jar mixin PLUGINSERVICE /eventbus-4.0.0.jar eventbus PLUGINSERVICE /forge-1.16.5-36.2.8.jar object_holder_definalize PLUGINSERVICE /forge-1.16.5-36.2.8.jar runtime_enum_extender PLUGINSERVICE /accesstransformers-3.0.1.jar accesstransformer PLUGINSERVICE /forge-1.16.5-36.2.8.jar capability_inject_definalize PLUGINSERVICE /forge-1.16.5-36.2.8.jar runtimedistcleaner PLUGINSERVICE /mixin-0.8.4.jar mixin TRANSFORMATIONSERVICE /forge-1.16.5-36.2.8.jar fml TRANSFORMATIONSERVICE FML: 36.2 Forge: net.minecraftforge:36.2.8 FML Language Providers: javafml@36.2 minecraft@1 kotlinforforge@1.15.1 Mod List: H.E.B+Beta+0.8.jar |Hals Enhanced Biomes |heb |0.8 |NONE |Manifest: NOSIGNATURE skds_core-0.1.0.jar |SKDS Core |skds_core |0.1.0 |NONE |Manifest: NOSIGNATURE Marshmallow.jar |Marshmallows |marshmallows |1.0.0 |NONE |Manifest: NOSIGNATURE Mod+of+Longplays+1.1.1.jar |Mod of Longplays |mod_of_longplays |1.1.1 |NONE |Manifest: NOSIGNATURE jei-1.16.5-7.7.1.129.jar |Just Enough Items |jei |7.7.1.129 |NONE |Manifest: NOSIGNATURE The_Graveyard_1.0_(FORGE)_for_1.16.4-1.16.5.jar |The Graveyard (FORGE) |graveyard |1.0 |NONE |Manifest: NOSIGNATURE PrideBlocks.jar |Pride Blocks |prideblocks |1.0.0 |NONE |Manifest: NOSIGNATURE Agressive_Cuddlers+-+1.16.5+-+2.0.0+NoGlow.jar |Agressive Cuddlers |agressivecuddlers |2.0 |NONE |Manifest: NOSIGNATURE HeadBump-1.0.1-Forge-MC1.16.jar |Head Bump |headbump |1.0.1 |NONE |Manifest: NOSIGNATURE mcw-windows-2.0.0-mc1.16.5.jar |Macaw's Windows |mcwwindows |2.0.0 |NONE |Manifest: NOSIGNATURE PortalFluids.jar |PortalFluids |portalfluids |1.0.0 |NONE |Manifest: NOSIGNATURE modnametooltip_1.16.2-1.15.0.jar |Mod Name Tooltip |modnametooltip |1.15.0 |NONE |Manifest: NOSIGNATURE BetterCaves-Forge-1.16.4-1.1.2.jar |YUNG's Better Caves |bettercaves |1.16.4-1.1.2 |NONE |Manifest: NOSIGNATURE REBIRTH+6.0.0+I+Minecon+Update+I.jar |REBIRTH |rebirth |6.0.0 |NONE |Manifest: NOSIGNATURE TerraForged-1.16.5-0.2.15.jar |TerraForged |terraforged |0.2.15 |NONE |Manifest: 7b:73:d0:a2:c3:40:13:84:35:4f:c9:0e:2b:85:8c:08:ea:3c:3c:eb:f1:98:8b:5b:6e:ca:8a:a0:9a:cf:12:b3 citadel-1.8.1-1.16.5.jar |Citadel |citadel |1.8.1 |NONE |Manifest: NOSIGNATURE mystical-plants-1.0.1-1.16.5.jar |Mystical Plant's |mystical_plants |1.1.0 |NONE |Manifest: NOSIGNATURE dynamic_tnt-1.0.1.jar |Dynamic TNT |dynamic_tnt |1.0.0 |NONE |Manifest: NOSIGNATURE YungsApi-1.16.4-Forge-13.jar |YUNG's API |yungsapi |1.16.4-Forge-13 |NONE |Manifest: NOSIGNATURE compactmachines-4.0.0-beta.2.jar |Compact Machines 4 |compactmachines |4.0.0-beta.2 |NONE |Manifest: NOSIGNATURE [FORGE]+Wilder+Wilds+V1.1.6+-+1.16.5 (1).jar |The Wilds Get Wilder (Forge) |the_wilds_get_wilder_forge |1.0.0 |NONE |Manifest: NOSIGNATURE WaxedWood-1.0-Forge-MC1.16.jar |Waxed Wood |waxedwood |1.0 |NONE |Manifest: NOSIGNATURE create-confectionery1.16.5_v1.0.2.jar |Create Confectionery |create_confectionery |1.0.2 |NONE |Manifest: NOSIGNATURE RealisticTorches-1.16.5-3.1.2.jar |Realistic Torches |realistictorches |1.16.5-3.1.2 |NONE |Manifest: NOSIGNATURE mcw-doors-1.0.3-mc1.16.5.jar |Macaw's Doors |mcwdoors |1.0.3 |NONE |Manifest: NOSIGNATURE stone-age-1.16.5-1.3.5.jar |Stone Age |stone_age |1.16.5-1.3.5 |NONE |Manifest: NOSIGNATURE restored_earth-1.16.5-1.1.0.jar |Restored Earth |restored_earth |1.1.0 |NONE |Manifest: NOSIGNATURE forge-1.16.5-36.2.8-universal.jar |Forge |forge |36.2.8 |NONE |Manifest: 22:af:21:d8:19:82:7f:93:94:fe:2b:ac:b7:e4:41:57:68:39:87:b1:a7:5c:c6:44:f9:25:74:21:14:f5:0d:90 water_physics_overhaul-0.1.1.jar |Water Physics Overhaul |wpo |0.1.1 |NONE |Manifest: NOSIGNATURE xercamusic-1.16.5-1.4.jar |Xerca's Music Maker Mod |xercamusic |1.16.5-1.4 |NONE |Manifest: NOSIGNATURE betterendforge-1.16.5-1.6.3.jar |BetterEnd Forge |betterendforge |1.16.5-1.6.3 |NONE |Manifest: NOSIGNATURE SpawnBalanceUtility-1.36.0.11.jar |SpawnBalanceUtility |spawnbalanceutility |1.36.0.11 |NONE |Manifest: NOSIGNATURE forge-1.16.5-36.2.8-client.jar |Minecraft |minecraft |1.16.5 |NONE |Manifest: NOSIGNATURE mcw-bridges-1.0.6-mc1.16.5.jar |Macaw's Bridges |mcwbridges |1.0.6 |NONE |Manifest: NOSIGNATURE DustrialDecor-1.2.9.jar |'Dustrial Decor |dustrial_decor |1.2.8 |NONE |Manifest: NOSIGNATURE physics-mod-1.3.4_forge.jar |Physics Mod |physicsmod |1.0 |NONE |Manifest: NOSIGNATURE T.S.A.jar |the spirit awakaning |the_spirit_awakaning |1.0.0 |NONE |Manifest: NOSIGNATURE Aquamirae+1.1+(1.16.5).jar |Aquamirae |ob_aquamirae |1.1.0 |NONE |Manifest: NOSIGNATURE mcpaint-1.6.3.jar |Mc Paint |mcpaint |1.6.3 |NONE |Manifest: NOSIGNATURE mcw-trapdoors-1.0.3-mc1.16.5.jar |Macaw's Trapdoors |mcwtrpdoors |1.0.3 |NONE |Manifest: NOSIGNATURE Road+Signs+USA+Forge+1.0.jar |Road Signs USA |road_signs_usa |1.0.0 |NONE |Manifest: NOSIGNATURE YungsBridges-Forge-1.16.4-1.0.1.jar |YUNG's Bridges |yungsbridges |1.16.4-1.0.1 |NONE |Manifest: NOSIGNATURE xercamod-1.17.1-2.2.jar |Xerca Mod |xercamod |1.17.1-2.2 |NONE |Manifest: NOSIGNATURE flywheel-1.16-0.2.4.jar |Flywheel |flywheel |1.16-0.2.4 |NONE |Manifest: NOSIGNATURE steampowered-1.16.5-1.1.1.jar |Create: Steam Powered |steampowered |1.16.5-1.1.1 |NONE |Manifest: NOSIGNATURE create-mc1.16.5_v0.3.2f.jar |Create |create |v0.3.2f |NONE |Manifest: NOSIGNATURE tarot-v1.0.1-forge-1.16.5.jar |Tarot |tarot |1.0.1 |NONE |Manifest: NOSIGNATURE xplosives-1.2.jar |XPlosives |xplosives |1.2.0 |NONE |Manifest: NOSIGNATURE rats-7.2.0-1.16.5.jar |Rats |rats |7.2.0 |NONE |Manifest: NOSIGNATURE ratlantis-1.0.0-1.16.3.jar |Rats: Ratlantis |ratlantis |1.0.0-1.16.3 |NONE |Manifest: NOSIGNATURE gravestone-1.16.5-1.0.6.jar |Gravestone Mod |gravestone |1.16.5-1.0.6 |NONE |Manifest: NOSIGNATURE YungsExtras-Forge-1.16.4-1.0.jar |YUNG's Extras |yungsextras |Forge-1.16.4-1.0 |NONE |Manifest: NOSIGNATURE FramedBlocks-2.11.1.jar |FramedBlocks |framedblocks |2.11.1 |NONE |Manifest: NOSIGNATURE DoubleSlabs-1.16-3.7.2.jar |Double Slabs |doubleslabs |3.7.2 |NONE |Manifest: NOSIGNATURE ages-api-1.16.5-1.2.0.jar |Ages API |ages_api |1.16.5-1.2.0 |NONE |Manifest: NOSIGNATURE BetterStrongholds-1.16.4-1.2.1.jar |YUNG's Better Strongholds |betterstrongholds |1.16.4-1.2.1 |NONE |Manifest: NOSIGNATURE light-pistons-1.1.0.jar |Light Pistons |light-pistons |1.0.0 |NONE |Manifest: NOSIGNATURE Auto-Smelting+1.2.jar |Auto Smelting |autosmelting |1.2 |NONE |Manifest: NOSIGNATURE World+Stripper-1.16.5-2.1.0.jar |World Stripper |worldstripper |2.1.0 |NONE |Manifest: NOSIGNATURE cfm-7.0.0pre22-1.16.3.jar |MrCrayfish's Furniture Mod |cfm |7.0.0-pre22 |NONE |Manifest: NOSIGNATURE Obscuria's+Core+1.1+(1.16.5).jar |Obscuria's Core |ob_core |1.1.0 |NONE |Manifest: NOSIGNATURE creategearaddon-v1.1.0.jar |Create gear addon |creategearaddon |v1.1.0 |NONE |Manifest: NOSIGNATURE PoliceCraft-PC-1.16.5.jar |police craft mod PC |police_craft_mod_pc |1.0.0 |NONE |Manifest: NOSIGNATURE DynamicTrees-1.16.5-0.10.0-Beta25.jar |Dynamic Trees |dynamictrees |1.16.5-0.10.0-Beta25|NONE |Manifest: NOSIGNATURE chiselsandbits-1.0.38-ALPHA.jar |Chisels & bits |chiselsandbits |1.0.38-ALPHA |NONE |Manifest: NOSIGNATURE BetterMineshafts-Forge-1.16.4-2.0.4.jar |YUNG's Better Mineshafts |bettermineshafts |1.16.4-2.0.4 |NONE |Manifest: NOSIGNATURE BetterFoliage-2.7.1-Forge-1.16.5.jar |Better Foliage |betterfoliage |2.7.1 |NONE |Manifest: NOSIGNATURE drinkbeer-1.16.5-2.3.1.jar |Drink Beer |drinkbeer |2.3.1 |NONE |Manifest: NOSIGNATURE Launched Version: 1.16.5-forge-36.2.8 Backend library: LWJGL version 3.2.2 build 10 Backend API: NVIDIA GeForce GTX 1070 Ti/PCIe/SSE2 GL version 4.6.0 NVIDIA 471.96, NVIDIA Corporation GL Caps: Using framebuffer using OpenGL 3.0 Using VBOs: Yes Is Modded: Definitely; Client brand changed to 'forge' Type: Client (map_client.txt) CPU: 16x AMD Ryzen 7 2700X Eight-Core Processor  
    • Hello everyone, I am making a mod that place specific sign in Minecraft. I decided to make a first gui that allow the user to select a specific form of sign. Then I create a second screen for the sign with a little white arrow. However, when placing one of this and retrying to create the same sign it did initialise the screen but is unable to render it. I will add as detail that the screen is generated using a loop of networking call : first the user click on the block which send to the server a message to open the GUI. Then when on the first GUI if we click on the specific button, it send to server a message to open the second GUI. Here is the link to my git repository : https://github.com/matt1999rd/SignMod    
    • https://forge.gemwire.uk/wiki/SimpleChannel#Sending_to_Clients what D7 means is why you send a packet from the client to the server to get a structure location
    • Thanks for confirming my assumptions. (I was already flamed on the OptiFine-Github for posting this issue because it was already acknowledged beforehand). I just wanted to post this on both pages.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.