jabelar
Members-
Posts
3266 -
Joined
-
Last visited
-
Days Won
39
Everything posted by jabelar
-
Well there isn't anything really that special about a weather system. You just code what you want to happen and when. So in this case I assume you'd have some randomness for the starting and stopping of the sandstorm so you'd use some sort of world or server tick method and on the server side you'd check to see if it should start or stop the storm. Then you would need to notify all the clients using a packet about the state of the weather. Then on the client you'd either use an overlay render event or the fog density event and add your fog effect. Basically the state of the weather would be determined on the server, probably with some randomess, it would tell all the clients and the clients would use that information to control the fog or other effects.
-
So I can tell by your coding style that you are a competent programmer. So I suggest that you just need to learn a bit more about debugging tools. In your IDE (Eclipse or whatever you're using) you should have ability to run in a debug mode where you can watch field values and set breakpoints and such. With that it should quickly become obvious why any field isn't getting the value you expect. Since I like debugging issues during actual gameplay I find the debug mode can be a bit limiting for some situations (like you can't breakpoint every rendering frame) so I like to add my own console or logger statements. By putting them in judicious points in the code (usually in each method call to confirm that the method was called and the value of the parameters passed in) and at each logical branch in the code you can very quickly figure out what is going wrong. You're partly there as you are outputting some values to the console. So why not go further and trace the entire (relevant) logic of your code.
-
In terms of your general problem with registering items, it is understandable if you've modded before to be confused that there is now an entirely different method of doing so which uses special registry events together with a new "object holder" annotation. In your InitBlocks and InitItems classes you should actually initialize them to null. Then you should give each class the @ObjectHolder annotation. What this does is during mod loading there are several passes after each registry event to "inject" the actual instance into the fields. The fields are matched up by the field name matching the registry name (or you can add additional annotation if you want a different field name). Next you need methods that handle the registry events. I personally put those in an inner class of the class that has the @ObjectHolder instances. Those require methods regular event handling meaning the class needs the @EventBusSubscriber annotation and the methods need to be static and have the @SubscribeEvent annotation. The registry events are generic so you have to handle each valid type. Such as RegistryEvent.Register<Block> and RegistryEvent.Register<Item>. (Note you should also be using this for entities, biomes and some other things.) Lastly you do the actual constructing of your singleton instances in the registry handling event. You can see my example mod classes for ideas on how to put it all together: https://github.com/jabelar/ExampleMod-1.12/blob/master/src/main/java/com/blogspot/jabelarminecraft/examplemod/init/ModBlocks.java https://github.com/jabelar/ExampleMod-1.12/blob/master/src/main/java/com/blogspot/jabelarminecraft/examplemod/init/ModItems.java Hope that helps.
-
Creating a crop (1.12.2) and gives wierd errors!
jabelar replied to UM3 F0R TH3 W1N's topic in Modder Support
Okay, now I'm home and I have some time to give more specific advice. It took me a while to get into the @ObjectHolder annotation but the way you should do it is as follows: In your InitBlocks and InitItems classes you should actually initialize them to null. Then you should give each class the @ObjectHolder annotation. What this does is during mod loading there are several passes after each registry event to "inject" the actual instance into the fields. The fields are matched up by the field name matching the registry name (or you can add additional annotation if you want a different field name). Next you need methods that handle the registry events. I personally put those in an inner class of the class that has the @ObjectHolder instances. Those require methods regular event handling meaning the class needs the @EventBusSubscriber annotation and the methods need to be static and have the @SubscribeEvent annotation. The registry events are generic so you have to handle each valid type. Such as RegistryEvent.Register<Block> and RegistryEvent.Register<Item>. (Note you should also be using this for entities, biomes and some other things.) Lastly you do the actual constructing of your singleton instances in the registry handling event. You can see my example mod classes for ideas on how to put it all together: https://github.com/jabelar/ExampleMod-1.12/blob/master/src/main/java/com/blogspot/jabelarminecraft/examplemod/init/ModBlocks.java https://github.com/jabelar/ExampleMod-1.12/blob/master/src/main/java/com/blogspot/jabelarminecraft/examplemod/init/ModItems.java Now the cool thing is that if you do all this, you'll also solve your original problem because the Item registry event will happen after the Block is registered and injected into the object holder. So then when you instantiate your seed it will get the plantable block rather than null. Hope that helps. -
Creating a crop (1.12.2) and gives wierd errors!
jabelar replied to UM3 F0R TH3 W1N's topic in Modder Support
Okay, I was able to find way to look at paste bin. You are not using the recommended way of using the registry events and @ObjectHolder annotation. The way you are doing it will not work as you cannot control their order of the static initialization between the two classes. Please look how too use the new system and implement that. -
Creating a crop (1.12.2) and gives wierd errors!
jabelar replied to UM3 F0R TH3 W1N's topic in Modder Support
Sorry I know it can be frustrating to not get quick answers but remember we have lives. Today I had to get my daughter to the airport, have lunch with friends and now have to put in a couple hours at work. I can't look at it on my work break because my work blocks paste bin site. Ill probably be able to look at it this evening. Otherwise hopefully someone else can respond. But generally it is considered rude to bump your topic unless a full day has passed. -
Creating a crop (1.12.2) and gives wierd errors!
jabelar replied to UM3 F0R TH3 W1N's topic in Modder Support
Well first of all make sure you're using latest techniques for registering blocks and items. Then if that doesn't fix it by itself, post your registration and class code here so that people can help. -
Custom Flower - Texture only shows up for the item but not the block
jabelar replied to Korlimann's topic in Modder Support
Yeah, I just made a custom flower and decided to do it "flat" meaning making separate flower for each type rather than have a type variant. So then I just extended BlockBush instead of BlockFlower. public class BlockFlowerCloud extends BlockBush { public BlockFlowerCloud() { } @Override public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { return super.getBoundingBox(state, source, pos).offset(state.getOffset(source, pos)); } /** * Get the OffsetType for this Block. Determines if the model is rendered slightly offset. */ @Override public Block.EnumOffsetType getOffsetType() { return Block.EnumOffsetType.XZ; } } Then the blockstate and model were pretty easy. Note that you still need to handle the growth stage variant: { "forge_marker": 1, "defaults": { "model": "examplemod:cloud_flower", "uvlock": true }, "variants": { "normal": [{ }], "inventory": [{ }], "stage=0":[{ }], "stage=1":[{ }] } } model: { "parent": "block/cross", "textures": { "cross": "examplemod:blocks/cloud_flower" } } -
Creating a crop (1.12.2) and gives wierd errors!
jabelar replied to UM3 F0R TH3 W1N's topic in Modder Support
Not strange. Almost everyone who creates a custom crop runs into this. It is because the block instance is null when you construct the seed item to your seed item tries to plan a null. Just control the order. In 1.12.2 you should be using the registry event and @ObjectHolder system for registering and instantiating. In that case, the item registration should happen after the blocks get their object holder injection. Anyway, yes your suspicious is correct. It has to do with the order of registration and construction of the related classes. Just think through it and it should become obvious. -
It's just a coding style thing. That was probably convenient to the person who needed that method in the first place since they were using it for making creative tabs. Like you could pass in an existing list for the creative tab and this method would add to it then you could get the list containing the subitems of multiple item types and if they are itemstacks that makes it super easy to put into the gui container inventory.
-
Hmmm, you're right. In that case I would work around it by recording information about the player being in the bed during the START phase of that event and then restoring it (i.e. undoing the ejection from the bed if it occurred during the player onUpdate() method) in the END phase of that event.
-
I moved the event handling from the proxy to an independent event handling class and now the error goes away. It seems that maybe having the client proxy also be an event handler for sided events might have some conflict. Or maybe something happened when I was moving the methods out of the proxy that inadvertently fixed it. Does anyone know how having sided event handlers inside the proxy might cause trouble with sided class loading? One thing I noticed was that you can't put @SideOnly annotation on your client proxy class otherwise you get an error that the ClientProxy class itself is a no class def error. So I'm thinking that the client proxy class is technically loaded in some manner even on the server and I guess that allows the event handler to look at subscriptions for methods in the class even though on the server that shouldn't happen. I might play with this using a more targeted sample mod to see if there is an actual bug, or if it is just my poor understanding of this.
-
Handle the PlayerTickEvent START phase, cancel it so vanilla code doesn't run and copy the onUpdate() code over and modify the check for daytime to what you want.
-
I think that is set with the base block of the chunk generator. So you'd need a custom chunk generator as well. Alternatively, your biome decorator can go through the whole chunk and replace any stone already generated.
-
Yeah, it seems that having the client proxy class also be an @EventSubscriber isn't possible? If I comment out the @EventSubscriber the errors go away. I guess the event subscriber annotation picks up the classes and methods even though there is an @SideOnly annotation. I can put the event handlers back outside the proxy, but I was getting errors that way too. It is weird though because I've done GUIs and such for quite a while without previous problem. I'll keep trying to isolate the problem code...
-
Okay, so I've got a mod here: https://github.com/jabelar/ExampleMod-1.12 and I'm getting a NoClassDefFound error for GuiScreen when I run a Server run configuration in Eclipse. So seems to be an @SideOnly issue. However, I'm not entirely sure why as I have my Gui classes with @SideOnly annotation and I have all code calling it (including some event handling methods) in my ClientProxy. Here is full console output: 2018-02-15 22:03:55,264 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2018-02-15 22:03:55,267 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream [22:03:55] [main/INFO] [GradleStart]: Extra: [] [22:03:55] [main/INFO] [GradleStart]: Running with arguments: [--tweakClass, net.minecraftforge.fml.common.launcher.FMLServerTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [22:03:55] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLServerTweaker [22:03:55] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLServerTweaker [22:03:55] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [22:03:55] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLServerTweaker 2018-02-15 22:03:55,955 main WARN Disabling terminal, you're running in an unsupported environment. [22:03:55] [main/INFO] [FML]: Forge Mod Loader version 14.23.1.2582 for Minecraft 1.12.2 loading [22:03:55] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_161, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_161 [22:03:55] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [22:03:55] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin), we are in deobf and it's a forge core plugin [22:03:55] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin), we are in deobf and it's a forge core plugin [22:03:56] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [22:03:56] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [22:03:56] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [22:03:56] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [22:03:56] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [22:03:56] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [22:03:56] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [22:03:56] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [22:03:56] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [22:03:57] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [22:03:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [22:03:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [22:03:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [22:03:57] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [22:03:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [22:03:57] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.server.MinecraftServer} [22:04:03] [Server thread/INFO]: Starting minecraft server version 1.12.2 [22:04:03] [Server thread/INFO] [FML]: MinecraftForge v14.23.1.2582 Initialized [22:04:03] [Server thread/INFO] [FML]: Starts to replace vanilla recipe ingredients with ore ingredients. [22:04:03] [Server thread/INFO] [FML]: Replaced 1036 ore ingredients [22:04:04] [Server thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer [22:04:04] [Server thread/INFO] [FML]: Searching E:\Modding Workspace\run\assets\mods for mods [22:04:05] [Server thread/INFO] [FML]: Forge Mod Loader has identified 5 mods to load [22:04:05] [Server thread/WARN] [FML]: Missing English translation for FML: assets/fml/lang/en_us.lang [22:04:05] [Server thread/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, examplemod] at CLIENT [22:04:05] [Server thread/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, examplemod] at SERVER [22:04:06] [Server thread/ERROR] [FML]: An error occurred trying to load an EventBusSubscriber examplemod for modid java.lang.NoClassDefFoundError: net/minecraft/client/gui/GuiScreen [22:04:06] [Server thread/FATAL] [FML]: Fatal errors were detected during the transition from CONSTRUCTING to PREINITIALIZATION. Loading cannot continue [22:04:06] [Server thread/FATAL] [FML]: 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 | |:----- |:---------- |:------------ |:-------------------------------- |:--------- | | UC | minecraft | 1.12.2 | minecraft.jar | None | | UC | mcp | 9.42 | minecraft.jar | None | | UC | FML | 8.0.99.99 | forgeSrc-1.12.2-14.23.1.2582.jar | None | | UC | forge | 14.23.1.2582 | forgeSrc-1.12.2-14.23.1.2582.jar | None | | UE | examplemod | 1.0.0 | bin | None | [22:04:06] [Server thread/FATAL] [FML]: The following problems were captured during this phase [22:04:06] [Server thread/ERROR] [FML]: Caught exception from examplemod (net.minecraftforge.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/gui/GuiScreen) [22:04:06] [Server thread/ERROR]: Encountered an unexpected exception net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Example Mod (examplemod) Caused by: net.minecraftforge.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/gui/GuiScreen at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:89) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:586) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_161] at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[guava-21.0.jar:?] at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[guava-21.0.jar:?] at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[guava-21.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[guava-21.0.jar:?] at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:253) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:231) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_161] at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[guava-21.0.jar:?] at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[guava-21.0.jar:?] at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[guava-21.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[guava-21.0.jar:?] at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:148) ~[LoadController.class:?] at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:568) ~[Loader.class:?] at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:97) ~[FMLServerHandler.class:?] at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:331) ~[FMLCommonHandler.class:?] at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:128) ~[DedicatedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:550) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_161] Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/gui/GuiScreen at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:1.8.0_161] at java.lang.Class.privateGetDeclaredMethods(Unknown Source) ~[?:1.8.0_161] at java.lang.Class.privateGetPublicMethods(Unknown Source) ~[?:1.8.0_161] at java.lang.Class.getMethods(Unknown Source) ~[?:1.8.0_161] at net.minecraftforge.fml.common.eventhandler.EventBus.register(EventBus.java:81) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:82) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:586) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_161] at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[guava-21.0.jar:?] at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[guava-21.0.jar:?] at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[guava-21.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[guava-21.0.jar:?] at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:253) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:231) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_161] at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[guava-21.0.jar:?] at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[guava-21.0.jar:?] at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[guava-21.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[guava-21.0.jar:?] at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:148) ~[LoadController.class:?] at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:568) ~[Loader.class:?] at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:97) ~[FMLServerHandler.class:?] at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:331) ~[FMLCommonHandler.class:?] at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:128) ~[DedicatedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:550) ~[MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) ~[?:1.8.0_161] Caused by: java.lang.ClassNotFoundException: net.minecraft.client.gui.GuiScreen at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_161] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_161] at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:1.8.0_161] at java.lang.Class.privateGetDeclaredMethods(Unknown Source) ~[?:1.8.0_161] at java.lang.Class.privateGetPublicMethods(Unknown Source) ~[?:1.8.0_161] at java.lang.Class.getMethods(Unknown Source) ~[?:1.8.0_161] at net.minecraftforge.fml.common.eventhandler.EventBus.register(EventBus.java:81) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:82) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:586) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_161] at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[guava-21.0.jar:?] at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[guava-21.0.jar:?] at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[guava-21.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[guava-21.0.jar:?] at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:253) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:231) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_161] at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[guava-21.0.jar:?] at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[guava-21.0.jar:?] at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[guava-21.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[guava-21.0.jar:?] at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:148) ~[LoadController.class:?] at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:568) ~[Loader.class:?] at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:97) ~[FMLServerHandler.class:?] at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:331) ~[FMLCommonHandler.class:?] at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:128) ~[DedicatedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:550) ~[MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) ~[?:1.8.0_161] Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@5af97169 from coremod FMLCorePlugin at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:262) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_161] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_161] at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:1.8.0_161] at java.lang.Class.privateGetDeclaredMethods(Unknown Source) ~[?:1.8.0_161] at java.lang.Class.privateGetPublicMethods(Unknown Source) ~[?:1.8.0_161] at java.lang.Class.getMethods(Unknown Source) ~[?:1.8.0_161] at net.minecraftforge.fml.common.eventhandler.EventBus.register(EventBus.java:81) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:82) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:586) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_161] at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[guava-21.0.jar:?] at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[guava-21.0.jar:?] at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[guava-21.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[guava-21.0.jar:?] at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:253) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:231) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_161] at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[guava-21.0.jar:?] at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[guava-21.0.jar:?] at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[guava-21.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[guava-21.0.jar:?] at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:148) ~[LoadController.class:?] at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:568) ~[Loader.class:?] at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:97) ~[FMLServerHandler.class:?] at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:331) ~[FMLCommonHandler.class:?] at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:128) ~[DedicatedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:550) ~[MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) ~[?:1.8.0_161] Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/gui/GuiScreen for invalid side SERVER at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:62) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:258) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_161] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_161] at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:1.8.0_161] at java.lang.Class.privateGetDeclaredMethods(Unknown Source) ~[?:1.8.0_161] at java.lang.Class.privateGetPublicMethods(Unknown Source) ~[?:1.8.0_161] at java.lang.Class.getMethods(Unknown Source) ~[?:1.8.0_161] at net.minecraftforge.fml.common.eventhandler.EventBus.register(EventBus.java:81) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:82) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:586) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_161] at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[guava-21.0.jar:?] at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[guava-21.0.jar:?] at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[guava-21.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[guava-21.0.jar:?] at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:253) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:231) ~[forgeSrc-1.12.2-14.23.1.2582.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_161] at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[guava-21.0.jar:?] at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) ~[guava-21.0.jar:?] at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[guava-21.0.jar:?] at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[guava-21.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[guava-21.0.jar:?] at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:148) ~[LoadController.class:?] at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:568) ~[Loader.class:?] at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:97) ~[FMLServerHandler.class:?] at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:331) ~[FMLCommonHandler.class:?] at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:128) ~[DedicatedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:550) ~[MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) ~[?:1.8.0_161] [22:04:06] [Server thread/ERROR]: This crash report has been saved to: E:\Modding Workspace\run\assets\.\crash-reports\crash-2018-02-15_22.04.06-server.txt [22:04:06] [Server thread/INFO]: Stopping server [22:04:06] [Server thread/INFO]: Saving worlds [22:04:06] [Server thread/WARN] [FML]: Can't revert to frozen GameData state without freezing first. [22:04:06] [Server thread/INFO] [FML]: The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED. Errors may have been discarded. [22:04:06] [Server thread/INFO] [FML]: The state engine was in incorrect state ERRORED and forced into state AVAILABLE. Errors may have been discarded. [22:04:06] [Server Shutdown Thread/INFO]: Stopping server [22:04:06] [Server Shutdown Thread/INFO]: Saving worlds If I do a search for GuiScreen in my code, it only shows up in my GUI classes, my config GUI factory class, and my proxy. All my GUI classes have the @SideOnly annotation. My GUI factory class does not though -- is that needed? Now the interesting thing is that the error message seems to be related to my event subscribers. So I'm guessing that the annotations are somehow competing -- that the SERVER side is looking at the event subscriber annotation and missing the sided annotation. Basically for events that have an sided event class, such as RenderOverlayEvent() I decided to put the entire handling method in my proxy. The proxy itself of course is sided and I even go further and add the annotation to the handling method. My client proxy class is here: https://github.com/jabelar/ExampleMod-1.12/blob/master/src/main/java/com/blogspot/jabelarminecraft/examplemod/proxy/ClientProxy.java I have the client proxy annotated as an @EventBusSubscriber and have the methods annotated with @SubscribeEvent. So the method code is: @SideOnly(Side.CLIENT) @SubscribeEvent(priority = EventPriority.HIGHEST, receiveCanceled = true) public static void onEvent(RenderGameOverlayEvent event) { Minecraft mc = Minecraft.getMinecraft(); GuiIngame ingameGUI = mc.ingameGUI; ScaledResolution scaledRes = event.getResolution(); if (mc.getRenderViewEntity() instanceof EntityPlayer) { EntityPlayer entityplayer = (EntityPlayer) mc.getRenderViewEntity(); int airIndicatorX = scaledRes.getScaledWidth() / 2 + 91; int airIndicatorBottom = scaledRes.getScaledHeight() - 39; int airIndicatorTop = airIndicatorBottom - 10; if (entityplayer.isInsideOfMaterial(Material.WATER) || entityplayer.isInsideOfMaterial(ModMaterials.SLIME)) { int airAmount = mc.player.getAir(); int airLostPercent = MathHelper.ceil((airAmount - 2) * 10.0D / 300.0D); int airLeftPercent = MathHelper.ceil(airAmount * 10.0D / 300.0D) - airLostPercent; for (int airUnitIndex = 0; airUnitIndex < airLostPercent + airLeftPercent; ++airUnitIndex) { if (airUnitIndex < airLostPercent) { ingameGUI.drawTexturedModalRect(airIndicatorX - airUnitIndex * 8 - 9, airIndicatorTop, 16, 18, 9, 9); } else { ingameGUI.drawTexturedModalRect(airIndicatorX - airUnitIndex * 8 - 9, airIndicatorTop, 25, 18, 9, 9); } } } } } So I feel that I am double-protected for a sided problem but there is still an issue. If I comment out some of the methods in my event handler, the error changes (it complains about a different class) so it definitely seems to be related to the client proxy event handling classes. But I really don't understand it since it is fully sided. Also, after I comment out all the event handlers I am left with a console error complaining about NoClassDefFound for EntityPlayerSP in the event subscriber. But a Java search of my project shows that I don't reference that class anywhere! Anyway, I'm probably doing something stupid but it feels like there might be some conflict with the @EventSubscriber and @SideOnly annotations in a client proxy?
-
My suggestion was actually to make each layer different sizes. If they are exact same size as each other then I can imagine that in graphics rendering terms maybe one gets culled somehow. Actually, now that I'm thinking about it, is this some sort of face culling problem? Like is the inside layer being treated as something behind the outer layer that then doesn't need rendering? Maybe your cullface parameters in your model are causing this issue. Anyway, I'm not an expert in this area so just giving ideas.
-
I make a custom model for all my custom blocks, even if they are just cubes. The game certainly does not ignore them, as you can tell by the fact the texture gets properly referenced. What do you mean that it ignores your model? Like if you edit things in the model that nothing changes at all? Or you mean just that the layering system isn't working? Is it possible it is one of those graphics rendering ambiguities where both your layers are right on top of each other so only one gets rendered. What happens if you change the element x, y, z for the first layer to be smaller than full cube start = (0.1, 0.1, 0.1) and finish = (15.9, 15.9, 15.9)?
-
[1.12] [Solved] Keeping mobs spawned and active away from the player
jabelar replied to Kinniken's topic in Modder Support
This is a common problem in most large games. It is very difficult to keep performance up if all the logic for all the things you cannot see is still running. Most games need to deactivate complicated objects that are "off screen". Minecraft uses this technique in many ways. For example, whole chunks get unloaded when possible. Entities can be unloaded as well, and even if they are still running on the server they will stop "tracking" (sending packets to the client) beyond a certain distance. Some of these things can be overridden a bit, for example the tracking range. I would start by seeing if using the Minecraft methods can help you. I would first make sure that the entities are registered with a very long (like 8000) tracking range. Secondly I would us the enablePersistence() method on your entities to prevent despawning. Just keep in mind that if you do this a lot it will cause performance issues. -
What do you mean by "not visible"? Do you mean there isn't even a place for it on your creative tab? Do you mean you can hold it in your hand but when you try to place it in the world it isn't visible? Do you mean it is truly not visible or do you mean it shows the purple and black checkerboard placeholder texture? In any case, to debug these things you just need to trace the execution. This is an important skill. You should never just run code and then ask the forum unless you've traced the full execution. To do this I personally use a lot of console statements (System.out.println()) throughout my code to confirm the execution while playing. For example, I would have a print statement in my fluid constructor, in the registry events and some of my fluid handling events. You can put key information in the statement, for example in your registry method you are converting a list of instances to an array so if that screws up somehow you will know if you print out the list at that time. Depending on what happens with your console statements you can find out all sorts of things: - if the registry statement doesn't even print, then you know your event handling isn't set up properly. - if your list you're registering is empty, then that is obviously a problem. - if your block never gets constructed, then that is obviously a problem. - if your fluid level is always 0, then that is a problem. etc. Now looking at your code, it seems that you are registering an empty list. When do you put the block instances into your BLOCKS list? Also, even though I used to do it that way most modders including myself have moved to using the @ObjectHolder injection method to populate the singleton instances.
-
To explain more fully, reflection requires knowing the field / method names but Minecraft modding is working with "deobfuscated" version of the code which means the names we see in the mod environment are not the same as used in the actual Minecraft code. So you need to use a mapping -- in this case MCP which is why diesieben07 pointed you to it -- to use reflection on the right name. However, if you use the Minecraft name then it would not work in the development environment. So what you need to do is use the ReflectionHelper class so that both names are supported. Basically, when using reflection in modding, don't use the standard Java reflection classes but use the ReflectionHelper class. Then make sure you put both versions of the name in as parameters to the ReflectionHelper methods.
-
Maybe look up custom armor tutorial.
-
Choonster creates wooden buckets and stone buckets in his TestMod3 example code. https://github.com/Choonster-Minecraft-Mods/TestMod3/blob/099f84747156ce8d01f1276954e047d5ec6ce800/src/main/java/choonster/testmod3/item/ItemBucketTestMod3.java
-
[1.12.2] How to create a teleporter to a custom dimension
jabelar replied to DragonFerocity's topic in Modder Support
Why don't you handle the EntityTravelToDimension event, put your own code that copies the Entity#changeDimension() code but with your own teleporter, and CANCEL the event so that the vanilla code doesn't run?