Jump to content

Soulas97

Members
  • Posts

    86
  • Joined

  • Last visited

Everything posted by Soulas97

  1. i think i got it , with code no errors but still doesn't work
  2. first how to fix that error? its a bit annoying but strange still it says to remove @Override
  3. when i try to add @Override over them i get an error at this line attackEntityAsMob(Entity entityTarget, boolean wasDamageDone) idk why it says to remove @Override
  4. i tried but i doesn't work
  5. how to use that thingy ? im new
  6. idk how to setup it to be right?
  7. like how to to that properly i know that on update tick, but do you have an example code for that, please to set nearest entities on fire, like EntityLiving
  8. and where to type it? before what line?
  9. and how to set to true?
  10. does it works same way, with when other entity is in range with my entity and, to get it on fire when it is in range like 5-10blocks
  11. i still getting errors on this line if (entityTargetinstanceof EntityLivingBase) {
  12. post example code,please how to make, when he attacks, maybe just knockbacks target straight or in to the air
  13. package com.hogans.craft.entities; import com.hogans.craft.HogansCraft; import net.minecraft.block.Block; import net.minecraft.enchantment.EnchantmentHelper; 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.EntityAIAvoidEntity; import net.minecraft.entity.ai.EntityAIBreakDoor; import net.minecraft.entity.ai.EntityAIHurtByTarget; import net.minecraft.entity.ai.EntityAILeapAtTarget; import net.minecraft.entity.ai.EntityAILookIdle; import net.minecraft.entity.ai.EntityAIMoveThroughVillage; import net.minecraft.entity.ai.EntityAINearestAttackableTarget; import net.minecraft.entity.ai.EntityAIOpenDoor; import net.minecraft.entity.ai.EntityAISwimming; import net.minecraft.entity.ai.EntityAIWander; import net.minecraft.entity.ai.EntityAIWatchClosest; import net.minecraft.entity.boss.EntityWither; import net.minecraft.entity.monster.EntityCaveSpider; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityEnderman; import net.minecraft.entity.monster.EntityIronGolem; import net.minecraft.entity.monster.EntityMob; import net.minecraft.entity.monster.EntitySkeleton; import net.minecraft.entity.monster.EntitySlime; import net.minecraft.entity.monster.EntitySpider; import net.minecraft.entity.monster.EntityWitch; import net.minecraft.entity.monster.EntityZombie; import net.minecraft.entity.passive.EntityBat; import net.minecraft.entity.passive.EntityChicken; import net.minecraft.entity.passive.EntityCow; import net.minecraft.entity.passive.EntityHorse; import net.minecraft.entity.passive.EntityOcelot; import net.minecraft.entity.passive.EntityPig; import net.minecraft.entity.passive.EntitySheep; import net.minecraft.entity.passive.EntitySquid; import net.minecraft.entity.passive.EntityVillager; import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.world.EnumDifficulty; import net.minecraft.world.World; import net.minecraftforge.common.ForgeModContainer; public class EntityBull extends EntityMob { public EntityBull(World world) { super(world); isImmuneToFire = false; getNavigator().clearPathEntity(); getNavigator().setBreakDoors(true); //getNavigator().func_48679_a(true); this.tasks.addTask(0, new EntityAISwimming(this)); tasks.addTask(2, new EntityAILeapAtTarget(this, 0.4F)); this.tasks.addTask(4, new EntityAIAttackOnCollide(this, EntityLiving.class, 1.0D, true)); this.tasks.addTask(4, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, true)); this.tasks.addTask(5, new EntityAIWander(this, 2.0D)); this.tasks.addTask(6, new EntityAIMoveThroughVillage(this, 1.0D, false)); this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 60.0F)); this.tasks.addTask(9, new EntityAIBreakDoor(this)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntitySheperd.class, 0, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, 0, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityCow.class, 1, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityWolf.class, 1, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityHorse.class, 1, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityZombie.class, 2, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntitySkeleton.class, 2, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntitySpider.class, 3, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityIronGolem.class, 3, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityCaveSpider.class, 4, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityEnderman.class, 4, true)); this.despawnEntity(false); } private void despawnEntity(boolean b) { // TODO Auto-generated method stub } protected Item getDropItem() { return HogansCraft.CrazyMushroom; } protected void dropRareDrop(int par1) { this.entityDropItem(new ItemStack(HogansCraft.BullsTear, 1, 1), 0.0F); } protected String getLivingSound() { return "mob.cow.say"; } /** * Returns the sound this mob makes when it is hurt. */ protected String getHurtSound() { return "mob.cow.hurt"; } /** * Returns the sound this mob makes on death. */ protected String getDeathSound() { return "mob.cow.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.cow.step", 0.15F, 1.0F); } protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(150.0D); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.34000000417232513D); this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(12.0D); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(150.0D); this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(10.0D); } //* Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue public int getTotalArmorValue() { return 25; } protected boolean isAIEnabled() { return true; } }
  14. where to type it? because when i type it before ai = false i get many errors/
  15. and it will work on other mobs, if i add to a attacker entity? fire aspect on attack
  16. my mob, when it attacks other entity or targets a player, he specialisizes on charging on enemies, hell bull
  17. hey, guys i have a question, how to make that when mob attacks you or other entyti ,he sets target on fire, and knockbacks it.? how to make that? and maybe adds wither effect to it?
  18. ok i will so how to fix this crash?
  19. ---- Minecraft Crash Report ---- // Don't be sad, have a hug! <3 Time: 14.6.18 09.39 Description: Ticking entity java.lang.NullPointerException: Ticking entity at com.hogans.craft.relics.RuneOfVision.onUpdate(RuneOfVision.java:34) at net.minecraft.item.ItemStack.updateAnimation(ItemStack.java:378) at net.minecraft.entity.player.InventoryPlayer.decrementAnimations(InventoryPlayer.java:311) at net.minecraft.entity.player.EntityPlayer.onLivingUpdate(EntityPlayer.java:539) at net.minecraft.client.entity.EntityPlayerSP.onLivingUpdate(EntityPlayerSP.java:287) at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1603) at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:289) at net.minecraft.client.entity.EntityClientPlayerMP.onUpdate(SourceFile:63) at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2019) at net.minecraft.world.World.updateEntity(World.java:1983) at net.minecraft.world.World.updateEntities(World.java:1836) at net.minecraft.client.Minecraft.runTick(Minecraft.java:1956) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:916) at net.minecraft.client.Minecraft.run(Minecraft.java:835) at net.minecraft.client.main.Main.main(SourceFile:103) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at com.hogans.craft.relics.RuneOfVision.onUpdate(RuneOfVision.java:34) at net.minecraft.item.ItemStack.updateAnimation(ItemStack.java:378) at net.minecraft.entity.player.InventoryPlayer.decrementAnimations(InventoryPlayer.java:311) at net.minecraft.entity.player.EntityPlayer.onLivingUpdate(EntityPlayer.java:539) at net.minecraft.client.entity.EntityPlayerSP.onLivingUpdate(EntityPlayerSP.java:287) at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1603) at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:289) at net.minecraft.client.entity.EntityClientPlayerMP.onUpdate(SourceFile:63) at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2019) at net.minecraft.world.World.updateEntity(World.java:1983) -- Entity being ticked -- Details: Entity Type: null (net.minecraft.client.entity.EntityClientPlayerMP) Entity ID: 64 Entity Name: Player57 Entity's Exact location: -1,43, 81,76, 1021,40 Entity's Block location: World: (-2,81,1021), Chunk: (at 14,5,13 in -1,63; contains blocks -16,0,1008 to -1,255,1023), Region: (-1,1; contains chunks -32,32 to -1,63, blocks -512,0,512 to -1,255,1023) Entity's Momentum: 0,00, 0,00, 0,00 Stacktrace: at net.minecraft.world.World.updateEntities(World.java:1836) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player57'/64, l='MpServer', x=-1,43, y=81,76, z=1021,40]] Chunk stats: MultiplayerChunkCache: 285, 285 Level seed: 0 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: World: (-9,64,998), Chunk: (at 7,4,6 in -1,62; contains blocks -16,0,992 to -1,255,1007), Region: (-1,1; contains chunks -32,32 to -1,63, blocks -512,0,512 to -1,255,1023) Level time: 1198 game time, 1198 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 24 total; [EntitySquid['Squid'/136, l='MpServer', x=39,88, y=60,69, z=976,59], EntitySquid['Squid'/129, l='MpServer', x=34,19, y=56,73, z=978,16], EntitySquid['Squid'/133, l='MpServer', x=28,81, y=61,34, z=969,97], EntitySquid['Squid'/132, l='MpServer', x=36,81, y=55,69, z=981,22], EntitySquid['Squid'/135, l='MpServer', x=30,44, y=59,34, z=973,53], EntitySquid['Squid'/134, l='MpServer', x=34,44, y=60,38, z=975,13], EntityBat['Bat'/8871, l='MpServer', x=-60,25, y=28,23, z=1033,75], EntityBat['Bat'/8870, l='MpServer', x=-61,13, y=27,00, z=1031,59], EntitySquid['Squid'/237, l='MpServer', x=-65,72, y=53,80, z=1030,13], EntitySquid['Squid'/283, l='MpServer', x=-61,34, y=55,36, z=1010,25], EntitySquid['Squid'/281, l='MpServer', x=-61,41, y=53,78, z=1010,22], EntitySquid['Squid'/287, l='MpServer', x=-59,88, y=53,26, z=1019,03], EntitySquid['Squid'/286, l='MpServer', x=-61,59, y=54,14, z=1004,56], EntitySquid['Squid'/285, l='MpServer', x=-64,84, y=55,38, z=1012,91], EntityBat['Bat'/10028, l='MpServer', x=18,53, y=12,00, z=998,78], EntityBat['Bat'/10025, l='MpServer', x=9,63, y=14,29, z=995,56], EntityBat['Bat'/10008, l='MpServer', x=-45,25, y=32,51, z=942,22], EntitySquid['Squid'/351, l='MpServer', x=56,75, y=53,34, z=1001,44], EntitySquid['Squid'/350, l='MpServer', x=58,50, y=53,72, z=1000,88], EntitySquid['Squid'/352, l='MpServer', x=61,50, y=52,02, z=1001,28], EntitySquid['Squid'/398, l='MpServer', x=62,78, y=57,89, z=1003,78], EntityBat['Bat'/439, l='MpServer', x=65,75, y=32,10, z=971,63], EntityClientPlayerMP['Player57'/64, l='MpServer', x=-1,43, y=81,76, z=1021,40], EntityBat['Bat'/463, l='MpServer', x=-63,34, y=28,39, z=1034,09]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:368) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2382) at net.minecraft.client.Minecraft.run(Minecraft.java:857) at net.minecraft.client.main.Main.main(SourceFile:103) 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 net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) -- System Details -- Details: Minecraft Version: 1.7.2 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.7.0_60, Oracle Corporation Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 870502704 bytes (830 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 11194 (626864 bytes; 0 MB) allocated, 5 (280 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94 FML: MCP v9.03 FML v7.2.205.1101 Minecraft Forge 10.12.1.1101 4 mods loaded, 4 mods active mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.2.205.1101} [Forge Mod Loader] (forgeBin-1.7.2-10.12.1.1101.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.12.1.1101} [Minecraft Forge] (forgeBin-1.7.2-10.12.1.1101.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available HogansCraft{Alpha 1.0} [HogansCraft] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Launched Version: 1.6 LWJGL: 2.9.0 OpenGL: GeForce 8600 GT/PCI/SSE2 GL version 3.0.0, NVIDIA Corporation Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: Canadian English (CA) Profiler Position: N/A (disabled) Vec3 Pool Size: 27231 (1524936 bytes; 1 MB) allocated, 19 (1064 bytes; 0 MB) used Anisotropic Filtering: Off (1) idk how to set time, im new at this stuff
  20. i wan't to make that when, rune of vision, is in players inventory it gives nightvision and speed , pernament until you move it away from your inventory but when you remove it from main 9slots to other inventory slots minecraft crashes RuneOfVision.class package com.hogans.craft.relics; import com.hogans.craft.HogansCraft; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; public class RuneOfVision extends Item { public RuneOfVision() { this.setCreativeTab(HogansCraft.HogansOresTab); } @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister iconRegister) { this.itemIcon = iconRegister.registerIcon(HogansCraft.MODID + ":" + this.getUnlocalizedName().substring(5)); } public void onUpdate(ItemStack itemstack, World world, Entity entity, int i, boolean flag) { EntityPlayer Player; if(entity instanceof EntityPlayer) { Player = (EntityPlayer) entity; if(Player.getCurrentEquippedItem().equals(this)) { if(Player.isInWater()) { Player.addPotionEffect((new PotionEffect(Potion.nightVision.getId(), 0, 1))); Player.addPotionEffect((new PotionEffect(Potion.moveSpeed.getId(), 0, 5))); } } else { Player.curePotionEffects(itemstack); } } } }
  21. so how to make it, because i wanna to bull be a mob type that charges into enemy and if misses and hits a block destroys it, or when he charges block beneath him will be destroyed
  22. how to make that when, bull will charge at enemy and block will be in his way, he will just destroy it, and any other blocks in hi's way, except obsidian and bedrock
×
×
  • Create New...

Important Information

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