• Recently Browsing

    No registered users viewing this page.

  • Posts

    • You might find this tutorial project useful: https://github.com/TheGreyGhost/MinecraftByExample   In order to find the code for Nether portals, you need to know a bit about the objects and datastructures used by Minecraft; that's where the various tutorials around the web can be a big help. The source code itself is generally poorly documented (very few comments in vanilla code, and somewhat patchy comments for the Forge code) and often the names of methods can be misleading or even wrong, because the code has been decompiled and then manually deobfuscated by crowdsourcing.   So for example for NetherPortals, the relevant code is in NetherPortalBlock and PortalSize, but it will be difficult to understand what's going on.  You might be better off with BedBlock or DoorBlock but even those are likely to be hard work until you have a number of the key concepts around blocks and blockstates under your belt.   -TGG  
    • I'm running 2 different mods, I'm lost and don't know what to do. when i press play, it just doesn't load.
    • Howdy folks   Are there any guidelines I should follow to ensure that my mod code is not going to cause multithreading problems?   Most of the time it is obvious because I know whether my code is in a render thread, client tick thread, server thread etc, and the method I'm overriding or implementing gives me the (thread-safe) object I need.   But I think there are some other places where there might be risk of concurrent threads colliding if I call vanilla objects; especially static registration methods of vanilla classes during mod initialisation.   Are ModEventBus events called concurrently if multiple mods are present?  If so, any calls I make to vanilla code from a ModEventBus event is likely to be risky I think.  I hear rumours that DeferredWordQueue::enqueueWork is the method to ensure that registrations using vanilla classes are executed single-threaded, is this the intended method?   What about the server thread, client thread?  Eg are there ever concurrent server threads which may cause my mod to access non-thread-safe objects or methods?  I know there are multiple render threads, which is perfectly safe provided I stick to the objects provided in the calling method or event and don't try to access server or client objects via 'sneaky' methods.   What assumptions is it safe to make?   The worst bugs I've ever had to deal with have all been caused by multithread collisions or race conditions so I'm very keen to understand where the high risk areas are...   Cheers  TGG  
  • Topics

  • Who's Online (See full list)