Added natural carved pumpkins/jack-o-lanterns to the Pumpkin Patch biome. Removed unused textures
|
@ -2,9 +2,10 @@ package biomesoplenty.common.world.gen.feature;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockCarvedPumpkin;
|
||||||
import net.minecraft.block.BlockLeaves;
|
import net.minecraft.block.BlockLeaves;
|
||||||
import net.minecraft.block.state.IBlockState;
|
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IWorld;
|
import net.minecraft.world.IWorld;
|
||||||
import net.minecraft.world.gen.IChunkGenSettings;
|
import net.minecraft.world.gen.IChunkGenSettings;
|
||||||
|
@ -25,9 +26,22 @@ public class PumpkinPatchFeature extends Feature<NoFeatureConfig>
|
||||||
{
|
{
|
||||||
|
|
||||||
if (p_212245_3_.nextInt(3) == 0)
|
if (p_212245_3_.nextInt(3) == 0)
|
||||||
|
{
|
||||||
|
int rand = p_212245_3_.nextInt(50);
|
||||||
|
|
||||||
|
if (rand > 10)
|
||||||
{
|
{
|
||||||
p_212245_1_.setBlockState(blockpos, Blocks.PUMPKIN.getDefaultState(), 2);
|
p_212245_1_.setBlockState(blockpos, Blocks.PUMPKIN.getDefaultState(), 2);
|
||||||
}
|
}
|
||||||
|
else if (rand > 1)
|
||||||
|
{
|
||||||
|
p_212245_1_.setBlockState(blockpos, Blocks.CARVED_PUMPKIN.getDefaultState().with(BlockCarvedPumpkin.FACING, EnumFacing.byIndex(2 + p_212245_3_.nextInt(4))), 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
p_212245_1_.setBlockState(blockpos, Blocks.JACK_O_LANTERN.getDefaultState().with(BlockCarvedPumpkin.FACING, EnumFacing.byIndex(2 + p_212245_3_.nextInt(4))), 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
p_212245_1_.setBlockState(blockpos, Blocks.OAK_LEAVES.getDefaultState().with(BlockLeaves.PERSISTENT, true), 2);
|
p_212245_1_.setBlockState(blockpos, Blocks.OAK_LEAVES.getDefaultState().with(BlockLeaves.PERSISTENT, true), 2);
|
||||||
|
|
Before Width: | Height: | Size: 348 B |
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 599 B |
Before Width: | Height: | Size: 341 B |
Before Width: | Height: | Size: 372 B |
Before Width: | Height: | Size: 355 B |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.1 KiB |