diff options
| author | Onyx <sor1n.iliutza16@gmail.com> | 2015-12-01 20:55:30 +0000 |
|---|---|---|
| committer | Onyx <sor1n.iliutza16@gmail.com> | 2015-12-01 20:55:30 +0000 |
| commit | 01c8701b68986ccfa83e902515716838d6829311 (patch) | |
| tree | b21aa78f4df6ca9bac90e2726221114a41f2294a /src/main/java/darkknight/jewelrycraft/curses/CurseRabbitsPaw.java | |
| parent | 35da479288f75d6686c64a00e1dc77e7e7fd50e1 (diff) | |
- Fixed all of the bugs mentioned on github
- Added new config options
- Rabbits paw now increases the chance of spawning hearts, rather than
itself spawning some
- Hearts now have a much lower chance to spawn by default
- You can no longer increase your health past 20 hearts (aka double the
default health)
- The guide now also shows the total number of pages on each tab
- A new luck stat has been added to the Curse API
- Cleaned up the code a bit (removed unused methods, imports etc)
- The displayer's info now has a purple solid color background; the text
also has a much closer shadow and now shrinks in height as well as in
width when too big
- I have modified the potion list to use Mithion's code, credits have
been given
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/curses/CurseRabbitsPaw.java')
| -rw-r--r-- | src/main/java/darkknight/jewelrycraft/curses/CurseRabbitsPaw.java | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/curses/CurseRabbitsPaw.java b/src/main/java/darkknight/jewelrycraft/curses/CurseRabbitsPaw.java index 32ea0fb..831f5c5 100644 --- a/src/main/java/darkknight/jewelrycraft/curses/CurseRabbitsPaw.java +++ b/src/main/java/darkknight/jewelrycraft/curses/CurseRabbitsPaw.java @@ -7,9 +7,6 @@ import java.util.ArrayList; import darkknight.jewelrycraft.api.Curse;
import darkknight.jewelrycraft.config.ConfigHandler;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.util.JewelrycraftUtil;
import darkknight.jewelrycraft.util.Variables;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@@ -17,7 +14,6 @@ import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityXPOrb;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
-import net.minecraft.util.MathHelper;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
@@ -33,34 +29,21 @@ public class CurseRabbitsPaw extends Curse {
for(EntityItem item: drops){
ItemStack drop = item.getEntityItem().copy();
- drop.stackSize = this.rand.nextInt(4);
+ drop.stackSize = this.rand.nextInt(4);
if (drop.stackSize > 0) target.entityDropItem(drop, 0.5F);
}
}
public void entityDeathAction(World world, EntityLivingBase target, EntityPlayer player)
{
- String[] types = {"Red", "Blue", "White", "Black"};
- String type = types[rand.nextInt(4)];
- if (rand.nextInt(3) == 0 && target.getCreatureAttribute() != JewelrycraftUtil.HEART){
- if (type == "White"){
- EntityHeart h = new EntityHalfHeart(world);
- h.setType(type);
- h.setLocationAndAngles(target.posX, target.posY, target.posZ, MathHelper.wrapAngleTo180_float(rand.nextFloat() * 360.0F), 0.0F);
- world.spawnEntityInWorld(h);
- }else{
- for(int i = 1; i <= 1 + rand.nextInt(1 + (int)(target.getMaxHealth() / 20)); i++){
- EntityHeart[] hearts = {new EntityHeart(world), new EntityHalfHeart(world)};
- EntityHeart h = hearts[rand.nextInt(2)];
- h.setType(type);
- h.setLocationAndAngles(target.posX, target.posY, target.posZ, MathHelper.wrapAngleTo180_float(rand.nextFloat() * 360.0F), 0.0F);
- world.spawnEntityInWorld(h);
- }
- }
- }
if (rand.nextInt(3) == 0) world.spawnEntityInWorld(new EntityXPOrb(world, target.posX, target.posY, target.posZ, 1 + rand.nextInt(40)));
}
+ public int luck()
+ {
+ return 10;
+ }
+
public String getDescription()
{
return StatCollector.translateToLocal("curse." + Variables.MODID + ".rabbitspaw.description");
|
