mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 11:54:47 +00:00
Revert "Merge remote-tracking branch 'origin/dev' into dev"
This reverts commit66edbcea80, reversing changes made to3fd962289c.
This commit is contained in:
1 parent
66edbcea80
commit
8d3cd3fd82
58 files changed
+780
-284
No files matched your search
@@ -1,6 +1,5 @@
|
||||
package noppes.npcs.scripted.entity;
|
||||
|
||||
import net.minecraft.block.BlockLiquid;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.potion.Potion;
|
||||
@@ -8,18 +7,14 @@ import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EntityDamageSource;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import noppes.npcs.scripted.ScriptBlockPos;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.ScriptDamageSource;
|
||||
import noppes.npcs.scripted.constants.EntityType;
|
||||
import noppes.npcs.scripted.interfaces.IBlock;
|
||||
import noppes.npcs.scripted.interfaces.IPos;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntity;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
import noppes.npcs.scripted.constants.EntityType;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntityLivingBase;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.ScriptDamageSource;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
||||
|
||||
public class ScriptLivingBase<T extends EntityLivingBase> extends ScriptEntity<T> implements IEntityLivingBase {
|
||||
protected T entity;
|
||||
@@ -108,7 +103,7 @@ public class ScriptLivingBase<T extends EntityLivingBase> extends ScriptEntity<T
|
||||
|
||||
public IPos getLookVector() {
|
||||
Vec3 lookVec = entity.getLookVec();
|
||||
return new ScriptBlockPos(new BlockPos(lookVec.xCoord,lookVec.yCoord,lookVec.zCoord));
|
||||
return NpcAPI.Instance().getIPos(lookVec.xCoord,lookVec.yCoord,lookVec.zCoord);
|
||||
}
|
||||
|
||||
public IBlock getLookingAtBlock(int maxDistance, boolean stopOnBlock, boolean stopOnLiquid, boolean stopOnCollision) {
|
||||
@@ -248,4 +243,54 @@ public class ScriptLivingBase<T extends EntityLivingBase> extends ScriptEntity<T
|
||||
public void setArmor(int slot, IItemStack item){
|
||||
entity.setCurrentItemOrArmor(slot + 1, item == null?null:item.getMCItemStack());
|
||||
}
|
||||
|
||||
public boolean isChild() {
|
||||
return this.entity.isChild();
|
||||
}
|
||||
|
||||
public void renderBrokenItemStack(IItemStack itemStack)
|
||||
{
|
||||
this.entity.renderBrokenItemStack(itemStack.getMCItemStack());
|
||||
}
|
||||
|
||||
public boolean isOnLadder()
|
||||
{
|
||||
return this.entity.isOnLadder();
|
||||
}
|
||||
|
||||
public int getTotalArmorValue()
|
||||
{
|
||||
return this.entity.getTotalArmorValue();
|
||||
}
|
||||
|
||||
public int getArrowCountInEntity() {
|
||||
return this.entity.getArrowCountInEntity();
|
||||
}
|
||||
|
||||
public void setArrowCountInEntity(int count)
|
||||
{
|
||||
this.entity.setArrowCountInEntity(count);
|
||||
}
|
||||
|
||||
public void dismountEntity(IEntity entity) {
|
||||
this.entity.dismountEntity(entity.getMCEntity());
|
||||
}
|
||||
|
||||
public void setAIMoveSpeed(float speed)
|
||||
{
|
||||
this.entity.setAIMoveSpeed(speed);
|
||||
}
|
||||
|
||||
public float getAIMoveSpeed() {
|
||||
return this.entity.getAIMoveSpeed();
|
||||
}
|
||||
|
||||
public void setAbsorptionAmount(float amount)
|
||||
{
|
||||
this.entity.setAbsorptionAmount(amount);
|
||||
}
|
||||
|
||||
public float getAbsorptionAmount() {
|
||||
return this.entity.getAbsorptionAmount();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user