world.gen.feature patches, worldgen should be stable with vanilla. In all places I looked.

This commit is contained in:
LexManos committed 2018-12-06 18:09:47 -08:00
1 parent eb22f42fea
commit bbf1ea41b8
66 files changed
+1066 -1026

No files matched your search

@@ -374,9 +374,9 @@ public interface IForgeBlock
* @param pos Block position in world
* @return true if this block can be replaced by growing leaves.
*/
default boolean canBeReplacedByLeaves(IBlockState state, IWorldReader world, BlockPos pos)
default boolean canBeReplacedByLeaves(IBlockState state, IWorldReaderBase world, BlockPos pos)
{
return isAir(state, world, pos) || state.isIn(BlockTags.LEAVES);
return (isAir(state, world, pos) || state.isIn(BlockTags.LEAVES)) || !state.isOpaqueCube(world, pos);
}
/**
@@ -390,7 +390,7 @@ public interface IForgeBlock
* @return True to allow this block to be replaced by a ore
*/
default boolean isReplaceableOreGen(IBlockState state, IWorldReader world, BlockPos pos, Predicate<IBlockState> target)
{ //TODO: Re-evaluate with new world gen
{
return target.test(state);
}
@@ -580,9 +580,9 @@ public interface IForgeBlock
* @param pos Block position in world
* @param source Source plant's position in world
*/
default void onPlantGrow(IBlockState state, World world, BlockPos pos, BlockPos source)
default void onPlantGrow(IBlockState state, IWorld world, BlockPos pos, BlockPos source)
{
if (this.getBlock() == Blocks.GRASS || this.getBlock() == Blocks.FARMLAND)
if (this.getBlock() == Blocks.GRASS || this.getBlock() == Blocks.FARMLAND || this.getBlock() == Blocks.AIR)
world.setBlockState(pos, Blocks.DIRT.getDefaultState(), 2);
}
@@ -36,6 +36,7 @@ import net.minecraft.item.EnumDyeColor;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.pathfinding.PathNodeType;
import net.minecraft.tags.BlockTags;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*;
import net.minecraft.util.math.BlockPos;
@@ -184,7 +185,6 @@ public interface IForgeBlockState
return getBlockState().getBlock().canHarvestBlock(getBlockState(), world, pos, player);
}
/**
* Called when a player removes a block. This is responsible for
* actually destroying the block, and the block is intact at time of call.
@@ -323,7 +323,7 @@ public interface IForgeBlockState
* @param pos Block position in world
* @return true if this block can be replaced by growing leaves.
*/
default boolean canBeReplacedByLeaves(IWorldReader world, BlockPos pos)
default boolean canBeReplacedByLeaves(IWorldReaderBase world, BlockPos pos)
{
return getBlockState().getBlock().canBeReplacedByLeaves(getBlockState(), world, pos);
}
@@ -520,7 +520,7 @@ public interface IForgeBlockState
* @param pos Block position in world
* @param source Source plant's position in world
*/
default void onPlantGrow(World world, BlockPos pos, BlockPos source)
default void onPlantGrow(IWorld world, BlockPos pos, BlockPos source)
{
getBlockState().getBlock().onPlantGrow(getBlockState(), world, pos, source);
}