Backported GUI features and necessary classes from 1.12.

This commit is contained in:
luisc committed 2021-09-30 21:44:30 -05:00
1 parent 8b6e84a8d4
commit 95d2814651
46 files changed
+3675 -520

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.wrapper;
import net.minecraft.util.DamageSource;
import noppes.npcs.scripted.IDamageSource;
import noppes.npcs.scripted.NpcAPI;
import noppes.npcs.scripted.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());
}
}