Jump to content

[1.8] proyectile Arrow head Shoot, get precise position where arrow hits Mob


perromercenary00

Recommended Posts

 

 

 

 

 

 

 

 

 

Good days

this is mi mod

http://www.curse.com/mc-mods/minecraft/228033-mercenarymod

 

lately i been working in mi arrows and 45bullts

and i wanna make the hits on the head of an entity critical (Damagex2)

 

i learn i could get the aparently heigth of a mod whith

float mheigth = mob.getHeigth();

 

the code is not exact becose im not in the computer whith the code

 

using the mob heigth i decide than  if an arrow hits in 1/5 upper part of mobheigth then its headShoot and do damage x2

 

and whits begin the trouble how do i know the exact heigth of the arrow when reach the hiting box from a mob

 

first try

using in the OnUpdate() method  when the arrow does the damage, i ask for the value of

this.posY() andcompare it to mob.getHeigth();

but fail cos the value of this.posY() only updates once every tick but most of the times the arrow reach the target in less than a tick so the resulting  value is the same arrow starting posY 

 

 

second try

using maths i could calculate  the heigt of the player crosshair at the position of the mob, but this in unuseful becose arrows move in Parabolic Motion and the starting position of the arrow is not the eyesigth of the player so

lets say i aim the player crosshair to the head of a zombye at 10meters like 30feets and i  shoot an arrow at the fully strength of 2.0F, the cross hair aim to the zombyes head but the arrow hits at their legs so this cannot be consider  for a head shoot

 

thirth try

lets say i get the arrow heigth at the distance of the target entity using  math from the Parabolic Motion of Projectiles but at how is equivalent the 2.0F streng of the arrow , but im pretty sure its not to  2m per second  the other thing is the gravity value from the minecraft world  ¿9.8 blocks per second

 

 

some help some ideas ?

 

thanks for reading .

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

using in the OnUpdate() method  when the arrow does the damage, i ask for the value of

this.posY() andcompare it to mob.getHeigth();

but fail cos the value of this.posY() only updates once every tick but most of the times the arrow reach the target in less than a tick so the resulting  value is the same arrow starting posY 

 

This is the only and proper way to do this.

 

only updates once every tick but most of the times the arrow reach the target in less than a tick

 

There is nothing "less than a tick".

Hits are calculated every tick onUpdate() by making little box around arrow and checking if the box touches some entity - if yes - checking if that entity can be hit and performing damage.

 

You need to get height of arrow and compare it to entity's eye height. Obviosly you need to grab brackets like [eyeHeigh - 0.2, eyeHeight + 0.2].

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

your rigth but

nop dont ge it

 

public void onUpdate() {
	super.onUpdate();

	System.out.println("updatetick="+updatetick);
	System.out.println("arrowHeigth="+this.posY);
	updatetick ++;
}

 

and I shoot to the sky

 

[23:11:14] [Client thread/INFO]: [CHAT] Player28 has just earned the achievement [Taking Inventory]
[23:11:23] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=0
[23:11:23] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=69.52000000327826
[23:11:23] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=1
[23:11:23] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=75.23358706154791
[23:11:23] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=0
[23:11:23] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=69.52000000327826
[23:11:23] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=2
[23:11:23] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=80.84003830297883
[23:11:23] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=1
[23:11:23] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=75.11943529452965
[23:11:23] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=2
[23:11:23] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=80.61287628552385
[23:11:23] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=3
[23:11:23] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=86.34042508471765
[23:11:23] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=3
[23:11:23] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=86.00138291825259
[23:11:23] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=4
[23:11:23] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=91.73580805034982
[23:11:24] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=4
[23:11:24] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=91.28600453529778
[23:11:24] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=5
[23:11:24] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=97.02723723703498
[23:11:24] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=5
[23:11:24] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=96.46777998582554
[23:11:24] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=6
[23:11:24] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=102.21575218157123
[23:11:24] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=6
[23:11:24] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=101.54773773052023
[23:11:24] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=7
[23:11:24] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=107.3023820253986
[23:11:24] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=7
[23:11:24] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=106.52689594546916
[23:11:24] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=8
[23:11:24] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=112.28814561855252
[23:11:24] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=8
[23:11:24] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=111.40626262500851
[23:11:24] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=9
[23:11:24] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=117.17405162257779
[23:11:24] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=9
[23:11:24] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=116.18683568354066
[23:11:24] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=10
[23:11:24] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:342]: arrowHeigth=121.96109861241338
[23:11:24] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:341]: updatetick=10
[23:11:24] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenaria

 

 

 

 

