More fixes to global NPC scripts not executing on servers, and added more functions to IEntityLivingBase.

This commit is contained in:
Luis C.M committed 2022-12-24 01:46:43 -06:00
1 parent 5562e3b82d
commit f481602612
2 files changed
+26 -6

No files matched your search

+6 -6
View File
@@ -541,12 +541,12 @@ public interface ICustomNpc<T extends EntityCreature> extends IEntityLiving<T> {
/**
* @return The melee strength
*/
float getMeleeStrength();
double getMeleeStrength();
/**
* @param strength The melee strength
*/
void setMeleeStrength(float strength);
void setMeleeStrength(double strength);
/**
* @return The melee speed
@@ -733,12 +733,12 @@ public interface ICustomNpc<T extends EntityCreature> extends IEntityLiving<T> {
/**
* @param resistance Knockback resistance (0-2) default is 1
*/
void setKnockbackResistance(float resistance);
void setKnockbackResistance(double resistance);
/**
* @return Returns Knockback Resistance
*/
float getKnockbackResistance();
double getKnockbackResistance();
/**
* @param type Retaliation type. 0:normal, 1:panic, 2:retreat, 3:nothing
@@ -789,9 +789,9 @@ public interface ICustomNpc<T extends EntityCreature> extends IEntityLiving<T> {
boolean isFlyHeightLimited(boolean limit);
void setSpeed(int speed);
void setSpeed(double speed);
int getSpeed();
double getSpeed();
void setSkinType(byte type);
@@ -1,6 +1,7 @@
package noppes.npcs.api.entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import noppes.npcs.api.IBlock;
import noppes.npcs.api.IDamageSource;
import noppes.npcs.api.IPos;
@@ -27,6 +28,25 @@ public interface IEntityLivingBase<T extends EntityLivingBase> extends IEntity<T
* @return Entity's max health
*/
double getMaxHealth();
double getFollowRange();
double getKnockbackResistance();
double getSpeed();
double getMeleeStrength();
void setMaxHealth(double health);
void setFollowRange(double range);
void setKnockbackResistance(double knockbackResistance);
void setSpeed(double speed);
void setMeleeStrength(double attackDamage);
/**
* @return Whether or not this entity is attacking something
*/