Posted November 19, 2016 Hi, I'd like to request a mod that creates a new item on a trader. When the item is depleted, it should refresh on the trader. Much like Sleep Powder or a Transmutation Rod does when you take the final one from them. Doesn't matter what the item is, I'm more concerned with the methodology of how this is done. I've been trying forever now and nothing seems to be working. 1 Share this post Link to post Share on other sites
Posted November 19, 2016 I wish you all the best because this idea is cool =) Share this post Link to post Share on other sites
Posted November 19, 2016 +1 would be nice to be able to customize em Share this post Link to post Share on other sites
Posted November 19, 2016 (edited) 2 hours ago, Sindusk said: Hi, I'd like to request a mod that creates a new item on a trader. When the item is depleted, it should refresh on the trader. Much like Sleep Powder or a Transmutation Rod does when you take the final one from them. Doesn't matter what the item is, I'm more concerned with the methodology of how this is done. I've been trying forever now and nothing seems to be working. To add the items to traders go to com.wurmonline.server.economy.shop If i remember right you need to change IsPurchased from true to false in the corresponding ItemTemplate of the item you are trying to add to the trader to have the item replenish. I don't have a working mod as i took the lazy route and just edited the classes directly, the classes are simplistic and the shop class shouldn't be changed to often. An actual mod for this thou would be nice. Edited November 19, 2016 by ausimus 1 Share this post Link to post Share on other sites
Posted November 19, 2016 (edited) 3 minutes ago, ausimus said: To add the items to traders go to com.wurmonline.server.economy.shop If i remember right you need to change IsPurchased from true to false in the corresponding ItemTemplate of the item you are trying to add to the trader to have the item replenish. I've already tried all of this. I've read every bit of code I could find regarding how it "would" be done. I'm looking for an actual mod that I can put on my server, it works, and then I'll copy the method. Anything less than an actual working mod is insufficient right now, because I've tried all the "theoretical" ways to do it, having talked to several other modders and spending countless hours trying to make anything work. Edited November 19, 2016 by Sindusk Share this post Link to post Share on other sites
Posted November 19, 2016 1 minute ago, Sindusk said: I've already tried all of this. I've read every bit of code I could find regarding how it "would" be done. I'm looking for an actual mod that I can put on my server, it works, and then I'll copy the method. Anything less than an actual working mod is insufficient right now, because I've tried all the "theoretical" ways to do it. I agree, I've edited my above post. Share this post Link to post Share on other sites
Posted November 20, 2016 (edited) you have to alter 2 files the item file to set the actual price of the item and the like the guy said the shop class file is where you will add the actual item to the world trader. I mod all my own files on my server no modloader. Someone might mod this for you'll but good luck not many people understand the java coding going on in wurm unlimited only a few of us actually do it is way different than the usual minecraft modder coding. Spoiler private static void createShop(Creature toReturn) { try { Item ex = toReturn.getInventory(); for(int contract = 0; contract < 3; ++contract) // what this does is it sets the item at 3 on the merchant if it ever goes below 3 it will make sure there is at least 1 on them at all times { Item item = Creature.createItem(143, (float)(10 + Server.rand.nextInt(40)));//flintSteel ex.insertItem(item); item = Creature.createItem(509, 80.0F);//resurrectionStone ex.insertItem(item); item = Creature.createItem(525, 80.0F);//teleportationStone ex.insertItem(item); item = Creature.createItem(524, 80.0F);//teleportationTwig ex.insertItem(item); item = Creature.createItem(601, (float)(60 + Server.rand.nextInt(40)));//shakerOrb ex.insertItem(item); item = Creature.createItem(664, 40.0F);//chestNoDecayLarge ex.insertItem(item); item = Creature.createItem(665, 40.0F);//chestNoDecaySmall ex.insertItem(item); item = Creature.createItem(443, 99.0F);//bagKeeping ex.insertItem(item); item = Creature.createItem(781, 99.0F);//handMirror ex.insertItem(item); item = Creature.createItem(489, 99.0F);//spyglass ex.insertItem(item); item = Creature.createItem(468, 50.0F);//dragonLeatherSleeve ex.insertItem(item); item = Creature.createItem(469, 50.0F);//dragonLeatherBoot ex.insertItem(item); item = Creature.createItem(470, 50.0F);//dragonLeatherCap ex.insertItem(item); item = Creature.createItem(471, 50.0F);//dragonLeatherHose ex.insertItem(item); item = Creature.createItem(472, 50.0F);//dragonLeatherGlove ex.insertItem(item); item = Creature.createItem(473, 50.0F);//dragonLeatherJacket ex.insertItem(item); item = Creature.createItem(474, 50.0F);//dragonScaleBoot ex.insertItem(item); item = Creature.createItem(475, 50.0F);//dragonScaleHose ex.insertItem(item); item = Creature.createItem(476, 50.0F);//dragonScaleJacket ex.insertItem(item); item = Creature.createItem(477, 50.0F);//dragonScaleSleeve ex.insertItem(item); item = Creature.createItem(478, 50.0F);//dragonScaleGauntlet ex.insertItem(item); item = Creature.createItem(871, 99.0F);//potionWeaponSmithing ex.insertItem(item); item = Creature.createItem(872, 99.0F);//potionRopemaking ex.insertItem(item); item = Creature.createItem(873, 99.0F);//potionWaterwalking ex.insertItem(item); item = Creature.createItem(874, 99.0F);//potionMining ex.insertItem(item); item = Creature.createItem(875, 99.0F);//potionTailoring ex.insertItem(item); item = Creature.createItem(876, 99.0F);//potionArmourSmithing ex.insertItem(item); item = Creature.createItem(877, 99.0F);//potionFletching ex.insertItem(item); item = Creature.createItem(878, 99.0F);//potionBlacksmithing ex.insertItem(item); item = Creature.createItem(879, 99.0F);//potionLeatherworking ex.insertItem(item); item = Creature.createItem(880, 99.0F);//potionShipbuilding ex.insertItem(item); item = Creature.createItem(881, 99.0F);//potionStonecutting ex.insertItem(item); item = Creature.createItem(882, 99.0F);//potionMasonry ex.insertItem(item); item = Creature.createItem(883, 99.0F);//potionWoodcutting ex.insertItem(item); item = Creature.createItem(884, 99.0F);//potionCarpentry ex.insertItem(item); item = Creature.createItem(973, 99.0F);//maskEnlightended ex.insertItem(item); item = Creature.createItem(974, 99.0F);//maskRavager ex.insertItem(item); item = Creature.createItem(975, 99.0F);//maskPale ex.insertItem(item); item = Creature.createItem(976, 99.0F);//maskShadow ex.insertItem(item); item = Creature.createItem(977, 99.0F);//maskChallenge ex.insertItem(item); item = Creature.createItem(978, 99.0F);//maskIsles ex.insertItem(item); item = Creature.createItem(836, 99.0F);//potionAffinity 836 is the item name 99.0F is the item ql ex.insertItem(item); in here you can see original and what I've added in the shop.class file. I added comments behind stuff i added so I don't have to mem a bunch of numbers I just see the name of the item. now the other thing you change is the price of the item and that's in the item template files at the end of the item code. Edited November 20, 2016 by Arkonick 1 Share this post Link to post Share on other sites
Posted November 20, 2016 3 hours ago, Arkonick said: you have to alter 2 files the item file to set the actual price of the item and the like the guy said the shop class file is where you will add the actual item to the world trader. I mod all my own files on my server no modloader. Someone might mod this for you'll but good luck not many people understand the java coding going on in wurm unlimited only a few of us actually do it is way different than the usual minecraft modder coding. Reveal hidden contents private static void createShop(Creature toReturn) { try { Item ex = toReturn.getInventory(); for(int contract = 0; contract < 3; ++contract) // what this does is it sets the item at 3 on the merchant if it ever goes below 3 it will make sure there is at least 1 on them at all times { Item item = Creature.createItem(143, (float)(10 + Server.rand.nextInt(40)));//flintSteel ex.insertItem(item); item = Creature.createItem(509, 80.0F);//resurrectionStone ex.insertItem(item); item = Creature.createItem(525, 80.0F);//teleportationStone ex.insertItem(item); item = Creature.createItem(524, 80.0F);//teleportationTwig ex.insertItem(item); item = Creature.createItem(601, (float)(60 + Server.rand.nextInt(40)));//shakerOrb ex.insertItem(item); item = Creature.createItem(664, 40.0F);//chestNoDecayLarge ex.insertItem(item); item = Creature.createItem(665, 40.0F);//chestNoDecaySmall ex.insertItem(item); item = Creature.createItem(443, 99.0F);//bagKeeping ex.insertItem(item); item = Creature.createItem(781, 99.0F);//handMirror ex.insertItem(item); item = Creature.createItem(489, 99.0F);//spyglass ex.insertItem(item); item = Creature.createItem(468, 50.0F);//dragonLeatherSleeve ex.insertItem(item); item = Creature.createItem(469, 50.0F);//dragonLeatherBoot ex.insertItem(item); item = Creature.createItem(470, 50.0F);//dragonLeatherCap ex.insertItem(item); item = Creature.createItem(471, 50.0F);//dragonLeatherHose ex.insertItem(item); item = Creature.createItem(472, 50.0F);//dragonLeatherGlove ex.insertItem(item); item = Creature.createItem(473, 50.0F);//dragonLeatherJacket ex.insertItem(item); item = Creature.createItem(474, 50.0F);//dragonScaleBoot ex.insertItem(item); item = Creature.createItem(475, 50.0F);//dragonScaleHose ex.insertItem(item); item = Creature.createItem(476, 50.0F);//dragonScaleJacket ex.insertItem(item); item = Creature.createItem(477, 50.0F);//dragonScaleSleeve ex.insertItem(item); item = Creature.createItem(478, 50.0F);//dragonScaleGauntlet ex.insertItem(item); item = Creature.createItem(871, 99.0F);//potionWeaponSmithing ex.insertItem(item); item = Creature.createItem(872, 99.0F);//potionRopemaking ex.insertItem(item); item = Creature.createItem(873, 99.0F);//potionWaterwalking ex.insertItem(item); item = Creature.createItem(874, 99.0F);//potionMining ex.insertItem(item); item = Creature.createItem(875, 99.0F);//potionTailoring ex.insertItem(item); item = Creature.createItem(876, 99.0F);//potionArmourSmithing ex.insertItem(item); item = Creature.createItem(877, 99.0F);//potionFletching ex.insertItem(item); item = Creature.createItem(878, 99.0F);//potionBlacksmithing ex.insertItem(item); item = Creature.createItem(879, 99.0F);//potionLeatherworking ex.insertItem(item); item = Creature.createItem(880, 99.0F);//potionShipbuilding ex.insertItem(item); item = Creature.createItem(881, 99.0F);//potionStonecutting ex.insertItem(item); item = Creature.createItem(882, 99.0F);//potionMasonry ex.insertItem(item); item = Creature.createItem(883, 99.0F);//potionWoodcutting ex.insertItem(item); item = Creature.createItem(884, 99.0F);//potionCarpentry ex.insertItem(item); item = Creature.createItem(973, 99.0F);//maskEnlightended ex.insertItem(item); item = Creature.createItem(974, 99.0F);//maskRavager ex.insertItem(item); item = Creature.createItem(975, 99.0F);//maskPale ex.insertItem(item); item = Creature.createItem(976, 99.0F);//maskShadow ex.insertItem(item); item = Creature.createItem(977, 99.0F);//maskChallenge ex.insertItem(item); item = Creature.createItem(978, 99.0F);//maskIsles ex.insertItem(item); item = Creature.createItem(836, 99.0F);//potionAffinity 836 is the item name 99.0F is the item ql ex.insertItem(item); in here you can see original and what I've added in the shop.class file. I added comments behind stuff i added so I don't have to mem a bunch of numbers I just see the name of the item. now the other thing you change is the price of the item and that's in the item template files at the end of the item code. Do those items refresh when depleted? Share this post Link to post Share on other sites
Posted November 20, 2016 1 hour ago, Sindusk said: Do those items refresh when depleted? they don't refresh back to 3 but will remain 1 at all times. The world trader will never go below 1 of the item in his inventory. Share this post Link to post Share on other sites
Posted November 20, 2016 Wow, this would be a super cool mod, to be able to add things to a trader, we were trying for an hour or two a couple of days ago to get the trader to sell spyglass, but no luck Hope someone comes up with a simple way of doing it. The above is a bit beyond us lol Valiance and Kaylie. 1 Share this post Link to post Share on other sites
Posted November 20, 2016 Just remember if you ever edit a World traders inventory and add new stuff the old traders have to be destroyed in order for there inventory to update and a new trader placed in there place. This is how it happened for me on my server and was the only way for them to update there stock to the new stuff added to them. Not sure if they changed or auto update there stock down the road but I wasn't going to wait days to find out if it worked and just replaced them with new world traders on the spot cause a server restart didn't make there inventory update. and Ausimus you didn't take the easy road when doing this to your server you hard coded it, the easy road would be a mod and no work on your part. Just wanted to point that out. Share this post Link to post Share on other sites
Posted November 20, 2016 Sindusk I have looked into this too, at this point I think the best way would be to make a completely new trader, but that is a huge amount of work with the mod loader. Share this post Link to post Share on other sites
Posted November 22, 2016 (edited) Well, I took a look. This seems to work for me, see comment below; it's definitely fixable without that roundtrip to database, but ah, it would take a bit more code than the below. I hope this helps, if not, let me know and I'll take another peek! Quote /* * You want to run this from your onItemTemplatesCreated() hook in your Ago's * modloader Mod. * * Basically, we are constrained by when database connections become available, so * the easiest way to go about it is really go in and create an entry in the IDS * table of Ago's modsupport database. The important bit here is really seeing * to it that you book up a unique ID for your item. * * I already had an item which I tested with, but you wanted a completely new * item, so... * * Anyhow, add the following row to the table (but make sure 22762 is free in * your DB, if not, take the next in sequence): * "22762" "ITEMTEMPLATE" "friya.tradertest" * * I guess if I was going to do it proper I'd probably add something in preInit() * which gave me an opportunity to act as soon as connections became available. * * What I tested: * - With a freshly cloned trader: buying entire stock of the newly added item, * then reopening trade and buying the restocked item. * */ private void addItemToTrader() { try { // See comment above int amuletId = 22762; // This data is essentially just copied from sleeping powders. I could // sadly not eat them: // [04:26:58] You have a lust for blood, normal food will not sustain you. com.wurmonline.server.items.ItemTemplateCreatorContinued.createItemTemplate( amuletId, "amulet of friyanouce", "amulets of friyanouce", "excellent", "good", "ok", "poor", "The amulet is of archaic design beaten into a thick coin of hammered bronze " + "and hanging from a chain. Its time worn surface still shows a myriad of magical protection runes.", new short[]{43, 42, 5, 76, 53, 127}, (short)641, (short)1, 0, Long.MAX_VALUE, 3, 3, 3, -10, com.wurmonline.server.MiscConstants.EMPTY_BYTE_PRIMITIVE_ARRAY, "model.resource.whitepowder", 300.0f, 25, (byte)6, 100000, false ); String descriptor = Descriptor.ofMethod(CtClass.voidType, new CtClass[] { HookManager.getInstance().getClassPool().get("com.wurmonline.server.creatures.Creature") }); HookManager.getInstance().registerHook("com.wurmonline.server.economy.Shop", "createShop", descriptor, new InvocationHandlerFactory() { @Override public InvocationHandler createInvocationHandler() { return new InvocationHandler() { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { Object result = method.invoke(proxy, args); Item inventory = ((Creature)args[0]).getInventory(); for(int x = 0; x < 3; ++x) { // this is our item... Item item = Creature.createItem(amuletId, 50.0f); inventory.insertItem(item); } return result; } }; } }); } catch (NotFoundException | IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } Edited November 22, 2016 by Friya Share this post Link to post Share on other sites
Posted November 25, 2016 @FriyaDid not work. Couldn't even test it because the invocation handler isn't working. My code: @Override public void onItemTemplatesCreated() { try { logger.info("Attempting Shop Hook..."); logger.info("Creating Hook Descriptor..."); String descriptor = Descriptor.ofMethod(CtClass.voidType, new CtClass[] { HookManager.getInstance().getClassPool().get("com.wurmonline.server.creatures.Creature") }); logger.info("Hooking createShop..."); HookManager.getInstance().registerHook("com.wurmonline.server.economy.Shop", "createShop", descriptor, new InvocationHandlerFactory() { @Override public InvocationHandler createInvocationHandler() { return new InvocationHandler() { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { Object result = method.invoke(proxy, args); Item inventory = ((Creature)args[0]).getInventory(); for(int x = 0; x < 3; ++x) { // this is our item... Item item = Creature.createItem(22761, 50.0f); inventory.insertItem(item); } return result; } }; } }); } catch (NoSuchTemplateException | IllegalArgumentException | IllegalAccessException | ClassCastException | NoSuchFieldException | NotFoundException e) { e.printStackTrace(); } } The error: [05:21:46 PM] INFO org.gotti.wurmunlimited.mods.wyvernmods.WyvernMods: Attempting Shop Hook... [05:21:46 PM] INFO org.gotti.wurmunlimited.mods.wyvernmods.WyvernMods: Creating Hook Descriptor... [05:21:46 PM] INFO org.gotti.wurmunlimited.mods.wyvernmods.WyvernMods: Hooking createShop... [05:21:46 PM] INFO com.wurmonline.server.Server: Shutting down the server - reason: Problem running the server - java.lang.IllegalAccessError: tried to access class org.gotti.wurmunlimited.mods.wyvernmods.WyvernMods$3 from class org.gotti.wurmunlimited.mods.wyvernmods.WyvernMods [05:21:46 PM] INFO com.wurmonline.server.Server: Shutting down the server - cause: org.gotti.wurmunlimited.modloader.classhooks.HookException: java.lang.IllegalAccessError: tried to access class org.gotti.wurmunlimited.mods.wyvernmods.WyvernMods$3 from class org.gotti.wurmunlimited.mods.wyvernmods.WyvernMods at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:312) at com.wurmonline.server.items.ItemTemplateCreator.initialiseItemTemplates(ItemTemplateCreator.java) at com.wurmonline.server.Server.startRunning(Server.java:743) at com.wurmonline.server.ServerLauncher.runServer$1(ServerLauncher.java:117) 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 org.gotti.wurmunlimited.modloader.server.ProxyServerHook$1$1.invoke(ProxyServerHook.java:55) at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:302) at com.wurmonline.server.ServerLauncher.runServer(ServerLauncher.java) at com.wurmonline.server.gui.WurmServerGuiController.StartOfflineButtonClicked(WurmServerGuiController.java:341) 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 sun.reflect.misc.Trampoline.invoke(Unknown Source) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.reflect.misc.MethodUtil.invoke(Unknown Source) at javafx.fxml.FXMLLoader$MethodHandler.invoke(Unknown Source) at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(Unknown Source) at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source) at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source) at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source) at javafx.event.Event.fireEvent(Unknown Source) at javafx.scene.Node.fireEvent(Unknown Source) at javafx.scene.control.Button.fire(Unknown Source) at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(Unknown Source) at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(Unknown Source) at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(Unknown Source) at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source) at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source) at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source) at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source) at javafx.event.Event.fireEvent(Unknown Source) at javafx.scene.Scene$MouseHandler.process(Unknown Source) at javafx.scene.Scene$MouseHandler.access$1500(Unknown Source) at javafx.scene.Scene.impl_processMouseEvent(Unknown Source) at javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source) at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source) at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$355(Unknown Source) at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source) at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source) at com.sun.glass.ui.View.handleMouseEvent(Unknown Source) at com.sun.glass.ui.View.notifyMouse(Unknown Source) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$149(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.IllegalAccessError: tried to access class org.gotti.wurmunlimited.mods.wyvernmods.WyvernMods$3 from class org.gotti.wurmunlimited.mods.wyvernmods.WyvernMods at org.gotti.wurmunlimited.mods.wyvernmods.WyvernMods.onItemTemplatesCreated(WyvernMods.java:200) at org.gotti.wurmunlimited.modloader.server.ServerHook.lambda$fireOnItemTemplatesCreated$3(ServerHook.java:49) at org.gotti.wurmunlimited.modloader.server.Listeners.lambda$fire$0(Listeners.java:35) at java.util.concurrent.CopyOnWriteArrayList.forEach(Unknown Source) at org.gotti.wurmunlimited.modloader.server.Listeners.fire(Listeners.java:33) at org.gotti.wurmunlimited.modloader.server.ServerHook.fireOnItemTemplatesCreated(ServerHook.java:49) at org.gotti.wurmunlimited.modloader.server.ProxyServerHook$2$1.invoke(ProxyServerHook.java:78) at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:302) ... 81 more Share this post Link to post Share on other sites
Posted December 20, 2016 I forgot to reply to this one, but I talked to Sindusk shortly after this and we came to the conclusion that it's probably something else on his side. The code above is working in a mod for me, so it should be no problem to implement. Share this post Link to post Share on other sites
Posted January 29, 2017 What program did you use to edit the CLASS file? I tried using IntelliJ but said it is not writable. Do I need to decompile, edit and then re-compile? Any help would be greatly appreciated. Share this post Link to post Share on other sites