Jump to content

[1.14.4] Custom Skeleton not using the custom bow


erce312

Recommended Posts

So I have made a custom skeleton and a custom bow item, however when I give it to the custom skeleton he doesn't use it. Here is my class. Any help would be greatly appreciated.

package com.github.erce312.informatikacraft.entities;

import com.github.erce312.informatikacraft.init.InformatikacraftEntities;
import com.github.erce312.informatikacraft.init.InformatikacraftItems;

import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.monster.AbstractSkeletonEntity;
import net.minecraft.entity.monster.SkeletonEntity;
import net.minecraft.entity.projectile.AbstractArrowEntity;
import net.minecraft.entity.projectile.ProjectileHelper;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.ItemStack;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.World;

public class Reaper extends AbstractSkeletonEntity
{
  
    public Reaper(EntityType<? extends AbstractSkeletonEntity> type, World wotldIn) 
    {
        super((EntityType<? extends SkeletonEntity>) InformatikacraftEntities.REAPER, wotldIn);
    }
    @Override
     protected void setEquipmentBasedOnDifficulty(DifficultyInstance difficulty) 
    {
         super.setEquipmentBasedOnDifficulty(difficulty);
         this.setItemStackToSlot(EquipmentSlotType.MAINHAND, new ItemStack(InformatikacraftItems.amethyst_bow));

    }
    @Override
    protected SoundEvent getStepSound() {
        return null;
    }
    @Override
    public void attackEntityWithRangedAttack(LivingEntity target, float distanceFactor) {
          ItemStack itemstack = this.findAmmo(this.getHeldItem(ProjectileHelper.getHandWith(this, InformatikacraftItems.amethyst_bow)));
          AbstractArrowEntity abstractarrowentity = this.func_213624_b(itemstack, distanceFactor);
          if (this.getHeldItemMainhand().getItem() instanceof net.minecraft.item.BowItem)
             abstractarrowentity = ((net.minecraft.item.BowItem)this.getHeldItemMainhand().getItem()).customeArrow(abstractarrowentity);
          double d0 = target.posX - this.posX;
          double d1 = target.getBoundingBox().minY + (double)(target.getHeight() / 3.0F) - abstractarrowentity.posY;
          double d2 = target.posZ - this.posZ;
          double d3 = (double)MathHelper.sqrt(d0 * d0 + d2 * d2);
          abstractarrowentity.shoot(d0, d1 + d3 * (double)0.2F, d2, 1.6F, (float)(14 - this.world.getDifficulty().getId() * 4));
          this.playSound(SoundEvents.ENTITY_SKELETON_SHOOT, 1.0F, 1.0F / (this.getRNG().nextFloat() * 0.4F + 0.8F));
          this.world.addEntity(abstractarrowentity);
        super.attackEntityWithRangedAttack(target, distanceFactor);
    }          
}


     

Link to comment
Share on other sites

I have tried to to that but had a lot of issues with aiArrowAttack and aiAttackOnCollide being set to private in the AbstractSkeletonEntity class. I've tried to rewrite them like this in my code

        private final RangedBowAttackGoal<AbstractSkeletonEntity> aiArrowAttack = new RangedBowAttackGoal<>(this, 1.0D, 20, 15.0F);
        private final MeleeAttackGoal aiAttackOnCollide = new MeleeAttackGoal(this, 1.2D, false) 
        {

              public void resetTask() {
                 super.resetTask();
                 Reaper.this.setAggroed(false);
              }


              public void startExecuting() {
                 super.startExecuting();
                 Reaper.this.setAggroed(true);
              }
        };

and then override the setAttackGoal 

    @Override
    public void setCombatTask() {
           if (this.world != null && !this.world.isRemote) {
              this.goalSelector.removeGoal(this.aiAttackOnCollide);
              this.goalSelector.removeGoal(this.aiArrowAttack);
              ItemStack itemstack = this.getHeldItem(ProjectileHelper.getHandWith(this, InformatikacraftItems.amethyst_bow));
              if (itemstack.getItem() instanceof net.minecraft.item.BowItem) {
                 int i = 20;
                 if (this.world.getDifficulty() != Difficulty.HARD) {
                    i = 40;
                 }

                 this.aiArrowAttack.setAttackCooldown(i);
                 this.goalSelector.addGoal(4, this.aiArrowAttack);
              } else {
                 this.goalSelector.addGoal(4, this.aiAttackOnCollide);
                 }

              }
           }

