Skip to content

Commit

Permalink
Update deprecated calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Iaccidentally committed Feb 2, 2013
1 parent bac2810 commit bacc095
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/me/snowleo/bleedingmobs/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ public final void loadConfig()
{
if (dyeColor.toString().replace("_", "").equals(colorName))
{
woolcolor = dyeColor.getData();
woolcolor = dyeColor.getWoolData();
}
}
if (woolcolor < 0)
{
woolcolor = ((Number)Math.min(15, Math.max(0, config.getInt(name + ".wool-color", builder.getWoolColor().getData())))).byteValue();
woolcolor = ((Number)Math.min(15, Math.max(0, config.getInt(name + ".wool-color", builder.getWoolColor().getWoolData())))).byteValue();
}
builder.setWoolColor(DyeColor.getByData(woolcolor));
builder.setWoolColor(DyeColor.getByWoolData(woolcolor));
builder.setStainsFloor(config.getBoolean(name + ".stains-floor", builder.isStainsFloor()));
builder.setBoneLife(Math.max(0, Math.min(1200, config.getInt(name + ".bone-life", builder.getBoneLife()))));
builder.setStainLifeFrom(Math.max(0, Math.min(12000, config.getInt(name + ".stain-life.from", builder.getStainLifeFrom()))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected MaterialData parse(final String color, final String material) throws I
MaterialData data = coloredMaterial.getNewData((byte)0);
if (data instanceof Colorable)
{
data.setData(dyeColor.getData());
data.setData(dyeColor.getWoolData());
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected DyeColor parse(final String arg) throws InvalidArgumentException
if (dyecolor == null)
{
Integer parse = INTEGER_PARSER.parse(arg);
dyecolor = DyeColor.getByData(parse.byteValue());
dyecolor = DyeColor.getByWoolData(parse.byteValue());
}
return dyecolor;
}
Expand Down
2 changes: 1 addition & 1 deletion src/me/snowleo/bleedingmobs/particles/BloodStain.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public BloodStain(final IBleedingMobs plugin, final ParticleType type, final Loc
}
else
{
stainedBlock = new StainedBlock(block, type.getWoolColor().getData());
stainedBlock = new StainedBlock(block, type.getWoolColor().getWoolData());
}
duration = Util.getRandomBetween(type.getStainLifeFrom(), type.getStainLifeTo());
}
Expand Down
2 changes: 1 addition & 1 deletion src/me/snowleo/bleedingmobs/particles/Particle.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private ItemStack createWoolStack()
}
else
{
return new ItemStack(Material.WOOL, 1, type.getWoolColor().getData());
return new ItemStack(Material.WOOL, 1, type.getWoolColor().getWoolData());
}
}

Expand Down

0 comments on commit bacc095

Please sign in to comment.