forked from TAIGA/TAIGA
Fixed a lot of minor issues. Added configuration for ore values and ore generation.
This commit is contained in:
@@ -34,7 +34,7 @@ public class TraitGarishly extends AbstractTrait {
|
||||
EntityPlayer player = (EntityPlayer) event.getSource().getEntity();
|
||||
if (event.getEntity() instanceof EntityMob && TinkerUtil.hasTrait(TagUtil.getTagSafe(player.getHeldItemMainhand()), identifier)) {
|
||||
|
||||
int r = random.nextInt(5);
|
||||
int r = random.nextInt(6);
|
||||
ItemStack i = null;
|
||||
switch (r) {
|
||||
case 0:
|
||||
@@ -56,7 +56,6 @@ public class TraitGarishly extends AbstractTrait {
|
||||
i = new ItemStack(lignite, random.nextInt(3));
|
||||
break;
|
||||
}
|
||||
|
||||
assert i != null;
|
||||
event.getDrops().add(0, new EntityItem(w, event.getEntity().posX, event.getEntity().posY, event.getEntity().posZ, i));
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ import slimeknights.tconstruct.library.utils.ToolHelper;
|
||||
|
||||
|
||||
public class TraitNatureBound extends AbstractTrait {
|
||||
private static int chance = 20;
|
||||
|
||||
public TraitNatureBound() {
|
||||
super("naturebound", TextFormatting.GREEN);
|
||||
@@ -34,6 +33,7 @@ public class TraitNatureBound extends AbstractTrait {
|
||||
@Override
|
||||
public void onUpdate(ItemStack tool, World world, Entity entity, int itemSlot, boolean isSelected) {
|
||||
// *20 because 20 ticks in a second
|
||||
int chance = 20;
|
||||
if (!world.isRemote && entity instanceof EntityLivingBase && random.nextInt(30 * chance) == 0) {
|
||||
ToolHelper.healTool(tool, random.nextInt(9) + 1, (EntityLivingBase) entity);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user