2012-12-17 21:21:53 +01:00
|
|
|
package com.pahimar.ee3.event;
|
2012-12-13 04:41:40 +01:00
|
|
|
|
2012-12-13 16:01:41 +01:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
2012-12-19 19:09:56 +01:00
|
|
|
import net.minecraft.item.ItemStack;
|
2012-12-13 16:01:41 +01:00
|
|
|
import net.minecraft.world.World;
|
2012-12-13 04:41:40 +01:00
|
|
|
import net.minecraftforge.event.Event;
|
|
|
|
|
2012-12-18 19:05:04 +01:00
|
|
|
public class ActionEvent extends Event {
|
|
|
|
|
2012-12-19 19:09:56 +01:00
|
|
|
public enum ActionResult {
|
|
|
|
SUCCESS, DEFAULT, FAILURE
|
|
|
|
}
|
|
|
|
|
2012-12-18 19:05:04 +01:00
|
|
|
public final byte actionType;
|
2012-12-19 19:09:56 +01:00
|
|
|
public ItemStack itemStack;
|
|
|
|
public final EntityPlayer player;
|
2012-12-13 04:41:40 +01:00
|
|
|
public final World world;
|
2012-12-17 22:38:56 +01:00
|
|
|
public final int x, y, z;
|
2012-12-18 19:05:04 +01:00
|
|
|
public final boolean hasActionOccured;
|
2012-12-13 04:41:40 +01:00
|
|
|
public final String data;
|
2012-12-19 19:09:56 +01:00
|
|
|
public ActionResult actionResult;
|
|
|
|
|
|
|
|
public ActionEvent(byte actionType, ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, boolean hasActionOccured, String data) {
|
2012-12-13 04:41:40 +01:00
|
|
|
|
2012-12-18 19:05:04 +01:00
|
|
|
this.actionType = actionType;
|
2012-12-19 19:09:56 +01:00
|
|
|
this.itemStack = itemStack;
|
2012-12-13 04:41:40 +01:00
|
|
|
this.player = player;
|
|
|
|
this.world = world;
|
2012-12-17 22:38:56 +01:00
|
|
|
this.x = x;
|
|
|
|
this.y = y;
|
|
|
|
this.z = z;
|
2012-12-18 19:05:04 +01:00
|
|
|
this.hasActionOccured = hasActionOccured;
|
2012-12-13 04:41:40 +01:00
|
|
|
this.data = data;
|
|
|
|
}
|
2012-12-19 19:09:56 +01:00
|
|
|
|
2012-12-13 04:41:40 +01:00
|
|
|
}
|