Dragon tree feature prototype
|
@ -1,5 +1,6 @@
|
||||||
package ru.betterend.util;
|
package ru.betterend.util;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
@ -208,4 +209,34 @@ public class SplineHelper {
|
||||||
float z = MathHelper.lerp(delta, p1.getZ(), p2.getZ());
|
float z = MathHelper.lerp(delta, p1.getZ(), p2.getZ());
|
||||||
return new Vector3f(x, y, z);
|
return new Vector3f(x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void rotateSpline(List<Vector3f> spline, float angle) {
|
||||||
|
for (Vector3f v: spline) {
|
||||||
|
float sin = (float) Math.sin(angle);
|
||||||
|
float cos = (float) Math.cos(angle);
|
||||||
|
float x = v.getX() * cos + v.getZ() * sin;
|
||||||
|
float z = v.getX() * sin + v.getZ() * cos;
|
||||||
|
v.set(x, v.getY(), z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<Vector3f> copySpline(List<Vector3f> spline) {
|
||||||
|
List<Vector3f> result = new ArrayList<Vector3f>(spline.size());
|
||||||
|
for (Vector3f v: spline) {
|
||||||
|
result.add(v.copy());
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void scale(List<Vector3f> spline, float scale) {
|
||||||
|
for (Vector3f v: spline) {
|
||||||
|
v.set(v.getX() * scale, v.getY() * scale, v.getZ() * scale);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void offset(List<Vector3f> spline, Vector3f offset) {
|
||||||
|
for (Vector3f v: spline) {
|
||||||
|
v.add(offset);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,16 +5,17 @@ import net.minecraft.particle.ParticleTypes;
|
||||||
import net.minecraft.world.gen.feature.ConfiguredStructureFeatures;
|
import net.minecraft.world.gen.feature.ConfiguredStructureFeatures;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.registry.EndFeatures;
|
import ru.betterend.registry.EndFeatures;
|
||||||
|
import ru.betterend.registry.EndSounds;
|
||||||
|
|
||||||
public class BiomeShadowForest extends EndBiome {
|
public class BiomeShadowForest extends EndBiome {
|
||||||
public BiomeShadowForest() {
|
public BiomeShadowForest() {
|
||||||
super(new BiomeDefinition("shadow_forest")
|
super(new BiomeDefinition("shadow_forest")
|
||||||
.setFogColor(87, 26, 87)
|
.setFogColor(0, 0, 0)
|
||||||
.setFogDensity(1.5F)
|
.setFogDensity(2.5F)
|
||||||
.setPlantsColor(122, 45, 122)
|
.setPlantsColor(122, 45, 122)
|
||||||
.setSurface(EndBlocks.SHADOW_GRASS)
|
.setSurface(EndBlocks.SHADOW_GRASS)
|
||||||
.setParticles(ParticleTypes.MYCELIUM, 0.01F)
|
.setParticles(ParticleTypes.MYCELIUM, 0.01F)
|
||||||
//.setLoop(EndSounds.AMBIENT_CHORUS_FOREST)
|
.setLoop(EndSounds.AMBIENT_CHORUS_FOREST)
|
||||||
//.setMusic(EndSounds.MUSIC_CHORUS_FOREST)
|
//.setMusic(EndSounds.MUSIC_CHORUS_FOREST)
|
||||||
.addFeature(EndFeatures.END_LAKE_RARE)
|
.addFeature(EndFeatures.END_LAKE_RARE)
|
||||||
.addFeature(EndFeatures.DRAGON_TREE)
|
.addFeature(EndFeatures.DRAGON_TREE)
|
||||||
|
|
|
@ -4,39 +4,46 @@ import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
|
||||||
import net.minecraft.block.LeavesBlock;
|
import net.minecraft.block.LeavesBlock;
|
||||||
import net.minecraft.block.Material;
|
import net.minecraft.block.Material;
|
||||||
import net.minecraft.client.util.math.Vector3f;
|
import net.minecraft.client.util.math.Vector3f;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.Direction;
|
||||||
import net.minecraft.world.StructureWorldAccess;
|
import net.minecraft.world.StructureWorldAccess;
|
||||||
import net.minecraft.world.gen.chunk.ChunkGenerator;
|
import net.minecraft.world.gen.chunk.ChunkGenerator;
|
||||||
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
|
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
|
||||||
import ru.betterend.noise.OpenSimplexNoise;
|
import ru.betterend.noise.OpenSimplexNoise;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.registry.EndTags;
|
import ru.betterend.registry.EndTags;
|
||||||
|
import ru.betterend.util.BlocksHelper;
|
||||||
import ru.betterend.util.MHelper;
|
import ru.betterend.util.MHelper;
|
||||||
import ru.betterend.util.SplineHelper;
|
import ru.betterend.util.SplineHelper;
|
||||||
import ru.betterend.util.sdf.PosInfo;
|
import ru.betterend.util.sdf.PosInfo;
|
||||||
import ru.betterend.util.sdf.SDF;
|
import ru.betterend.util.sdf.SDF;
|
||||||
import ru.betterend.util.sdf.operator.SDFCoordModify;
|
import ru.betterend.util.sdf.operator.SDFDisplacement;
|
||||||
import ru.betterend.util.sdf.operator.SDFFlatWave;
|
import ru.betterend.util.sdf.operator.SDFScale;
|
||||||
import ru.betterend.util.sdf.operator.SDFScale3D;
|
import ru.betterend.util.sdf.operator.SDFScale3D;
|
||||||
import ru.betterend.util.sdf.operator.SDFSubtraction;
|
import ru.betterend.util.sdf.operator.SDFSubtraction;
|
||||||
import ru.betterend.util.sdf.operator.SDFTranslate;
|
import ru.betterend.util.sdf.operator.SDFTranslate;
|
||||||
import ru.betterend.util.sdf.operator.SDFUnion;
|
|
||||||
import ru.betterend.util.sdf.primitive.SDFSphere;
|
import ru.betterend.util.sdf.primitive.SDFSphere;
|
||||||
|
|
||||||
public class DragonTreeFeature extends DefaultFeature {
|
public class DragonTreeFeature extends DefaultFeature {
|
||||||
private static final Function<BlockState, Boolean> REPLACE;
|
private static final Function<BlockState, Boolean> REPLACE;
|
||||||
|
private static final Function<BlockState, Boolean> IGNORE;
|
||||||
private static final Function<PosInfo, BlockState> POST;
|
private static final Function<PosInfo, BlockState> POST;
|
||||||
|
private static final List<Vector3f> BRANCH;
|
||||||
|
private static final List<Vector3f> SIDE1;
|
||||||
|
private static final List<Vector3f> SIDE2;
|
||||||
|
private static final List<Vector3f> ROOT;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random random, BlockPos pos, DefaultFeatureConfig config) {
|
public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random random, BlockPos pos, DefaultFeatureConfig config) {
|
||||||
if (!world.getBlockState(pos.down()).getBlock().isIn(EndTags.END_GROUND)) return false;
|
if (!world.getBlockState(pos.down()).getBlock().isIn(EndTags.END_GROUND)) return false;
|
||||||
|
|
||||||
float size = MHelper.randRange(15, 35, random);
|
float size = MHelper.randRange(10, 25, random);
|
||||||
List<Vector3f> spline = SplineHelper.makeSpline(0, 0, 0, 0, size, 0, 6);
|
List<Vector3f> spline = SplineHelper.makeSpline(0, 0, 0, 0, size, 0, 6);
|
||||||
SplineHelper.offsetParts(spline, random, 1F, 0, 1F);
|
SplineHelper.offsetParts(spline, random, 1F, 0, 1F);
|
||||||
|
|
||||||
|
@ -44,89 +51,95 @@ public class DragonTreeFeature extends DefaultFeature {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
float radius = MHelper.randRange(6F, 8F, random);
|
Vector3f last = SplineHelper.getPos(spline, 3.5F);
|
||||||
radius *= (size - 15F) / 20F + 1F;
|
OpenSimplexNoise noise = new OpenSimplexNoise(random.nextLong());
|
||||||
Vector3f top = spline.get(spline.size() - 1);
|
float radius = size * MHelper.randRange(0.5F, 0.7F, random);
|
||||||
|
makeCap(world, pos.add(last.getX(), last.getY(), last.getZ()), radius, random, noise);
|
||||||
|
|
||||||
radius = size * MHelper.randRange(0.08F, 0.12F, random);
|
last = spline.get(0);
|
||||||
float radius2 = size / 15F;
|
makeRoots(world, pos.add(last.getX(), last.getY(), last.getZ()), radius, random);
|
||||||
SDF function = SplineHelper.buildSDF(spline, radius, radius2, (bpos) -> {
|
|
||||||
|
radius = MHelper.randRange(1.2F, 2.3F, random);
|
||||||
|
SDF function = SplineHelper.buildSDF(spline, radius, 1.2F, (bpos) -> {
|
||||||
return EndBlocks.DRAGON_TREE.bark.getDefaultState();
|
return EndBlocks.DRAGON_TREE.bark.getDefaultState();
|
||||||
});
|
});
|
||||||
|
|
||||||
int branches = (int) ((size - 10) * 0.25F + 5);
|
|
||||||
radius = size * MHelper.randRange(0.4F, 0.6F, random);
|
|
||||||
/*for (int i = 0; i < branches; i++) {
|
|
||||||
float angle = (float) i / (float) branches * MHelper.PI2;
|
|
||||||
float x2 = top.getX() + (float) Math.sin(angle) * radius;
|
|
||||||
float z2 = top.getZ() + (float) Math.cos(angle) * radius;
|
|
||||||
spline = SplineHelper.makeSpline(top.getX(), top.getY(), top.getZ(), x2, top.getY(), z2, 7);
|
|
||||||
SplineHelper.powerOffset(spline, radius * 0.5F, 3);
|
|
||||||
SplineHelper.fillSpline(spline, world, EndBlocks.DRAGON_TREE.bark.getDefaultState(), pos, (state) -> {
|
|
||||||
return state.getMaterial().isReplaceable() || state.isOf(EndBlocks.DRAGON_TREE_LEAVES);
|
|
||||||
});
|
|
||||||
}*/
|
|
||||||
|
|
||||||
BlockState leaves = EndBlocks.DRAGON_TREE_LEAVES.getDefaultState().with(LeavesBlock.DISTANCE, 1);
|
|
||||||
SDF leafCap = new SDFSphere().setRadius(radius + 3).setBlock(leaves);
|
|
||||||
leafCap = new SDFScale3D().setScale(1, 0.25F, 1).setSource(leafCap);
|
|
||||||
SDF sub = new SDFSphere().setRadius(radius * 2).setBlock(Blocks.AIR);
|
|
||||||
sub = new SDFTranslate().setTranslate(0, radius * 2 - 2F, 0).setSource(sub);
|
|
||||||
leafCap = new SDFSubtraction().setSourceA(leafCap).setSourceB(sub);
|
|
||||||
|
|
||||||
SDF branch = new SDFSphere().setRadius(1).setBlock(EndBlocks.DRAGON_TREE.bark);
|
|
||||||
branch = new SDFScale3D().setScale(1, 2F / radius, 1).setSource(branch);
|
|
||||||
branch = new SDFTranslate().setTranslate(0, -radius * 0.25F - 1F, 0).setSource(branch);
|
|
||||||
branch = new SDFFlatWave().setRaysCount(branches).setIntensity(radius).setSource(branch);
|
|
||||||
branch = new SDFCoordModify().setFunction((bpos) -> {
|
|
||||||
float dist = MHelper.length(bpos.getX(), bpos.getZ());
|
|
||||||
bpos.set(bpos.getX(), bpos.getY() - dist * 0.1F, bpos.getZ());
|
|
||||||
}).setSource(branch);
|
|
||||||
SDF center = new SDFSphere().setRadius(3).setBlock(EndBlocks.DRAGON_TREE.bark);
|
|
||||||
center = new SDFFlatWave().setRaysCount(branches).setIntensity(3).setSource(center);
|
|
||||||
branch = new SDFUnion().setSourceA(branch).setSourceB(center);
|
|
||||||
sub = new SDFSphere().setRadius(radius + 1).setBlock(leaves);
|
|
||||||
sub = new SDFScale3D().setScale(1, 0.25F, 1).setSource(sub);
|
|
||||||
branch = new SDFSubtraction().setSourceA(branch).setSourceB(sub);
|
|
||||||
|
|
||||||
leafCap = new SDFUnion().setSourceA(leafCap).setSourceB(branch);
|
|
||||||
|
|
||||||
OpenSimplexNoise noise = new OpenSimplexNoise(1234);
|
|
||||||
leafCap = new SDFCoordModify().setFunction((bpos) -> {
|
|
||||||
float dist = MHelper.length(bpos.getX(), bpos.getZ());
|
|
||||||
float y = bpos.getY() + (float) noise.eval(bpos.getX() * 0.1 + pos.getX(), bpos.getZ() * 0.1 + pos.getZ()) * dist * 0.3F + dist * 0.25F;
|
|
||||||
bpos.set(bpos.getX(), y, bpos.getZ());
|
|
||||||
}).setSource(leafCap);
|
|
||||||
|
|
||||||
SDF smallLeaf = leafCap;
|
|
||||||
leafCap = new SDFTranslate().setTranslate(top.getX(), top.getY() + radius * 0.25F + 1.5F, top.getZ()).setSource(leafCap);
|
|
||||||
function = new SDFUnion().setSourceA(function).setSourceB(leafCap);
|
|
||||||
|
|
||||||
/*branches = Math.round((size - 15) * 0.1F);
|
|
||||||
if (branches > 0) {
|
|
||||||
SDF pie = new SDFPie().setRadius(50).setAngle((float) Math.toRadians(135)).setBlock(leaves);
|
|
||||||
smallLeaf = new SDFIntersection().setSourceA(leafCap).setSourceB(pie);
|
|
||||||
|
|
||||||
for (int i = 0; i < branches; i++) {
|
|
||||||
float indexF = MHelper.randRange(3F, 5F, random);
|
|
||||||
Vector3f vec = SplineHelper.getPos(spline, indexF);
|
|
||||||
float scale = MHelper.randRange(0.3F, 0.6F, random);
|
|
||||||
SDF leaf = new SDFScale().setScale(scale).setSource(smallLeaf);
|
|
||||||
leaf = new SDFRotation().setRotation(Vector3f.POSITIVE_Y, MHelper.randRange(0, MHelper.PI2, random)).setSource(leaf);
|
|
||||||
leaf = new SDFTranslate().setTranslate(vec.getX(), vec.getY(), vec.getZ()).setSource(leaf);
|
|
||||||
function = new SDFUnion().setSourceA(function).setSourceB(leaf);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
function.setReplaceFunction(REPLACE);
|
function.setReplaceFunction(REPLACE);
|
||||||
function.setPostProcess(POST);
|
function.setPostProcess(POST);
|
||||||
function.fillRecursiveIgnore(world, pos, (state) -> {
|
function.fillRecursiveIgnore(world, pos, IGNORE);
|
||||||
return EndBlocks.DRAGON_TREE.isTreeLog(state) || state.isOf(EndBlocks.DRAGON_TREE_LEAVES);
|
|
||||||
});
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void makeCap(StructureWorldAccess world, BlockPos pos, float radius, Random random, OpenSimplexNoise noise) {
|
||||||
|
int count = (int) radius;
|
||||||
|
int offset = (int) (BRANCH.get(BRANCH.size() - 1).getY() * radius);
|
||||||
|
for (int i = 0; i < count; i++) {
|
||||||
|
float angle = (float) i / (float) count * MHelper.PI2;
|
||||||
|
float scale = radius * MHelper.randRange(0.85F, 1.15F, random);
|
||||||
|
|
||||||
|
List<Vector3f> branch = SplineHelper.copySpline(BRANCH);
|
||||||
|
SplineHelper.rotateSpline(branch, angle);
|
||||||
|
SplineHelper.scale(branch, scale);
|
||||||
|
SplineHelper.fillSpline(branch, world, EndBlocks.DRAGON_TREE.bark.getDefaultState(), pos, REPLACE);
|
||||||
|
|
||||||
|
branch = SplineHelper.copySpline(SIDE1);
|
||||||
|
SplineHelper.rotateSpline(branch, angle);
|
||||||
|
SplineHelper.scale(branch, scale);
|
||||||
|
SplineHelper.fillSpline(branch, world, EndBlocks.DRAGON_TREE.bark.getDefaultState(), pos, REPLACE);
|
||||||
|
|
||||||
|
branch = SplineHelper.copySpline(SIDE2);
|
||||||
|
SplineHelper.rotateSpline(branch, angle);
|
||||||
|
SplineHelper.scale(branch, scale);
|
||||||
|
SplineHelper.fillSpline(branch, world, EndBlocks.DRAGON_TREE.bark.getDefaultState(), pos, REPLACE);
|
||||||
|
}
|
||||||
|
leavesBall(world, pos.up(offset), radius * 1.15F + 2, random, noise);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void makeRoots(StructureWorldAccess world, BlockPos pos, float radius, Random random) {
|
||||||
|
int count = (int) (radius * 1.5F);
|
||||||
|
for (int i = 0; i < count; i++) {
|
||||||
|
float angle = (float) i / (float) count * MHelper.PI2;
|
||||||
|
float scale = radius * MHelper.randRange(0.85F, 1.15F, random);
|
||||||
|
|
||||||
|
List<Vector3f> branch = SplineHelper.copySpline(ROOT);
|
||||||
|
SplineHelper.rotateSpline(branch, angle);
|
||||||
|
SplineHelper.scale(branch, scale);
|
||||||
|
SplineHelper.fillSpline(branch, world, EndBlocks.DRAGON_TREE.bark.getDefaultState(), pos, REPLACE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void leavesBall(StructureWorldAccess world, BlockPos pos, float radius, Random random, OpenSimplexNoise noise) {
|
||||||
|
SDF sphere = new SDFSphere().setRadius(radius).setBlock(EndBlocks.DRAGON_TREE_LEAVES.getDefaultState().with(LeavesBlock.DISTANCE, 1));
|
||||||
|
SDF sub = new SDFScale().setScale(5).setSource(sphere);
|
||||||
|
sub = new SDFTranslate().setTranslate(0, -radius * 5, 0).setSource(sub);
|
||||||
|
sphere = new SDFSubtraction().setSourceA(sphere).setSourceB(sub);
|
||||||
|
sphere = new SDFScale3D().setScale(1, 0.5F, 1).setSource(sphere);
|
||||||
|
sphere = new SDFDisplacement().setFunction((vec) -> { return (float) noise.eval(vec.getX() * 0.2, vec.getY() * 0.2, vec.getZ() * 0.2) * 1.5F; }).setSource(sphere);
|
||||||
|
sphere = new SDFDisplacement().setFunction((vec) -> { return random.nextFloat() * 3F - 1.5F; }).setSource(sphere);
|
||||||
|
sphere.fillRecursiveIgnore(world, pos, IGNORE);
|
||||||
|
|
||||||
|
if (radius > 5) {
|
||||||
|
int count = (int) (radius * 2.5F);
|
||||||
|
for (int i = 0; i < count; i++) {
|
||||||
|
BlockPos p = pos.add(random.nextGaussian() * 1, random.nextGaussian() * 1, random.nextGaussian() * 1);
|
||||||
|
boolean place = true;
|
||||||
|
for (Direction d: Direction.values()) {
|
||||||
|
BlockState state = world.getBlockState(p.offset(d));
|
||||||
|
if (!EndBlocks.DRAGON_TREE.isTreeLog(state) && !state.isOf(EndBlocks.DRAGON_TREE_LEAVES)) {
|
||||||
|
place = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (place) {
|
||||||
|
BlocksHelper.setWithoutUpdate(world, p, EndBlocks.DRAGON_TREE.bark);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.DRAGON_TREE.bark);
|
||||||
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
REPLACE = (state) -> {
|
REPLACE = (state) -> {
|
||||||
if (state.isIn(EndTags.END_GROUND)) {
|
if (state.isIn(EndTags.END_GROUND)) {
|
||||||
|
@ -141,11 +154,42 @@ public class DragonTreeFeature extends DefaultFeature {
|
||||||
return state.getMaterial().isReplaceable();
|
return state.getMaterial().isReplaceable();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
IGNORE = (state) -> {
|
||||||
|
return EndBlocks.DRAGON_TREE.isTreeLog(state);
|
||||||
|
};
|
||||||
|
|
||||||
POST = (info) -> {
|
POST = (info) -> {
|
||||||
if (EndBlocks.DRAGON_TREE.isTreeLog(info.getStateUp()) && EndBlocks.DRAGON_TREE.isTreeLog(info.getStateDown())) {
|
if (EndBlocks.DRAGON_TREE.isTreeLog(info.getStateUp()) && EndBlocks.DRAGON_TREE.isTreeLog(info.getStateDown())) {
|
||||||
return EndBlocks.DRAGON_TREE.log.getDefaultState();
|
return EndBlocks.DRAGON_TREE.log.getDefaultState();
|
||||||
}
|
}
|
||||||
return info.getState();
|
return info.getState();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
BRANCH = Lists.newArrayList(new Vector3f(0, 0, 0),
|
||||||
|
new Vector3f(0.1F, 0.3F, 0),
|
||||||
|
new Vector3f(0.4F, 0.6F, 0),
|
||||||
|
new Vector3f(0.8F, 0.8F, 0),
|
||||||
|
new Vector3f(1, 1, 0));
|
||||||
|
SIDE1 = Lists.newArrayList(new Vector3f(0.4F, 0.6F, 0),
|
||||||
|
new Vector3f(0.8F, 0.8F, 0),
|
||||||
|
new Vector3f(1, 1, 0));
|
||||||
|
SIDE2 = SplineHelper.copySpline(SIDE1);
|
||||||
|
|
||||||
|
Vector3f offset1 = new Vector3f(-0.4F, -0.6F, 0);
|
||||||
|
Vector3f offset2 = new Vector3f(0.4F, 0.6F, 0);
|
||||||
|
|
||||||
|
SplineHelper.offset(SIDE1, offset1);
|
||||||
|
SplineHelper.offset(SIDE2, offset1);
|
||||||
|
SplineHelper.rotateSpline(SIDE1, 0.5F);
|
||||||
|
SplineHelper.rotateSpline(SIDE2, -0.5F);
|
||||||
|
SplineHelper.offset(SIDE1, offset2);
|
||||||
|
SplineHelper.offset(SIDE2, offset2);
|
||||||
|
|
||||||
|
ROOT = Lists.newArrayList(new Vector3f(0F, 1F, 0),
|
||||||
|
new Vector3f(0.1F, 0.7F, 0),
|
||||||
|
new Vector3f(0.3F, 0.3F, 0),
|
||||||
|
new Vector3f(0.7F, 0.05F, 0),
|
||||||
|
new Vector3f(0.8F, -0.2F, 0));
|
||||||
|
SplineHelper.offset(ROOT, new Vector3f(0, -0.45F, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"axis=x": [
|
||||||
|
{ "model": "betterend:block/dragon_tree_bark", "x": 90, "y": 90 },
|
||||||
|
{ "model": "betterend:block/dragon_tree_bark_2", "x": 90, "y": 90 },
|
||||||
|
{ "model": "betterend:block/dragon_tree_bark_3", "x": 90, "y": 90 },
|
||||||
|
{ "model": "betterend:block/dragon_tree_bark_4", "x": 90, "y": 90 }
|
||||||
|
],
|
||||||
|
"axis=y": [
|
||||||
|
{ "model": "betterend:block/dragon_tree_bark" },
|
||||||
|
{ "model": "betterend:block/dragon_tree_bark_2" },
|
||||||
|
{ "model": "betterend:block/dragon_tree_bark_3" },
|
||||||
|
{ "model": "betterend:block/dragon_tree_bark_4" }
|
||||||
|
],
|
||||||
|
"axis=z": [
|
||||||
|
{ "model": "betterend:block/dragon_tree_bark", "x": 90 },
|
||||||
|
{ "model": "betterend:block/dragon_tree_bark_2", "x": 90 },
|
||||||
|
{ "model": "betterend:block/dragon_tree_bark_3", "x": 90 },
|
||||||
|
{ "model": "betterend:block/dragon_tree_bark_4", "x": 90 }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"axis=x": [
|
||||||
|
{ "model": "betterend:block/dragon_tree_log", "x": 90, "y": 90 },
|
||||||
|
{ "model": "betterend:block/dragon_tree_log_2", "x": 90, "y": 90 },
|
||||||
|
{ "model": "betterend:block/dragon_tree_log_3", "x": 90, "y": 90 },
|
||||||
|
{ "model": "betterend:block/dragon_tree_log_4", "x": 90, "y": 90 }
|
||||||
|
],
|
||||||
|
"axis=y": [
|
||||||
|
{ "model": "betterend:block/dragon_tree_log" },
|
||||||
|
{ "model": "betterend:block/dragon_tree_log_2" },
|
||||||
|
{ "model": "betterend:block/dragon_tree_log_3" },
|
||||||
|
{ "model": "betterend:block/dragon_tree_log_4" }
|
||||||
|
],
|
||||||
|
"axis=z": [
|
||||||
|
{ "model": "betterend:block/dragon_tree_log", "x": 90 },
|
||||||
|
{ "model": "betterend:block/dragon_tree_log_2", "x": 90 },
|
||||||
|
{ "model": "betterend:block/dragon_tree_log_3", "x": 90 },
|
||||||
|
{ "model": "betterend:block/dragon_tree_log_4", "x": 90 }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "betterend:block/dragon_tree_log_side"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "betterend:block/dragon_tree_log_side_2"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "betterend:block/dragon_tree_log_side_3"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "betterend:block/dragon_tree_log_side_4"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube",
|
||||||
|
"textures": {
|
||||||
|
"down": "betterend:block/dragon_tree_log_top",
|
||||||
|
"east": "betterend:block/dragon_tree_log_side",
|
||||||
|
"north": "betterend:block/dragon_tree_log_side",
|
||||||
|
"particle": "betterend:block/dragon_tree_log_side",
|
||||||
|
"south": "betterend:block/dragon_tree_log_side",
|
||||||
|
"up": "betterend:block/dragon_tree_log_top",
|
||||||
|
"west": "betterend:block/dragon_tree_log_side"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube",
|
||||||
|
"textures": {
|
||||||
|
"down": "betterend:block/dragon_tree_log_top",
|
||||||
|
"east": "betterend:block/dragon_tree_log_side_2",
|
||||||
|
"north": "betterend:block/dragon_tree_log_side_2",
|
||||||
|
"particle": "betterend:block/dragon_tree_log_side_2",
|
||||||
|
"south": "betterend:block/dragon_tree_log_side_2",
|
||||||
|
"up": "betterend:block/dragon_tree_log_top",
|
||||||
|
"west": "betterend:block/dragon_tree_log_side_2"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube",
|
||||||
|
"textures": {
|
||||||
|
"down": "betterend:block/dragon_tree_log_top",
|
||||||
|
"east": "betterend:block/dragon_tree_log_side_3",
|
||||||
|
"north": "betterend:block/dragon_tree_log_side_3",
|
||||||
|
"particle": "betterend:block/dragon_tree_log_side_3",
|
||||||
|
"south": "betterend:block/dragon_tree_log_side_3",
|
||||||
|
"up": "betterend:block/dragon_tree_log_top",
|
||||||
|
"west": "betterend:block/dragon_tree_log_side_3"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube",
|
||||||
|
"textures": {
|
||||||
|
"down": "betterend:block/dragon_tree_log_top",
|
||||||
|
"east": "betterend:block/dragon_tree_log_side_4",
|
||||||
|
"north": "betterend:block/dragon_tree_log_side_4",
|
||||||
|
"particle": "betterend:block/dragon_tree_log_side_4",
|
||||||
|
"south": "betterend:block/dragon_tree_log_side_4",
|
||||||
|
"up": "betterend:block/dragon_tree_log_top",
|
||||||
|
"west": "betterend:block/dragon_tree_log_side_4"
|
||||||
|
}
|
||||||
|
}
|
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.3 KiB |