mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 13:04:46 +00:00
Used interfaces in implementations instead of the real classes for most scripted classes.
This commit is contained in:
1 parent
6896cec417
commit
cf33b90b26
63 files changed
+466
-551
No files matched your search
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted;
|
||||
|
||||
import net.minecraft.util.DamageSource;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
import noppes.npcs.scripted.interfaces.IDamageSource;
|
||||
import noppes.npcs.scripted.interfaces.entity.IEntity;
|
||||
|
||||
public class ScriptDamageSource implements IDamageSource {
|
||||
private DamageSource source;
|
||||
|
||||
public ScriptDamageSource(DamageSource source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return this.source.getDamageType();
|
||||
}
|
||||
|
||||
public boolean isUnblockable() {
|
||||
return this.source.isUnblockable();
|
||||
}
|
||||
|
||||
public boolean isProjectile() {
|
||||
return this.source.isProjectile();
|
||||
}
|
||||
|
||||
public DamageSource getMCDamageSource() {
|
||||
return this.source;
|
||||
}
|
||||
|
||||
public IEntity getTrueSource() {
|
||||
return NpcAPI.Instance().getIEntity(this.source.getEntity());
|
||||
}
|
||||
|
||||
public IEntity getImmediateSource() {
|
||||
return NpcAPI.Instance().getIEntity(this.source.getSourceOfDamage());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user