Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Asweez

Forge Modder
  • Joined

  • Last visited

Everything posted by Asweez

  1. Asweez replied to Asweez's topic in Modder Support
    Wow thanks! That was really helpful. Right now I'm registering that packet in the MagiNetwork whose init method is being called in the initialization event. Should I register that packet in my client proxy?
  2. Asweez replied to Asweez's topic in Modder Support
    Or not a server version but why is it trying to run on the server?
  3. Asweez replied to Asweez's topic in Modder Support
    Thanks all, I'm still confused though. If I'm registering the packet on the client side why is it trying to run a server version of it?
  4. So I made a syncSkills packet for my extended player and I am getting this error: Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/entity/EntityClientPlayerMP for invalid side SERVER at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:50) ~[forgeSrc-1.7.10-10.13.2.1230.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.11.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[?:1.7.0_71] at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[?:1.7.0_71] at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:1.7.0_71] at java.lang.Class.privateGetDeclaredConstructors(Class.java:2585) ~[?:1.7.0_71] at java.lang.Class.getConstructor0(Class.java:2885) ~[?:1.7.0_71] at java.lang.Class.newInstance(Class.java:350) ~[?:1.7.0_71] at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.instantiate(SimpleNetworkWrapper.java:113) ~[simpleNetworkWrapper.class:?] at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.registerMessage(SimpleNetworkWrapper.java:106) ~[simpleNetworkWrapper.class:?] at com.apmods.magicraft.network.MagiNetwork.registerMessageForServer(MagiNetwork.java:31) ~[MagiNetwork.class:?] at com.apmods.magicraft.network.MagiNetwork.init(MagiNetwork.java:19) ~[MagiNetwork.class:?] at com.apmods.magicraft.main.MagiCraft.init(MagiCraft.java:40) ~[MagiCraft.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_71] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_71] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_71] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_71] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513) ~[FMLModContainer.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_71] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_71] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_71] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_71] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) ~[LoadController.class:?] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) ~[LoadController.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_71] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_71] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_71] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_71] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) ~[LoadController.class:?] at cpw.mods.fml.common.Loader.initializeMods(Loader.java:691) ~[Loader.class:?] ... 5 more Here is my code MagiNetwork: SyncSkills
  5. I have a packet system set up and when the packet it received I want the player to swing his arm like it does when you hit something or break something. Is this possible?
  6. I fixed it. All I had to do was remove the if(!world.isRemote)
  7. No wait it actually worked yesterday and it was full time, like the player was constantly a light source
  8. No.. It was working a few days ago
  9. So my light just won't show up. Through the System.out.println() s I know that the event IS being called, the addLight IS being called and the light value IS NOT over 15 (its 9). What am I doing wrong? @SubscribeEvent public void onTick(TickEvent.PlayerTickEvent evt){ if(!evt.player.worldObj.isRemote){ if(evt.player.inventory.getCurrentItem() != null && evt.player.inventory.getCurrentItem().getItem() instanceof ItemWand){ ItemStack wand = evt.player.inventory.getCurrentItem(); System.out.println(wand.stackTagCompound.getBoolean("lumos")); if(wand.stackTagCompound != null && wand.stackTagCompound.getBoolean("lumos") == true){ evt.player.worldObj.updateLightByType(EnumSkyBlock.Block, prevposX, prevposY, prevposZ); this.addLight(evt.player.worldObj, evt.player); System.out.println("add light"); } else if(wand.stackTagCompound != null && wand.stackTagCompound.getBoolean("lumos") == false){ evt.player.worldObj.updateLightByType(EnumSkyBlock.Block, prevposX, prevposY, prevposZ); this.deleteLight(evt.player.worldObj, evt.player); evt.player.worldObj.updateLightByType(EnumSkyBlock.Block, prevposX, prevposY, prevposZ); } } } } private void addLight(World world, EntityPlayer player) { MagiSkills ext = MagiSkills.get(player); world.setLightValue(EnumSkyBlock.Block, (int) player.posX, (int) player.posY, (int) player.posZ, 9+ext.getCurrentSkillLevel(SpellLib.LUMOS)); System.out.println(9+ext.getCurrentSkillLevel(SpellLib.LUMOS)); prevposX = (int)player.posX; prevposY = (int)player.posY; prevposZ = (int)player.posZ; world.markBlockRangeForRenderUpdate((int) player.posX, (int) player.posY, (int) player.posX, 12, 12, 12); world.markBlockForUpdate((int) player.posX, (int) player.posY, (int) player.posZ); // for(int i = 1; i < 6; i++){ // for(int j = 1; j < 6; j++){ // for(int k = 1; k < 4; k++){ // world.updateLightByType(EnumSkyBlock.Block, (int) player.posX - 3 + j, (int) player.posY - 2 + k, (int) player.posZ - 3 + i); // } // } world.updateLightByType(EnumSkyBlock.Block, (int) player.posX, (int) player.posY - 1, (int) player.posZ); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX + 1, (int) player.posY - 1, (int) player.posZ + 1); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX, (int) player.posY - 1, (int) player.posZ + 1); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX - 1, (int) player.posY - 1, (int) player.posZ + 1); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX + 1, (int) player.posY - 1, (int) player.posZ); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX - 1, (int) player.posY - 1, (int) player.posZ); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX + 1, (int) player.posY - 1, (int) player.posZ-1); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX, (int) player.posY - 1, (int) player.posZ-1); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX - 1, (int) player.posY - 1, (int) player.posZ - 1); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX + 1, (int) player.posY + 1, (int) player.posZ + 1); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX, (int) player.posY + 1, (int) player.posZ + 1); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX - 1, (int) player.posY + 1, (int) player.posZ + 1); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX + 1, (int) player.posY + 1, (int) player.posZ); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX, (int) player.posY + 1, (int) player.posZ); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX - 1, (int) player.posY + 1, (int) player.posZ); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX + 1, (int) player.posY + 1, (int) player.posZ - 1); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX, (int) player.posY + 1, (int) player.posZ - 1); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX - 1, (int) player.posY + 1, (int) player.posZ - 1); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX + 1, (int) player.posY, (int) player.posZ + 1); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX, (int) player.posY, (int) player.posZ + 1); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX - 1, (int) player.posY, (int) player.posZ + 1); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX - 1, (int) player.posY, (int) player.posZ); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX + 1, (int) player.posY, (int) player.posZ); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX + 1, (int) player.posY, (int) player.posZ - 1); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX, (int) player.posY, (int) player.posZ - 1); world.updateLightByType(EnumSkyBlock.Block, (int) player.posX - 1, (int) player.posY, (int) player.posZ - 1); // } }
  10. IEEP is IExtendedEntityProperties btw
  11. Well its obvious. You are trying to register the Block after it is in the recipe. Essentially, you have a Block that doesn't exist yet in your crafting recipe. That's why its crashing. Register your ModBlocks before CraftingRegistry
  12. Dude ash jack had the original question
  13. Asweez replied to Asweez's topic in Modder Support
    Wait nvm I solved it
  14. Asweez posted a topic in Modder Support
    I've been trying to figure this out for days now but I have an Extended Player thing set up and I have a GUI that I want to display these properties. Like the tutorial says, I have to make packets. I know how to work out packets and everything but I'm stuck on the SyncPlayerPropsPacket because all the info on the tutorial is outdated. Any ideas or code that could help?
  15. I'm confused does this have anything to do with the original question?
  16. WHERE ARE YOU USING IT? And world.playerEntities is stupid
  17. Well it's probably because you are using the client side world. Where is this method?
  18. Well you never want to use the client side player unless you are on the client(gui, key binding). It is almost always available on the server side. Where do you need an instance of the player?
  19. Dude take a hint! We aren't helping you because what you are trying to do is hacking!!
  20. So you don't actually program using forge and you're basically just asking us experienced modders to make a hacked client for you?
  21. How would I do that? I tried doing it like I would in an item/entity (i.e ExtendedPlayer ext = ExtendedPlayer.get(player), then ext.getProperty()) but the client(my GUI) isn't showing any of the properties that are there. I have a basic counter of a level system, and even though the System tells me it is level 2 the GUI says level 0 still. Any help?

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.