Jump to content

[1.9.4] dissable ReequipAnimation not posible


Recommended Posts

good days im trying to do something a little complex here, and its a pistol whith the posibility to hold two pistol at same time in each hand and fire one of other presing left or right click

 

whell to disable the ReequipAnimation is supouse you @override the method  shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged)

 

and use your logic to deside when to play the animation or not but if you set this method return false the item kinda stucks    you can switch slot but item dont go unstuck and all the items from the hotbar now display as the gun  unless you select and empty slot this unstuck the gun from the players hand

 

 

all this wass using this code in the gun class

@Override
public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) {

	//Boolean b = oldStack.equals(newStack);
	//System.out.println("B="+!b);
	//return !b;

	return false;
}

 

 

well now this is more or least how the vainilla works

 

now the animations for the pistol shooting works, the unload reload works , the downside the original trouble its that is playing

ReequipAnimation every time the item writes or chang and NBTtag value to the gun and this become extremely anoying.

More in the case of the dual guns becoze i need to constantely write nbts to ensuser the animation of the offhand gun

as you could see in the first video this little feature of reequip animation end ruining all the dual pistol experience

 

this wass the code i use in the video

@Override
public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) {

	Boolean b = oldStack.equals(newStack);
	System.out.println("B="+!b);
	return !b;

}

 

 

 

to avoid minecraft to treat the newStack whith diferent NBT  as a completely diferent item i set a serialnumber system in mi guns so a could know if its the same gun or its another gun from the same kind or its a competely diferent item

geting this

 

 

the guns stucks again but its little diferent, if i change of selected slot the gun unstuck and the other slot item render normaly

 

and this time do something like this

@Override
public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) {
	Boolean b = oldStack.equals(newStack);
	if(!b)
	{
		int oldSN = util.getInttag(oldStack, "serial");
		int newSN = util.getInttag(newStack, "serial");

		System.out.println("new="+newSN+" = "+oldSN+"=old");

		if ( newSN == oldSN)
		{
			return false;
		}
	}
	return !b;
}

 

int the console outpot i get this when the gun stuck

 

[13:08:26] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:26] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:26] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:26] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:26] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:27] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:28] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:29] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:30] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:31] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:32] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:33] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old

 

ass  isee this means the client side get stuck and never replace the old stack for the newstack geting locked in an infinite blucle

 

but when i change of slot this happend

 

[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=50763212 = 50763212=old
[13:08:34] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=0 = 50763212=old
[13:08:35] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=0 = 50763212=old
[13:08:35] [Client thread/INFO] [sTDOUT]: [mercenarymod.items.armasdefuego.pistolaMercenaria:shouldCauseReequipAnimation:1187]: new=0 = 50763212=old

it stop the bucle and play reequip animation whith new stack

 

>> and this is way i calll BUG <<

acoirding to this you can change of item stack whithout play the switch animation whiout geting stuck whith the item in hand

sorry it is not to clear, english is not native languague

 

as i try to say at the beginig

it must be safe to just set return of shouldCauseReequipAnimation() to false whiout geting and stuck item in your hands

 

 

 

 

 

i also try to replicated what is in this other post

http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/modification-development/2350120-can-i-disable-the-animation-of-item-at-right-click

 

but the more i could wait from it, is to just reduce the up down move of the hand a little, becose i can cancell the animation

just triger it and wait for the next tick to use reflection to force the process to end  but either have luck whith it just end whith a bunch of stucked guns

 

 

thanks for reading :

 

 

 

 

 

Link to comment
Share on other sites

  • 3 weeks later...

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

    • Yeah, Minecraft.getInstance().player only works on the client side. Is there a way to get the player from the NetworkEvent.Context?
    • I have tried multimc, prism, and curseforge. They all crash without creating any logs.
    • I play with friends a server with mods, funny enough im the only one getting the error. Link to the crash error:https://pastebin.com/Qgn57EXZ
    • I have a keybind where you spit like a llama. On singleplayer both the entity and particle spawn and it's sound is played (https://youtu.be/bpxnFDuWw_I). But on a server only the entity is spawned and nothing else (https://youtu.be/veVQ4zSqnIA), no particles nor sound. Upon starting the server I have noticed this error in the window (https://postimg.cc/K3KDCpMY), don't know if it's relevant. The server works fine but when I want to spit the following pops up in the serverlog '''Attempted to load class net/minecraft/client/player/LocalPlayer for invalid dist DEDICATED_SERVER''' (https://postimg.cc/LqTDP1Sm). I have prepared the following code of the Server-to-Client packet class which I have made to spawn mentioned particles and sounds. package mett.palemannie.tabakmod.networking.packets; import net.minecraft.client.Minecraft; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.sounds.SoundEvents; import net.minecraft.util.RandomSource; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class SpuckEffektS2CPacket { public SpuckEffektS2CPacket(){ } public SpuckEffektS2CPacket(FriendlyByteBuf buf){ } public void toBytes(FriendlyByteBuf buf){ } public boolean handle(Supplier<NetworkEvent.Context> supplier){ NetworkEvent.Context context = supplier.get(); context.enqueueWork(()-> { Player player = Minecraft.getInstance().player; //Attempted to load class net/minecraft/client/player/LocalPlayer for invalid dist DEDICATED_SERVER Level level = Minecraft.getInstance().level; RandomSource rdm = RandomSource.create(); float r = rdm.nextInt(80, 120) / 100f; player.playSound(SoundEvents.LLAMA_SPIT, 1f, r); Vec3 MausPos = player.getEyePosition(); Vec3 SchauWinkel = player.getLookAngle(); level.addParticle(ParticleTypes.SPIT, true, MausPos.x, MausPos.y, MausPos.z, SchauWinkel.x/4, SchauWinkel.y/4, SchauWinkel.z/4); }); return true; } } Is there an alternative to Minecraft.getInstance().player;? dumb question. I have looked at other mods (MrCrayfish's Gun Mod, Ars Noveau, Apotheosis) on how they handle such server-to-client sound and particles but I haven't got any wiser.    
    • i keep getting error on minecraft when im trying to play modpack. When i go to logs folder i got this. 
  • Topics

×
×
  • Create New...

Important Information

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