But

this goes In the part that does the damage when the arrows hits something

 

						
float mobHealth = mob.getHealth();
					float mobMaxHealth = mob.getMaxHealth();

					if (headShootEnable){

						Double arrowHeigth = this.posY;
						Double mobHeigth = mob.height + mob.posY;
						Double mobposY = mob.posY;
						Double mobHead = mobHeigth - (mob.height /5);

						System.out.println("arrowHeigth"+arrowHeigth);
						System.out.println("mobHeigth"+mobHeigth);
						System.out.println("mobposY"+mobposY);
						System.out.println("mobHead"+mobHead);

						if (arrowHeigth >= mobHead)
						{
							System.out.println("HeadShoot");
						}

											}

 

and i put this in the constructor i use to shoot the arrow

//#########################################################################################################################3
// este es el methodo que uso para lanzar las flechas
public flechaMercenariaVainilla_entity(World worldIn, EntityLivingBase shooter, float p_i1756_3_, boolean vallesta) {
	super(worldIn);
	this.renderDistanceWeight = 10.0D;
	this.shootingEntity = shooter;

	this.thisId = this.getEntityId();
	this.shootingEntityId = shooter.getEntityId(); 


	if (shooter instanceof EntityPlayer) {
		this.canBePickedUp = 0;
	}

	this.setSize(0.5F, 0.5F);
	this.setLocationAndAngles(shooter.posX, shooter.posY + (double) shooter.getEyeHeight(), shooter.posZ, shooter.rotationYaw, shooter.rotationPitch);

	if (!vallesta) {
		this.posX -= (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F);
		this.posZ -= (double) (MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F);
	}
	this.posY -= 0.10000000149011612D;

	this.setPosition(this.posX, this.posY, this.posZ);
	this.motionX = (double) (-MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI));
	this.motionZ = (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI));
	this.motionY = (double) (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI));
	this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F);

	Double arrowHeigth = this.posY;
	System.out.println("inicial arrowHeigth"+arrowHeigth);

}
//#########################################################################################################################3

 

 

shooting to visual head
[23:27:58] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:<init>:158]: inicial arrowHeigth70.52000000327826
[23:27:58] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:<init>:158]: inicial arrowHeigth70.52000000327826
[23:27:58] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:659]: arrowHeigth70.52000000327826
[23:27:58] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:660]: mobHeigth70.95000004768372
[23:27:58] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:661]: mobposY69.0
[23:27:58] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:662]: mobHead70.56000003218651

shooting to the belly of the same mob
[23:28:02] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:<init>:158]: inicial arrowHeigth70.52000000327826
[23:28:02] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:<init>:158]: inicial arrowHeigth70.52000000327826
[23:28:02] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:659]: arrowHeigth70.52000000327826
[23:28:02] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:660]: mobHeigth70.95000004768372
[23:28:02] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:661]: mobposY69.0
[23:28:02] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:662]: mobHead70.56000003218651

shooting to their feets
[23:28:06] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:<init>:158]: inicial arrowHeigth70.52000000327826
[23:28:06] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:<init>:158]: inicial arrowHeigth70.52000000327826
[23:28:06] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:659]: arrowHeigth70.52000000327826
[23:28:06] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:660]: mobHeigth70.95000004768372
[23:28:06] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:661]: mobposY69.0
[23:28:06] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:662]: mobHead70.56000003218651

 

this value arrowHeigth  70.52000000327826 is the same value than the initial arrow heigth 

there must be something reseting this value but whaever it does just when hits something

 

is late tired  twomorrow i shall continue

 

Thanks for the tip

 

 

Link to comment
Share on other sites

this morning i realize something and make the custom arrow class full of system outs

 

 

Strength 2.0F

[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:<init>:161]: inicial arrowHeigth10.520000003278255
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:<init>:162]: inicial pitch-0.22247742
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:<init>:163]: inicial Yaw90.17516
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:<init>:164]: Fuerza inicial2.0
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:352]: 


[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:353]: updatetick=0
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:354]: worldIn=false
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:356]: arrowHeigth=10.520000003278255

[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:357]: arrowX=0.5300112784265364
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:358]: arrowZ=2.651967810608937
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:352]: 


[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:353]: updatetick=1
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:354]: worldIn=false
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:356]: arrowHeigth=10.508269451717808

[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:357]: arrowX=3.55101266101769
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:358]: arrowZ=2.6427318662823307
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:352]: 


[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:353]: updatetick=2
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:354]: worldIn=false
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:356]: arrowHeigth=10.446656204816037

[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:357]: arrowX=6.541804058593446
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:358]: arrowZ=2.6335882813109097
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:352]: 


[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:353]: updatetick=3
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:354]: worldIn=false
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:356]: arrowHeigth=10.335659089050635

[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:357]: arrowX=9.502687570715853
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:358]: arrowZ=2.624536132102003
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:352]: 


[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:353]: updatetick=4
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:354]: worldIn=false
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:356]: arrowHeigth=10.175771942639278

[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:357]: arrowX=12.433962275954222
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:358]: arrowZ=2.6155745042988574
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:352]: 


[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:353]: updatetick=5
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:354]: worldIn=false
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:356]: arrowHeigth=9.967483665422174

[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:357]: arrowX=15.335924262095023
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:358]: arrowZ=2.6067024926882785
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:352]: 


[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:353]: updatetick=6
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:354]: worldIn=false
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:356]: arrowHeigth=9.71127826824579

[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:357]: arrowX=18.208866656049683
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:358]: arrowZ=2.597919201109195
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:352]: 


[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:353]: updatetick=7
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:354]: worldIn=false
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:356]: arrowHeigth=9.407634921852747

[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:357]: arrowX=21.053079653463307
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:358]: arrowZ=2.5892237423621385
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:352]: 


[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:353]: updatetick=8
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:354]: worldIn=false
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:356]: arrowHeigth=9.057028005282808

[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:357]: arrowX=23.868850548027325
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:358]: arrowZ=2.580615238119626
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:352]: 


[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:353]: updatetick=9
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:354]: worldIn=false
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:356]: arrowHeigth=8.659927153789862

[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:357]: arrowX=26.656463760498987
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:358]: arrowZ=2.572092818837442
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:352]: 


[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:353]: updatetick=10
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:354]: worldIn=false
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:356]: arrowHeigth=8.216797306279739

[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:357]: arrowX=29.416200867430682
[08:45:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:358]: arrowZ=2.5636556236668033

 

strength 10F

[09:21:52] [server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 2349ms behind, skipping 46 tick(s)
[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:<init>:164]: inicial arrowHeigth10.520000003278255
[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:<init>:165]: inicial pitch0.0
[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:<init>:166]: inicial Yaw90.148315
[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:<init>:167]: Fuerza inicial10.0
[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:355]: 


[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:356]: updatetick=0
[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:357]: worldIn=false
[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:359]: arrowHeigth=10.520000003278255

[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:360]: arrowX=0.5468684833476746
[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:361]: arrowZ=2.6330270612907856
[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:355]: 


[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:356]: updatetick=1
[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:357]: worldIn=false
[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:359]: arrowHeigth=10.520000003278255

[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:360]: arrowX=15.546818415446063
[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:361]: arrowZ=2.594198216154918
[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:355]: 


[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:356]: updatetick=2
[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:357]: worldIn=false
[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:359]: arrowHeigth=10.470000002533197

[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:360]: arrowX=30.396768991274136
[09:22:05] [server thread/INFO] [sTDOUT]: [mercenarymod.items.arcos.flechaMercenariaVainilla_entity:onUpdate:361]: arrowZ=2.5557576591001085
[09:22:08] [server thread/INFO]: Saving and pausing game...

 

 

 

i create a plain world and build to columns one in the exactly x0 z2  and other at the east in x30 z2 and shoot from the one to the other

so at  Strength 2.0F (fuerza 2.0F) the arrow has an average  speed of  2,89385233 blocks / per tick

and gravity is like −0,23032027 blocks / per tick

 

at Strength 10F

speed  like 14,997032667  blocks / per tick

gravity  −0,025 blocks / per tick

 

so fuck up this shit gravity is not constan depends on the strength  so no Parabolic Motion is usable

thirth try is  a fail

 

four try

witchcraft i gonna need witchcraft to solve this

 

Link to comment
Share on other sites

i get something

 

				float mobHealth = mob.getHealth();
					float mobMaxHealth = mob.getMaxHealth();

					if (headShootEnable) {

						boolean HS = true;

						// dont heatShoot anything whith more health than a witch

						if (mobHealth > 26.0F) {
							HS = false;
						}

						float mobHeigth = mob.height;

						// dont heatShoot anything to Small like pigs or childs
						if (mobHeigth < 1.0F) {
							HS = false;
						}

						if (HS) {
							Double mobposY = mob.posY;
							Double mobHead = ( mobposY + mobHeigth ) - (mob.height / 5);

							Double nextPosX = this.posX + this.motionX;
							Double nextPosY = this.posY + this.motionY;
							Double nextPosZ = this.posZ + this.motionZ;

							double longitud0 = (double) MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);

							float angulo = (float) ((Math.atan(this.motionY / longitud0) * -1) * 180.0D / Math.PI); 
							double mobdX = this.posX - mob.posX;
							double mobdZ = this.posZ - mob.posZ;

							double longitud1 = (double) MathHelper.sqrt_double((mobdX * mobdX) + (mobdZ * mobdZ));

							// tang(x) * CA = CO
							double altura = (Math.tan(Math.toRadians(angulo)) * -1) * longitud1;

							double alturax = (altura + this.posY);

							// System.out.println("alturax="+alturax);

							if (alturax >= mobHead) {
								System.out.println("HeadShoot");
								damageM = damageM * 1.5F;

							}

						}

					}


					if (damageM > 26.1F)
					{
						damageM = 26.1F;
					}

 

