Jump to content

Lea9ue

Members
  • Posts

    44
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Lea9ue's Achievements

Tree Puncher

Tree Puncher (2/8)

5

Reputation

  1. Trying to replace Vanilla Zombie with custom entity. With code, I am having random game hangs. Only Occasionally so its hard to tell exact problem. Game occasionally hangs at 100% when loading. Other times it hangs when playing. Never crashes, just everything freezes except player, Player can still move around in loaded chucks but cant interact with anything. Any ideas? @SubscribeEvent public void copyZombie(final EntityJoinWorldEvent event) { World world = event.getEntity().world; if (!world.isRemote) { if (event.getEntity() instanceof ZombieEntity) { if (!(event.getEntity() instanceof ZombieCopyEntity)) { ZombieEntity zombie = (ZombieEntity) event.getEntity(); ZombieCopyEntity copy = new ZombieCopyEntity(EntityReg.ZOMBIECOPY, world); copy.setPosition(zombie.getPosition().getX(), zombie.getPosition().getY(), zombie.getPosition().getZ()); event.setCanceled(true); world.addEntity(copy); } } } }
  2. I'm trying and failing with this: @SubscribeEvent public void zombieSpawn(EntityJoinWorldEvent event) { if (isRemoveZombieGoal()) { World world = event.getEntity().world; if (!world.isRemote) { if (event.getEntity() instanceof ZombieEntity) { System.out.println("should remove"); ZombieEntity zombie = (ZombieEntity) event.getEntity(); zombie.targetSelector.removeGoal(new NearestAttackableTargetGoal<>(zombie, PlayerEntity.class, true)); zombie.goalSelector.removeGoal(new ZombieAttackGoal(zombie, 1.0D, false)); } } } } What am I doing wrong here. I do get console message.
  3. You need to show your code. CANNOT help if you dont. Show your UnicornEntityModel class first.
  4. There is literally zero reasons for you to be using Tabula or BlockBench to add a horn to a horse. You already have Horsemodel. You already have a texture file for a horse that you can add texture to make the horn. I have a feeling that you are just lost. You should then add a box like I said before to your model class. this.corn.addBox(.....); Then right here is the coordinates of the texture on the png. this.corn = new RendererModel(this, number, number); The 2 numbers tell exactly where the texture is located on png.
  5. You should add box for your entities "corn". Render it in then just copyModelAngles of the head. See vahnilla code for how it copys headwear to head.
  6. In your item class you should have something like... @Override public boolean getIsRepairable(ItemStack toRepair, ItemStack repair) { if (toRepair.getItem().equals("YOUR ITEM") && repair.getItem().equals("WHAT REPAIRS IT")) { return true; } else { return false; } }
  7. Not really . TESR only way.
  8. Maybe because you're removing entity while ticking or something like that. At least that's the error I am see while trying to use livingTick() and making an entity explode. Possibly move the blowUp parts out of livingTick() and put them under tick(). see CreeperEntity.
  9. You are going to need to post code.
  10. what is posX, posY, posZ? I'm not very good at "this" but I think you need "this".
  11. event.getSource().getTrueSource and check if instanceof Player. Post your code if you want more help.
  12. Look under item. I believe you need to override onBlockStartBreak.
×
×
  • Create New...

Important Information

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