mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-26 05:08:34 +01:00
some mycelium-related fixes
This commit is contained in:
parent
d0b5add9fd
commit
d5bb470b6b
2 changed files with 4 additions and 4 deletions
|
@ -125,7 +125,7 @@ public class ClientEvents {
|
||||||
BlockPos pos = new BlockPos(x, mc.world.getHeight(Heightmap.Type.WORLD_SURFACE, x, z) - 1, z);
|
BlockPos pos = new BlockPos(x, mc.world.getHeight(Heightmap.Type.WORLD_SURFACE, x, z) - 1, z);
|
||||||
BlockState state = mc.world.getBlockState(pos);
|
BlockState state = mc.world.getBlockState(pos);
|
||||||
Block block = state.getBlock();
|
Block block = state.getBlock();
|
||||||
if (block instanceof IGrowable || block instanceof IPlantable || block instanceof LeavesBlock) {
|
if (block instanceof IGrowable || block instanceof IPlantable || block instanceof LeavesBlock || block instanceof MyceliumBlock) {
|
||||||
int excess = IAuraChunk.triangulateAuraInArea(mc.world, pos, 45) - IAuraChunk.DEFAULT_AURA;
|
int excess = IAuraChunk.triangulateAuraInArea(mc.world, pos, 45) - IAuraChunk.DEFAULT_AURA;
|
||||||
if (excess > 0) {
|
if (excess > 0) {
|
||||||
int chance = Math.max(10, 50 - excess / 25000);
|
int chance = Math.max(10, 50 - excess / 25000);
|
||||||
|
@ -137,7 +137,7 @@ public class ClientEvents {
|
||||||
mc.world.rand.nextGaussian() * 0.01F,
|
mc.world.rand.nextGaussian() * 0.01F,
|
||||||
mc.world.rand.nextFloat() * 0.025F,
|
mc.world.rand.nextFloat() * 0.025F,
|
||||||
mc.world.rand.nextGaussian() * 0.01F,
|
mc.world.rand.nextGaussian() * 0.01F,
|
||||||
BiomeColors.getGrassColor(mc.world, pos),
|
block instanceof MyceliumBlock ? 0x875ca1 : BiomeColors.getGrassColor(mc.world, pos),
|
||||||
Math.min(2F, 1F + mc.world.rand.nextFloat() * (excess / 30000F)),
|
Math.min(2F, 1F + mc.world.rand.nextFloat() * (excess / 30000F)),
|
||||||
Math.min(300, 100 + mc.world.rand.nextInt(excess / 3000 + 1)),
|
Math.min(300, 100 + mc.world.rand.nextInt(excess / 3000 + 1)),
|
||||||
0F, false, true);
|
0F, false, true);
|
||||||
|
|
|
@ -41,9 +41,9 @@ public class ItemShovel extends ShovelItem implements IModItem, ICustomItemModel
|
||||||
BlockState state = world.getBlockState(pos);
|
BlockState state = world.getBlockState(pos);
|
||||||
if (this == ModItems.INFUSED_IRON_SHOVEL) {
|
if (this == ModItems.INFUSED_IRON_SHOVEL) {
|
||||||
int damage = 0;
|
int damage = 0;
|
||||||
if (state.getBlock() == Blocks.DIRT) {
|
if (state.getBlock() == Blocks.DIRT || state.getBlock() == Blocks.MYCELIUM) {
|
||||||
if (world.getBlockState(pos.up()).getMaterial() == Material.AIR) {
|
if (world.getBlockState(pos.up()).getMaterial() == Material.AIR) {
|
||||||
world.setBlockState(pos, Blocks.GRASS.getDefaultState());
|
world.setBlockState(pos, Blocks.GRASS_BLOCK.getDefaultState());
|
||||||
damage = 5;
|
damage = 5;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue