Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/23/17 in all areas

  1. Best thing to do is upload your code to a github repository, it's much easier for people to see when you do so. It's free, and quite helpful. http://www.github.com For ore generation, I just went to google and typed in "minecraft forge 1.11.2 ore generation". You basically need to implement an IWorldGenerator. http://www.minecraftforge.net/forum/topic/53563-111-world-generation/ looks like it has some info you could use.
    2 points
  2. Do you have a file at this location?
    1 point
  3. That is not a material but a model issue. Make sure that your model is correct - you can follow this guide Okay, looking at your sourcecode: Please, never use ItemModelMesher. It leads to numerous bugs and issues. There is a ModelLoader class for registering your models. You should move everything rendering registry related into your client proxy. Models for blocks/items must be registered during pre-init, not init. Your blocks/items should be statically initialized. There is no need to call the init method. Simply write public static final Block rubyblock = new BlockRuby(); I believe that your blockstates file is not correct. I have provided a link to a tutorial on how to make those. Your model JSON file is invalid. It is missing an opening bracket
    1 point
  4. Drawing must happen each frame, as at the beginning of each frame the screen gets cleared of anything that is drawn on it. Create a variable to hold if the player clicked the mouse or not and draw your rectangle in the drawScreen method if that variable is true/hold whatever value you need it to. If you want something to be drawn 'after draw screen' just put your drawing calls after the super.drawScreen
    1 point
  5. http://mcforge.readthedocs.io/en/latest/concepts/sides/ When in SP you are connected to integrated local server (basically multiplayer with one player). In SP you have access to your own MinecraftServer since it is the one you are running in background, thus this: MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance(); Will not be null (it will be your integrated server). Now when you connect to other server (LAN or dedic) you don't have server thread with you (thus your getMinecraftServerInstance() will be null). Read 1st link if you didn't catch the fact that there are 2 threads. Now - guts tell me that MinecraftServer#getMaxPlayerIdleMinutes() is for server-side only. This means you can't access it from client thread. To make it clear: - If you are on MP (outside server) you don't have server thread, thus you cannot access MinecraftServer#getMaxPlayerIdleMinutes(). - While you are on SP - you DO have your integrated server thread, BUT - while it is possible to access this value (you will be doing cross-thread calls), you generally shouldn't do so! Why? Exchanging data between threads directly is kind of bad design, because, as you should understand now - it is NOT universal (works only on SP, not on MP). How to deal with it? Unless "idleMinutes" are somehow sent to client internally (which I doubt) - only server thread can use this field, that is why you will need packets to share it with client. 1. Setup SimpleNetworkWrapper 2. Make packet which will send integer (only) 3. Make handler which will literally set some static field to integer received. 4. The packet can be sent from PlayerEvent.PlayerLoggedInEvent. 5. Use that integer in all of your rendering things. Links: SNW: http://www.minecraftforge.net/forum/index.php/topic,20135.0.html Example: http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/2137055-1-7-x-1-8-customizing-packet-handling-with Thread safety: http://greyminecraftcoder.blogspot.com.au/2015/01/thread-safety-with-network-messages.html Aside from that: (some recent quote that might be useful): Important thing are those so-called "scopes" - you shouldn't write code for one scope, but for all, and if you need such code, you use proxies. Note that it is not directly connected with current case.
    1 point
  6. http://mcforge.readthedocs.io/en/latest/concepts/sides/ When in SP you are connected to integrated local server (basically multiplayer with one player). In SP you have access to your own MinecraftServer since it is the one you are running in background, thus this: MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance(); Will not be null (it will be your integrated server). Now when you connect to other server (LAN or dedic) you don't have server thread with you (thus your getMinecraftServerInstance() will be null). Read 1st link if you didn't catch the fact that there are 2 threads. Now - guts tell me that MinecraftServer#getMaxPlayerIdleMinutes() is for server-side only. This means you can't access it from client thread. To make it clear: - If you are on MP (outside server) you don't have server thread, thus you cannot access MinecraftServer#getMaxPlayerIdleMinutes(). - While you are on SP - you DO have your integrated server thread, BUT - while it is possible to access this value (you will be doing cross-thread calls), you generally shouldn't do so! Why? Exchanging data between threads directly is kind of bad design, because, as you should understand now - it is NOT universal (works only on SP, not on MP). How to deal with it? Unless "idleMinutes" are somehow sent to client internally (which I doubt) - only server thread can use this field, that is why you will need packets to share it with client. 1. Setup SimpleNetworkWrapper 2. Make packet which will send integer (only) 3. Make handler which will literally set some static field to integer received. 4. The packet can be sent from PlayerEvent.PlayerLoggedInEvent. 5. Use that integer in all of your rendering things. Links: SNW: http://www.minecraftforge.net/forum/index.php/topic,20135.0.html Example: http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/2137055-1-7-x-1-8-customizing-packet-handling-with Thread safety: http://greyminecraftcoder.blogspot.com.au/2015/01/thread-safety-with-network-messages.html Aside from that: (some recent quote that might be useful): Important thing are those so-called "scopes" - you shouldn't write code for one scope, but for all, and if you need such code, you use proxies. Note that it is not directly connected with current case.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.