forked from TAIGA/TAIGA
Adjusted tiberium ore, removed vanilla smelting recipes, adjusted three traits (one left), description for materials added
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.sosnitzka.taiga.traits;
|
||||
|
||||
import com.sosnitzka.taiga.util.TickTask;
|
||||
import com.sosnitzka.taiga.util.TickTaskHandler;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -19,14 +21,17 @@ public class TraitCascade extends AbstractTrait {
|
||||
public void afterBlockBreak(ItemStack tool, World world, IBlockState state, BlockPos pos, EntityLivingBase player, boolean wasEffective) {
|
||||
float f = random.nextFloat();
|
||||
float b = 0.99F * calcBonus(tool);
|
||||
|
||||
if (!world.isRemote && tool.canHarvestBlock(state) && f <= b) {
|
||||
double x, y, z, sx, sy, sz;
|
||||
sx = x = pos.getX();
|
||||
sy = y = pos.getY();
|
||||
sz = z = pos.getZ();
|
||||
|
||||
for (int i = random.nextInt(ToolHelper.getCurrentDurability(tool)); i > 0; i--) {
|
||||
for (int i = random.nextInt((int) (ToolHelper.getCurrentDurability(tool) * 1.5f)); i > 0; i--) {
|
||||
TickTaskHandler.getInstance().addTask(new TickTask(20, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
}
|
||||
}));
|
||||
int r = random.nextInt(3);
|
||||
int d = random.nextBoolean() ? 1 : -1;
|
||||
if (r == 0) x += d;
|
||||
@@ -44,8 +49,11 @@ public class TraitCascade extends AbstractTrait {
|
||||
y = sy;
|
||||
z = sz;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private float calcBonus(ItemStack tool) {
|
||||
|
Reference in New Issue
Block a user