Chorus models & fixes

This commit is contained in:
paulevsGitch 2020-10-15 14:18:28 +03:00
parent 9731063f95
commit 53ad813110
13 changed files with 513 additions and 210 deletions

View file

@ -1,18 +1,34 @@
package ru.betterend.mixin.common; package ru.betterend.mixin.common;
import java.util.Random;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.ChorusFlowerBlock; import net.minecraft.block.ChorusFlowerBlock;
import net.minecraft.block.ChorusPlantBlock;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.World;
import net.minecraft.world.WorldView; import net.minecraft.world.WorldView;
import ru.betterend.registry.BlockRegistry; import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.BlockTagRegistry;
import ru.betterend.util.BlocksHelper;
@Mixin(ChorusFlowerBlock.class) @Mixin(ChorusFlowerBlock.class)
public class ChorusFlowerBlockMixin { public class ChorusFlowerBlockMixin {
@Shadow
@Final
private ChorusPlantBlock plantBlock;
@Inject(method = "canPlaceAt", at = @At("HEAD"), cancellable = true) @Inject(method = "canPlaceAt", at = @At("HEAD"), cancellable = true)
private void canPlace(BlockState state, WorldView world, BlockPos pos, CallbackInfoReturnable<Boolean> info) { private void canPlace(BlockState state, WorldView world, BlockPos pos, CallbackInfoReturnable<Boolean> info) {
if (world.getBlockState(pos.down()).isOf(BlockRegistry.CHORUS_NYLIUM)) { if (world.getBlockState(pos.down()).isOf(BlockRegistry.CHORUS_NYLIUM)) {
@ -20,4 +36,28 @@ public class ChorusFlowerBlockMixin {
info.cancel(); info.cancel();
} }
} }
@Inject(method = "randomTick", at = @At("HEAD"), cancellable = true)
private void onTick(BlockState state, ServerWorld world, BlockPos pos, Random random, CallbackInfo info) {
if (world.getBlockState(pos.down()).isIn(BlockTagRegistry.END_GROUND)) {
BlockPos up = pos.up();
if (world.isAir(up) && up.getY() < 256) {
int i = state.get(ChorusFlowerBlock.AGE);
if (i < 5) {
this.grow(world, up, i + 1);
BlocksHelper.setWithoutUpdate(world, pos, plantBlock.getDefaultState().with(ChorusPlantBlock.UP, true).with(ChorusPlantBlock.DOWN, true).with(BlocksHelper.ROOTS, true));
info.cancel();
}
}
}
}
@Shadow
private static boolean isSurroundedByAir(WorldView world, BlockPos pos, @Nullable Direction exceptDirection) { return false; }
@Shadow
private void grow(World world, BlockPos pos, int age) {}
@Shadow
private void die(World world, BlockPos pos) {}
} }

View file

@ -18,14 +18,13 @@ import net.minecraft.world.BlockView;
import net.minecraft.world.WorldView; import net.minecraft.world.WorldView;
import ru.betterend.registry.BlockRegistry; import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.BlockTagRegistry; import ru.betterend.registry.BlockTagRegistry;
import ru.betterend.util.BlocksHelper;
@Mixin(ChorusPlantBlock.class) @Mixin(ChorusPlantBlock.class)
public class ChorusPlantBlockMixin { public class ChorusPlantBlockMixin {
private static final BooleanProperty ROOTS = BooleanProperty.of("roots");
@Inject(method = "appendProperties", at = @At("TAIL")) @Inject(method = "appendProperties", at = @At("TAIL"))
private void addProperties(StateManager.Builder<Block, BlockState> builder, CallbackInfo info) { private void addProperties(StateManager.Builder<Block, BlockState> builder, CallbackInfo info) {
builder.add(ROOTS); builder.add(BlocksHelper.ROOTS);
} }
@Inject(method = "canPlaceAt", at = @At("HEAD"), cancellable = true) @Inject(method = "canPlaceAt", at = @At("HEAD"), cancellable = true)
@ -41,10 +40,10 @@ public class ChorusPlantBlockMixin {
BlockState plant = info.getReturnValue(); BlockState plant = info.getReturnValue();
if (plant.isOf(Blocks.CHORUS_PLANT)) { if (plant.isOf(Blocks.CHORUS_PLANT)) {
if (!plant.get(Properties.DOWN) && world.getBlockState(pos.down()).isIn(BlockTagRegistry.END_GROUND)) { if (!plant.get(Properties.DOWN) && world.getBlockState(pos.down()).isIn(BlockTagRegistry.END_GROUND)) {
info.setReturnValue(plant.with(Properties.DOWN, true).with(ROOTS, true)); info.setReturnValue(plant.with(Properties.DOWN, true).with(BlocksHelper.ROOTS, true));
} }
else { else {
info.setReturnValue(plant.with(ROOTS, false)); info.setReturnValue(plant.with(BlocksHelper.ROOTS, false));
} }
} }
} }

View file

@ -1,205 +1,208 @@
package ru.betterend.util; package ru.betterend.util;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.Random; import java.util.Random;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks; import net.minecraft.block.Blocks;
import net.minecraft.block.FallingBlock; import net.minecraft.block.FallingBlock;
import net.minecraft.state.property.Property; import net.minecraft.state.property.BooleanProperty;
import net.minecraft.tag.BlockTags; import net.minecraft.state.property.Property;
import net.minecraft.util.BlockMirror; import net.minecraft.tag.BlockTags;
import net.minecraft.util.BlockRotation; import net.minecraft.util.BlockMirror;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.BlockRotation;
import net.minecraft.util.math.BlockPos.Mutable; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.BlockPos.Mutable;
import net.minecraft.util.math.Vec3i; import net.minecraft.util.math.Direction;
import net.minecraft.world.WorldAccess; import net.minecraft.util.math.Vec3i;
import ru.betterend.blocks.BlockBlueVine; import net.minecraft.world.WorldAccess;
import ru.betterend.blocks.basis.BlockDoublePlant; import ru.betterend.blocks.BlockBlueVine;
import ru.betterend.blocks.basis.BlockGlowingFur; import ru.betterend.blocks.basis.BlockDoublePlant;
import ru.betterend.registry.BlockTagRegistry; import ru.betterend.blocks.basis.BlockGlowingFur;
import ru.betterend.registry.BlockTagRegistry;
public class BlocksHelper {
public static final int FLAG_UPDATE_BLOCK = 1; public class BlocksHelper {
public static final int FLAG_SEND_CLIENT_CHANGES = 2; public static final BooleanProperty ROOTS = BooleanProperty.of("roots");
public static final int FLAG_NO_RERENDER = 4;
public static final int FORSE_RERENDER = 8; public static final int FLAG_UPDATE_BLOCK = 1;
public static final int FLAG_IGNORE_OBSERVERS = 16; public static final int FLAG_SEND_CLIENT_CHANGES = 2;
public static final int FLAG_NO_RERENDER = 4;
public static final int SET_SILENT = FLAG_UPDATE_BLOCK | FLAG_IGNORE_OBSERVERS | FLAG_SEND_CLIENT_CHANGES; public static final int FORSE_RERENDER = 8;
public static final Direction[] HORIZONTAL = makeHorizontal(); public static final int FLAG_IGNORE_OBSERVERS = 16;
private static final Mutable POS = new Mutable(); public static final int SET_SILENT = FLAG_UPDATE_BLOCK | FLAG_IGNORE_OBSERVERS | FLAG_SEND_CLIENT_CHANGES;
protected static final BlockState AIR = Blocks.AIR.getDefaultState(); public static final Direction[] HORIZONTAL = makeHorizontal();
private static final Vec3i[] OFFSETS = new Vec3i[] { private static final Mutable POS = new Mutable();
new Vec3i(-1, -1, -1), new Vec3i(-1, -1, 0), new Vec3i(-1, -1, 1), protected static final BlockState AIR = Blocks.AIR.getDefaultState();
new Vec3i(-1, 0, -1), new Vec3i(-1, 0, 0), new Vec3i(-1, 0, 1),
new Vec3i(-1, 1, -1), new Vec3i(-1, 1, 0), new Vec3i(-1, 1, 1), private static final Vec3i[] OFFSETS = new Vec3i[] {
new Vec3i(-1, -1, -1), new Vec3i(-1, -1, 0), new Vec3i(-1, -1, 1),
new Vec3i(0, -1, -1), new Vec3i(0, -1, 0), new Vec3i(0, -1, 1), new Vec3i(-1, 0, -1), new Vec3i(-1, 0, 0), new Vec3i(-1, 0, 1),
new Vec3i(0, 0, -1), new Vec3i(0, 0, 0), new Vec3i(0, 0, 1), new Vec3i(-1, 1, -1), new Vec3i(-1, 1, 0), new Vec3i(-1, 1, 1),
new Vec3i(0, 1, -1), new Vec3i(0, 1, 0), new Vec3i(0, 1, 1),
new Vec3i(0, -1, -1), new Vec3i(0, -1, 0), new Vec3i(0, -1, 1),
new Vec3i(1, -1, -1), new Vec3i(1, -1, 0), new Vec3i(1, -1, 1), new Vec3i(0, 0, -1), new Vec3i(0, 0, 0), new Vec3i(0, 0, 1),
new Vec3i(1, 0, -1), new Vec3i(1, 0, 0), new Vec3i(1, 0, 1), new Vec3i(0, 1, -1), new Vec3i(0, 1, 0), new Vec3i(0, 1, 1),
new Vec3i(1, 1, -1), new Vec3i(1, 1, 0), new Vec3i(1, 1, 1)
}; new Vec3i(1, -1, -1), new Vec3i(1, -1, 0), new Vec3i(1, -1, 1),
new Vec3i(1, 0, -1), new Vec3i(1, 0, 0), new Vec3i(1, 0, 1),
public static void setWithoutUpdate(WorldAccess world, BlockPos pos, BlockState state) { new Vec3i(1, 1, -1), new Vec3i(1, 1, 0), new Vec3i(1, 1, 1)
world.setBlockState(pos, state, SET_SILENT); };
}
public static void setWithoutUpdate(WorldAccess world, BlockPos pos, BlockState state) {
public static void setWithoutUpdate(WorldAccess world, BlockPos pos, Block block) { world.setBlockState(pos, state, SET_SILENT);
world.setBlockState(pos, block.getDefaultState(), SET_SILENT); }
}
public static void setWithoutUpdate(WorldAccess world, BlockPos pos, Block block) {
public static int upRay(WorldAccess world, BlockPos pos, int maxDist) { world.setBlockState(pos, block.getDefaultState(), SET_SILENT);
int length = 0; }
for (int j = 1; j < maxDist && (world.isAir(pos.up(j))); j++)
length++; public static int upRay(WorldAccess world, BlockPos pos, int maxDist) {
return length; int length = 0;
} for (int j = 1; j < maxDist && (world.isAir(pos.up(j))); j++)
length++;
public static int downRay(WorldAccess world, BlockPos pos, int maxDist) { return length;
int length = 0; }
for (int j = 1; j < maxDist && (world.isAir(pos.down(j))); j++)
length++; public static int downRay(WorldAccess world, BlockPos pos, int maxDist) {
return length; int length = 0;
} for (int j = 1; j < maxDist && (world.isAir(pos.down(j))); j++)
length++;
public static int downRayRep(WorldAccess world, BlockPos pos, int maxDist) { return length;
POS.set(pos); }
for (int j = 1; j < maxDist && (world.getBlockState(POS)).getMaterial().isReplaceable(); j++)
{ public static int downRayRep(WorldAccess world, BlockPos pos, int maxDist) {
POS.setY(POS.getY() - 1); POS.set(pos);
} for (int j = 1; j < maxDist && (world.getBlockState(POS)).getMaterial().isReplaceable(); j++)
return pos.getY() - POS.getY(); {
} POS.setY(POS.getY() - 1);
}
public static BlockState rotateHorizontal(BlockState state, BlockRotation rotation, Property<Direction> facing) { return pos.getY() - POS.getY();
return (BlockState) state.with(facing, rotation.rotate((Direction) state.get(facing))); }
}
public static BlockState rotateHorizontal(BlockState state, BlockRotation rotation, Property<Direction> facing) {
public static BlockState mirrorHorizontal(BlockState state, BlockMirror mirror, Property<Direction> facing) { return (BlockState) state.with(facing, rotation.rotate((Direction) state.get(facing)));
return state.rotate(mirror.getRotation((Direction) state.get(facing))); }
}
public static BlockState mirrorHorizontal(BlockState state, BlockMirror mirror, Property<Direction> facing) {
public static int getLengthDown(WorldAccess world, BlockPos pos, Block block) { return state.rotate(mirror.getRotation((Direction) state.get(facing)));
int count = 1; }
while (world.getBlockState(pos.down(count)).getBlock() == block)
count++; public static int getLengthDown(WorldAccess world, BlockPos pos, Block block) {
return count; int count = 1;
} while (world.getBlockState(pos.down(count)).getBlock() == block)
count++;
public static void cover(WorldAccess world, BlockPos center, Block ground, BlockState cover, int radius, Random random) { return count;
HashSet<BlockPos> points = new HashSet<BlockPos>(); }
HashSet<BlockPos> points2 = new HashSet<BlockPos>();
if (world.getBlockState(center).getBlock() == ground) { public static void cover(WorldAccess world, BlockPos center, Block ground, BlockState cover, int radius, Random random) {
points.add(center); HashSet<BlockPos> points = new HashSet<BlockPos>();
points2.add(center); HashSet<BlockPos> points2 = new HashSet<BlockPos>();
for (int i = 0; i < radius; i++) { if (world.getBlockState(center).getBlock() == ground) {
Iterator<BlockPos> iterator = points.iterator(); points.add(center);
while (iterator.hasNext()) { points2.add(center);
BlockPos pos = iterator.next(); for (int i = 0; i < radius; i++) {
for (Vec3i offset : OFFSETS) { Iterator<BlockPos> iterator = points.iterator();
if (random.nextBoolean()) { while (iterator.hasNext()) {
BlockPos pos2 = pos.add(offset); BlockPos pos = iterator.next();
if (random.nextBoolean() && world.getBlockState(pos2).getBlock() == ground for (Vec3i offset : OFFSETS) {
&& !points.contains(pos2)) if (random.nextBoolean()) {
points2.add(pos2); BlockPos pos2 = pos.add(offset);
} if (random.nextBoolean() && world.getBlockState(pos2).getBlock() == ground
} && !points.contains(pos2))
} points2.add(pos2);
points.addAll(points2); }
points2.clear(); }
} }
Iterator<BlockPos> iterator = points.iterator(); points.addAll(points2);
while (iterator.hasNext()) { points2.clear();
BlockPos pos = iterator.next(); }
BlocksHelper.setWithoutUpdate(world, pos, cover); Iterator<BlockPos> iterator = points.iterator();
} while (iterator.hasNext()) {
} BlockPos pos = iterator.next();
} BlocksHelper.setWithoutUpdate(world, pos, cover);
}
public static void fixBlocks(WorldAccess world, BlockPos start, BlockPos end) { }
BlockState state; }
for (int x = start.getX(); x <= end.getX(); x++) {
POS.setX(x); public static void fixBlocks(WorldAccess world, BlockPos start, BlockPos end) {
for (int z = start.getZ(); z <= end.getZ(); z++) { BlockState state;
POS.setZ(z); for (int x = start.getX(); x <= end.getX(); x++) {
for (int y = start.getY(); y <= end.getY(); y++) { POS.setX(x);
POS.setY(y); for (int z = start.getZ(); z <= end.getZ(); z++) {
state = world.getBlockState(POS); POS.setZ(z);
// Falling blocks for (int y = start.getY(); y <= end.getY(); y++) {
if (state.getBlock() instanceof FallingBlock) { POS.setY(y);
BlockState falling = state; state = world.getBlockState(POS);
// Falling blocks
POS.setY(POS.getY() - 1); if (state.getBlock() instanceof FallingBlock) {
state = world.getBlockState(POS); BlockState falling = state;
int ray = downRayRep(world, POS.toImmutable(), 64); POS.setY(POS.getY() - 1);
if (ray > 32) { state = world.getBlockState(POS);
BlocksHelper.setWithoutUpdate(world, POS, Blocks.END_STONE.getDefaultState());
if (world.getRandom().nextBoolean()) { int ray = downRayRep(world, POS.toImmutable(), 64);
POS.setY(POS.getY() - 1); if (ray > 32) {
state = world.getBlockState(POS); BlocksHelper.setWithoutUpdate(world, POS, Blocks.END_STONE.getDefaultState());
BlocksHelper.setWithoutUpdate(world, POS, Blocks.END_STONE.getDefaultState()); if (world.getRandom().nextBoolean()) {
} POS.setY(POS.getY() - 1);
} state = world.getBlockState(POS);
else { BlocksHelper.setWithoutUpdate(world, POS, Blocks.END_STONE.getDefaultState());
POS.setY(y); }
BlocksHelper.setWithoutUpdate(world, POS, AIR); }
else {
POS.setY(y - ray); POS.setY(y);
BlocksHelper.setWithoutUpdate(world, POS, falling); BlocksHelper.setWithoutUpdate(world, POS, AIR);
}
} POS.setY(y - ray);
// Blocks without support BlocksHelper.setWithoutUpdate(world, POS, falling);
else if (!state.canPlaceAt(world, POS)) { }
// Blue Vine }
if (state.getBlock() instanceof BlockBlueVine) { // Blocks without support
while (!state.canPlaceAt(world, POS)) { else if (!state.canPlaceAt(world, POS)) {
BlocksHelper.setWithoutUpdate(world, POS, AIR); // Blue Vine
for (Direction dir : HORIZONTAL) { if (state.getBlock() instanceof BlockBlueVine) {
BlockPos p = POS.offset(dir).up(); while (!state.canPlaceAt(world, POS)) {
state = world.getBlockState(p); BlocksHelper.setWithoutUpdate(world, POS, AIR);
if (state.getBlock() instanceof BlockGlowingFur) { for (Direction dir : HORIZONTAL) {
BlocksHelper.setWithoutUpdate(world, p, AIR); BlockPos p = POS.offset(dir).up();
} state = world.getBlockState(p);
} if (state.getBlock() instanceof BlockGlowingFur) {
POS.setY(POS.getY() + 1); BlocksHelper.setWithoutUpdate(world, p, AIR);
state = world.getBlockState(POS); }
} }
} POS.setY(POS.getY() + 1);
// Double plants state = world.getBlockState(POS);
if (state.getBlock() instanceof BlockDoublePlant) { }
BlocksHelper.setWithoutUpdate(world, POS, AIR); }
POS.setY(POS.getY() + 1); // Double plants
BlocksHelper.setWithoutUpdate(world, POS, AIR); if (state.getBlock() instanceof BlockDoublePlant) {
} BlocksHelper.setWithoutUpdate(world, POS, AIR);
// Other blocks POS.setY(POS.getY() + 1);
else { BlocksHelper.setWithoutUpdate(world, POS, AIR);
BlocksHelper.setWithoutUpdate(world, POS, AIR); }
} // Other blocks
} else {
} BlocksHelper.setWithoutUpdate(world, POS, AIR);
} }
} }
} }
}
public static boolean isEndNylium(Block block) { }
return block.isIn(BlockTags.NYLIUM) && block.isIn(BlockTagRegistry.END_GROUND); }
}
public static boolean isEndNylium(Block block) {
public static boolean isEndNylium(BlockState state) { return block.isIn(BlockTags.NYLIUM) && block.isIn(BlockTagRegistry.END_GROUND);
return isEndNylium(state.getBlock()); }
}
public static boolean isEndNylium(BlockState state) {
public static Direction[] makeHorizontal() { return isEndNylium(state.getBlock());
return new Direction[] { Direction.NORTH, Direction.SOUTH, Direction.EAST, Direction.WEST }; }
}
} public static Direction[] makeHorizontal() {
return new Direction[] { Direction.NORTH, Direction.SOUTH, Direction.EAST, Direction.WEST };
}
}

View file

@ -0,0 +1,50 @@
{
"__comment": "Designed by Paulevs with Cubik Studio - https://cubik.studio",
"textures": {
"particle": "betterend:block/chorus_plant_flower_side",
"side": "betterend:block/chorus_plant_flower_side",
"top": "betterend:block/chorus_plant_flower_top",
"bottom": "betterend:block/chorus_plant_flower_bottom"
},
"elements": [
{
"__comment": "Box1",
"from": [ 0, 2, 2 ],
"to": [ 16, 14, 14 ],
"faces": {
"down": { "uv": [ 0, 2, 16, 14 ], "texture": "#bottom" },
"up": { "uv": [ 0, 2, 16, 14 ], "texture": "#top" },
"north": { "uv": [ 0, 2, 16, 14 ], "texture": "#side" },
"south": { "uv": [ 0, 2, 16, 14 ], "texture": "#side" },
"west": { "uv": [ 2, 2, 14, 14 ], "texture": "#side" },
"east": { "uv": [ 2, 2, 14, 14 ], "texture": "#side" }
}
},
{
"__comment": "Box1",
"from": [ 2, 2, 0 ],
"to": [ 14, 14, 16 ],
"faces": {
"down": { "uv": [ 2, 0, 14, 16 ], "texture": "#bottom" },
"up": { "uv": [ 2, 0, 14, 16 ], "texture": "#top" },
"north": { "uv": [ 2, 2, 14, 14 ], "texture": "#side" },
"south": { "uv": [ 2, 2, 14, 14 ], "texture": "#side" },
"west": { "uv": [ 0, 2, 16, 14 ], "texture": "#side" },
"east": { "uv": [ 0, 2, 16, 14 ], "texture": "#side" }
}
},
{
"__comment": "Box1",
"from": [ 2, 0, 2 ],
"to": [ 14, 16, 14 ],
"faces": {
"down": { "uv": [ 2, 2, 14, 14 ], "texture": "#bottom" },
"up": { "uv": [ 2, 2, 14, 14 ], "texture": "#top" },
"north": { "uv": [ 2, 0, 14, 16 ], "texture": "#side" },
"south": { "uv": [ 2, 0, 14, 16 ], "texture": "#side" },
"west": { "uv": [ 2, 0, 14, 16 ], "texture": "#side" },
"east": { "uv": [ 2, 0, 14, 16 ], "texture": "#side" }
}
}
]
}

View file

@ -0,0 +1,175 @@
{
"__comment": "Designed by Paulevs with Cubik Studio - https://cubik.studio",
"textures": {
"particle": "betterend:block/chorus_plant_flower_petal",
"texture": "betterend:block/chorus_plant_flower_petal",
"center": "betterend:block/chorus_plant_flower_center",
"texture1": "betterend:block/chorus_plant_flower_fur"
},
"elements": [
{
"__comment": "Box1",
"from": [ 4, 0, 4 ],
"to": [ 12, 2, 12 ],
"faces": {
"down": { "uv": [ 0, 8, 8, 16 ], "texture": "#center" },
"up": { "uv": [ 0, 0, 8, 8 ], "texture": "#center" },
"north": { "uv": [ 8, 14, 16, 16 ], "texture": "#center" },
"south": { "uv": [ 8, 14, 16, 16 ], "texture": "#center" },
"west": { "uv": [ 8, 14, 16, 16 ], "texture": "#center" },
"east": { "uv": [ 8, 14, 16, 16 ], "texture": "#center" }
}
},
{
"__comment": "PlaneY2",
"from": [ 4.5, 1.125, 16 ],
"to": [ 20.5, 1.126, 32 ],
"rotation": { "origin": [ 4.5, 1.125, 16 ], "axis": "y", "angle": 45 },
"shade": false,
"faces": {
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "rotation": 180 }
}
},
{
"__comment": "PlaneY2",
"from": [ 0, 1.25, 4.5 ],
"to": [ 16, 1.251, 20.5 ],
"rotation": { "origin": [ 0, 1.25, 4.5 ], "axis": "y", "angle": -45 },
"shade": false,
"faces": {
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "rotation": 180 }
}
},
{
"__comment": "PlaneY2",
"from": [ -4.5, 1.375, -16 ],
"to": [ 11.5, 1.376, 0 ],
"rotation": { "origin": [ 11.5, 1.375, 0 ], "axis": "y", "angle": 45 },
"shade": false,
"faces": {
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "rotation": 180 },
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" }
}
},
{
"__comment": "PlaneY2",
"from": [ 0, 1, -4.5 ],
"to": [ 16, 1.001, 11.5 ],
"rotation": { "origin": [ 16, 1, 11.5 ], "axis": "y", "angle": -45 },
"shade": false,
"faces": {
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "rotation": 180 },
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" }
}
},
{
"__comment": "PlaneX6",
"from": [ 11, 0.999, 0.5 ],
"to": [ 20, 0.9999999, 16.5 ],
"rotation": { "origin": [ 11, 1, 0.5 ], "axis": "z", "angle": 22.5 },
"shade": false,
"faces": {
"down": { "uv": [ 0, 7, 16, 16 ], "texture": "#texture", "rotation": 90 },
"up": { "uv": [ 16, 16, 0, 7 ], "texture": "#texture", "rotation": 270 }
}
},
{
"__comment": "PlaneX6",
"from": [ 19.25, 4.374, 0.5 ],
"to": [ 28.25, 4.375, 16.5 ],
"shade": false,
"faces": {
"down": { "uv": [ 0, 0, 16, 9 ], "texture": "#texture", "rotation": 90 },
"up": { "uv": [ 16, 9, 0, 0 ], "texture": "#texture", "rotation": 270 }
}
},
{
"__comment": "PlaneY11",
"from": [ -3, 0.999, 0 ],
"to": [ 5, 0.9999999, 16 ],
"rotation": { "origin": [ 5, 1, 0 ], "axis": "z", "angle": -22.5 },
"shade": false,
"faces": {
"down": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture", "rotation": 270 },
"up": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture", "rotation": 270 }
}
},
{
"__comment": "PlaneY11",
"from": [ -10.375, 3.999, 0 ],
"to": [ -2.375, 4, 16 ],
"shade": false,
"faces": {
"down": { "uv": [ 0, 0, 16, 8 ], "texture": "#texture", "rotation": 270 },
"up": { "uv": [ 0, 0, 16, 8 ], "texture": "#texture", "rotation": 270 }
}
},
{
"__comment": "PlaneY13",
"from": [ -0.5, 1, 11 ],
"to": [ 15.5, 1.001, 20 ],
"rotation": { "origin": [ -0.5, 1, 11 ], "axis": "x", "angle": -22.5 },
"shade": false,
"faces": {
"down": { "uv": [ 0, 7, 16, 16 ], "texture": "#texture" },
"up": { "uv": [ 0, 7, 16, 16 ], "texture": "#texture", "rotation": 180 }
}
},
{
"__comment": "PlaneY13",
"from": [ -0.5, 4.5, 19.25 ],
"to": [ 15.5, 4.501, 28.25 ],
"shade": false,
"faces": {
"down": { "uv": [ 0, 0, 16, 9 ], "texture": "#texture" },
"up": { "uv": [ 0, 0, 16, 9 ], "texture": "#texture", "rotation": 180 }
}
},
{
"__comment": "PlaneY18",
"from": [ 1, 0.999, -4 ],
"to": [ 17, 0.9999999, 5 ],
"rotation": { "origin": [ 1, 1, 5 ], "axis": "x", "angle": 22.5 },
"shade": false,
"faces": {
"down": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture", "rotation": 180 },
"up": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture" }
}
},
{
"__comment": "PlaneY18",
"from": [ 1, 4.374, -12.25 ],
"to": [ 17, 4.375, -3.25 ],
"rotation": { "origin": [ 1, 4.375, -3.25 ], "axis": "x", "angle": 0 },
"shade": false,
"faces": {
"down": { "uv": [ 0, 0, 16, 8 ], "texture": "#texture", "rotation": 180 },
"up": { "uv": [ 0, 0, 16, 8 ], "texture": "#texture" }
}
},
{
"__comment": "PlaneX20",
"from": [ 2, 1, 2 ],
"to": [ 2.001, 8, 18 ],
"rotation": { "origin": [ 2, 1, 2 ], "axis": "y", "angle": 45 },
"shade": false,
"faces": {
"west": { "uv": [ 0, 9, 16, 16 ], "texture": "#texture1" },
"east": { "uv": [ 0, 9, 16, 16 ], "texture": "#texture1" }
}
},
{
"__comment": "PlaneX20",
"from": [ 14, 1, 2 ],
"to": [ 14.001, 8, 18 ],
"rotation": { "origin": [ 14, 1, 2 ], "axis": "y", "angle": -45 },
"shade": false,
"faces": {
"west": { "uv": [ 0, 9, 16, 16 ], "texture": "#texture1" },
"east": { "uv": [ 0, 9, 16, 16 ], "texture": "#texture1" }
}
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -0,0 +1,22 @@
{
"variants": {
"age=0": {
"model": "betterend:block/chorus_plant_flower"
},
"age=1": {
"model": "betterend:block/chorus_plant_flower"
},
"age=2": {
"model": "betterend:block/chorus_plant_flower"
},
"age=3": {
"model": "betterend:block/chorus_plant_flower"
},
"age=4": {
"model": "betterend:block/chorus_plant_flower"
},
"age=5": {
"model": "betterend:block/chorus_plant_flower_open"
}
}
}

View file

@ -0,0 +1,14 @@
{
"defaultMap": {
"spriteMap": [
{
"sprite": "betterend:block/chorus_plant_flower_petal",
"material": "betterend:waving_floor"
},
{
"sprite": "betterend:block/chorus_plant_flower_fur",
"material": "betterend:waving_floor"
}
]
}
}