Used interfaces in implementations instead of the real classes for most scripted classes.

This commit is contained in:
Luis C.M committed 2022-05-11 22:08:31 -05:00
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());
}
}