Jump to content

MoCsabi

Members
  • Posts

    14
  • Joined

  • Last visited

Recent Profile Visitors

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

MoCsabi's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Don't spam, he will definitely look at it, but he has to answer a lot of topics
  2. You can view the logs the same way as before
  3. No, I’m doing an animation outside the container with an entity and particles.
  4. If yes, what waiting method should I use? I’m trying to make a small “animation”.
  5. Thank you so much for your help! I copied these from the processInteraction() method! entity.setTamedBy((PlayerEntity)entity.getOwner()); entity.setAttackTarget((LivingEntity)null); entity.world.setEntityState(entity, (byte)7); It's working! Thank you so much (Also I don't know how I didn't notice the setTamedBy() method...)
  6. Okay, I've done it! It helped a bit, bit its still not perfect. Now if I Sys.out isOwner(), now it says yes! So the server side is probably good. I'm probably wrong here, but I think that the client side is not working. It's not showing the collar, and not registering my clicks on the wolf, but it still moves towards me (so the serverside works). My new code: //The player is is the player using World sWorld=player.world; WolfEntity entity=EntityType.WOLF.create(sWorld); entity.moveToBlockPosAndAngles(player.getPosition(),0,0); entity.onInitialSpawn(sWorld, sWorld.getDifficultyForLocation(player.getPosition()), SpawnReason.EVENT, (ILivingEntityData)null, (CompoundNBT)null); entity.setOwnerId(itemStackWithNBT.getTag().getUniqueId("owner")); sWorld.addEntity(entity); I don't know how to fix this problem...
  7. Oh I’m so dumb... so I store the player when he opens the container? ( that’s where I can get it from parameters)
  8. Well, I need the server world to spawn in the wolf. Or you don’t need the server for the server world?
  9. But can I use Minecraft.getInstance.getIntegratedServer? Or is there another way of getting the server?
  10. Sorry, I'm new, what solution would you recommend?
  11. I'm doing this from the detectAndSendChanges() method of a container. I am looking into network pockets. Thanks for your help!
  12. I want to summon a vanilla-minecraft wolf with an owner set already. I have stored the player's UUID in an nbt tag (on an itemstack), but when I use the setOwnerID() method, the dog wont get a collar, nor can I sit it down. But what is interesting is that it still walks towards me, and telepors if I go away... I tried using updateEntity() method (both on ServerWorld and ClientWorld). If I reopen my world, the dog has a collar, and I can make it sit. I'm kinda new, so this might be terribly obvious. Thanks in advance! My code for summoning the entity: Minecraft instance= Minecraft.getInstance(); ServerWorld sWorld=Minecraft.getInstance().getIntegratedServer().getWorld(instance.player.getEntityWorld().getDimension().getType()); WolfEntity Entity=EntityType.WOLF.create(sWorld); entity.moveToBlockPosAndAngles(instance.player.getPosition(),0,0); entity.onInitialSpawn(sWorld, sWorld.getDifficultyForLocation(instance.player.getPosition()), SpawnReason.EVENT, eData, (CompoundNBT)null); entity.setOwnerId(itemStackWithNBT.getStack().getTag().getUniqueId("owner")); sWorld.addEntity(entity); sWorld.updateEntity(entity); instance.world.updateEntity(entity); //Sorry for messy code I also tried debugging using the isOwner() method, it said false.
×
×
  • Create New...

Important Information

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