block cleanup #5
This commit is contained in:
parent
84611eef7f
commit
9a6abe495c
18 changed files with 78 additions and 63 deletions
|
@ -35,11 +35,16 @@ public class BlockLeaves extends BlockLeavesBase
|
||||||
{
|
{
|
||||||
public static final PropertyBool DECAY = PropertyBool.create("decay");
|
public static final PropertyBool DECAY = PropertyBool.create("decay");
|
||||||
public static final List<BlockLeaves> LEAVES = Lists.newArrayList();
|
public static final List<BlockLeaves> LEAVES = Lists.newArrayList();
|
||||||
|
private static final BlockLeaves[] MAPPING = new BlockLeaves[WoodType.values().length * LeavesType.values().length];
|
||||||
|
|
||||||
private final WoodType type;
|
private final WoodType type;
|
||||||
private final LeavesType subType;
|
private final LeavesType subType;
|
||||||
|
|
||||||
int[] surroundings;
|
int[] surroundings;
|
||||||
|
|
||||||
|
public static BlockLeaves getLeavesBlock(WoodType type, LeavesType subType) {
|
||||||
|
return MAPPING[type.ordinal() * LeavesType.values().length + subType.ordinal()];
|
||||||
|
}
|
||||||
|
|
||||||
public BlockLeaves(WoodType type, LeavesType subType)
|
public BlockLeaves(WoodType type, LeavesType subType)
|
||||||
{
|
{
|
||||||
|
@ -53,6 +58,7 @@ public class BlockLeaves extends BlockLeavesBase
|
||||||
this.setLightOpacity(1);
|
this.setLightOpacity(1);
|
||||||
this.setStepSound(SoundType.GRASS);
|
this.setStepSound(SoundType.GRASS);
|
||||||
LEAVES.add(this);
|
LEAVES.add(this);
|
||||||
|
MAPPING[type.ordinal() * LeavesType.values().length + subType.ordinal()] = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LeavesType getType() {
|
public LeavesType getType() {
|
||||||
|
@ -91,7 +97,7 @@ public class BlockLeaves extends BlockLeavesBase
|
||||||
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
|
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
|
||||||
{
|
{
|
||||||
if(Vars.seasonLeaves && this.subType != worldIn.getLeavesGen(pos)) {
|
if(Vars.seasonLeaves && this.subType != worldIn.getLeavesGen(pos)) {
|
||||||
worldIn.setState(pos, BlockRegistry.getRegisteredBlock(this.type + "_leaves_" + worldIn.getLeavesGen(pos)).getState().withProperty(DECAY, state.getValue(DECAY)), 2);
|
worldIn.setState(pos, getLeavesBlock(this.type, worldIn.getLeavesGen(pos)).getState().withProperty(DECAY, state.getValue(DECAY)), 2);
|
||||||
}
|
}
|
||||||
if(Vars.leafDry && worldIn.getTemperatureC(pos) >= 50.0f) {
|
if(Vars.leafDry && worldIn.getTemperatureC(pos) >= 50.0f) {
|
||||||
worldIn.setState(pos, worldIn.rand.chance(40) ? Blocks.air.getState() : Blocks.dry_leaves.getState());
|
worldIn.setState(pos, worldIn.rand.chance(40) ? Blocks.air.getState() : Blocks.dry_leaves.getState());
|
||||||
|
|
|
@ -4,6 +4,7 @@ import common.biome.Biome;
|
||||||
import common.block.foliage.BlockFlower;
|
import common.block.foliage.BlockFlower;
|
||||||
import common.entity.npc.EntityMetalhead;
|
import common.entity.npc.EntityMetalhead;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
import common.init.WoodType;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.rng.WeightedList;
|
import common.rng.WeightedList;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
|
@ -11,7 +12,7 @@ import server.worldgen.tree.WorldGenBaseTree;
|
||||||
import server.worldgen.tree.WorldGenTree;
|
import server.worldgen.tree.WorldGenTree;
|
||||||
|
|
||||||
public class BiomeBlackened extends GenBiome {
|
public class BiomeBlackened extends GenBiome {
|
||||||
protected final WorldGenTree treeGen = new WorldGenBaseTree(false, Blocks.blackwood_log.getState(), Blocks.blackwood_leaves.getState());
|
protected final WorldGenTree treeGen = new WorldGenBaseTree(false, Blocks.blackwood_log.getState(), WoodType.BLACKWOOD);
|
||||||
|
|
||||||
public BiomeBlackened() {
|
public BiomeBlackened() {
|
||||||
super(Biome.BLACKENED);
|
super(Biome.BLACKENED);
|
||||||
|
|
|
@ -8,6 +8,7 @@ import common.entity.animal.EntityWolf;
|
||||||
import common.entity.npc.EntityElf;
|
import common.entity.npc.EntityElf;
|
||||||
import common.entity.npc.EntityWoodElf;
|
import common.entity.npc.EntityWoodElf;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
import common.init.WoodType;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.ExtMath;
|
import common.util.ExtMath;
|
||||||
|
@ -35,13 +36,13 @@ public class BiomeForest extends GenBiome
|
||||||
// protected WorldGenBigTree cherryBig;
|
// protected WorldGenBigTree cherryBig;
|
||||||
// protected WorldGenBigTree mapleBig;
|
// protected WorldGenBigTree mapleBig;
|
||||||
protected WorldGenBaseTree cherry = new WorldGenBaseTree(false, Blocks.cherry_log.getState(), // .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.CHERRY),
|
protected WorldGenBaseTree cherry = new WorldGenBaseTree(false, Blocks.cherry_log.getState(), // .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.CHERRY),
|
||||||
Blocks.cherry_leaves.getState()); // .withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen()));
|
WoodType.CHERRY); // .withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen()));
|
||||||
protected WorldGenBaseTree maple = new WorldGenBaseTree(false, Blocks.maple_log.getState(), // .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.MAPLE),
|
protected WorldGenBaseTree maple = new WorldGenBaseTree(false, Blocks.maple_log.getState(), // .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.MAPLE),
|
||||||
Blocks.maple_leaves.getState()); // .withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen()));
|
WoodType.MAPLE); // .withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen()));
|
||||||
protected WorldGenBigTree cherryBig = new WorldGenBigTree(false, Blocks.cherry_log.getState(), // .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.CHERRY),
|
protected WorldGenBigTree cherryBig = new WorldGenBigTree(false, Blocks.cherry_log.getState(), // .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.CHERRY),
|
||||||
Blocks.cherry_leaves.getState()); // .withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen()));
|
WoodType.CHERRY); // .withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen()));
|
||||||
protected WorldGenBigTree mapleBig = new WorldGenBigTree(false, Blocks.maple_log.getState(), // .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.MAPLE),
|
protected WorldGenBigTree mapleBig = new WorldGenBigTree(false, Blocks.maple_log.getState(), // .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.MAPLE),
|
||||||
Blocks.maple_leaves.getState()); // .withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen()));
|
WoodType.MAPLE); // .withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen()));
|
||||||
|
|
||||||
public BiomeForest(Biome base, int type)
|
public BiomeForest(Biome base, int type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,6 +5,7 @@ import common.block.foliage.BlockTallGrass;
|
||||||
import common.entity.animal.EntityChicken;
|
import common.entity.animal.EntityChicken;
|
||||||
import common.entity.animal.EntityOcelot;
|
import common.entity.animal.EntityOcelot;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
import common.init.WoodType;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
@ -21,8 +22,8 @@ import server.worldgen.tree.WorldGenTree;
|
||||||
public class BiomeJungle extends GenBiome
|
public class BiomeJungle extends GenBiome
|
||||||
{
|
{
|
||||||
private static final State LOG = Blocks.jungle_log.getState(); // .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.JUNGLE);
|
private static final State LOG = Blocks.jungle_log.getState(); // .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.JUNGLE);
|
||||||
private static final State LEAVES = Blocks.jungle_leaves.getState(); // .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.JUNGLE); // .withProperty(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false));
|
private static final WoodType LEAVES = WoodType.JUNGLE; // .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.JUNGLE); // .withProperty(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false));
|
||||||
private static final State BUSH = Blocks.oak_leaves.getState(); // .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.OAK); // .withProperty(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false));
|
private static final WoodType BUSH = WoodType.OAK; // .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.OAK); // .withProperty(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false));
|
||||||
|
|
||||||
private final boolean edge;
|
private final boolean edge;
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import common.entity.animal.EntityMouse;
|
||||||
import common.entity.animal.EntityRabbit;
|
import common.entity.animal.EntityRabbit;
|
||||||
import common.entity.npc.EntityCultivator;
|
import common.entity.npc.EntityCultivator;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
import common.init.WoodType;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.rng.WeightedList;
|
import common.rng.WeightedList;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
|
@ -22,12 +23,12 @@ public class BiomeTian extends GenBiome
|
||||||
{
|
{
|
||||||
protected FeatureGenerator spikeGen = new WorldGenSpikes(Blocks.tian_soil, 128, 2, 3, Blocks.obsidian.getState(), true);
|
protected FeatureGenerator spikeGen = new WorldGenSpikes(Blocks.tian_soil, 128, 2, 3, Blocks.obsidian.getState(), true);
|
||||||
protected FeatureGenerator mushroomBlueGen = new WorldGenMushroom(Blocks.blue_mushroom);
|
protected FeatureGenerator mushroomBlueGen = new WorldGenMushroom(Blocks.blue_mushroom);
|
||||||
protected WorldGenTree treeGen1 = new WorldGenBigTree(false, Blocks.tian_log.getState(), Blocks.tian_leaves.getState())
|
protected WorldGenTree treeGen1 = new WorldGenBigTree(false, Blocks.tian_log.getState(), WoodType.TIAN)
|
||||||
.setHeightLimit(6, 8);
|
.setHeightLimit(6, 8);
|
||||||
protected WorldGenTree treeGen2 = new WorldGenBigTree(false, Blocks.tian_log.getState(), Blocks.tian_leaves.getState())
|
protected WorldGenTree treeGen2 = new WorldGenBigTree(false, Blocks.tian_log.getState(), WoodType.TIAN)
|
||||||
.setHeightLimit(14, 20);
|
.setHeightLimit(14, 20);
|
||||||
protected WorldGenTree treeGen3 = new WorldGenBaseTree(false, Blocks.tian_log.getState(), Blocks.tian_leaves.getState());
|
protected WorldGenTree treeGen3 = new WorldGenBaseTree(false, Blocks.tian_log.getState(), WoodType.TIAN);
|
||||||
protected WorldGenTree treeGen4 = new WorldGenBigTree(false, Blocks.tian_log.getState(), Blocks.tian_leaves.getState())
|
protected WorldGenTree treeGen4 = new WorldGenBigTree(false, Blocks.tian_log.getState(), WoodType.TIAN)
|
||||||
.setHeightLimit(12, 15);
|
.setHeightLimit(12, 15);
|
||||||
|
|
||||||
public BiomeTian()
|
public BiomeTian()
|
||||||
|
|
|
@ -672,8 +672,7 @@ public abstract class GenBiome implements IBiome {
|
||||||
WoodType type = state.getBlock() instanceof BlockSapling ? ((BlockSapling)state.getBlock()).getWoodType() : WoodType.OAK;
|
WoodType type = state.getBlock() instanceof BlockSapling ? ((BlockSapling)state.getBlock()).getWoodType() : WoodType.OAK;
|
||||||
State log = type == WoodType.CHERRY ? Blocks.cherry_log.getState() : // .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.CHERRY) :
|
State log = type == WoodType.CHERRY ? Blocks.cherry_log.getState() : // .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.CHERRY) :
|
||||||
(type == WoodType.MAPLE ? Blocks.maple_log.getState() /* .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.MAPLE) */ : Blocks.oak_log.getState());
|
(type == WoodType.MAPLE ? Blocks.maple_log.getState() /* .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.MAPLE) */ : Blocks.oak_log.getState());
|
||||||
State leaves = type == WoodType.CHERRY ? Blocks.cherry_leaves.getState() :
|
WoodType leaves = type == WoodType.CHERRY || type == WoodType.MAPLE ? type : WoodType.OAK;
|
||||||
(type == WoodType.MAPLE ? Blocks.maple_leaves.getState() : Blocks.oak_leaves.getState());
|
|
||||||
FeatureGenerator worldgenerator = (FeatureGenerator)(rand.chance(10) ? new WorldGenBigTree(true, log, leaves) : new WorldGenBaseTree(true, log, leaves));
|
FeatureGenerator worldgenerator = (FeatureGenerator)(rand.chance(10) ? new WorldGenBigTree(true, log, leaves) : new WorldGenBaseTree(true, log, leaves));
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int j = 0;
|
int j = 0;
|
||||||
|
@ -711,13 +710,13 @@ public abstract class GenBiome implements IBiome {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TIAN:
|
case TIAN:
|
||||||
worldgenerator = new WorldGenBigTree(true, Blocks.tian_log.getState(), Blocks.tian_leaves.getState())
|
worldgenerator = new WorldGenBigTree(true, Blocks.tian_log.getState(), WoodType.TIAN)
|
||||||
.setHeightLimit(6, 20);
|
.setHeightLimit(6, 20);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case JUNGLE:
|
case JUNGLE:
|
||||||
State iblockstate = Blocks.jungle_log.getState(); // .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.JUNGLE);
|
State iblockstate = Blocks.jungle_log.getState(); // .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.JUNGLE);
|
||||||
State iblockstate1 = Blocks.jungle_leaves.getState(); // .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.JUNGLE); // .withProperty(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false));
|
WoodType iblockstate1 = WoodType.JUNGLE; // .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.JUNGLE); // .withProperty(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false));
|
||||||
label269:
|
label269:
|
||||||
|
|
||||||
for (i = 0; i >= -1; --i)
|
for (i = 0; i >= -1; --i)
|
||||||
|
|
|
@ -4,6 +4,7 @@ import common.block.Block;
|
||||||
import common.block.Material;
|
import common.block.Material;
|
||||||
import common.block.foliage.BlockLeaves;
|
import common.block.foliage.BlockLeaves;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
import common.init.WoodType;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
@ -12,14 +13,14 @@ import server.worldgen.tree.WorldGenBaseTree;
|
||||||
|
|
||||||
public class WorldGenShrub extends WorldGenBaseTree
|
public class WorldGenShrub extends WorldGenBaseTree
|
||||||
{
|
{
|
||||||
private final State leavesMetadata;
|
private final WoodType leavesMetadata;
|
||||||
private final State woodMetadata;
|
private final State woodMetadata;
|
||||||
|
|
||||||
public WorldGenShrub(State log, State leaves)
|
public WorldGenShrub(State log, WoodType leaves)
|
||||||
{
|
{
|
||||||
super(false);
|
super(false);
|
||||||
this.woodMetadata = log;
|
this.woodMetadata = log;
|
||||||
this.leavesMetadata = leaves.withProperty(BlockLeaves.DECAY, Boolean.valueOf(false));
|
this.leavesMetadata = leaves;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean generate(WorldServer worldIn, Random rand, BlockPos position)
|
public boolean generate(WorldServer worldIn, Random rand, BlockPos position)
|
||||||
|
@ -57,7 +58,7 @@ public class WorldGenShrub extends WorldGenBaseTree
|
||||||
|
|
||||||
if (!worldIn.getState(blockpos).getBlock().isFullBlock())
|
if (!worldIn.getState(blockpos).getBlock().isFullBlock())
|
||||||
{
|
{
|
||||||
this.setBlockAndNotifyAdequately(worldIn, blockpos, this.leavesMetadata.withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen(blockpos)));
|
this.setBlockAndNotifyAdequately(worldIn, blockpos, BlockLeaves.getLeavesBlock(this.leavesMetadata, worldIn.getLeavesGen(blockpos)).getState().withProperty(BlockLeaves.DECAY, Boolean.valueOf(false)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import common.block.foliage.BlockCocoa;
|
||||||
import common.block.foliage.BlockLeaves;
|
import common.block.foliage.BlockLeaves;
|
||||||
import common.block.foliage.BlockVine;
|
import common.block.foliage.BlockVine;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
import common.init.WoodType;
|
||||||
import common.properties.PropertyBool;
|
import common.properties.PropertyBool;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
|
@ -16,29 +17,29 @@ import server.world.WorldServer;
|
||||||
public class WorldGenBaseTree extends WorldGenTree
|
public class WorldGenBaseTree extends WorldGenTree
|
||||||
{
|
{
|
||||||
private static final State defLog = Blocks.oak_log.getState(); // .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.OAK);
|
private static final State defLog = Blocks.oak_log.getState(); // .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.OAK);
|
||||||
private static final State defLeaves = Blocks.oak_leaves.getState(); // .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.OAK);
|
private static final WoodType defLeaves = WoodType.OAK; // .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.OAK);
|
||||||
|
|
||||||
private final int minTreeHeight;
|
private final int minTreeHeight;
|
||||||
private final boolean vinesGrow;
|
private final boolean vinesGrow;
|
||||||
private final State metaWood;
|
private final State metaWood;
|
||||||
private final State metaLeaves;
|
private final WoodType metaLeaves;
|
||||||
|
|
||||||
public WorldGenBaseTree(boolean notify)
|
public WorldGenBaseTree(boolean notify)
|
||||||
{
|
{
|
||||||
this(notify, 4, defLog, defLeaves, false);
|
this(notify, 4, defLog, defLeaves, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public WorldGenBaseTree(boolean notify, State log, State leaves)
|
public WorldGenBaseTree(boolean notify, State log, WoodType leaves)
|
||||||
{
|
{
|
||||||
this(notify, 4, log, leaves, false);
|
this(notify, 4, log, leaves, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public WorldGenBaseTree(boolean notify, int minHeight, State log, State leaves, boolean vines)
|
public WorldGenBaseTree(boolean notify, int minHeight, State log, WoodType leaves, boolean vines)
|
||||||
{
|
{
|
||||||
super(notify);
|
super(notify);
|
||||||
this.minTreeHeight = minHeight;
|
this.minTreeHeight = minHeight;
|
||||||
this.metaWood = log;
|
this.metaWood = log;
|
||||||
this.metaLeaves = leaves.withProperty(BlockLeaves.DECAY, Boolean.valueOf(false));
|
this.metaLeaves = leaves;
|
||||||
this.vinesGrow = vines;
|
this.vinesGrow = vines;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +119,7 @@ public class WorldGenBaseTree extends WorldGenTree
|
||||||
|
|
||||||
if (block == Blocks.air || block.getMaterial() == Material.LEAVES || block.getMaterial() == Material.BUSH)
|
if (block == Blocks.air || block.getMaterial() == Material.LEAVES || block.getMaterial() == Material.BUSH)
|
||||||
{
|
{
|
||||||
this.setBlockAndNotifyAdequately(worldIn, blockpos, this.metaLeaves.withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen(blockpos)));
|
this.setBlockAndNotifyAdequately(worldIn, blockpos, BlockLeaves.getLeavesBlock(this.metaLeaves, worldIn.getLeavesGen(blockpos)).getState().withProperty(BlockLeaves.DECAY, Boolean.valueOf(false)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import common.block.foliage.BlockLeaves;
|
||||||
import common.block.foliage.BlockLog;
|
import common.block.foliage.BlockLog;
|
||||||
import common.collect.Lists;
|
import common.collect.Lists;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
import common.init.WoodType;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.ExtMath;
|
import common.util.ExtMath;
|
||||||
|
@ -16,7 +17,7 @@ import server.world.WorldServer;
|
||||||
|
|
||||||
public class WorldGenBigTree extends WorldGenTree
|
public class WorldGenBigTree extends WorldGenTree
|
||||||
{
|
{
|
||||||
private final State leavesBase;
|
private final WoodType leavesBase;
|
||||||
private final State logBase;
|
private final State logBase;
|
||||||
|
|
||||||
private Random rand;
|
private Random rand;
|
||||||
|
@ -34,7 +35,7 @@ public class WorldGenBigTree extends WorldGenTree
|
||||||
private int leafDistanceLimit = 4;
|
private int leafDistanceLimit = 4;
|
||||||
List<WorldGenBigTree.FoliageCoordinates> field_175948_j;
|
List<WorldGenBigTree.FoliageCoordinates> field_175948_j;
|
||||||
|
|
||||||
public WorldGenBigTree(boolean notify, State logBase, State leavesBase)
|
public WorldGenBigTree(boolean notify, State logBase, WoodType leavesBase)
|
||||||
{
|
{
|
||||||
super(notify);
|
super(notify);
|
||||||
this.leavesBase = leavesBase;
|
this.leavesBase = leavesBase;
|
||||||
|
@ -43,7 +44,7 @@ public class WorldGenBigTree extends WorldGenTree
|
||||||
|
|
||||||
public WorldGenBigTree(boolean notify)
|
public WorldGenBigTree(boolean notify)
|
||||||
{
|
{
|
||||||
this(notify, Blocks.oak_log.getState(), Blocks.oak_leaves.getState());
|
this(notify, Blocks.oak_log.getState(), WoodType.OAK);
|
||||||
}
|
}
|
||||||
|
|
||||||
public WorldGenBigTree setHeightLimit(int lower, int limit) {
|
public WorldGenBigTree setHeightLimit(int lower, int limit) {
|
||||||
|
@ -176,8 +177,7 @@ public class WorldGenBigTree extends WorldGenTree
|
||||||
{
|
{
|
||||||
for (int i = 0; i < this.leafDistanceLimit; ++i)
|
for (int i = 0; i < this.leafDistanceLimit; ++i)
|
||||||
{
|
{
|
||||||
this.func_181631_a(pos.up(i), this.leafSize(i), this.leavesBase.withProperty(BlockLeaves.DECAY, Boolean.valueOf(false))
|
this.func_181631_a(pos.up(i), this.leafSize(i), BlockLeaves.getLeavesBlock(this.leavesBase, this.world.getLeavesGen(pos.up(i))).getState().withProperty(BlockLeaves.DECAY, Boolean.valueOf(false)));
|
||||||
.withProperty(BlockLeaves.TYPE, this.world.getLeavesGen(pos.up(i))));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ import common.block.Block;
|
||||||
import common.block.Material;
|
import common.block.Material;
|
||||||
import common.block.foliage.BlockLeaves;
|
import common.block.foliage.BlockLeaves;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
import common.init.WoodType;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
@ -12,9 +13,8 @@ import server.world.WorldServer;
|
||||||
public class WorldGenBirch extends WorldGenTree
|
public class WorldGenBirch extends WorldGenTree
|
||||||
{
|
{
|
||||||
private static final State logBlock = Blocks.birch_log.getState(); // .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.BIRCH);
|
private static final State logBlock = Blocks.birch_log.getState(); // .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.BIRCH);
|
||||||
private static final State leavesBlock = Blocks.birch_leaves.getState()
|
private static final WoodType leavesBlock = WoodType.BIRCH;
|
||||||
// .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.BIRCH)
|
// .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.BIRCH);
|
||||||
.withProperty(BlockLeaves.DECAY, Boolean.valueOf(false));
|
|
||||||
private boolean useExtraRandomHeight;
|
private boolean useExtraRandomHeight;
|
||||||
|
|
||||||
public WorldGenBirch(boolean notify, boolean extra)
|
public WorldGenBirch(boolean notify, boolean extra)
|
||||||
|
@ -103,7 +103,7 @@ public class WorldGenBirch extends WorldGenTree
|
||||||
|
|
||||||
if (block == Blocks.air || block.getMaterial() == Material.LEAVES)
|
if (block == Blocks.air || block.getMaterial() == Material.LEAVES)
|
||||||
{
|
{
|
||||||
this.setBlockAndNotifyAdequately(worldIn, blockpos, leavesBlock.withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen(blockpos)));
|
this.setBlockAndNotifyAdequately(worldIn, blockpos, BlockLeaves.getLeavesBlock(leavesBlock, worldIn.getLeavesGen(blockpos)).getState().withProperty(BlockLeaves.DECAY, Boolean.valueOf(false)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import common.block.Block;
|
||||||
import common.block.Material;
|
import common.block.Material;
|
||||||
import common.block.foliage.BlockLeaves;
|
import common.block.foliage.BlockLeaves;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
import common.init.WoodType;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.Facing;
|
import common.util.Facing;
|
||||||
|
@ -13,9 +14,8 @@ import server.world.WorldServer;
|
||||||
public class WorldGenDarkOak extends WorldGenTree
|
public class WorldGenDarkOak extends WorldGenTree
|
||||||
{
|
{
|
||||||
private static final State logBlock = Blocks.dark_oak_log.getState(); // .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.DARK_OAK);
|
private static final State logBlock = Blocks.dark_oak_log.getState(); // .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.DARK_OAK);
|
||||||
private static final State leavesBlock = Blocks.dark_oak_leaves.getState()
|
private static final WoodType leavesBlock = WoodType.DARK_OAK;
|
||||||
// .withProperty(BlockNewLeaf.VARIANT, BlockPlanks.EnumType.DARK_OAK)
|
// .withProperty(BlockNewLeaf.VARIANT, BlockPlanks.EnumType.DARK_OAK);
|
||||||
.withProperty(BlockLeaves.DECAY, Boolean.valueOf(false));
|
|
||||||
|
|
||||||
public WorldGenDarkOak(boolean notify)
|
public WorldGenDarkOak(boolean notify)
|
||||||
{
|
{
|
||||||
|
@ -212,7 +212,7 @@ public class WorldGenDarkOak extends WorldGenTree
|
||||||
|
|
||||||
if (block == Blocks.air)
|
if (block == Blocks.air)
|
||||||
{
|
{
|
||||||
this.setBlockAndNotifyAdequately(worldIn, blockpos, leavesBlock.withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen(blockpos)));
|
this.setBlockAndNotifyAdequately(worldIn, blockpos, BlockLeaves.getLeavesBlock(leavesBlock, worldIn.getLeavesGen(blockpos)).getState().withProperty(BlockLeaves.DECAY, Boolean.valueOf(false)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import common.block.Block;
|
||||||
import common.block.Material;
|
import common.block.Material;
|
||||||
import common.block.foliage.BlockLeaves;
|
import common.block.foliage.BlockLeaves;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
import common.init.WoodType;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
@ -18,16 +19,16 @@ public abstract class WorldGenHugeTree extends WorldGenTree
|
||||||
protected final State woodMetadata;
|
protected final State woodMetadata;
|
||||||
|
|
||||||
/** Sets the metadata for the leaves used in huge trees */
|
/** Sets the metadata for the leaves used in huge trees */
|
||||||
protected final State leavesMetadata;
|
protected final WoodType leavesMetadata;
|
||||||
protected int extraRandomHeight;
|
protected int extraRandomHeight;
|
||||||
|
|
||||||
public WorldGenHugeTree(boolean notify, int base, int extra, State log, State leaves)
|
public WorldGenHugeTree(boolean notify, int base, int extra, State log, WoodType leaves)
|
||||||
{
|
{
|
||||||
super(notify);
|
super(notify);
|
||||||
this.baseHeight = base;
|
this.baseHeight = base;
|
||||||
this.extraRandomHeight = extra;
|
this.extraRandomHeight = extra;
|
||||||
this.woodMetadata = log;
|
this.woodMetadata = log;
|
||||||
this.leavesMetadata = leaves.withProperty(BlockLeaves.DECAY, Boolean.valueOf(false));
|
this.leavesMetadata = leaves;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int func_150533_a(Random p_150533_1_)
|
protected int func_150533_a(Random p_150533_1_)
|
||||||
|
@ -123,7 +124,7 @@ public abstract class WorldGenHugeTree extends WorldGenTree
|
||||||
|
|
||||||
if (block == Blocks.air || block.getMaterial() == Material.LEAVES)
|
if (block == Blocks.air || block.getMaterial() == Material.LEAVES)
|
||||||
{
|
{
|
||||||
this.setBlockAndNotifyAdequately(worldIn, blockpos, this.leavesMetadata.withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen(blockpos)));
|
this.setBlockAndNotifyAdequately(worldIn, blockpos, BlockLeaves.getLeavesBlock(this.leavesMetadata, worldIn.getLeavesGen(blockpos)).getState().withProperty(BlockLeaves.DECAY, Boolean.valueOf(false)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -145,7 +146,7 @@ public abstract class WorldGenHugeTree extends WorldGenTree
|
||||||
|
|
||||||
if (block == Blocks.air || block.getMaterial() == Material.LEAVES)
|
if (block == Blocks.air || block.getMaterial() == Material.LEAVES)
|
||||||
{
|
{
|
||||||
this.setBlockAndNotifyAdequately(worldIn, blockpos, this.leavesMetadata.withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen(blockpos)));
|
this.setBlockAndNotifyAdequately(worldIn, blockpos, BlockLeaves.getLeavesBlock(this.leavesMetadata, worldIn.getLeavesGen(blockpos)).getState().withProperty(BlockLeaves.DECAY, Boolean.valueOf(false)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package server.worldgen.tree;
|
||||||
|
|
||||||
import common.block.foliage.BlockVine;
|
import common.block.foliage.BlockVine;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
import common.init.WoodType;
|
||||||
import common.properties.PropertyBool;
|
import common.properties.PropertyBool;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
|
@ -11,7 +12,7 @@ import server.world.WorldServer;
|
||||||
|
|
||||||
public class WorldGenJungle extends WorldGenHugeTree
|
public class WorldGenJungle extends WorldGenHugeTree
|
||||||
{
|
{
|
||||||
public WorldGenJungle(boolean p_i46448_1_, int p_i46448_2_, int p_i46448_3_, State p_i46448_4_, State p_i46448_5_)
|
public WorldGenJungle(boolean p_i46448_1_, int p_i46448_2_, int p_i46448_3_, State p_i46448_4_, WoodType p_i46448_5_)
|
||||||
{
|
{
|
||||||
super(p_i46448_1_, p_i46448_2_, p_i46448_3_, p_i46448_4_, p_i46448_5_);
|
super(p_i46448_1_, p_i46448_2_, p_i46448_3_, p_i46448_4_, p_i46448_5_);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import common.block.Block;
|
||||||
import common.block.Material;
|
import common.block.Material;
|
||||||
import common.block.natural.BlockDirt;
|
import common.block.natural.BlockDirt;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
import common.init.WoodType;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.ExtMath;
|
import common.util.ExtMath;
|
||||||
|
@ -13,8 +14,9 @@ import server.world.WorldServer;
|
||||||
public class WorldGenPine extends WorldGenHugeTree
|
public class WorldGenPine extends WorldGenHugeTree
|
||||||
{
|
{
|
||||||
private static final State field_181633_e = Blocks.spruce_log.getState(); // .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.SPRUCE);
|
private static final State field_181633_e = Blocks.spruce_log.getState(); // .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.SPRUCE);
|
||||||
private static final State field_181634_f = Blocks.spruce_leaves.getState(); // .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.SPRUCE); // .withProperty(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false));
|
private static final WoodType field_181634_f = WoodType.SPRUCE; // .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.SPRUCE); // .withProperty(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false));
|
||||||
private static final State field_181635_g = Blocks.dirt.getState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.PODZOL);
|
private static final State field_181635_g = Blocks.podzol.getState();
|
||||||
|
|
||||||
private boolean useBaseHeight;
|
private boolean useBaseHeight;
|
||||||
|
|
||||||
public WorldGenPine(boolean p_i45457_1_, boolean p_i45457_2_)
|
public WorldGenPine(boolean p_i45457_1_, boolean p_i45457_2_)
|
||||||
|
|
|
@ -4,6 +4,7 @@ import common.block.Block;
|
||||||
import common.block.Material;
|
import common.block.Material;
|
||||||
import common.block.foliage.BlockLeaves;
|
import common.block.foliage.BlockLeaves;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
import common.init.WoodType;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.Facing;
|
import common.util.Facing;
|
||||||
|
@ -14,9 +15,8 @@ public class WorldGenSavanna extends WorldGenTree
|
||||||
{
|
{
|
||||||
private static final State field_181643_a = Blocks.acacia_log.getState();
|
private static final State field_181643_a = Blocks.acacia_log.getState();
|
||||||
// .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.ACACIA);
|
// .withProperty(BlockNewLog.VARIANT, BlockPlanks.EnumType.ACACIA);
|
||||||
private static final State field_181644_b = Blocks.acacia_leaves.getState()
|
private static final WoodType field_181644_b = WoodType.ACACIA;
|
||||||
// .withProperty(BlockNewLeaf.VARIANT, BlockPlanks.EnumType.ACACIA)
|
// .withProperty(BlockNewLeaf.VARIANT, BlockPlanks.EnumType.ACACIA);
|
||||||
.withProperty(BlockLeaves.DECAY, Boolean.valueOf(false));
|
|
||||||
|
|
||||||
public WorldGenSavanna(boolean p_i45463_1_)
|
public WorldGenSavanna(boolean p_i45463_1_)
|
||||||
{
|
{
|
||||||
|
@ -213,7 +213,7 @@ public class WorldGenSavanna extends WorldGenTree
|
||||||
|
|
||||||
if (block == Blocks.air || block.getMaterial() == Material.LEAVES)
|
if (block == Blocks.air || block.getMaterial() == Material.LEAVES)
|
||||||
{
|
{
|
||||||
this.setBlockAndNotifyAdequately(worldIn, p_175924_2_, field_181644_b.withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen(p_175924_2_)));
|
this.setBlockAndNotifyAdequately(worldIn, p_175924_2_, BlockLeaves.getLeavesBlock(field_181644_b, worldIn.getLeavesGen(p_175924_2_)).getState().withProperty(BlockLeaves.DECAY, Boolean.valueOf(false)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import common.block.Material;
|
||||||
import common.block.foliage.BlockLeaves;
|
import common.block.foliage.BlockLeaves;
|
||||||
import common.block.foliage.BlockVine;
|
import common.block.foliage.BlockVine;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
import common.init.WoodType;
|
||||||
import common.properties.PropertyBool;
|
import common.properties.PropertyBool;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
|
@ -15,9 +16,8 @@ public class WorldGenSwamp extends WorldGenTree
|
||||||
{
|
{
|
||||||
private static final State field_181648_a = Blocks.oak_log.getState();
|
private static final State field_181648_a = Blocks.oak_log.getState();
|
||||||
// .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.OAK);
|
// .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.OAK);
|
||||||
private static final State field_181649_b = Blocks.oak_leaves.getState()
|
private static final WoodType field_181649_b = WoodType.OAK;
|
||||||
// .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.OAK)
|
// .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.OAK);
|
||||||
.withProperty(BlockLeaves.DECAY, Boolean.valueOf(false));
|
|
||||||
|
|
||||||
public WorldGenSwamp()
|
public WorldGenSwamp()
|
||||||
{
|
{
|
||||||
|
@ -112,7 +112,7 @@ public class WorldGenSwamp extends WorldGenTree
|
||||||
|
|
||||||
if (!worldIn.getState(blockpos).getBlock().isFullBlock())
|
if (!worldIn.getState(blockpos).getBlock().isFullBlock())
|
||||||
{
|
{
|
||||||
this.setBlockAndNotifyAdequately(worldIn, blockpos, field_181649_b.withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen(blockpos)));
|
this.setBlockAndNotifyAdequately(worldIn, blockpos, BlockLeaves.getLeavesBlock(field_181649_b, worldIn.getLeavesGen(blockpos)).getState().withProperty(BlockLeaves.DECAY, Boolean.valueOf(false)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import common.block.Block;
|
||||||
import common.block.Material;
|
import common.block.Material;
|
||||||
import common.block.foliage.BlockLeaves;
|
import common.block.foliage.BlockLeaves;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
import common.init.WoodType;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
@ -13,9 +14,8 @@ public class WorldGenTaiga1 extends WorldGenTree
|
||||||
{
|
{
|
||||||
private static final State field_181636_a = Blocks.spruce_log.getState();
|
private static final State field_181636_a = Blocks.spruce_log.getState();
|
||||||
// .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.SPRUCE);
|
// .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.SPRUCE);
|
||||||
private static final State field_181637_b = Blocks.spruce_leaves.getState()
|
private static final WoodType field_181637_b = WoodType.SPRUCE;
|
||||||
// .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.SPRUCE)
|
// .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.SPRUCE);
|
||||||
.withProperty(BlockLeaves.DECAY, Boolean.valueOf(false));
|
|
||||||
|
|
||||||
public WorldGenTaiga1()
|
public WorldGenTaiga1()
|
||||||
{
|
{
|
||||||
|
@ -95,7 +95,7 @@ public class WorldGenTaiga1 extends WorldGenTree
|
||||||
|
|
||||||
if (!worldIn.getState(blockpos).getBlock().isFullBlock())
|
if (!worldIn.getState(blockpos).getBlock().isFullBlock())
|
||||||
{
|
{
|
||||||
this.setBlockAndNotifyAdequately(worldIn, blockpos, field_181637_b.withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen(blockpos)));
|
this.setBlockAndNotifyAdequately(worldIn, blockpos, BlockLeaves.getLeavesBlock(field_181637_b, worldIn.getLeavesGen(blockpos)).getState().withProperty(BlockLeaves.DECAY, Boolean.valueOf(false)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import common.block.Block;
|
||||||
import common.block.Material;
|
import common.block.Material;
|
||||||
import common.block.foliage.BlockLeaves;
|
import common.block.foliage.BlockLeaves;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
import common.init.WoodType;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
@ -13,9 +14,8 @@ public class WorldGenTaiga2 extends WorldGenTree
|
||||||
{
|
{
|
||||||
private static final State field_181645_a = Blocks.spruce_log.getState();
|
private static final State field_181645_a = Blocks.spruce_log.getState();
|
||||||
// .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.SPRUCE);
|
// .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.SPRUCE);
|
||||||
private static final State field_181646_b = Blocks.spruce_leaves.getState()
|
private static final WoodType field_181646_b = WoodType.SPRUCE;
|
||||||
// .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.SPRUCE)
|
// .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.SPRUCE);
|
||||||
.withProperty(BlockLeaves.DECAY, Boolean.valueOf(false));
|
|
||||||
|
|
||||||
public WorldGenTaiga2(boolean p_i2025_1_)
|
public WorldGenTaiga2(boolean p_i2025_1_)
|
||||||
{
|
{
|
||||||
|
@ -101,7 +101,7 @@ public class WorldGenTaiga2 extends WorldGenTree
|
||||||
|
|
||||||
if (!worldIn.getState(blockpos).getBlock().isFullBlock())
|
if (!worldIn.getState(blockpos).getBlock().isFullBlock())
|
||||||
{
|
{
|
||||||
this.setBlockAndNotifyAdequately(worldIn, blockpos, field_181646_b.withProperty(BlockLeaves.TYPE, worldIn.getLeavesGen(blockpos)));
|
this.setBlockAndNotifyAdequately(worldIn, blockpos, BlockLeaves.getLeavesBlock(field_181646_b, worldIn.getLeavesGen(blockpos)).getState().withProperty(BlockLeaves.DECAY, Boolean.valueOf(false)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue