Skip to content

Comments

Implemented compatibility to players#252

Open
Vidal1sHere wants to merge 1 commit intoKAMKEEL:devfrom
Vidal1sHere:ability
Open

Implemented compatibility to players#252
Vidal1sHere wants to merge 1 commit intoKAMKEEL:devfrom
Vidal1sHere:ability

Conversation

@Vidal1sHere
Copy link
Collaborator

There might be quite a few incompat

Comment on lines +164 to +165
if (!(e instanceof EntityLivingBase)) continue;
if (e == entity) continue;
Copy link
Contributor

@PeTcHeNkA PeTcHeNkA Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (e == enity || !(e instanceof EntityLivingBase)) continue

Comment on lines +186 to +187
if (!(e instanceof EntityLivingBase)) continue;
if (e == entity) continue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (e == enity || !(e instanceof EntityLivingBase)) continue

Comment on lines +145 to +146
if (!(currentEntity instanceof EntityLivingBase)) continue;
if (currentEntity == entity) continue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (currentEntity == enity || !(currentEntity instanceof EntityLivingBase)) continue

if (entity instanceof EntityLivingBase && entity != npc) {
EntityLivingBase living = (EntityLivingBase) entity;
for (Entity currentEntity : entities) {
if (currentEntity instanceof EntityLivingBase && currentEntity != entity) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (currentEntity != entity && currentEntity instanceof EntityLivingBase)

if (entity.isDead) continue;
for (EntityLivingBase currentEntity : entities) {
if (currentEntity == entity) continue;
if (currentEntity.isDead) continue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (currentEntity.isDead || currentEntity == entity) continue;

if (entity instanceof EntityLivingBase && entity != npc) {
EntityLivingBase livingTarget = (EntityLivingBase) entity;
for (Entity currentEntity : entities) {
if (currentEntity instanceof EntityLivingBase && currentEntity != entity) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (currentEntity != entity && currentEntity instanceof EntityLivingBase)

Comment on lines +395 to +396
if (!(currentEntity instanceof EntityLivingBase)) continue;
if (currentEntity == entity) continue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (currentEntity == entity || !(currentEntity instanceof EntityLivingBase)) continue;

Comment on lines +238 to +239
if (currentEntity == entity) continue;
if (currentEntity.isDead) continue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (currentEntity.isDead || currentEntity == entity) continue;

Comment on lines +98 to +99
if (currentEntity == entity) continue;
if (currentEntity.isDead) continue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (currentEntity.isDead || currentEntity == entity) continue;

public boolean check(EntityNPCInterface npc, EntityLivingBase target) {
return npc.getHealth() / npc.getMaxHealth() > threshold;
public boolean check(IAbilityHolder entity, EntityLivingBase target) {
return ((EntityLivingBase) entity).getHealth() / ((EntityLivingBase) entity).getMaxHealth() > threshold;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fuck, why double cast ?

final EntityLivingBase living = (EntityLivingBase) entity;
return (living.getHealth() / living.getMaxHealth()) > threshold;

public boolean check(EntityNPCInterface npc, EntityLivingBase target) {
return npc.getHealth() / npc.getMaxHealth() < threshold;
public boolean check(IAbilityHolder entity, EntityLivingBase target) {
return ((EntityLivingBase) entity).getHealth() / ((EntityLivingBase) entity).getMaxHealth() < threshold;
Copy link
Contributor

@PeTcHeNkA PeTcHeNkA Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wtfffffffffffff why method logic is doubled ????
also:

final EntityLivingBase living = (EntityLivingBase) entity;
return (living.getHealth() / living.getMaxHealth()) < threshold;

Comment on lines 234 to +236
// Check NPC's recent hit count from DataAbilities
if (npc.abilities != null) {
return npc.abilities.getRecentHitCount(withinTicks) >= requiredHits;
if (entity.getAbilityData() != null) {
return entity.getAbilityData().getRecentHitCount(withinTicks) >= requiredHits;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wtf and getter is doubled!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants