-
Posts
31 -
Joined
-
Last visited
Everything posted by Osuology
-
[1.10.2] How to register entities in this version?
Osuology replied to Osuology's topic in Modder Support
Thank you very much! It's working perfectly (other than the spawn egg spawning a pig, but that's because I haven't finished it completely yet). -
[1.10.2] How to register entities in this version?
Osuology replied to Osuology's topic in Modder Support
OK, I took a look at some stuff (namely the Mod class in fml) and I saw that @Mod.Instance is it's own annotation entirely. Putting in @Mod.Instance(value = "modidhere") is the proper syntax, no? I just don't know where to put it, since everywhere I could think of putting it is invalid. -
[1.10.2] How to register entities in this version?
Osuology replied to Osuology's topic in Modder Support
I don't completely understand here. @Mod is used to initialize the mod. And, annotations can only be before methods or classes to feed information, so I don't understand how to apply this. It says it's invalid before the method, and using it before the class doesn't help a bit. I can't use any info I put into the annotation for the class, and annotations are not exactly the object that the method is looking for. I'm sorry if I'm really stupid here, but I'm trying to make sense of this. Looking at forge documentation on it gives nothing helpful, and neither does looking at the java documentation. I know what an annotation does I think. I don't understand how any of that helps me one bit. -
[1.10.2] How to register entities in this version?
Osuology replied to Osuology's topic in Modder Support
OK, that's cool that they upgraded from what they had before with the ID. It says that annotations are not allowed in the method though, so unless I'm misunderstanding, I can't use @Mod.Instance. -
[1.10.2] How to register entities in this version?
Osuology replied to Osuology's topic in Modder Support
I tried this, but first of all, I don't know how to get a unique id and secondly when I type mymainclass.instance, there is no value called instance. -
There is no easy way to find it in the game's source code, and I haven't seen one tutorial for 1.10.2 on entities. The file I have works completely fine, I just can't figure out how to register them. I know you use EntityRegistry but the method requires the mod and an ID? I don't really understand what this is necessary for...
-
The output log: http://pastebin.com/7zhXCtZT Sorry, if this is the wrong place. I have refreshed dependencies and followed the README, and it came up with this. I know it usually has been solved by updating drivers but I have the latest drivers for sure. Does anyone know what is the deal? EDIT: Also, this only happens in IntelliJ, never happens in normal minecraft and even in modded minecraft with the EXACT same minecraft forge version.
-
[1.10.2] IntelliJ "Run Minecraft Client" Not Working
Osuology replied to Osuology's topic in Modder Support
Ah, so my problem was not setting one part of the config for the application settings. Set "Use classpath of module" to <whatever>_main fixed everything. Thanks for linking that video! -
I have setup gradle for intellij, as the README.txt tells you to. I have generated the intellij runs, and have refreshed dependencies. After running minecraft client, I get the following error: Exception in thread "main" java.lang.ClassNotFoundException: GradleStart at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:123) Java HotSpot 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release I understand what it means, and I'm pretty sure GradleStart isn't the right class to start minecraft with, but net.minecraft.Launcher.Launch isn't working. As a matter of fact, intellij doesn't recognize any of the vanilla packages at all for some reason.
-
[1.10.2] Detecting whether a block was generated during world gen.
Osuology replied to Osuology's topic in Modder Support
So, essentially use my mod's eventhandler to edit the chunkload event, such that each block is generated with a boolean, that is true? Then also use my eventhandler to edit blockplace event, and make that boolean defaultly false? I don't know how to save anything to a chunk yet, could you please go a little more into detail on that? -
I'm not sure if I'm right about this, but maybe it's true. Cactus's have a slightly smaller hitbox than normal blocks, and perhaps that's so that the onEntityCollided actually works?
-
[1.10.2] Using DataManager to sync client and server
Osuology replied to Osuology's topic in Modder Support
Woops. I'm really tired. Ok thanks a lot! -
[1.10.2] Using DataManager to sync client and server
Osuology replied to Osuology's topic in Modder Support
Well, first of all, I just found out that putting || offItem != null in the if loop causes the problem. I have gotten it to work. mostly. The only problem is when I switch from the nether star to empty hand, it doesn't change anything at all I still can fly. @pWn3d I probably should do it that way, except offhand and main hand as separate if loops. -
[1.10.2] Using DataManager to sync client and server
Osuology replied to Osuology's topic in Modder Support
I'm aware but that doesn't actually cause the problem. It still crashes after adding offHand != null. -
[1.10.2] Using DataManager to sync client and server
Osuology replied to Osuology's topic in Modder Support
That's my event handler of course. My main mod file is: -
[1.10.2] Using DataManager to sync client and server
Osuology replied to Osuology's topic in Modder Support
Actually, it's not working. When I hold the nether star I can fly, and if I switch to empty hand I still fly. And it crashes if I hold something else that's not a nether star. -
[1.10.2] Using DataManager to sync client and server
Osuology replied to Osuology's topic in Modder Support
Oh I wasn't aware of PlayerTickEvent existing. I changed that. Yes it is a NullPointerException, but checking if it's null doesn't help at all it still gives me a null pointer exception. Anyways new code: EventHandler: The mod class is the exact same. EDIT: Never mind, I shouldn't call .getItem to check if it's null. It works now. Thanks! -
[1.10.2] Using DataManager to sync client and server
Osuology replied to Osuology's topic in Modder Support
Well, my code as is causes a crash saying that the player is ticking. My EventHandler: And my main mod file: -
I assume DataManager is the same as DataWatcher for 1.7.10, but that might be my problem If they are the same though, I'm just trying to detect whether the player is holding a item and if so, they can fly. I think what I have would work, but the problem is that I'm getting that information from the client which it obviously doesn't store, the server stores that. So I don't quite understand how to retrieve that information from the server.