forked from TAIGA/TAIGA
updated some stuff
This commit is contained in:
@@ -16,9 +16,12 @@ public class Generator {
|
||||
}
|
||||
|
||||
public static void generateNetherOre(IBlockState state, Random random, int x, int z, World world, int chance, int minY, int maxY, int minSize, int maxSize) {
|
||||
generateOre(state, Blocks.NETHERRACK.getDefaultState(),null, null, random, x, z, world, chance, minY, maxY, minSize, maxSize);
|
||||
generateOre(state, Blocks.NETHERRACK.getDefaultState(), null, null, random, x, z, world, chance, minY, maxY, minSize, maxSize);
|
||||
}
|
||||
|
||||
public static void generateOre(IBlockState state, IBlockState replace, Random random, int chunkX, int chunkZ, World world, int chance, int minY, int maxY, int minSize, int maxSize) {
|
||||
generateOre(state, replace, null, null, random, chunkX, chunkZ, world, chance, minY, maxY, minSize, maxSize);
|
||||
}
|
||||
|
||||
public static void generateOre(IBlockState state, IBlockState replace, IProperty property, Comparable comparable, Random random, int chunkX, int chunkZ, World world, int chance, int minY, int maxY, int minSize, int maxSize) {
|
||||
int size = minSize + random.nextInt(maxSize - minSize);
|
||||
|
@@ -21,6 +21,12 @@ public class StateMatcher implements Predicate<IBlockState> {
|
||||
}
|
||||
|
||||
public boolean apply(IBlockState state) {
|
||||
return state != null && state.getBlock() == this.state.getBlock() && state.getValue(property) == value;
|
||||
if (state != null) {
|
||||
if (property != null && value != null)
|
||||
return state.getBlock() == this.state.getBlock() && state.getValue(property) == value;
|
||||
else
|
||||
return state.getBlock() == this.state.getBlock();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user