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.

GigaNova

Members
  • Joined

  • Last visited

  1. I've edited your code, but it still just reverts back to normal after restart. Here is how it looks: public void writeToNBT(NBTTagCompound par1NBTTagCompound) { super.writeToNBT(par1NBTTagCompound); par1NBTTagCompound.setBoolean("defeat", mobisdefeated); NBTTagList nbttaglist = new NBTTagList(); par1NBTTagCompound.setTag("tag", nbttaglist); } public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); NBTTagList nbttaglist = par1NBTTagCompound.getTagList("tag"); for (int i = 0; i < nbttaglist.tagCount(); ++i) { NBTTagCompound nbttagcompound1 = (NBTTagCompound)nbttaglist.tagAt(i); byte slot = nbttagcompound1.getByte("Slot"); } mobisdefeated = par1NBTTagCompound.getBoolean("defeat"); }
  2. I've looked at your code, but I can't find anything that sets the boolean to true. When a mob is defeated, the boolean is set to true, allowing an item to do something. But how can I do this with NBT? And yes, I have a tamable entity too, that resets after restarts, even tough it extends EntityTameable.
  3. Ehm, sorry if I have to ask, but could you explain that for me? I have this boolean called "DefeatedMob" that is set to true.
  4. I have a boolean that is set to false. An event changes this boolean to true. But after I close minecraft and restart it, its set back to false. I have this problem with an item and my tameable mob (he stops following me after restart). How can I permenantly set this in a save file? Thanks!
  5. Ok, I'm gonna have to bump this, because I really want this to work. Is there really no way to show a gui on a death of a mob? I don't believe that.
  6. This is the entire error log, if thats more helpfull. [iNFO] Starting minecraft server version 1.5.2 [sEVERE] Encountered an unexpected exception NoClassDefFoundError java.lang.NoClassDefFoundError: dpmod3rdimpact/ModelHuman at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at cpw.mods.fml.common.ModClassLoader.loadBaseModClass(ModClassLoader.java:86) at cpw.mods.fml.common.modloader.ModLoaderModContainer.constructMod(ModLoaderModContainer.java:483) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98) at cpw.mods.fml.common.Loader.loadMods(Loader.java:503) at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:85) at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:350) at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:69) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:430) at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16) Caused by: java.lang.ClassNotFoundException: dpmod3rdimpact.ModelHuman at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:238) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 30 more Caused by: java.lang.RuntimeException: Attempted to load class dpmod3rdimpact/ModelHuman for invalid side SERVER at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:50) at cpw.mods.fml.relauncher.RelaunchClassLoader.runTransformers(RelaunchClassLoader.java:352) at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:225) ... 32 more
  7. I was testing my mod, and singleplayer works just fine. But when starting a server, it gives: [sEVERE] Encountered an unexpected exception NoClassDefFoundError java.lang.NoClassDefFoundError: ModName/ModelHuman And the file is there, but it doesn't seem to find it. Do I need to register a model first or?
  8. Ah, I see. Well here is the entire Entity: http://pastebin.com/FtwHZCmv
  9. @Override public void onLivingUpdate() { if (this.health == 0) { Modloader.openGUI(attackingPlayer, new GuiDefeatGiyga()); } } This is all the code there is. I'm searching for a FML variant of openGUI but I can't find any.
  10. Well, only the method is Modloader. I am using Forge 1.5.2.7.8.8 at the moment. But my entity is acting all weird, he won't move and loops the being hit animation really fast. Even when I kill him then, the GUI still does not pop-up. I have no idea why this is not working.
  11. Thanks alot! My code now looks like this: @Override public void onLivingUpdate() { if (this.health == 0) { ModLoader.openGUI(attackingPlayer, new GuiDefeatGiyga()); } } Only "attackingPlayer" could be found in EntityLiving, is there any way I can set it to all Players (like on a MP server)? EDIT: The code doesn't really work. He's doesn't move anymore and when I hit him, his limbs do the damage animation really quikly in an endless loop.
  12. Ah, come on. This is like my 4th thread that isn't resolved .
  13. I only need to know how to do this, I just use the function I've used for all my Gui's. So please, give a normal answer, or don't answer at all.
  14. Because the OpenGUI uses ModLoader.openGUI([b]par3EntityPlayer[/b]
  15. Hello, I made a custom GUI that opens as soon as a my mob dies, but nothing happens. As soon as its dead, it just falls over and thats it. I've tested the GUI and it works if I open it with something else (onRightClick). This is the code: public void onLivingUpdate(EntityPlayer par3EntityPlayer) { if (this.dead = true) { ModLoader.openGUI(par3EntityPlayer, new GuiDefeatGiyga()); } } I tried using if (this.health <= 0) but that doesn't work either. Can somebody help me?

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.