So basically I'm trying to make Iceologer for 1.12.2, I want to get the Iceologer to summon the Ice Cloud Above the player (like 2 or 3 blocks above it), any help would be great.
So basically I'm trying to make Iceologer for 1.12.2, I want to get the Iceologer to summon the Ice Cloud Above the player (like 2 or 3 blocks above it), any help would be great.
You can use one of the World.getEntitiesWithinAABB() variants to get players near the Iceologer, and then Player.getPositionVector() to get the position of the player. Finally you would use World.spawnEntity() to spawn the actual Ice Cloud.
protected void castSpell() {
EntityZombie zombie = new EntityZombie(Iceologer.this.world);
float range = 15F;
Iceologer.this.world.getEntitiesWithinAABB(EntityPlayer.class);
Iceologer.this.world.spawnEntity(zombie);
player.getPositionVector();
}
zombie is a placeholder til I fix the iceCloud
I need to fix get Entities WIthinAABB & getPositionVector
Well, what exactly are you struggling with? The second parameter to getEntitiesWithinAABB() requires a bounding box, which you could construct from e.g. the Iceologers bounding box. Then you would use the player position vector in zombie.setPosition() to set the position of the zombie before spawning it in the world.
So basically I'm trying to make Iceologer for 1.12.2, I want to get the Iceologer to summon the Ice Cloud Above the player (like 2 or 3 blocks above it), any help would be great.
You can use one of the World.getEntitiesWithinAABB() variants to get players near the Iceologer, and then Player.getPositionVector() to get the position of the player. Finally you would use World.spawnEntity() to spawn the actual Ice Cloud.
Ok, so far I got this:
Well, what exactly are you struggling with? The second parameter to getEntitiesWithinAABB() requires a bounding box, which you could construct from e.g. the Iceologers bounding box. Then you would use the player position vector in zombie.setPosition() to set the position of the zombie before spawning it in the world.
Oh, I got it, I never used getEntitiesWithinAABB before so I make things much complex than what I needed, Thanks for helping
.
No problem, glad I could be of help