forked from TAIGA/TAIGA
some minor fixes
This commit is contained in:
@@ -9,6 +9,7 @@ import net.minecraft.util.math.MathHelper;
|
|||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import javax.annotation.ParametersAreNonnullByDefault;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import static com.sosnitzka.taiga.Items.lignite;
|
import static com.sosnitzka.taiga.Items.lignite;
|
||||||
@@ -29,6 +30,7 @@ public class BlockLignite extends BasicBlock {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ParametersAreNonnullByDefault
|
||||||
public int quantityDropped(IBlockState state, int fortune, Random random) {
|
public int quantityDropped(IBlockState state, int fortune, Random random) {
|
||||||
return MathHelper.getRandomIntegerInRange(random, 1, 3 + fortune);
|
return MathHelper.getRandomIntegerInRange(random, 1, 3 + fortune);
|
||||||
}
|
}
|
||||||
|
@@ -11,6 +11,7 @@ import net.minecraft.world.Explosion;
|
|||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import javax.annotation.ParametersAreNonnullByDefault;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import static com.sosnitzka.taiga.util.Utils.PREFIX_ORE;
|
import static com.sosnitzka.taiga.util.Utils.PREFIX_ORE;
|
||||||
@@ -25,13 +26,13 @@ public class BlockTiberium extends BasicBlock {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getExpDrop(IBlockState state, IBlockAccess world, BlockPos pos, int fortune) {
|
public int getExpDrop(IBlockState state, IBlockAccess world, BlockPos pos, int fortune) {
|
||||||
Random rand = world instanceof World ? ((World) world).rand : new Random();
|
|
||||||
if (random.nextBoolean()) {
|
if (random.nextBoolean()) {
|
||||||
return random.nextInt(10) + fortune;
|
return random.nextInt(10) + fortune;
|
||||||
} else return 0;
|
} else return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ParametersAreNonnullByDefault
|
||||||
public int quantityDropped(IBlockState state, int fortune, Random random) {
|
public int quantityDropped(IBlockState state, int fortune, Random random) {
|
||||||
return (random.nextInt(3 + fortune) + 1);
|
return (random.nextInt(3 + fortune) + 1);
|
||||||
}
|
}
|
||||||
|
@@ -40,7 +40,6 @@ public class TraitFragile extends AbstractTrait {
|
|||||||
if (r == 1) y += d;
|
if (r == 1) y += d;
|
||||||
if (r == 2) z += d;
|
if (r == 2) z += d;
|
||||||
BlockPos nextBlock = new BlockPos(x, y, z);
|
BlockPos nextBlock = new BlockPos(x, y, z);
|
||||||
int tn = (int) world.getWorldTime() + 5;
|
|
||||||
if (world.getBlockState(nextBlock) == world.getBlockState(pos)) {
|
if (world.getBlockState(nextBlock) == world.getBlockState(pos)) {
|
||||||
Block block = Blocks.STONE;
|
Block block = Blocks.STONE;
|
||||||
int ib = random.nextInt(3);
|
int ib = random.nextInt(3);
|
||||||
|
@@ -57,6 +57,7 @@ public class TraitGarishly extends AbstractTrait {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert i != null;
|
||||||
event.getDrops().add(0, new EntityItem(w, event.getEntity().posX, event.getEntity().posY, event.getEntity().posZ, i));
|
event.getDrops().add(0, new EntityItem(w, event.getEntity().posX, event.getEntity().posY, event.getEntity().posZ, i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user