use of com.tntmodders.takumi.world.gen.TakumiWorldGenTrees in project takumicraft by TNTModders.
the class EntityTreeCreeper method takumiExplode.
@Override
public void takumiExplode() {
if (!this.world.isRemote) {
this.world.createExplosion(this, this.posX, this.posY, this.posZ, this.getPowered() ? 6 : 3, false);
WorldGenAbstractTree tree = this.getPowered() ? new TakumiWorldGenBigTree(true, TakumiBlockCore.CREEPER_LOG.getDefaultState(), TakumiBlockCore.CREEPER_LEAVES.getDefaultState()) : new TakumiWorldGenTrees(true, false, TakumiBlockCore.CREEPER_LOG.getDefaultState(), TakumiBlockCore.CREEPER_LEAVES.getDefaultState());
tree.generate(this.world, this.rand, new BlockPos(this));
Calendar calendar = this.world.getCurrentDate();
int month = calendar.get(Calendar.MONTH) + 1;
int date = calendar.get(Calendar.DATE);
if (month == 12 && (date == 24 || date == 25)) {
for (int i = 0; i < 45; i++) {
BlockPos pos = this.getPosition().add(this.rand.nextInt(40) - 20, 0, this.rand.nextInt(40) - 20);
pos = pos.up(this.world.getHeight(pos).getY() - pos.getY());
EntityFireworksCreeper.createTree(this, pos);
}
}
}
}
use of com.tntmodders.takumi.world.gen.TakumiWorldGenTrees in project takumicraft by TNTModders.
the class EntityNaturalCreeper method takumiExplode.
@Override
public void takumiExplode() {
if (!this.world.isRemote) {
this.world.createExplosion(this, this.posX, this.posY, this.posZ, this.getPowered() ? 6 : 3, false);
WorldGenAbstractTree tree = this.getPowered() ? new TakumiWorldGenBigTree(true, TakumiBlockCore.GUNORE.getDefaultState(), TakumiBlockCore.CREEPER_BOMB.getDefaultState()) : new TakumiWorldGenTrees(true, false, TakumiBlockCore.GUNORE.getDefaultState(), TakumiBlockCore.CREEPER_BOMB.getDefaultState());
tree.generate(this.world, this.rand, new BlockPos(this));
}
}
Aggregations