But the mob wouldn't spawn now. Here is the crash report

 [Server thread/FATAL] [minecraft/ThreadTaskExecutor]: Error executing task on Server
java.lang.NullPointerException: null
        at net.minecraft.entity.ai.goal.PrioritizedGoal.hashCode(PrioritizedGoal.java:97) ~[?:?] {re:classloading}
        at java.util.HashMap.hash(HashMap.java:339) ~[?:1.8.0_221] {}
        at java.util.HashMap.put(HashMap.java:612) ~[?:1.8.0_221] {}
        at java.util.HashSet.add(HashSet.java:220) ~[?:1.8.0_221] {}
        at net.minecraft.entity.ai.goal.GoalSelector.addGoal(GoalSelector.java:42) ~[?:?] {re:classloading}
        at com.github.erce312.informatikacraft.entities.Reaper.setCombatTask(Reaper.java:87) ~[?:?] {re:classloading}
        at net.minecraft.entity.monster.AbstractSkeletonEntity.<init>(AbstractSkeletonEntity.java:69) ~[?:?] {re:classloading,pl:accesstransformer:B}
        at com.github.erce312.informatikacraft.entities.Reaper.<init>(Reaper.java:44) ~[?:?] {re:classloading}
        at net.minecraft.entity.EntityType.create(EntityType.java:415) ~[?:?] {re:classloading}
        at net.minecraft.entity.EntityType.create(EntityType.java:305) ~[?:?] {re:classloading}
        at net.minecraft.entity.EntityType.spawn(EntityType.java:297) ~[?:?] {re:classloading}
        at net.minecraft.entity.EntityType.spawn(EntityType.java:292) ~[?:?] {re:classloading}
        at net.minecraft.item.SpawnEggItem.onItemUse(SpawnEggItem.java:80) ~[?:?] {re:classloading}
        at net.minecraftforge.common.ForgeHooks.onPlaceItemIntoWorld(ForgeHooks.java:607) ~[?:?] {re:classloading}
        at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:168) ~[?:?] {re:classloading}
        at net.minecraft.server.management.PlayerInteractionManager.func_219441_a(PlayerInteractionManager.java:341) ~[?:?] {re:classloading}
        at net.minecraft.network.play.ServerPlayNetHandler.processTryUseItemOnBlock(ServerPlayNetHandler.java:870) ~[?:?] {re:classloading}
        at net.minecraft.network.play.client.CPlayerTryUseItemOnBlockPacket.processPacket(CPlayerTryUseItemOnBlockPacket.java:42) ~[?:?] {re:classloading}
        at net.minecraft.network.play.client.CPlayerTryUseItemOnBlockPacket.processPacket(CPlayerTryUseItemOnBlockPacket.java:12) ~[?:?] {re:classloading}
        at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:19) ~[?:?] {re:classloading}
        at net.minecraft.util.concurrent.TickDelayedTask.run(TickDelayedTask.java:20) ~[?:?] {re:classloading}
        at net.minecraft.util.concurrent.ThreadTaskExecutor.run(ThreadTaskExecutor.java:140) [?:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.util.concurrent.RecursiveEventLoop.run(RecursiveEventLoop.java:22) [?:?] {re:classloading}
        at net.minecraft.util.concurrent.ThreadTaskExecutor.driveOne(ThreadTaskExecutor.java:110) [?:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:726) [?:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.MinecraftServer.driveOne(MinecraftServer.java:720) [?:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.util.concurrent.ThreadTaskExecutor.drainTasks(ThreadTaskExecutor.java:97) [?:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.MinecraftServer.runScheduledTasks(MinecraftServer.java:705) [?:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:650) [?:?] {re:classloading,pl:accesstransformer:B}
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_221] {}

Here is the full class

package com.github.erce312.informatikacraft.entities;

import com.github.erce312.informatikacraft.init.InformatikacraftEntities;
import com.github.erce312.informatikacraft.init.InformatikacraftItems;

import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.ai.goal.MeleeAttackGoal;
import net.minecraft.entity.ai.goal.RangedBowAttackGoal;
import net.minecraft.entity.monster.AbstractSkeletonEntity;
import net.minecraft.entity.monster.SkeletonEntity;
import net.minecraft.entity.projectile.AbstractArrowEntity;
import net.minecraft.entity.projectile.ProjectileHelper;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.Difficulty;
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.World;

public class Reaper extends AbstractSkeletonEntity
{
        private final RangedBowAttackGoal<AbstractSkeletonEntity> aiArrowAttack = new RangedBowAttackGoal<>(this, 1.0D, 20, 15.0F);
        private final MeleeAttackGoal aiAttackOnCollide = new MeleeAttackGoal(this, 1.2D, false) 
        {

              public void resetTask() {
                 super.resetTask();
                 Reaper.this.setAggroed(false);
              }


              public void startExecuting() {
                 super.startExecuting();
                 Reaper.this.setAggroed(true);
              }
        };
         
    public Reaper(EntityType<? extends AbstractSkeletonEntity> type, World wotldIn) 
    {
        super((EntityType<? extends SkeletonEntity>) InformatikacraftEntities.REAPER, wotldIn);
    }
    @Override
     protected void setEquipmentBasedOnDifficulty(DifficultyInstance difficulty) 
    {
         super.setEquipmentBasedOnDifficulty(difficulty);
         this.setItemStackToSlot(EquipmentSlotType.MAINHAND, new ItemStack(InformatikacraftItems.amethyst_bow));

    }
    @Override
    protected SoundEvent getStepSound() {
        return null;
    }
    @Override
    public void attackEntityWithRangedAttack(LivingEntity target, float distanceFactor) {
          ItemStack itemstack = this.findAmmo(this.getHeldItem(ProjectileHelper.getHandWith(this, InformatikacraftItems.amethyst_bow)));
        

 

Link to comment
Share on other sites

On 2/26/2020 at 2:54 PM, erce312 said:

I have tried to to that but had a lot of issues with aiArrowAttack and aiAttackOnCollide being set to private in the AbstractSkeletonEntity class. I've tried to rewrite them like this in my code


        private final RangedBowAttackGoal<AbstractSkeletonEntity> aiArrowAttack = new RangedBowAttackGoal<>(this, 1.0D, 20, 15.0F);
        private final MeleeAttackGoal aiAttackOnCollide = new MeleeAttackGoal(this, 1.2D, false) 
        {

              public void resetTask() {
                 super.resetTask();
                 Reaper.this.setAggroed(false);
              }


              public void startExecuting() {
                 super.startExecuting();
                 Reaper.this.setAggroed(true);
              }
        };

and then override the setAttackGoal 


    @Override
    public void setCombatTask() {
           if (this.world != null && !this.world.isRemote) {
              this.goalSelector.removeGoal(this.aiAttackOnCollide);
              this.goalSelector.removeGoal(this.aiArrowAttack);
              ItemStack itemstack = this.getHeldItem(ProjectileHelper.getHandWith(this, InformatikacraftItems.amethyst_bow));
              if (itemstack.getItem() instanceof net.minecraft.item.BowItem) {
                 int i = 20;
                 if (this.world.getDifficulty() != Difficulty.HARD) {
                    i = 40;
                 }

                 this.aiArrowAttack.setAttackCooldown(i);
                 this.goalSelector.addGoal(4, this.aiArrowAttack);
              } else {
                 this.goalSelector.addGoal(4, this.aiAttackOnCollide);
                 }

              }
           }

But the mob wouldn't spawn now. Here is the crash report


 [Server thread/FATAL] [minecraft/ThreadTaskExecutor]: Error executing task on Server
java.lang.NullPointerException: null
        at net.minecraft.entity.ai.goal.PrioritizedGoal.hashCode(PrioritizedGoal.java:97) ~[?:?] {re:classloading}
        at java.util.HashMap.hash(HashMap.java:339) ~[?:1.8.0_221] {}
        at java.util.HashMap.put(HashMap.java:612) ~[?:1.8.0_221] {}
        at java.util.HashSet.add(HashSet.java:220) ~[?:1.8.0_221] {}
        at net.minecraft.entity.ai.goal.GoalSelector.addGoal(GoalSelector.java:42) ~[?:?] {re:classloading}
        at com.github.erce312.informatikacraft.entities.Reaper.setCombatTask(Reaper.java:87) ~[?:?] {re:classloading}
        at net.minecraft.entity.monster.AbstractSkeletonEntity.<init>(AbstractSkeletonEntity.java:69) ~[?:?] {re:classloading,pl:accesstransformer:B}
        at com.github.erce312.informatikacraft.entities.Reaper.<init>(Reaper.java:44) ~[?:?] {re:classloading}
        at net.minecraft.entity.EntityType.create(EntityType.java:415) ~[?:?] {re:classloading}
        at net.minecraft.entity.EntityType.create(EntityType.java:305) ~[?:?] {re:classloading}
        at net.minecraft.entity.EntityType.spawn(EntityType.java:297) ~[?:?] {re:classloading}
        at net.minecraft.entity.EntityType.spawn(EntityType.java:292) ~[?:?] {re:classloading}
        at net.minecraft.item.SpawnEggItem.onItemUse(SpawnEggItem.java:80) ~[?:?] {re:classloading}
        at net.minecraftforge.common.ForgeHooks.onPlaceItemIntoWorld(ForgeHooks.java:607) ~[?:?] {re:classloading}
        at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:168) ~[?:?] {re:classloading}
        at net.minecraft.server.management.PlayerInteractionManager.func_219441_a(PlayerInteractionManager.java:341) ~[?:?] {re:classloading}
        at net.minecraft.network.play.ServerPlayNetHandler.processTryUseItemOnBlock(ServerPlayNetHandler.java:870) ~[?:?] {re:classloading}
        at net.minecraft.network.play.client.CPlayerTryUseItemOnBlockPacket.processPacket(CPlayerTryUseItemOnBlockPacket.java:42) ~[?:?] {re:classloading}
        at net.minecraft.network.play.client.CPlayerTryUseItemOnBlockPacket.processPacket(CPlayerTryUseItemOnBlockPacket.java:12) ~[?:?] {re:classloading}
        at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:19) ~[?:?] {re:classloading}
        at net.minecraft.util.concurrent.TickDelayedTask.run(TickDelayedTask.java:20) ~[?:?] {re:classloading}
        at net.minecraft.util.concurrent.ThreadTaskExecutor.run(ThreadTaskExecutor.java:140) [?:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.util.concurrent.RecursiveEventLoop.run(RecursiveEventLoop.java:22) [?:?] {re:classloading}
        at net.minecraft.util.concurrent.ThreadTaskExecutor.driveOne(ThreadTaskExecutor.java:110) [?:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:726) [?:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.MinecraftServer.driveOne(MinecraftServer.java:720) [?:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.util.concurrent.ThreadTaskExecutor.drainTasks(ThreadTaskExecutor.java:97) [?:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.MinecraftServer.runScheduledTasks(MinecraftServer.java:705) [?:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:650) [?:?] {re:classloading,pl:accesstransformer:B}
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_221] {}

Here is the full class


package com.github.erce312.informatikacraft.entities;

import com.github.erce312.informatikacraft.init.InformatikacraftEntities;
import com.github.erce312.informatikacraft.init.InformatikacraftItems;

import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.ai.goal.MeleeAttackGoal;
import net.minecraft.entity.ai.goal.RangedBowAttackGoal;
import net.minecraft.entity.monster.AbstractSkeletonEntity;
import net.minecraft.entity.monster.SkeletonEntity;
import net.minecraft.entity.projectile.AbstractArrowEntity;
import net.minecraft.entity.projectile.ProjectileHelper;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.Difficulty;
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.World;

public class Reaper extends AbstractSkeletonEntity
{
        private final RangedBowAttackGoal<AbstractSkeletonEntity> aiArrowAttack = new RangedBowAttackGoal<>(this, 1.0D, 20, 15.0F);
        private final MeleeAttackGoal aiAttackOnCollide = new MeleeAttackGoal(this, 1.2D, false) 
        {

              public void resetTask() {
                 super.resetTask();
                 Reaper.this.setAggroed(false);
              }


              public void startExecuting() {
                 super.startExecuting();
                 Reaper.this.setAggroed(true);
              }
        };
         
    public Reaper(EntityType<? extends AbstractSkeletonEntity> type, World wotldIn) 
    {
        super((EntityType<? extends SkeletonEntity>) InformatikacraftEntities.REAPER, wotldIn);
    }
    @Override
     protected void setEquipmentBasedOnDifficulty(DifficultyInstance difficulty) 
    {
         super.setEquipmentBasedOnDifficulty(difficulty);
         this.setItemStackToSlot(EquipmentSlotType.MAINHAND, new ItemStack(InformatikacraftItems.amethyst_bow));

    }
    @Override
    protected SoundEvent getStepSound() {
        return null;
    }
    @Override
    public void attackEntityWithRangedAttack(LivingEntity target, float distanceFactor) {
          ItemStack itemstack = this.findAmmo(this.getHeldItem(ProjectileHelper.getHandWith(this, InformatikacraftItems.amethyst_bow)));
        

 

The crashlog is incomplete, can you send a link to github with your mod?

  • Like 1

New in Modding? == Still learning!

Link to comment
Share on other sites

4 hours ago, DragonITA said:

 

I need the crash report pls, else without we can‘t read where is your mistake.

Well my game doesn't really crash, the entity just doesn't spawn and this is the output in the console. Sorry for using the wrong expression. I also realized I never posted the full class so here it is.

package com.github.erce312.informatikacraft.entities;

import com.github.erce312.informatikacraft.init.InformatikacraftEntities;
import com.github.erce312.informatikacraft.init.InformatikacraftItems;

import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.ai.goal.MeleeAttackGoal;
import net.minecraft.entity.ai.goal.RangedBowAttackGoal;
import net.minecraft.entity.monster.AbstractSkeletonEntity;
import net.minecraft.entity.monster.SkeletonEntity;
import net.minecraft.entity.projectile.AbstractArrowEntity;
import net.minecraft.entity.projectile.ProjectileHelper;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.Difficulty;
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.World;

public class Reaper extends AbstractSkeletonEntity
{
    private final RangedBowAttackGoal<AbstractSkeletonEntity> aiArrowAttack = new RangedBowAttackGoal<>(this, 1.0D, 20, 15.0F);
    private final MeleeAttackGoal aiAttackOnCollide = new MeleeAttackGoal(this, 1.2D, false) 
    {

          public void resetTask() {
             super.resetTask();
             Reaper.this.setAggroed(false);
          }


          public void startExecuting() {
             super.startExecuting();
             Reaper.this.setAggroed(true);
          }
    };
    public Reaper(EntityType<? extends AbstractSkeletonEntity> type, World wotldIn) 
    {
        super((EntityType<? extends SkeletonEntity>) InformatikacraftEntities.REAPER, wotldIn);
    }
    @Override
     protected void setEquipmentBasedOnDifficulty(DifficultyInstance difficulty) 
    {
         super.setEquipmentBasedOnDifficulty(difficulty);
         this.setItemStackToSlot(EquipmentSlotType.MAINHAND, new ItemStack(InformatikacraftItems.amethyst_bow));

    }
    @Override
    protected SoundEvent getStepSound() {
        return null;
    }
    @Override
    public void setCombatTask() {
           if (this.world != null && !this.world.isRemote) {
              this.goalSelector.removeGoal(this.aiAttackOnCollide);
              this.goalSelector.removeGoal(this.aiArrowAttack);
              ItemStack itemstack = this.getHeldItem(ProjectileHelper.getHandWith(this, InformatikacraftItems.amethyst_bow));
              if (itemstack.getItem() instanceof net.minecraft.item.BowItem) {
                 int i = 20;
                 if (this.world.getDifficulty() != Difficulty.HARD) {
                    i = 40;
                 }

                 this.aiArrowAttack.setAttackCooldown(i);
                 this.goalSelector.addGoal(4, this.aiArrowAttack);
              } else {
                 this.goalSelector.addGoal(4, this.aiAttackOnCollide);
                 }

              }
           }

    @Override
    public void attackEntityWithRangedAttack(LivingEntity target, float distanceFactor) {
          ItemStack itemstack = this.findAmmo(this.getHeldItem(ProjectileHelper.getHandWith(this, InformatikacraftItems.amethyst_bow)));
          AbstractArrowEntity abstractarrowentity = this.func_213624_b(itemstack, distanceFactor);
          if (this.getHeldItemMainhand().getItem() instanceof net.minecraft.item.BowItem)
             abstractarrowentity = ((net.minecraft.item.BowItem)this.getHeldItemMainhand().getItem()).customeArrow(abstractarrowentity);
          double d0 = target.posX - this.posX;
          double d1 = target.getBoundingBox().minY + (double)(target.getHeight() / 3.0F) - abstractarrowentity.posY;
          double d2 = target.posZ - this.posZ;
          double d3 = (double)MathHelper.sqrt(d0 * d0 + d2 * d2);
          abstractarrowentity.shoot(d0, d1 + d3 * (double)0.2F, d2, 1.6F, (float)(14 - this.world.getDifficulty().getId() * 4));
          this.playSound(SoundEvents.ENTITY_SKELETON_SHOOT, 1.0F, 1.0F / (this.getRNG().nextFloat() * 0.4F + 0.8F));
          this.world.addEntity(abstractarrowentity);
        super.attackEntityWithRangedAttack(target, distanceFactor);
    }
    
}

I've also changed the class a bit so here is the log again 

�[m�[1;31m[22:34:39] [Server thread/FATAL] [minecraft/ThreadTaskExecutor]: Error executing task on Server
java.lang.NullPointerException: null
    at net.minecraft.entity.ai.goal.PrioritizedGoal.hashCode(PrioritizedGoal.java:97) ~[?:?] {re:classloading}
    at java.util.HashMap.hash(Unknown Source) ~[?:1.8.0_241] {}
    at java.util.HashMap.put(Unknown Source) ~[?:1.8.0_241] {}
    at java.util.HashSet.add(Unknown Source) ~[?:1.8.0_241] {}
    at net.minecraft.entity.ai.goal.GoalSelector.addGoal(GoalSelector.java:42) ~[?:?] {re:classloading}
    at com.github.erce312.informatikacraft.entities.Reaper.setCombatTask(Reaper.java:71) ~[?:?] {re:classloading}
    at net.minecraft.entity.monster.AbstractSkeletonEntity.<init>(AbstractSkeletonEntity.java:69) ~[?:?] {re:classloading,pl:accesstransformer:B}
    at com.github.erce312.informatikacraft.entities.Reaper.<init>(Reaper.java:43) ~[?:?] {re:classloading}
    at net.minecraft.entity.EntityType.create(EntityType.java:415) ~[?:?] {re:classloading}
    at net.minecraft.entity.EntityType.create(EntityType.java:305) ~[?:?] {re:classloading}
    at net.minecraft.entity.EntityType.spawn(EntityType.java:297) ~[?:?] {re:classloading}
    at net.minecraft.entity.EntityType.spawn(EntityType.java:292) ~[?:?] {re:classloading}
    at net.minecraft.item.SpawnEggItem.onItemUse(SpawnEggItem.java:80) ~[?:?] {re:classloading}
    at net.minecraftforge.common.ForgeHooks.onPlaceItemIntoWorld(ForgeHooks.java:607) ~[?:?] {re:classloading}
    at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:168) ~[?:?] {re:classloading}
    at net.minecraft.server.management.PlayerInteractionManager.func_219441_a(PlayerInteractionManager.java:341) ~[?:?] {re:classloading}
    at net.minecraft.network.play.ServerPlayNetHandler.processTryUseItemOnBlock(ServerPlayNetHandler.java:870) ~[?:?] {re:classloading}
    at net.minecraft.network.play.client.CPlayerTryUseItemOnBlockPacket.processPacket(CPlayerTryUseItemOnBlockPacket.java:42) ~[?:?] {re:classloading}
    at net.minecraft.network.play.client.CPlayerTryUseItemOnBlockPacket.processPacket(CPlayerTryUseItemOnBlockPacket.java:12) ~[?:?] {re:classloading}
    at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:19) ~[?:?] {re:classloading}
    at net.minecraft.util.concurrent.TickDelayedTask.run(TickDelayedTask.java:20) ~[?:?] {re:classloading}
    at net.minecraft.util.concurrent.ThreadTaskExecutor.run(ThreadTaskExecutor.java:140) [?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.util.concurrent.RecursiveEventLoop.run(RecursiveEventLoop.java:22) [?:?] {re:classloading}
    at net.minecraft.util.concurrent.ThreadTaskExecutor.driveOne(ThreadTaskExecutor.java:110) [?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:726) [?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.driveOne(MinecraftServer.java:720) [?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.util.concurrent.ThreadTaskExecutor.driveUntil(ThreadTaskExecutor.java:123) [?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.runScheduledTasks(MinecraftServer.java:706) [?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:650) [?:?] {re:classloading,pl:accesstransformer:B}
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_241] {}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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