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

PulseBeat_02

Members
  • Posts

    161
  • Joined

  • Last visited

Everything posted by PulseBeat_02

  1. That makes way more sense now. I was a bit confused originally because that method return an array of worlds, and I wouldn't know which world that would be currently loading in. Ah. Thank you for your help.
  2. Oh yeah, I forgot lol. If I recall properly, I would need to use the MinecraftServer.getServer().worldServers method (Unless it was changed in the recent versions of forge). This would return an array of all loaded Worlds. I would then change the method to a loop which would run through all of the loaded worlds.
  3. If you aren't doing anything that is going to be "custom" to the slab, you could just directly use the constructor from the class and pass in some params (as what Draco18s said). That would be much simpler and easier to read. If you wanted to change how certain functions and methods work in the slab, you would have to extend the class.
  4. I did see the SlabBlock class. Maybe try making your own Slab class and extend it? I'm pretty sure if you search for classes you will find a couple examples of slabs in the Minecraft source.
  5. It should be noted that items do burn in fire (You would have to override that). I am slightly confused on what your plan is. Do you want the cooked item to be thrown out from the fire and onto the player once it is finished? You could always make a block similar to the normal Fireplace in Minecraft (which also cooks food). Maybe take a look at that class.
  6. Ah. I see. Thank you for helping me find what the other events are that I needed to use. That means that if I want to check if a user is creating a fresh world, I would have to make a new class which extends WorldSavedData (which would contain a constructor that would be invoked if the player is creating a new world). Here is my code, (and the method used to determine if a world is newly created is inside the class): import org.kingmammoth.kmcutscenes.KingMammothCutScenes; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.storage.WorldSavedData; import net.minecraftforge.fml.client.FMLClientHandler; public class FreshWorldCreation extends WorldSavedData { private static final String DATA_NAME = KingMammothCutScenes.MODID + "_CUTSCENEDATA"; public FreshWorldCreation() { super(DATA_NAME); } @Override public void readFromNBT(NBTTagCompound nbt) { } @Override public NBTTagCompound writeToNBT(NBTTagCompound compound) { return null; } public static boolean isFreshlyCreated() { FreshWorldCreation instance = (FreshWorldCreation) FMLClientHandler.instance().getWorldClient().getMapStorage() .getOrLoadData(FreshWorldCreation.class, DATA_NAME); return instance == null ? true : false; } } Is that correct?
  7. Ah. Thank you for the event. I was thinking of if there was more specific events, such as something like onWorldCreate, onWorldLoad, onExitWorld, something like that.
  8. Hi, I was looking around for an event which would could be used while the user is creating a single player world. (For example, methods with this event would be called when the user is creating a single player world). Does anyone know a possible event which exists? If there isn't an event, please tell me a way to do this without using the event.
  9. You can get started on Twitch, if that helps. Just make a custom profile and start adding some mods. You can look at the mod's documentation if you want to tweak some settings.
  10. This thread is pretty old, and I don't know why we are necroing it. I think the conclusion is that adfoc.us is very safe as long as you don't click on the ads and press skip on the top right corner. If a mod could close the thread they are more than welcome to.
  11. So there is this mod called Ambience, (a mod which adds music), that I would like to port to 1.15. The current version is 1.12. What steps would I take to get the code from the Github and set the version in Gradle/Forge to 1.15? I've downloaded the code in a zip file, edited the gradle config file to set the mcp mappings to the latest 1.15 version, and set the version to the latest 1.15 forge version. After that I ran gradlew eclipse and gradlew genEclipseRuns. Is there anything else I have to do before in order to get myself started and start changing up the code to make it compatible with forge 1.15? Thanks.
  12. I'm not a moderator, but anything 1.12 and below is not supported. Check out the update on the green bar.
  13. @DavidM I am having some trouble trying to configure these dependencies in the build.gradle dependencies section. Can you show me a line of script that would add JavaFX to the build path?
  14. Hello, have you tried following online tutorials such as https://minecraft.gamepedia.com/Mods/Installing_Forge_mods You must install Forge by clicking on the jar/exe file (depending on your installation), and then selecting "Install Client". Make sure you played that specific Minecraft version at least once, or the installer won't let you install Forge. Then, after installing, go into your .minecraft folder, and go into the mods folder (or create a mods folder if there isn't one), and add the downloaded mod jar file there. Then, go into Minecraft, create another custom Launch Configuration, and select your forge version. Then, you should be able to just click "Play", and the mod should be loaded in.
  15. Hi, I was trying to make a Scene in my mod using JavaFX. After making the JFXPanel, and adding it to the JFrame, I ran it in my mod, however, I crashed almost immediately. Time: 8/27/19 8:35 PM Description: There was a severe problem during mod loading that has caused the game to fail net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from King Mammoth (kingmammoth) Caused by: java.lang.NoClassDefFoundError: pulsebeat_02/kingmammoth/config/window/Trailer at pulsebeat_02.kingmammoth.KingMammoth.preInit(KingMammoth.java:42) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:639) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) at com.google.common.eventbus.EventBus.post(EventBus.java:217) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) at com.google.common.eventbus.EventBus.post(EventBus.java:217) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136) at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:627) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:252) at net.minecraft.client.Minecraft.init(Minecraft.java:514) at net.minecraft.client.Minecraft.run(Minecraft.java:422) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:25) Caused by: java.lang.ClassNotFoundException: pulsebeat_02.kingmammoth.config.window.Trailer at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 48 more Caused by: java.lang.NoClassDefFoundError: javafx/embed/swing/JFXPanel at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ... 50 more Caused by: java.lang.ClassNotFoundException: javafx.embed.swing.JFXPanel at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:101) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 54 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_191, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 210370472 bytes (200 MB) / 715128832 bytes (682 MB) up to 3801088000 bytes (3625 MB) JVM Flags: 0 total; IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.42 Powered by Forge 14.23.5.2838 5 mods loaded, 5 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored | State | ID | Version | Source | Signature | |:----- |:----------- |:------------ |:-------------------------------- |:--------- | | LCH | minecraft | 1.12.2 | minecraft.jar | None | | LCH | mcp | 9.42 | minecraft.jar | None | | LCH | FML | 8.0.99.99 | forgeSrc-1.12.2-14.23.5.2838.jar | None | | LCH | forge | 14.23.5.2838 | forgeSrc-1.12.2-14.23.5.2838.jar | None | | LCE | kingmammoth | 1.0.0 | main | None | Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 430.39' Renderer: 'GeForce GTX 1060 6GB/PCIe/SSE2' [20:35:52] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: #@!@# Game crashed! Crash report saved to: #@!@# C:\King Mammoth Mod\KingMammoth\run\.\crash-reports\crash-2019-08-27_20.35.52-client.txt From the crash report, it looks like attempting to initialize the JFrame with a JFXPanel will cause a crash due to Minecraft not finding the libraries, however, this is very misleading because Eclipse can identify these libraries, but Minecraft has a custom class loader I believe just by analyzing the crash report ( net.minecraft.launchwrapper.LaunchClassLoader.findClass ), Minecraft uses that class to load libraries. Is there way for my mod to include external dependencies such as JavaFX, other than Forge and included libraries?
  16. I found a class called "SplashProgress", that does this. I tried overriding the start() method with some other code, but eclipse gave me an error saying I couldn't override it. And also, what's so bad about doing this?
  17. Hi, I was wondering how I would implement a custom splash screen when Forge pre-inits, inits, and post-inits mod. When I mean by "Custom Splash Screen", I don't mean by going into the splash.properties file and editing properties, but by actually have a custom window with a different background, text, and possibly even images. Is there a class or method I would use to be able to achieve this? Thanks.
  18. Thanks, however, i solved it a different way by using GLStateManager.
  19. Hi, I wanted to implement a feature in my mod where if the player's mouse is pointing at a block, it will highlight it with a yellow line. How would I implement this into my mod?
  20. Ahh, I see what you are all saying. After adding @ObjectHolder("name here") to all the items, the textures were finally fixed and working. Thank you!
  21. @Animefan8888 Updated it @DaemonUmbra If I remove the static initializer, I can't register the model because it's in a separate class. Getters and Setters perhaps?
  22. @Animefan8888 After adding a logger statement, i noticed that the logger statement isn't printing something out, which probably means that the code probably did not run, or not being called. How would I fix this?
×
×
  • Create New...

Important Information

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