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

@@ -1,24 +1,22 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
// (powered by FernFlower decompiler)
//
package noppes.npcs.scripted.event;
import cpw.mods.fml.common.eventhandler.Cancelable;
import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.DamageSource;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import noppes.npcs.scripted.IContainer;
import noppes.npcs.scripted.IDamageSource;
import noppes.npcs.scripted.NpcAPI;
import noppes.npcs.scripted.block.IBlock;
import noppes.npcs.scripted.entity.IEntity;
import noppes.npcs.scripted.entity.IEntityLivingBase;
import noppes.npcs.scripted.entity.IPlayer;
import noppes.npcs.scripted.event.CustomNPCsEvent;
import noppes.npcs.scripted.handler.data.IFaction;
import noppes.npcs.scripted.item.IItemStack;
import noppes.npcs.scripted.IEntity;
import noppes.npcs.scripted.IEntityLivingBase;
import noppes.npcs.scripted.IPlayer;
import noppes.npcs.scripted.IItemStack;
public class PlayerEvent extends CustomNPCsEvent {
public final IPlayer player;
@@ -27,19 +25,6 @@ public class PlayerEvent extends CustomNPCsEvent {
this.player = player;
}
public static class FactionUpdateEvent extends PlayerEvent {
public final IFaction faction;
public int points;
public boolean init;
public FactionUpdateEvent(IPlayer player, IFaction faction, int points, boolean init) {
super(player);
this.faction = faction;
this.points = points;
this.init = init;
}
}
@Cancelable
public static class ChatEvent extends PlayerEvent {
public String message;
@@ -130,7 +115,7 @@ public class PlayerEvent extends CustomNPCsEvent {
public DiedEvent(IPlayer player, DamageSource damagesource, Entity entity) {
super(player);
this.damageSource = NpcAPI.Instance().getIDamageSource(damagesource);
this.type = damagesource.field_76373_n;
this.type = damagesource.getDamageType();
this.source = NpcAPI.Instance().getIEntity(entity);
}
}
@@ -194,18 +179,6 @@ public class PlayerEvent extends CustomNPCsEvent {
}
}
@Cancelable
public static class BreakEvent extends PlayerEvent {
public final IBlock block;
public int exp;
public BreakEvent(IPlayer player, IBlock block, int exp) {
super(player);
this.block = block;
this.exp = exp;
}
}
@Cancelable
public static class AttackEvent extends PlayerEvent {
public final int type;