1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
package darkknight.jewelrycraft.api;
import java.util.ArrayList;
import java.util.Random;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderHandEvent;
import net.minecraftforge.client.event.RenderPlayerEvent;
import net.minecraftforge.event.world.BlockEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class Curse
{
protected int textureID;
protected String name, description, texturePackName;
protected Random rand = new Random();
private static ArrayList<Curse> curses = new ArrayList<Curse>();
public static ArrayList<Curse> availableCurses = new ArrayList<Curse>();
/**
* @param id the ID of the curse
* @param name the name of the curse
* @param texturepack the ID of the pack the texture is located in
*/
protected Curse(String name, int txtID, String texturepack)
{
this.name = name;
this.texturePackName = texturepack;
this.textureID = txtID;
curses.add(this);
availableCurses.add(this);
}
/**
* @return the name of the curse
*/
public String getName()
{
return name;
}
/**
* @return the description of the curse
*/
public String getDescription()
{
return description;
}
public Curse setDescription(String desc)
{
description = desc;
return this;
}
/**
* @return the texture pack ID
*/
public String getTexturePack()
{
return texturePackName;
}
/**
* @return the texture ID
*/
public int getTextureID()
{
return textureID;
}
/**
* @param world
* @param player
*/
public void action(World world, EntityPlayer player)
{}
/**
* @param world
* @param player
*/
public void playerDeathAction(World world, EntityPlayer player)
{}
public void entityDeathAction(World world, EntityLivingBase target, EntityPlayer player)
{}
/**
* @param world
* @param player
*/
public void respawnAction(World world, EntityPlayer player)
{}
/**
* @param world
* @param player
*/
public void attackedAction(World world, EntityPlayer player)
{}
/**
* @param world
* @param player
*/
public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
{}
public void entityDropItems(EntityPlayer player, Entity target, ArrayList<EntityItem> drops)
{}
@SideOnly(Side.CLIENT)
public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
{}
@SideOnly(Side.CLIENT)
public void playerHandRender(EntityPlayer player, RenderHandEvent event)
{}
public void onBlockItemsDrop(EntityPlayer player, BlockEvent.HarvestDropsEvent event)
{}
public void onBlockDestroyed(EntityPlayer player, BlockEvent.BreakEvent event)
{}
public boolean itemToss()
{
return false;
}
/**
* @return
*/
public static ArrayList<Curse> getCurseList()
{
return curses;
}
}
|