Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

GigaNova

Members
  • Posts

    47
  • Joined

  • Last visited

Everything posted by GigaNova

  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?
  16. Hello guys, I got a problem with my swimming mob, you see, I tried editing the code of the squid to fit it but instead of swimming it stays frozen in one spot and just spins around like a moron. I tried alot, but nothing happend and there are 0 tutorials on it. Help would really be appreciated. package modfile; import net.minecraft.block.material.Material; import net.minecraft.entity.ai.EntityAISwimming; import net.minecraft.entity.passive.EntityWaterMob; import net.minecraft.util.MathHelper; import net.minecraft.world.World; public class EntitySwimmingMobextends EntityWaterMob { private float randomMotionVecX = 0.0F; private float randomMotionVecY = 0.0F; private float randomMotionVecZ = 0.0F; private float randomMotionSpeed = 1.0F; public EntitySwimmingMobWorld par1World) { super(par1World); this.texture = "/Mob.png"; this.canBreatheUnderwater(); } public int getMaxHealth() { return 10; } public void moveEntityWithHeading(float par1, float par2) { this.moveEntity(this.motionX, this.motionY, this.motionZ); } public boolean isInWater() { return this.worldObj.handleMaterialAcceleration(this.boundingBox.expand(0.0D, 0.0D, 0.0D), Material.water, this); } public void onLivingUpdate() { { this.motionX = (double)(this.randomMotionVecX * this.randomMotionSpeed); this.motionY = (double)(this.randomMotionVecY * this.randomMotionSpeed); this.motionZ = (double)(this.randomMotionVecZ * this.randomMotionSpeed); float f = this.rand.nextFloat() * (float)Math.PI * 2.0F; this.randomMotionVecX = MathHelper.cos(f) * 0.2F; this.randomMotionVecY = -0.1F + this.rand.nextFloat() * 0.2F; this.randomMotionVecZ = MathHelper.sin(f) * 0.2F; this.renderYawOffset += (-((float)Math.atan2(this.motionX, this.motionZ)) * 180.0F / (float)Math.PI - this.renderYawOffset) * 0.1F; this.rotationYaw = this.renderYawOffset; } } /** * Checks if the entity's current position is a valid location to spawn this entity. */ public boolean getCanSpawnHere() { return posY > 45D && posY < 63D && super.getCanSpawnHere(); } }
  17. Hello guys, I got a problem with my swimming mob, you see, I tried editing the code of the squid to fit it but instead of swimming it stays frozen in one spot and just spins around like a moron. I tried alot, but nothing happend and there are 0 tutorials on it. Help would really be appreciated. package modfile; import net.minecraft.block.material.Material; import net.minecraft.entity.ai.EntityAISwimming; import net.minecraft.entity.passive.EntityWaterMob; import net.minecraft.util.MathHelper; import net.minecraft.world.World; public class EntitySwimmingMobextends EntityWaterMob { private float randomMotionVecX = 0.0F; private float randomMotionVecY = 0.0F; private float randomMotionVecZ = 0.0F; private float randomMotionSpeed = 1.0F; public EntitySwimmingMobWorld par1World) { super(par1World); this.texture = "/Mob.png"; this.canBreatheUnderwater(); } public int getMaxHealth() { return 10; } public void moveEntityWithHeading(float par1, float par2) { this.moveEntity(this.motionX, this.motionY, this.motionZ); } public boolean isInWater() { return this.worldObj.handleMaterialAcceleration(this.boundingBox.expand(0.0D, 0.0D, 0.0D), Material.water, this); } public void onLivingUpdate() { { this.motionX = (double)(this.randomMotionVecX * this.randomMotionSpeed); this.motionY = (double)(this.randomMotionVecY * this.randomMotionSpeed); this.motionZ = (double)(this.randomMotionVecZ * this.randomMotionSpeed); float f = this.rand.nextFloat() * (float)Math.PI * 2.0F; this.randomMotionVecX = MathHelper.cos(f) * 0.2F; this.randomMotionVecY = -0.1F + this.rand.nextFloat() * 0.2F; this.randomMotionVecZ = MathHelper.sin(f) * 0.2F; this.renderYawOffset += (-((float)Math.atan2(this.motionX, this.motionZ)) * 180.0F / (float)Math.PI - this.renderYawOffset) * 0.1F; this.rotationYaw = this.renderYawOffset; } } /** * Checks if the entity's current position is a valid location to spawn this entity. */ public boolean getCanSpawnHere() { return posY > 45D && posY < 63D && super.getCanSpawnHere(); } }
  18. Hello, Could somebody tell me what the replacement for setBlockWithMetadata and setBlockNotify is in 1.5.1? Because there is only setBlock and setBlockMetadataWithNotify. But setBlock can't replace them because it errors and setBlockMetadataWithNotify just makes the block turn into air.
  19. Ok, I'm gonna need to bump this because NOTHING is generating anymore. My ores, my structures, nothing. And the worst part is nobody wants to tell the fix or why its broken.
  20. Thank you, but there is no func that is the same as .setblock anymore. Only .setblockandmetadatawithnotify. Its still not generating, but I get no errors about the code.
  21. Hello, I've seen that .setblock was replaced (I have no idea why) so I had to replace edit my structures. My normal blocks look like this: world.func_94575_c(i + 0, j + 0, k + 0, Block.stoneBrick.blockID); and my Metadata blocks: world.setBlockAndMetadataWithNotify(i + 7, j + 8, k + 38, Block.stoneBrick.blockID, 1, 1); In my mod_ file there is this piece: for(int i = 0; i < 10; i++) { int randPosX = chunkX + random.nextInt(16); int randPosY = random.nextInt(60); int randPosZ = chunkZ + random.nextInt(16); (new GiygasTemple()).generate(world, random, randPosX, randPosY, randPosZ); Underneath "generatesurface" But when creating a world, nothing happens. There is no structure, anywhere. Has this changed or...? Thanks in advance EDIT: Seriously? Nobody knows how to fix it?
  22. Hello, I've added a custom biome, but everytime I try to create a new world it just stops at "Creating World" and gives me this error. 2013-02-20 19:21:29 [iNFO] [sTDERR] java.lang.NullPointerException 2013-02-20 19:21:29 [iNFO] [sTDERR] at net.minecraft.world.World.getTopSolidOrLiquidBlock(World.java:1967) 2013-02-20 19:21:29 [iNFO] [sTDERR] at net.minecraft.world.biome.BiomeDecorator.decorate(BiomeDecorator.java:226) 2013-02-20 19:21:29 [iNFO] [sTDERR] at net.minecraft.world.biome.BiomeDecorator.decorate(BiomeDecorator.java:203) 2013-02-20 19:21:29 [iNFO] [sTDERR] at net.minecraft.world.biome.BiomeGenBase.decorate(BiomeGenBase.java:367) 2013-02-20 19:21:29 [iNFO] [sTDERR] at net.minecraft.world.gen.ChunkProviderGenerate.populate(ChunkProviderGenerate.java:577) 2013-02-20 19:21:29 [iNFO] [sTDERR] at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:258) 2013-02-20 19:21:29 [iNFO] [sTDERR] at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1258) 2013-02-20 19:21:29 [iNFO] [sTDERR] at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:153) 2013-02-20 19:21:29 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:310) 2013-02-20 19:21:29 [iNFO] [sTDERR] at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:84) 2013-02-20 19:21:29 [iNFO] [sTDERR] at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:100) 2013-02-20 19:21:29 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:458) 2013-02-20 19:21:29 [iNFO] [sTDERR] at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16) 2013-02-20 19:21:29 [iNFO] [ForgeModLoader] Unloading dimension 0 2013-02-20 19:21:29 [iNFO] [ForgeModLoader] Unloading dimension -1 2013-02-20 19:21:29 [iNFO] [ForgeModLoader] Unloading dimension 1 2013-02-20 19:21:29 [sEVERE] [ForgeModLoader] Fatal errors were detected during the transition from AVAILABLE to SERVER_STOPPED. Loading cannot continue 2013-02-20 19:21:29 [sEVERE] [ForgeModLoader] mcp [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available FML [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available Forge [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available mod_3rdimpact [mod_3rdimpact] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available mod_biomwasteland [mod_biomwasteland] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available 2013-02-20 19:21:29 [sEVERE] [ForgeModLoader] The following problems were captured during this phase 2013-02-20 19:21:29 [iNFO] [sTDERR] Exception in thread "Server thread" cpw.mods.fml.common.LoaderException 2013-02-20 19:21:29 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.transition(LoadController.java:117) 2013-02-20 19:21:29 [iNFO] [sTDERR] at cpw.mods.fml.common.Loader.serverStopped(Loader.java:752) 2013-02-20 19:21:29 [iNFO] [sTDERR] at cpw.mods.fml.common.FMLCommonHandler.handleServerStopped(FMLCommonHandler.java:459) 2013-02-20 19:21:29 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:559) 2013-02-20 19:21:29 [iNFO] [sTDERR] at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16) 2013-02-20 19:48:23 [iNFO] [sTDERR] Someone is closing me! I just can't figure out whats doing it and only removing the whole code stops the error. Help!
  23. 2 Errors: at float 1F = worldObj.getWorldChunkManager().getBiomeGenAt(i, k).getFloatRainfall(); Syntax error on token "1F", invalid VariableDecloratorID at float f3 = f1;
  24. When I debugged my "Crap", It didnt help a thing, same error, giving the same location. I need to find a replacement method, but I can't seem to get one. The method is really needed to generate my world. Did you try my response? I tried that, but then F3 gave errors because F1 was undifined, and when commenting F3 other vars would get errors and so on. Can I replace this with something else, not the same function but something must give the same outcome?
  25. When I debugged my "Crap", It didnt help a thing, same error, giving the same location. I need to find a replacement method, but I can't seem to get one. The method is really needed to generate my world.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.