Jump to content

aw_wolfe

Members
  • Posts

    94
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by aw_wolfe

  1. I have a mod that alters the day/night cycle. To integrate it, the /time command needs to be adjusted. I've done this by creating a new CommandTimeR class that extends CommandTime and in my event handlers class, I listen for CommandEvent and if the 'time' command is used, I launch my class. Everything for me works fine, except that the vanilla CommandTime is also fired. I want to cancel the vanilla CommandTime and handle the event myself. The commandMap in CommandHandler is private, so can't simply manually remove. Is there anyway to unregister the vanilla time command (and then register mine as a normal command instead of listening for vanilla command) or cancel the execution of it when I handle it? Thanks, Tony
  2. Thanks, even dumber mistake. I was following online directions from older version of setting up and was running a vanilla server that simply wasn't even trying to load the mods. After thinking about not getting stdout messages, I realized what was happening and was able to fix it by running the server from command line ./gradlew runServer from project directory. Thanks, Tony
  3. found an article suggesting problem related to the server not actually loading any mods. mod_list.json points to a libraries folder, which I put my jar into. I've tried added to the modRef arrary in the json, but nothing so far is working, no indication mods are being loaded. Does forge output anything in the server stdout to indicate that forge is loaded and trying to load mods?
  4. having a mod item in your inventory is erased if you quit and rejoin the game. So the server isn't storing them. Seems to point toward server configuration problem. all vanilla data is saved. Tony
  5. I should also note that in creative mode. The mod items are listed in the 'master' inventory, you can take them to your inventory. But, placing them causes them to 'flash' there and immediately disappear. The inventory also does not let you drop them with the 'q' key in creative mode. All vanilla items seem to work fine. when running the server with /debug, I was getting some warnings, but not directly related to issues....meaning, seeing an item disappear wasn't preceeded or followed immediately by a warning, so while might be a problem, not a direct cause/effect. No other warnings/errors appeared in the stdout/log file. [19:41:24] [Server thread/WARN]: Something's taking too long! 'root.levels.world.tick' took aprox 115.649885 ms [19:41:24] [Server thread/WARN]: Something's taking too long! 'root.levels.world' took aprox 116.026612 ms [19:41:24] [Server thread/WARN]: Something's taking too long! 'root.levels' took aprox 116.21246 ms [19:41:24] [Server thread/WARN]: Something's taking too long! 'root' took aprox 116.372142 ms [19:41:31] [Server thread/WARN]: Something's taking too long! 'root.levels.world.tick.entities.regular.tick' took aprox 100.02426
  6. minecraft: 1.11.2 forge:forge-1.11.2-13.20.0.2228 linux I have a server running with new mod items and having issues, so I took out my mod testing and put in other 'established' mods to see if it was mine or had to do with the server. So right now, I have SpartanShields-1.11-1.2.jar placed in the server/mod directory. (I'll describe problem with known working mods so that there is no question that my mod is the issue. ) It loads, but has some weird 'artifacts'.... 1) making shield requires only 1 item placed in inventory slot, having a stack of 2 in any slot shows shield, but trying to take shield out, causes the shield to disappear. Dragging it to your inventory: shield disappears and ingredients reappear. - could live with ***2) once shield is made and equipped, it will disappear randomly in a few minutes....even with no damage.*** --makes mods useless I tried one of the decorations pack: cfm-4.1.2-mc1.11.2.jar and items disappear instantly when placed on ground. --makes mods useless Note: all these work fine if I run the client in single player. All mods are placed in the server/mods directory, client/run/mods directory. Server is run in commandline. clients are started with forge eclipse So, have I installed the mods incorrectly by placing them in the server/mod directory? is there some other setting or file permission thing that is causing the items to despawn? Is it a client-server issue where the server is causing items to be erased on a sync because they never get updated to the server? Troubleshooting ideals? Thanks, Tony
  7. If I start the client from eclipse with the argument : --username=Tony , in the run configurations it works. However, I am not seeing how to do this from the command line with gradlew runClient. I get an error: * What went wrong: Problem configuring task :runClient from command line. > Unknown command-line option '--username'. What is the proper way to start from commandline? Sorry, obviously I've been doing this wrong. Eclipse run config points to a main class GradleStart, but I don't see any jars in my project folder that would have it.
  8. Thanks. I did find if I set the server to offline I was able to connect without logging into my minecraft account. However, the player name is randomly selected each time I join the server. Is there a way to set the player name from the command line like ..... ./gradlew runClient --playername="Tony".... or something similar? Thanks, Tony
  9. Ok, so you can't use a development environment to run more than 1 copy of minecraft on separate lan machines to test network issues out? Each copy needs to different minecraft licence? Or can I log in with single minecraft license on 2 different machines and connect 'offline lan'? I remember older versions of minecraft had no issues connecting lan and only needed licence if going online. Thanks, Tony
  10. minecraft 1.11.2 forge-1.11.2-13.20.0.2228 linux I want to test my mod in a multiplayer environment. I copied my project folder to another local computer and re-ran the ./gradlew build,./gradlew runClient. It runs on new machine. I select "open to lan" and try to connect with my computer. I get a "Failed to login: Invalid session (Try restarting your game)" error message. Restarting game, does not help. Is there some configuration in forge or a different way to start it that would allow me to connect? Is there something else I can do to troubleshoot? Thanks, Tony
  11. Great! Thank you so much, works now. For others that run into same problem. Mod class: @Mod.EventHandler public void init(FMLInitializationEvent event){ MinecraftForge.EVENT_BUS.register(new SeasonsEventHandler()); } EventHandler Class: public class SeasonsEventHandler { @SubscribeEvent public void onTickEvent(WorldTickEvent event){ if(event.world.getTotalWorldTime()%40==0) //only need to check every couple seconds. Probably could be less often { updateSeason(event.world); } //System.out.println("_______________OnTickEvent_______________"); } private void udpateSeason(World world){ //code here } }
  12. also, if event fires, I'd have access to the world object through the event (So don't need to mess with Minecraft.getMinecraft()--but still not sure why doesn't work on the 'real' minecraft. I get the obfucated issue, just not sure what to change and thought the gradlew build would have handled it...all other minecraft mappings in previous mods have worked--never tried Minecraft.getMinecraft() before though), which is what I want. But how often is this event going to fire? I don't need 20 ticks a second and don't want to waster resources if do not have to....which is another reason I originally went with the java.Timer route.
  13. Thanks. This is what I have now...still not getting anything on the stdout. Thanks for your patience. ModClass: @SubscribeEvent @Mod.EventHandler public void init(FMLInitializationEvent event){ MinecraftForge.EVENT_BUS.register(new SeasonsEventHandler()); } EventHandlerclass public class SeasonsEventHandler { public void onTickEvent(WorldTickEvent event){ System.out.println("_______________OnTickEvent_______________"); } }
  14. Am I registering correctly? or am I completely misunderstanding what you are suggesting I need to do?
  15. Thanks. Just tried this... in main mod class: @Mod.EventHandler public void postInit(FMLPostInitializationEvent event){ System.out.println("Post initialization event---------------"); //some tutorials were recommending registering with more than one bus. Neither seem to work. MinecraftForge.EVENT_BUS.register(new SeasonsEventHandler()); FMLCommonHandler.instance().bus().register(new SeasonsEventHandler()); } in SeasonsEventHandler class: public class SeasonsEventHandler { public void onTickEvent(net.minecraftforge.fml.common.gameevent.TickEvent event){ System.out.println("_______________OnTickEvent_______________"); } } The SeasonsEventHandler never prints out the "OnTickEvent".
  16. Timer issue: I am trying to have an overall monitor/controller that isn't linked to a specific object in the game and only need to check occasionally on the time. So it isn't linked to anything that has an in game Entity where I could call for a tick update (or more likely I don't know how to do so). The tutorials I found were for older versions that the functions didn't line up and were for objects in a game that were generally called. Is there a decent reference for getting a tickupdate from a non-entity class? build: I built the mod jar with "./gradlew build" and grabbed it from /build/libs/ . This is what has worked for me with other mods in the past...but I'm still new at this, so if there is a better way to port over, I'll happily change. Is there a setting in the build.gradle file or somewhere that will map the to obfuscate minecraft?
  17. Minecraft: 1.11.2 Forge:forge-1.11.2-13.20.0.2228 Linux. I have a main mod class where I am using java.Timer and Java.Timer.TimerTask to run a function every so often. In my preInt(FMLPreInitializationEvent even) function I get a reference to Minecraft.getMinecraft and store it, so that the TimerTask can access the world inforation when it runs. This works in the development evironment, running from project folder with ./gradlew runClient. Game loads, Forge loads, mod loads, function runs as scheduled (STDOUT used to check). When I port the mod (jar file) over to my .minecraft (authentic version) mod folder...game loads, forge starts loading, mod tries to load but throws: java.lang.NoSuchMethodError: net.minecraft.client.Minecraft.getMinecraft(). When installing forge, I used the jar and chose 'install client'. Why doesn't forge (on the 'real' minecraft) have a getMinecraft function ? What do I need to do? Wrong forge install? Did I need to install server? Thanks, Tony
  18. I am trying to setup a new environment for modding minecraft 1.11.2. I am following tutorial (https://mcforge.readthedocs.io/en/latest/gettingstarted/) for linux. After downloading, creating new folder and running gradlew setupDecompWorkspace I receive an error with several notes. I am new to this and not sure if notes are leading to errors or if servers are down or something. I did not run with --info or --stacktrace, since the error seems self-explanatory, but can do so if anyone thinks might be helpful. Thanks for any help. Tony First questionable note: "This mapping 'snapshot_20161220' was designed for MC 1.11! Use at your own peril." -- download page on Forge says 11.2 , so not sure why coming back and stating it is 1.11 Error: Download http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.11.2-13.20.0.2228/forge-1.11.2-13.20.0.2228-userdev.jar :extractDependencyATs SKIPPED :extractMcpData Download http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp/1.11.2/mcp-1.11.2-srg.zip :extractMcpMappings FAILURE: Build failed with an exception. * What went wrong: Could not resolve all dependencies for configuration ':forgeGradleMcpMappings'. > Could not resolve de.oceanlabs.mcp:mcp_snapshot:20161220-1.11. Required by: com.yourname.modid:OilMod:1.0 > Could not resolve de.oceanlabs.mcp:mcp_snapshot:20161220-1.11. > Could not get resource 'http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp_snapshot/20161220-1.11/mcp_snapshot-20161220-1.11.pom'. > Could not GET 'http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp_snapshot/20161220-1.11/mcp_snapshot-20161220-1.11.pom'. > Connect to files.minecraftforge.net:80 [files.minecraftforge.net/158.69.55.219] failed: Connection timed out * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED ***************** ***************** Entire dump: ./gradlew setupDecompWorkspace To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.14/userguide/gradle_daemon.html. This mapping 'snapshot_20161220' was designed for MC 1.11! Use at your own peril. ################################################# ForgeGradle 2.2-SNAPSHOT-2112b0a https://github.com/MinecraftForge/ForgeGradle ################################################# Powered by MCP unknown http://modcoderpack.com by: Searge, ProfMobius, Fesh0r, R4wk, ZeuX, IngisKahn, bspkrs ################################################# :deobfCompileDummyTask :deobfProvidedDummyTask :getVersionJson :extractUserdev Download http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.11.2-13.20.0.2228/forge-1.11.2-13.20.0.2228.pom Download http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.11.2-13.20.0.2228/forge-1.11.2-13.20.0.2228-userdev.jar :extractDependencyATs SKIPPED :extractMcpData Download http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp/1.11.2/mcp-1.11.2-srg.zip :extractMcpMappings FAILURE: Build failed with an exception. * What went wrong: Could not resolve all dependencies for configuration ':forgeGradleMcpMappings'. > Could not resolve de.oceanlabs.mcp:mcp_snapshot:20161220-1.11. Required by: com.yourname.modid:OilMod:1.0 > Could not resolve de.oceanlabs.mcp:mcp_snapshot:20161220-1.11. > Could not get resource 'http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp_snapshot/20161220-1.11/mcp_snapshot-20161220-1.11.pom'. > Could not GET 'http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp_snapshot/20161220-1.11/mcp_snapshot-20161220-1.11.pom'. > Connect to files.minecraftforge.net:80 [files.minecraftforge.net/158.69.55.219] failed: Connection timed out * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED
×
×
  • Create New...

Important Information

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