mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-22 17:18:20 +01:00
Tick attackStrengthTicker and item cooldowns
This commit is contained in:
parent
613770bd4e
commit
8f3a396198
@ -297,6 +297,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
}
|
||||
}
|
||||
}
|
||||
aF++;
|
||||
df().a();
|
||||
cJ();
|
||||
}
|
||||
|
||||
|
@ -361,6 +361,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
}
|
||||
}
|
||||
}
|
||||
aE++;
|
||||
di().a();
|
||||
cL();
|
||||
}
|
||||
|
||||
|
@ -372,6 +372,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
}
|
||||
}
|
||||
}
|
||||
aE++;
|
||||
getCooldownTracker().a();
|
||||
cT();
|
||||
}
|
||||
|
||||
|
@ -354,6 +354,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
}
|
||||
}
|
||||
}
|
||||
aH++;
|
||||
getCooldownTracker().a();
|
||||
dh();
|
||||
}
|
||||
|
||||
|
@ -360,6 +360,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
}
|
||||
}
|
||||
}
|
||||
aD++;
|
||||
getCooldownTracker().a();
|
||||
if (!npc.hasTrait(EntityPoseTrait.class) || npc.getTraitNullable(EntityPoseTrait.class).getPose() == null) {
|
||||
dB();
|
||||
}
|
||||
|
@ -406,6 +406,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
}
|
||||
}
|
||||
}
|
||||
aB++;
|
||||
getCooldownTracker().a();
|
||||
if (!npc.hasTrait(EntityPoseTrait.class) || npc.getTraitNullable(EntityPoseTrait.class).getPose() == null) {
|
||||
dX();
|
||||
}
|
||||
|
@ -371,6 +371,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
}
|
||||
}
|
||||
}
|
||||
at++;
|
||||
getCooldownTracker().a();
|
||||
if (!npc.hasTrait(EntityPoseTrait.class) || npc.getTraitNullable(EntityPoseTrait.class).getPose() == null) {
|
||||
eu();
|
||||
}
|
||||
|
@ -163,6 +163,8 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
|
||||
entity.playerTouch(this);
|
||||
}
|
||||
}
|
||||
++attackStrengthTicker;
|
||||
getCooldowns().tick();
|
||||
if (!npc.hasTrait(EntityPoseTrait.class) || npc.getTraitNullable(EntityPoseTrait.class).getPose() == null) {
|
||||
updatePlayerPose();
|
||||
}
|
||||
|
@ -382,8 +382,8 @@ public class NMSImpl implements NMSBridge {
|
||||
public void attack(org.bukkit.entity.LivingEntity attacker, org.bukkit.entity.LivingEntity btarget) {
|
||||
LivingEntity handle = getHandle(attacker);
|
||||
LivingEntity target = getHandle(btarget);
|
||||
if (handle instanceof ServerPlayer) {
|
||||
((ServerPlayer) handle).attack(target);
|
||||
if (handle instanceof net.minecraft.world.entity.player.Player) {
|
||||
((net.minecraft.world.entity.player.Player) handle).attack(target);
|
||||
PlayerAnimation.ARM_SWING.play((Player) handle.getBukkitEntity());
|
||||
return;
|
||||
}
|
||||
|
@ -164,6 +164,8 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
|
||||
entity.playerTouch(this);
|
||||
}
|
||||
}
|
||||
++attackStrengthTicker;
|
||||
getCooldowns().tick();
|
||||
if (!npc.hasTrait(EntityPoseTrait.class) || npc.getTraitNullable(EntityPoseTrait.class).getPose() == null) {
|
||||
updatePlayerPose();
|
||||
}
|
||||
|
@ -386,8 +386,8 @@ public class NMSImpl implements NMSBridge {
|
||||
public void attack(org.bukkit.entity.LivingEntity attacker, org.bukkit.entity.LivingEntity btarget) {
|
||||
LivingEntity source = getHandle(attacker);
|
||||
LivingEntity target = getHandle(btarget);
|
||||
if (source instanceof ServerPlayer) {
|
||||
((ServerPlayer) source).attack(target);
|
||||
if (source instanceof net.minecraft.world.entity.player.Player) {
|
||||
((net.minecraft.world.entity.player.Player) source).attack(target);
|
||||
PlayerAnimation.ARM_SWING.play((Player) source.getBukkitEntity());
|
||||
return;
|
||||
}
|
||||
|
@ -157,6 +157,8 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
|
||||
entity.playerTouch(this);
|
||||
}
|
||||
}
|
||||
++attackStrengthTicker;
|
||||
getCooldowns().tick();
|
||||
if (!npc.hasTrait(EntityPoseTrait.class) || npc.getTraitNullable(EntityPoseTrait.class).getPose() == null) {
|
||||
updatePlayerPose();
|
||||
}
|
||||
|
@ -425,8 +425,8 @@ public class NMSImpl implements NMSBridge {
|
||||
public void attack(org.bukkit.entity.LivingEntity attacker, org.bukkit.entity.LivingEntity btarget) {
|
||||
LivingEntity source = getHandle(attacker);
|
||||
LivingEntity target = getHandle(btarget);
|
||||
if (source instanceof ServerPlayer) {
|
||||
((ServerPlayer) source).attack(target);
|
||||
if (source instanceof net.minecraft.world.entity.player.Player) {
|
||||
((net.minecraft.world.entity.player.Player) source).attack(target);
|
||||
PlayerAnimation.ARM_SWING.play((Player) source.getBukkitEntity());
|
||||
return;
|
||||
}
|
||||
|
@ -159,6 +159,8 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
|
||||
entity.playerTouch(this);
|
||||
}
|
||||
}
|
||||
++attackStrengthTicker;
|
||||
getCooldowns().tick();
|
||||
if (!npc.hasTrait(EntityPoseTrait.class) || npc.getTraitNullable(EntityPoseTrait.class).getPose() == null) {
|
||||
updatePlayerPose();
|
||||
}
|
||||
|
@ -416,8 +416,8 @@ public class NMSImpl implements NMSBridge {
|
||||
public void attack(org.bukkit.entity.LivingEntity attacker, org.bukkit.entity.LivingEntity btarget) {
|
||||
LivingEntity source = getHandle(attacker);
|
||||
LivingEntity target = getHandle(btarget);
|
||||
if (source instanceof ServerPlayer) {
|
||||
((ServerPlayer) source).attack(target);
|
||||
if (source instanceof net.minecraft.world.entity.player.Player) {
|
||||
((net.minecraft.world.entity.player.Player) source).attack(target);
|
||||
PlayerAnimation.ARM_SWING.play((Player) source.getBukkitEntity());
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user