i make this an gonna test it

if i dont like it i repost the question

for now itake it like solved

 

Thanks

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • LINK ADA DI BAWAH INI  LINK LOGIN LINK DAFTAR EXTRAWD ADALAH AGEN SLOT , TOGEL DAN BOLA TERBESAR INDONESIA YANG MERUPAKAN SITUS ONLINE PERTAMA YANG MENYEDIAKAN BERBAGAI JENIS PERMAINAN DAN BETTING ONLINE TELENGKAP, SEPERTI PERMAINAN CASINO ONLINE, SLOT ONLINE, TOGEL ONLINE, BOLA ONLINE, DAN MASIH BANYAK JENIS PILIHAN 
    • Platform tempat untuk melangsungkan perjudian togel yang paling aman saat ini dan bisa merasakan sensasi hadiah JP jeda tentunya hanya bisa menggunakan situs agen toto togel resmi EXTRAWD . Bersama website agen togel ini anda akan mendapatkan jaminan bahwa hadiah kemenangan pasti dibayar tanpa ada potongan biaya administrasi. Hal terpenting di dalam permainan judi togel melalui situs EXTRAWD adalah wajib memiliki legalitas demi menghindari risiko terhadap hadiah kemenangan. Legalitas tersebut merupakan badan hukum untuk mengawasi terjadinya proses pengundian, sehingga cita-cita untuk mendapatkan JP togel semakin mudah untuk direalisasikan.  
    • I'm having trouble updating my mod Primal Magick to MC1.20.4 on Forge 49.0.48 with JEI 17.3.0.49. I believe I've followed the Forge and JEI instructions correctly, but I'm getting the following exception when I try to run the data generator: java.lang.module.ResolutionException: Modules jei._1._20._4.common.api and jei export package mezz.jei.api.runtime to module primalmagick Full output sample here, and the build.gradle file in question is here. Trying to run the game client results in a different type of exception, but with the same inner error. It looks like I'm getting two separate JEI modules which are interfering with each other, but I'm not sure why that would be. Things I've discovered in my investigations so far: Blowing away my repository and re-cloning from remote does not fix the error, even in combination with nuking my entire gradle cache.  I'm *mostly* sure that it's not just because my workspace is in a bad state. Commenting out line 144 of the build.gradle file, where it specifies the runtime-only deobf dependency of JEI makes the exception not get thrown, but means that JEI is not active in my debug runtime.  While this is a partial workaround for the issue, it leaves me unable to debug any of my JEI integration code, and so is far from ideal. Most maddeningly, running the client and/or data generator from the gradle CLI *also* causes the bug to not reproduce.  Data files get generated, and the client even runs with JEI; it just leaves me unable to trace through the code. I've already reached out to Mezz on the JEI Discord and he's stumped as well.  If I didn't know better, I'd say that one of the "compileOnly" or "runtimeOnly" directives are being executed when they shouldn't be, but why that would be happening now, or happening only when run in Eclipse, is beyond me.  If anyone knows how to resolve this issue, I would be very grateful.  Thank you, and stay safe.
    • Jos77 adalah situs slot terpercaya yang menawarkan proses pendaftaran dan login yang mudah. Dengan deposit minimal hanya 5000 rupiah, Jos77 membuat perjudian slot online menjadi lebih terjangkau untuk semua orang. Bergabunglah sekarang dan nikmati pengalaman bermain yang seru dan menguntungkan dengan Jos77!  
    • EXTRAWD disini menjadi salah satu situs agen judi slot gacor terpercaya yang memungkinkan pemainnya bisa memenangkan jackpot uang asli dengan mudah setiap harinya. HOEXTRAWD  I77 memiliki berbagai jenis game slot gacor resmi terbaik hari ini yang memungkinkan member untuk menikmati permainan yang menyenangkan dan menarik. Ada banyak variasi permainan yang dapat dipilih mulai dari game jackpot, game mesin slot, dan banyak lagi. Selain itu, disini juga memberikan banyak bonus dan hadiah yang membuat member setia lebih tertarik untuk bermain di agen situs judi slot gacor gampang menang JP Maxwin. EXTRAWD  merupakan platform yang memiliki link demo gratis tanpa daftar dan kini akan memberikan kalian banyak sekali bocoran yang lebih efektif untuk memperoleh kemudahan menang jackpot terbesar dan bisa mencapai puluhan hingga ratusan juta rupiah. Pasti kalian sudah tidak sabar untuk menunggunya bukan? Langsung saja kalian kunjungi EXTRAWD  dimana seluruh permainan dapat memberikan untung ratusan juta bahkan hingga puluhan juta rupiah hanya dengan bet yang rendah. Sebagai tempat bertaruh gampang menang tentu kami memiliki fasilitas terbaik untuk seluruh member setia yang telah bergabung bersama website EXTRAWD  . Anda dapat menikmati berbagai layanan di situs EXTRAWD  yang selalu online 24jam dihadirkan dengan fasilitas seperti anda bisa memaksimalkan setiap bermain dengan mendapatkan kemenangan besar. Maka dari itu tidak ada salahnya jika kini anda bisa untuk mencobanya sekarang juga dengan meraih keuntungan dengan bisa langsung WD sekarang juga. Skema Jackpot ! 8 Provider Slot Gacor Maxwin Hari Ini Demi menyajikan permainan slot gacor online gampang menang berkualitas maka EXTRAWD sebagai situs judi slot online terbaik no 1 di Indonesia berkerja sama dengan beberapa provider slot terbaik. Dan game-game slot dari provider terkemuka ini bisa anda mainkan kapan saja dan dimana saja. Penasaran siapa saja yang membantu menghadirkan game slot gacor maxwin? Berikut adalah daftar 8 provider judi slot online yang wajib untuk dimainkan. Slot Gacor Pragmatic Play Semua player slot pasti sudah mengenal provider slot yang populer ini. Ya dia adalah Pragmatic Play yang merupakan salah satu penyedia game slot gacor terbaik yang masih beroperasi hingga saat ini. Pragmatic Play sangat populer karena produk-produknya terkenal mudah untuk dimainkan. Slot Gacor Habanero Selanjutnya adalah Habanero yang merupakan salah satu pemasok game slot gacor yang populer di Indonesia. Game slot dari Habanero sudah dilengkapi dengan grafik bagus dan efek suara yang terdengar nyata sehingga akan memberikan pengalaman bermain yang lebih menyenangkan. Slot Gacor Joker123 Joker123 atau Joker Gaming adalah salah satu provider yang membantu kami menghadirkan game slot gacor gampang maxwin. Joker123 termasuk salah satu provider yang sudah beroperasi lama dan tentunya bisa dipercaya. Sudah banyak produk slot yang dihadirkan oleh Joker123 ini diminati masyarakat di Indonesia. Slot Gacor Microgaming Sudah tidak diragukan lagi kualitas dari provider slot satu ini. Provider tersebut ialah Microgaming yang telah memproduksi ratusan macam game slot gacor gampang menang JP dengan tema menarik. Banyak slotter yang bersaksi bahwa mereka dapat dengan mudah memperoleh uang tunai bila memainkan game judi slot online dari Microgaming. Slot Gacor Spadegaming Spadegaming sangat cocok untuk kalian yang mencari game judi slot online gacor dengan winrate yang tinggi. Biasanya, para pemain baru akan mencoba game slot spadegaming ini karena sangat mudah dimainkan dan mudah menang. Selain itu, terdapat fitur-fitur bonus yang menarik dan menggiurkan di setiap mesin slot Spadegaming. Slot Gacor Playtech Playtech merupakan sebuah provider slot online yang sedang populer-populernya di tahun 2024 ini karena banyak game dari Playtech yang menarik perhatian para bettor untuk mencobanya. Mungkin salah satu faktornya adalah terdapat hadiah Jackpot yang besar bila memainkan produk slot dari Playtech. Slot Gacor EXTRAWD Slot88 adalah perusahaan penyedia permainan slot terbaik yang populer sejak tahun 2022-2024. Yang menjadi ciri khas dari provider ini ialah anda dapat bermain dengan menggunakan modal yang kecil namun berkesempatan memperoleh uang tunai yang banyak. Tidak heran banyak bettor memfavoritkan permainan slot online EXTRAWD ini. Slot Gacor PG Soft PG Soft atau Pocket Game Soft merupakan provider slot yang sudah lama berdiri dan tetap konsisten menyajikan permainan slot terbaik hingga saat ini. Lebih dari 100 game slot gacor sudah disajikan oleh PG Soft. Selain itu, tidak sedikit bettor yang menyukai game dari PG Soft karena seru dan menguntungkan. Daftar Game Slot Gacor Terbaru Viral di Tahun 2024 Permainan mesin slot gacor telah berkembang dengan pesat saat ini. Berbagai macam game mesin slot terbaru gampang menang tumbuh setiap hari dan permainan ini sering memberikan cuan yang begitu sensasional, menawarkan berbagai macam variasi mesin slot online gacor yang unik dan menarik. Banyak pilihan yang bisa kalian mainkan dari berbagai provider terbaik seperti pragmatic play, EXTRAWD , joker123, playtech dan lain sebagainya. Game online telah menjadi salah satu jenis taruhan yang viral dan sangat populer dikalangan pecintanya. Sehingga Platform EXTRAWD dipenuhi oleh pemain yang berhasil mengumpulkan kemanangan jackpot terbesar yang dapat di withdraw kapan pun. Lalu apa saja sih game yang dimainkan oleh pemainnya untuk mendapatkan kemenangan besar, inilah daftar game yang sering dimainkan di website EXTRAWD : Great Rhino Megaways : RTP 98,01% Aztec Gems : RTP 87,42% Mahjong Ways : RTP 91,06% Koi Gates : RTP 95% Spaceman : RTP 92,85% Madame Destiny : RTP 77,93% Gates of Olympus : RTP 54% Zeus : RTP 96% Gates of Gatot Kaca : RTP 90% Queen of Wands : RTP 94,81% Itulah deretan game slot gacor hari ini gampang menang yang disediakan oleh EXTRAWD dimana hampir seluruh permainan memiliki tingkat kemenangan yang sangat tinggi sehingga diyakini oleh bettor sebagai tempat untuk mencari cuan. Website Slot Gacor Hari ini EXTRAWD Provider Slot Terbaik 🔵 PRAGMATIC PLAY, 🟢 HABANERO SLOT, 🟠 PG SOFT. Game Slot Online Gacor 🔱 Gates Of Olympus, 🍭 Sweet Bonanza Xmas, 🀄️ Mahjong Ways 2, Bonanza Gold 💎. Winrate RTP 98.54% Metode Deposit BCA, BRI, BNI, MANDIRI, CIMB, PULSA, E-Walet (DANA, OVO, GOPAY). Minimal Deposit 💰 Min Deposit Rp 10.000 Minimal WD 💰 Min WD Rp 25.000 BONUS Hoki77 Bonus Deposit Harian 50%, Bonus Mingguan 20%, Bonus New Member 100%, Bonus Referral 100% Link Daftar EXTRAWD Website EXTRAWD
  • Topics

×
×
  • Create New...

Important Information

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