
BoonieQuafter-CrAfTeR
Members-
Posts
337 -
Joined
-
Last visited
Everything posted by BoonieQuafter-CrAfTeR
-
im making a mob boss that summons in other mobs, I want the mobs to attack whatever hurts the Boss, so kinda like a minon thing. anyway I want them to protect how should I, I couldn't find anything in the wolf class. if its easier, how do I make a mob not attack another mob if its hurt by it.
-
Weird Entity Glitch. 1.7.10
BoonieQuafter-CrAfTeR replied to BoonieQuafter-CrAfTeR's topic in Modder Support
I worked and know it doesn't what the heck. -
Weird Entity Glitch. 1.7.10
BoonieQuafter-CrAfTeR replied to BoonieQuafter-CrAfTeR's topic in Modder Support
what the heck it worked.. package com.OlympiansMod.entity; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityList; import net.minecraft.entity.EnumCreatureType; import net.minecraft.world.biome.BiomeGenBase; import com.OlympiansMod.Main.MainRegistry; import com.sun.xml.internal.bind.v2.model.core.ID; import cpw.mods.fml.common.registry.EntityRegistry; public class MEntity { public static void MainRegistry(){ registerEntity(); } public static void registerEntity(){ EntityRegistry.registerModEntity(EntityBullet.class, "Bullet", 302942, MainRegistry.modInstance, 1, 80, true); EntityRegistry.registerModEntity(EntitySGuardian.class, "SGaurdian", 301320, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntitySGolem.class, "EntitySGolem", 420193, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntityUndead.class, "UndeadRoman", 403998, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntityUndeadGreekArcher.class, "UndeadArcherGreek", 403698, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntityThunderBolt.class, "ThunderBolt", 413698, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntityMasterBolt.class, "MasterBolt", 413798, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(Zeus.class, "Zeus", 414798, MainRegistry.modInstance, 100, 1, true); EntityRegistry.registerModEntity(Arachne.class, "Arachne", 414799, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntityCell.class, "EntityCell", 414789, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(ZeusExtended.class, "ZeusExtended", 414790, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntityFireBalloDeath.class, "EntityFireBalloDeath", 414791, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(GreekUndead.class, "GreekUndead", 414792, MainRegistry.modInstance, 80, 1, true); } public static void createEntity(Class entityClass, String entityName){ //int randomID = EntityRegistry.findGlobalUniqueEntityId(); //EntityRegistry.registerModEntity(entityClass, entityName, randomID, MainRegistry.modInstance, 1, 80, true); } } -
never mind I failed lol sorry bout that.
-
I know this might seem like a stupid question but how exactly do you get "the World" if your method doesn't support it, or if nothing in your method has a World field?
-
ChatComponent problem [1.7.10]
BoonieQuafter-CrAfTeR replied to BoonieQuafter-CrAfTeR's topic in Modder Support
k cool, -
Weird Entity Glitch. 1.7.10
BoonieQuafter-CrAfTeR replied to BoonieQuafter-CrAfTeR's topic in Modder Support
yes, ill change it, but that's not even the problem is it? I mean my arachne mob works just fine regardless, so what the heck? -
ChatComponent problem [1.7.10]
BoonieQuafter-CrAfTeR replied to BoonieQuafter-CrAfTeR's topic in Modder Support
so, if(!world.isRemote) sets it serverside? just asking, im Pretty sure it does, like almost 89% positive. anyways doing this worked thanks. -
ok so im made an item that basically returns an itemstack whenever its rightclicked. as well as a chat message, problem is it registers twice ingame, so I get a double message, how can I fix this? any help is greatly appreciated thank you. OnItemRightclick method: public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { if (player.capabilities.isCreativeMode || player.inventory.consumeInventoryItem(Items.redstone)) { world.playSoundAtEntity(player, "random.fizz", 0.7f, 0.8f); if (!world.isRemote) { world.spawnEntityInWorld(new EntityBullet(world, player)); } } if (player.isSneaking()) { player.addChatMessage(new ChatComponentText( "Ballistae -- Sniper Mode")); return new ItemStack(ModItems.BoomStickSniperMode); } return itemstack; } }
-
Weird Entity Glitch. 1.7.10
BoonieQuafter-CrAfTeR replied to BoonieQuafter-CrAfTeR's topic in Modder Support
I didn't realive this was unclear, but I cant attack my mobs, which is quite a problem because player could be farmed if a monster is next to there spawn point. and also its not all mobs in the mod, just the ones that are more complex. -
After I die and try to attack my mobs, the attacks register through them, meaning I am able to break a block through one of my entitys, but I can still collide with them, and they can attack me, its with every single entity in my mod. vanilla mobs don't have an effect, so its not my computer or anything like that. I have no Idea at this point, but just for example im going to show one of my mob classes to see if there is a problem, because personally I couldn't find one, ill also post my main registry to make sure im loading them into the game correctly, thanks for all of your time. Mob code: package com.OlympiansMod.entity; package com.OlympiansMod.entity; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIAttackOnCollide; import net.minecraft.entity.ai.EntityAIHurtByTarget; import net.minecraft.entity.ai.EntityAILookIdle; import net.minecraft.entity.ai.EntityAIMoveTowardsRestriction; import net.minecraft.entity.ai.EntityAIMoveTowardsTarget; import net.minecraft.entity.ai.EntityAINearestAttackableTarget; import net.minecraft.entity.ai.EntityAIWander; import net.minecraft.entity.ai.EntityAIWatchClosest; import net.minecraft.entity.monster.EntityMob; import net.minecraft.entity.monster.IMob; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.world.World; public class GreekUndead extends EntityMob{ private int attackTimer; public GreekUndead(World world) { super(world); this.setSize(1.1F, 2F); this.getNavigator().setAvoidsWater(true); this.tasks.addTask(1, new EntityAIAttackOnCollide(this, 1.0D, true)); this.tasks.addTask(2, new EntityAIMoveTowardsTarget(this, 2.0D, 32.0F)); this.tasks.addTask(3, new EntityAIMoveTowardsRestriction(this, 1.0D)); this.tasks.addTask(4, new EntityAIWander(this, 0.6D)); this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); this.tasks.addTask(6, new EntityAILookIdle(this)); this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false)); this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, Zeus.class, 0, true)); this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, ZeusExtended.class, 0, true)); } protected boolean isAIEnabled(){ return true; } protected void applyEntityAttributes(){ super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(100.0f); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.50D); this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(10.0D); } public void onLivingUpdate() { super.onLivingUpdate(); if (this.attackTimer > 0) { --this.attackTimer; } } public boolean attackEntityAsMob(Entity entity) { this.attackTimer = 20; this.worldObj.setEntityState(this, (byte)4); boolean flag = entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float)(10 + this.rand.nextInt(15))); if (flag) { entity.motionX += 0.4000000059604645D; } this.playSound("mob.irongolem.throw", 1.0F, 1.0F); return flag; } @SideOnly(Side.CLIENT) public void handleHealthUpdate(byte par1) { if (par1 == 4) { this.attackTimer = 10; this.playSound("mob.irongolem.throw", 1.0F, 1.0F); } else if (par1 == 11) { } else super.handleHealthUpdate(par1); } @SideOnly(Side.CLIENT) public int getAttackTimer() { return this.attackTimer; } protected String getHurtSound() { return "mob.irongolem.hit"; } protected String getDeathSound() { return "mob.irongolem.death"; } protected void func_145780_a(int p_145780_1_, int p_145780_2_, int p_145780_3_, Block p_145780_4_) { this.playSound("mob.irongolem.walk", 1.0F, 1.0F); } } MainRegistry: package com.OlympiansMod.Main; import net.minecraft.client.renderer.entity.RenderSnowball; import net.minecraftforge.event.entity.living.LivingDeathEvent; import com.OlympiansMod.Block.ModBlocks; import com.OlympiansMod.Item.ModItems; import com.OlympiansMod.creativetabs.MCreativeTabs; import com.OlympiansMod.entity.EntityCell; import com.OlympiansMod.entity.EntityGreekFire; import com.OlympiansMod.entity.MEntity; import com.OlympiansMod.lib.Refstrings; import com.OlympiansMod.world.MWorld; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = Refstrings.MODID , name = Refstrings.NAME , version = Refstrings.VERSION) public class MainRegistry { @SidedProxy(clientSide = Refstrings.CLIENTSIDE , serverSide = Refstrings.SERVERSIDE) public static ServerProxy proxy; @Instance public static MainRegistry modInstance; @EventHandler public static void PreLoad(FMLPreInitializationEvent PreEvent) { MCreativeTabs.initialiseTabs(); ModBlocks.MainRegistry(); MEntity.MainRegistry(); ModItems.MainRegistry(); MWorld.MainRegistry(); CraftingManager.mainRegistry(); } @EventHandler public static void Load(FMLInitializationEvent event) { proxy.registerRenderInfo(); } @EventHandler public static void PostLoad(FMLPostInitializationEvent PostEvent) { } } Mob registry: (don't ask about the ids, its not the problem) package com.OlympiansMod.entity; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityList; import net.minecraft.entity.EnumCreatureType; import net.minecraft.world.biome.BiomeGenBase; import com.OlympiansMod.Main.MainRegistry; import com.sun.xml.internal.bind.v2.model.core.ID; import cpw.mods.fml.common.registry.EntityRegistry; public class MEntity { public static void MainRegistry(){ registerEntity(); } public static void registerEntity(){ createEntity(EntityGreekFire.class, "GreekFire"); createEntity(EntityBullet.class, "Bullet"); createEntity(EntitySGuardian.class, "SGuardian"); createEntity(EntitySGolem.class, "SGolem"); createEntity(EntityUndead.class, "Undead"); createEntity(EntityUndeadGreekArcher.class, "UndeadArcherGreek"); createEntity(EntityThunderBolt.class, "ThunderBolt"); createEntity(EntityMasterBolt.class, "MasterBolt"); createEntity(Zeus.class, "Zeus"); createEntity(ZeusExtended.class, "ZeusExtended"); createEntity(Arachne.class, "Arachne"); createEntity(EntityCell.class, "EntityCell"); createEntity(EntityFireBalloDeath.class, "EntityCell"); createEntity(GreekUndead.class, "GreekUndead"); } public static void createEntity(Class entityClass, String entityName){ //int randomID = EntityRegistry.findGlobalUniqueEntityId(); //EntityRegistry.registerModEntity(entityClass, entityName, randomID, MainRegistry.modInstance, 1, 80, true); EntityRegistry.registerModEntity(EntityGreekFire.class, "GreekFire", 4013479, MainRegistry.modInstance, 1, 80, true); EntityRegistry.registerModEntity(EntityBullet.class, "Bullet", 302942, MainRegistry.modInstance, 1, 80, true); EntityRegistry.registerModEntity(EntitySGuardian.class, "SGaurdian", 301320, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntitySGolem.class, "EntitySGolem", 420193, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntityUndead.class, "UndeadRoman", 403998, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntityUndeadGreekArcher.class, "UndeadArcherGreek", 403698, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntityThunderBolt.class, "ThunderBolt", 413698, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntityMasterBolt.class, "MasterBolt", 413798, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(Zeus.class, "Zeus", 414798, MainRegistry.modInstance, 100, 1, true); EntityRegistry.registerModEntity(Arachne.class, "Arachne", 414799, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntityCell.class, "EntityCell", 414789, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(ZeusExtended.class, "ZeusExtended", 414790, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntityFireBalloDeath.class, "EntityFireBalloDeath", 414791, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(GreekUndead.class, "GreekUndead", 414792, MainRegistry.modInstance, 80, 1, true); } } Once again thank you for all of your time.
-
Why doesnt this work? 1.7.10
BoonieQuafter-CrAfTeR replied to BoonieQuafter-CrAfTeR's topic in Modder Support
dude read the dates, I posted this one before the originally thread was completed -
Biped attack animation?(1.7.10)
BoonieQuafter-CrAfTeR replied to BoonieQuafter-CrAfTeR's topic in Modder Support
I would post the model code, but its illeagal. -
so I was thinking about how It might be cool to make one of my mobs have an attack animation like the entity player, so naturally I go to look in the model biped folder, and what do I see, no attack animation. so were is it may I ask? or am I just missing it horribly. any way thank you in advance.
-
[1.7.10] switching a mobs ai. [SOLVED] 100%
BoonieQuafter-CrAfTeR replied to BoonieQuafter-CrAfTeR's topic in Modder Support
Fixed it! wow.. well anyway thank all of you. -
[1.7.10] switching a mobs ai. [SOLVED] 100%
BoonieQuafter-CrAfTeR replied to BoonieQuafter-CrAfTeR's topic in Modder Support
also you said before that I was getting the crash report because the game thinks this.getattacktarget cant equal null? how can I let the game know that it can be null? -
[1.7.10] switching a mobs ai. [SOLVED] 100%
BoonieQuafter-CrAfTeR replied to BoonieQuafter-CrAfTeR's topic in Modder Support
nevermind, but it doesn't work to add the tasks anywere else accept the combat task method -
[1.7.10] switching a mobs ai. [SOLVED] 100%
BoonieQuafter-CrAfTeR replied to BoonieQuafter-CrAfTeR's topic in Modder Support
im not sure if that will make a difference, but ill try it, the problem is, is that even when the code is not erred depending on which ever task is first in the line of code, that's the attack that it uses, I just want to make it remove the aiArrowattack whenever its in a certain range, like this.. @Override public boolean attackEntityAsMob(Entity entity) { if (this.getAttackTarget().getDistanceSqToEntity(this) < 16.0D) { this.tasks.removeTask(aiArrowAttack); this.attackTimer = 10; this.worldObj.setEntityState(this, (byte) 4); entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) (7 + this.rand.nextInt(15))); return true; } else { } this.tasks.addTask(3, aiArrowAttack); return true; } but it doesn't work at all, also what do you mean by "making sure that the attacks doesn't happen at the same time" like if the attack timer equals something different on each attack. -
so as most of the moderators probably know im making a mob that CAN attackoncollide if he is 4 blocks away from the target, being able to edit the combat task to do just so would make my life about 10 times easier, so if anybody would like to tell me why this doesn't work, it would be greatly appreciated, thank you. why doesn't it work? public void setCombatTask() { if (this.getAttackTarget().getDistanceSqToEntity(this) > 16.0D) { this.tasks.addTask(4, this.aiArrowAttack); } else { this.tasks.addTask(4, this.aiAttackOnCollide); } } crash report: A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at com.OlympiansMod.entity.Zeus.setCombatTask(Zeus.java:150) at com.OlympiansMod.entity.Zeus.<init>(Zeus.java:76) at com.OlympiansMod.Item.ZeusSpawn.onItemRightClick(ZeusSpawn.java:18) at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:164) at net.minecraft.server.management.ItemInWorldManager.tryUseItem(ItemInWorldManager.java:345) at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:576) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122) at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) -- Ticking connection -- Details: Connection: net.minecraft.network.NetworkManager@447b1252 Stacktrace: at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_45, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 679592152 bytes (648 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.85.1230 Minecraft Forge 10.13.2.1230 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.10.85.1230} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.13.2.1230} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available theolympiansmod{0.1} [The Olympians Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Player Count: 1 / 8; [EntityPlayerMP['Player959'/1478, l='New World', x=1139.40, y=241.78, z=1095.47]] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge' [18:48:26] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:393]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2015-07-13_18.48.26-server.txt [18:48:26] [Client thread/INFO] [FML]: Waiting for the server to terminate/save. [18:48:28] [server thread/INFO] [FML]: Unloading dimension 0 [18:48:28] [server thread/INFO] [FML]: Unloading dimension -1 [18:48:28] [server thread/INFO] [FML]: Unloading dimension 1 [18:48:28] [server thread/INFO] [FML]: Applying holder lookups [18:48:28] [server thread/INFO] [FML]: Holder lookups applied [18:48:28] [server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded. [18:48:28] [Client thread/INFO] [FML]: Server terminated. AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release this line of code is erroring it btw, if (this.getAttackTarget().getDistanceSqToEntity(this) > 16.0D)
-
[1.7.10] switching a mobs ai. [SOLVED] 100%
BoonieQuafter-CrAfTeR replied to BoonieQuafter-CrAfTeR's topic in Modder Support
nevermind about that last idea, my game crashes from doing this to the combat tasks, and my life would be ten times easier if this would work. why doesn't it work? public void setCombatTask() { if (this.getAttackTarget().getDistanceSqToEntity(this) > 16.0D) { this.tasks.addTask(4, this.aiArrowAttack); } else { this.tasks.addTask(4, this.aiAttackOnCollide); } } crash report: A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at com.OlympiansMod.entity.Zeus.setCombatTask(Zeus.java:150) at com.OlympiansMod.entity.Zeus.<init>(Zeus.java:76) at com.OlympiansMod.Item.ZeusSpawn.onItemRightClick(ZeusSpawn.java:18) at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:164) at net.minecraft.server.management.ItemInWorldManager.tryUseItem(ItemInWorldManager.java:345) at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:576) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122) at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) -- Ticking connection -- Details: Connection: net.minecraft.network.NetworkManager@447b1252 Stacktrace: at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_45, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 679592152 bytes (648 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.85.1230 Minecraft Forge 10.13.2.1230 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.10.85.1230} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.13.2.1230} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available theolympiansmod{0.1} [The Olympians Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Player Count: 1 / 8; [EntityPlayerMP['Player959'/1478, l='New World', x=1139.40, y=241.78, z=1095.47]] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge' [18:48:26] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:393]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2015-07-13_18.48.26-server.txt [18:48:26] [Client thread/INFO] [FML]: Waiting for the server to terminate/save. [18:48:28] [server thread/INFO] [FML]: Unloading dimension 0 [18:48:28] [server thread/INFO] [FML]: Unloading dimension -1 [18:48:28] [server thread/INFO] [FML]: Unloading dimension 1 [18:48:28] [server thread/INFO] [FML]: Applying holder lookups [18:48:28] [server thread/INFO] [FML]: Holder lookups applied [18:48:28] [server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded. [18:48:28] [Client thread/INFO] [FML]: Server terminated. AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release this line of code is erroring it btw, if (this.getAttackTarget().getDistanceSqToEntity(this) > 16.0D) -
[1.7.10] switching a mobs ai. [SOLVED] 100%
BoonieQuafter-CrAfTeR replied to BoonieQuafter-CrAfTeR's topic in Modder Support
actually I have another question, why doesn't this work? public void onUpdateTasks() { if (this.getAttackTarget().getDistanceSqToEntity(this) > 16.0D) { this.tasks.addTask(4, aiArrowAttack); this.tasks.removeTask(aiAttackOnCollide); } else if (this.getAttackTarget().getDistanceSqToEntity(this) < 16.0D) { this.tasks.removeTask(aiArrowAttack); this.tasks.addTask(4, aiAttackOnCollide); } } it doesn't work how I want it to, and if u read the code, you can see that im trying to get the mob to remove ai tasks as soon as its a certain distance close/away from the player. thanks for your help. -
[1.7.10] switching a mobs ai. [SOLVED] 100%
BoonieQuafter-CrAfTeR replied to BoonieQuafter-CrAfTeR's topic in Modder Support
never mind I found a way better way to do it.. -
[1.7.10] switching a mobs ai. [SOLVED] 100%
BoonieQuafter-CrAfTeR replied to BoonieQuafter-CrAfTeR's topic in Modder Support
how do I get the last attack. -
[1.7.10] switching a mobs ai. [SOLVED] 100%
BoonieQuafter-CrAfTeR replied to BoonieQuafter-CrAfTeR's topic in Modder Support
ok so, ive attempted to make an ai class, that requires the entity to attack on collide if the entity is collided. im sort of struggling here though, for I lack understanding of this specific concept, or in other words I would like someone to walk me through it, thanks. public void updateTask() { EntityLivingBase entitylivingbase = this.attacker.getAttackTarget(); double d0 = this.entityHost.getDistanceSq(this.attackTarget.posX, this.attackTarget.boundingBox.minY, this.attackTarget.posZ); boolean flag = this.entityHost.getEntitySenses().canSee(this.attackTarget); if(this.attackTarget.isCollided){ this.attacker.attackEntityAsMob(entitylivingbase); } if (flag) { ++this.field_75318_f; } else { this.field_75318_f = 0; } if (d0 <= (double)this.field_82642_h && this.field_75318_f >= 20) { this.entityHost.getNavigator().clearPathEntity(); } else { this.entityHost.getNavigator().tryMoveToEntityLiving(this.attackTarget, this.entityMoveSpeed); } this.entityHost.getLookHelper().setLookPositionWithEntity(this.attackTarget, 30.0F, 30.0F); float f; if (--this.rangedAttackTime == 0) { if (d0 > (double)this.field_82642_h || !flag) { return; } f = MathHelper.sqrt_double(d0) / this.field_96562_i; float f1 = f; if (f < 0.1F) { f1 = 0.1F; } if (f1 > 1.0F) { f1 = 1.0F; } this.rangedAttackEntityHost.attackEntityWithRangedAttack(this.attackTarget, f1); this.rangedAttackTime = MathHelper.floor_float(f * (float)(this.maxRangedAttackTime - this.field_96561_g) + (float)this.field_96561_g); } else if (this.rangedAttackTime < 0) { f = MathHelper.sqrt_double(d0) / this.field_96562_i; this.rangedAttackTime = MathHelper.floor_float(f * (float)(this.maxRangedAttackTime - this.field_96561_g) + (float)this.field_96561_g); } } } so this is a snippet of my code, what ive done is copy and pasted the entityaiarrow attack, and added a if(this.attackTarget.isCollided){ this.attacker.attackEntityAsMob(entitylivingbase);( im really not sure how to make it work at this point. -
[1.7.10] switching a mobs ai. [SOLVED] 100%
BoonieQuafter-CrAfTeR replied to BoonieQuafter-CrAfTeR's topic in Modder Support
Bump, perchance?