diff --git a/src/main/java/ru/betterend/blocks/BlockProperties.java b/src/main/java/ru/betterend/blocks/BlockProperties.java index 0e461467..331980be 100644 --- a/src/main/java/ru/betterend/blocks/BlockProperties.java +++ b/src/main/java/ru/betterend/blocks/BlockProperties.java @@ -18,6 +18,7 @@ public class BlockProperties { public static final BooleanProperty IS_FLOOR = BooleanProperty.of("is_floor"); public static final BooleanProperty NATURAL = BooleanProperty.of("natural"); public static final BooleanProperty ACTIVE = BooleanProperty.of("active"); + public static final BooleanProperty SMALL = BooleanProperty.of("small"); public static final IntProperty DESTRUCTION_LONG = IntProperty.of("destruction", 0, 8); public static final IntProperty DESTRUCTION = IntProperty.of("destruction", 0, 2); @@ -26,6 +27,7 @@ public class BlockProperties { public static final IntProperty COLOR = IntProperty.of("color", 0, 7); public static final IntProperty PORTAL = IntProperty.of("portal", 0, EndPortals.getCount()); public static final IntProperty SIZE = IntProperty.of("size", 0, 7); + public static final IntProperty AGE = IntProperty.of("age", 0, 3); public static enum TripleShape implements StringIdentifiable { TOP("top"), diff --git a/src/main/java/ru/betterend/blocks/CapsacisCapBlock.java b/src/main/java/ru/betterend/blocks/CapsacisCapBlock.java deleted file mode 100644 index a0ed6f46..00000000 --- a/src/main/java/ru/betterend/blocks/CapsacisCapBlock.java +++ /dev/null @@ -1,35 +0,0 @@ -package ru.betterend.blocks; - -import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.block.MaterialColor; -import net.minecraft.item.ItemPlacementContext; -import net.minecraft.state.StateManager; -import net.minecraft.state.property.IntProperty; -import ru.betterend.blocks.basis.BlockBase; -import ru.betterend.noise.OpenSimplexNoise; -import ru.betterend.util.MHelper; - -public class CapsacisCapBlock extends BlockBase { - private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(0); - public static final IntProperty COLOR = BlockProperties.COLOR; - - public CapsacisCapBlock() { - super(FabricBlockSettings.copyOf(Blocks.NETHER_WART_BLOCK).materialColor(MaterialColor.MAGENTA)); - } - - @Override - protected void appendProperties(StateManager.Builder stateManager) { - stateManager.add(COLOR); - } - - @Override - public BlockState getPlacementState(ItemPlacementContext ctx) { - double px = ctx.getBlockPos().getX() * 0.1; - double py = ctx.getBlockPos().getY() * 0.1; - double pz = ctx.getBlockPos().getZ() * 0.1; - return this.getDefaultState().with(COLOR, MHelper.floor(NOISE.eval(px, py, pz) * 3.5 + 4)); - } -} diff --git a/src/main/java/ru/betterend/blocks/CavePumpkinBlock.java b/src/main/java/ru/betterend/blocks/CavePumpkinBlock.java new file mode 100644 index 00000000..9cc43f34 --- /dev/null +++ b/src/main/java/ru/betterend/blocks/CavePumpkinBlock.java @@ -0,0 +1,65 @@ +package ru.betterend.blocks; + +import java.util.Collections; +import java.util.List; + +import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.ShapeContext; +import net.minecraft.item.ItemStack; +import net.minecraft.loot.context.LootContext; +import net.minecraft.state.StateManager; +import net.minecraft.state.property.BooleanProperty; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.shape.VoxelShape; +import net.minecraft.util.shape.VoxelShapes; +import net.minecraft.world.BlockView; +import ru.betterend.blocks.basis.BlockBaseNotFull; +import ru.betterend.client.render.ERenderLayer; +import ru.betterend.interfaces.IRenderTypeable; +import ru.betterend.registry.EndBlocks; + +public class CavePumpkinBlock extends BlockBaseNotFull implements IRenderTypeable { + public static final BooleanProperty SMALL = BlockProperties.SMALL; + private static final VoxelShape SHAPE_SMALL; + private static final VoxelShape SHAPE_BIG; + + public CavePumpkinBlock() { + super(FabricBlockSettings.copyOf(Blocks.PUMPKIN).luminance((state) -> state.get(SMALL) ? 10 : 15)); + setDefaultState(getDefaultState().with(SMALL, false)); + } + + @Override + protected void appendProperties(StateManager.Builder stateManager) { + stateManager.add(SMALL); + } + + @Override + public ERenderLayer getRenderLayer() { + return ERenderLayer.CUTOUT; + } + + @Override + public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { + return state.get(SMALL) ? SHAPE_SMALL : SHAPE_BIG; + } + + @Override + public List getDroppedStacks(BlockState state, LootContext.Builder builder) { + return state.get(SMALL) ? Collections.singletonList(new ItemStack(EndBlocks.CAVE_PUMPKIN_SEED)) : Collections.singletonList(new ItemStack(this)); + } + + static { + VoxelShape lantern = Block.createCuboidShape(1, 0, 1, 15, 13, 15); + VoxelShape cap = Block.createCuboidShape(0, 12, 0, 16, 15, 16); + VoxelShape top = Block.createCuboidShape(5, 15, 5, 11, 16, 11); + SHAPE_BIG = VoxelShapes.union(lantern, cap, top); + + lantern = Block.createCuboidShape(1, 7, 1, 15, 13, 15); + cap = Block.createCuboidShape(4, 12, 4, 12, 15, 12); + top = Block.createCuboidShape(6, 15, 6, 10, 16, 10); + SHAPE_SMALL = VoxelShapes.union(lantern, cap, top); + } +} diff --git a/src/main/java/ru/betterend/blocks/CavePumpkinVineBlock.java b/src/main/java/ru/betterend/blocks/CavePumpkinVineBlock.java new file mode 100644 index 00000000..732497db --- /dev/null +++ b/src/main/java/ru/betterend/blocks/CavePumpkinVineBlock.java @@ -0,0 +1,70 @@ +package ru.betterend.blocks; + +import java.util.Random; + +import net.minecraft.block.AbstractBlock; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.ShapeContext; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.util.shape.VoxelShape; +import net.minecraft.world.BlockView; +import net.minecraft.world.StructureWorldAccess; +import net.minecraft.world.WorldAccess; +import net.minecraft.world.WorldView; +import ru.betterend.blocks.basis.EndPlantWithAgeBlock; +import ru.betterend.registry.EndBlocks; + +public class CavePumpkinVineBlock extends EndPlantWithAgeBlock { + private static final VoxelShape SHAPE = Block.createCuboidShape(4, 0, 4, 12, 16, 12); + + @Override + public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) { + BlockState down = world.getBlockState(pos.up()); + return isTerrain(down); + } + + @Override + public void grow(ServerWorld world, Random random, BlockPos pos, BlockState state) { + int age = state.get(AGE); + BlockState down = world.getBlockState(pos.down()); + if (down.getMaterial().isReplaceable() || (down.isOf(EndBlocks.CAVE_PUMPKIN) && down.get(BlockProperties.SMALL))) { + if (age < 3) { + world.setBlockState(pos, state.with(AGE, age + 1)); + } + if (age == 2) { + world.setBlockState(pos.down(), EndBlocks.CAVE_PUMPKIN.getDefaultState().with(BlockProperties.SMALL, true)); + } + else if (age == 3) { + world.setBlockState(pos.down(), EndBlocks.CAVE_PUMPKIN.getDefaultState()); + } + } + } + + @Override + public void growAdult(StructureWorldAccess world, Random random, BlockPos pos) {} + + @Override + public BlockState getStateForNeighborUpdate(BlockState state, Direction facing, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) { + state = super.getStateForNeighborUpdate(state, facing, neighborState, world, pos, neighborPos); + if (state.isOf(this) && state.get(BlockProperties.AGE) > 1) { + BlockState down = world.getBlockState(pos.down()); + if (!down.isOf(EndBlocks.CAVE_PUMPKIN)) { + state = state.with(BlockProperties.AGE, 1); + } + } + return state; + } + + @Override + public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext ePos) { + return SHAPE; + } + + @Override + public AbstractBlock.OffsetType getOffsetType() { + return AbstractBlock.OffsetType.NONE; + } +} diff --git a/src/main/java/ru/betterend/blocks/basis/EndPlantWithAgeBlock.java b/src/main/java/ru/betterend/blocks/basis/EndPlantWithAgeBlock.java index 2d370940..b255d50b 100644 --- a/src/main/java/ru/betterend/blocks/basis/EndPlantWithAgeBlock.java +++ b/src/main/java/ru/betterend/blocks/basis/EndPlantWithAgeBlock.java @@ -14,9 +14,10 @@ import net.minecraft.state.property.IntProperty; import net.minecraft.util.math.BlockPos; import net.minecraft.world.StructureWorldAccess; import net.minecraft.world.World; +import ru.betterend.blocks.BlockProperties; public abstract class EndPlantWithAgeBlock extends EndPlantBlock { - public static final IntProperty AGE = IntProperty.of("age", 0, 3); + public static final IntProperty AGE = BlockProperties.AGE; public EndPlantWithAgeBlock() { this(FabricBlockSettings.of(Material.PLANT) diff --git a/src/main/java/ru/betterend/blocks/basis/UnderwaterPlantWithAgeBlock.java b/src/main/java/ru/betterend/blocks/basis/UnderwaterPlantWithAgeBlock.java index 363bad5e..db52390d 100644 --- a/src/main/java/ru/betterend/blocks/basis/UnderwaterPlantWithAgeBlock.java +++ b/src/main/java/ru/betterend/blocks/basis/UnderwaterPlantWithAgeBlock.java @@ -13,9 +13,10 @@ import net.minecraft.state.StateManager; import net.minecraft.state.property.IntProperty; import net.minecraft.util.math.BlockPos; import net.minecraft.world.StructureWorldAccess; +import ru.betterend.blocks.BlockProperties; public abstract class UnderwaterPlantWithAgeBlock extends UnderwaterPlantBlock { - public static final IntProperty AGE = IntProperty.of("age", 0, 3); + public static final IntProperty AGE = BlockProperties.AGE; public UnderwaterPlantWithAgeBlock() { super(FabricBlockSettings.of(Material.UNDERWATER_PLANT) diff --git a/src/main/java/ru/betterend/item/EndArmorItem.java b/src/main/java/ru/betterend/item/EndArmorItem.java index 58688011..dc298f2f 100644 --- a/src/main/java/ru/betterend/item/EndArmorItem.java +++ b/src/main/java/ru/betterend/item/EndArmorItem.java @@ -1,7 +1,10 @@ package ru.betterend.item; +import java.util.UUID; + import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.Multimap; + import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.attribute.EntityAttribute; import net.minecraft.entity.attribute.EntityAttributeModifier; @@ -13,8 +16,6 @@ import ru.betterend.mixin.common.ArmorItemAccessor; import ru.betterend.patterns.Patterned; import ru.betterend.patterns.Patterns; -import java.util.UUID; - public class EndArmorItem extends ArmorItem implements Patterned { public EndArmorItem(ArmorMaterial material, EquipmentSlot slot, Item.Settings settings) { super(material, slot, settings); diff --git a/src/main/java/ru/betterend/mixin/common/ArmorItemAccessor.java b/src/main/java/ru/betterend/mixin/common/ArmorItemAccessor.java index 39046ec7..8a02ed79 100644 --- a/src/main/java/ru/betterend/mixin/common/ArmorItemAccessor.java +++ b/src/main/java/ru/betterend/mixin/common/ArmorItemAccessor.java @@ -1,13 +1,15 @@ package ru.betterend.mixin.common; -import com.google.common.collect.Multimap; -import net.minecraft.entity.attribute.EntityAttribute; -import net.minecraft.entity.attribute.EntityAttributeModifier; -import net.minecraft.item.ArmorItem; +import java.util.UUID; + import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.gen.Accessor; -import java.util.UUID; +import com.google.common.collect.Multimap; + +import net.minecraft.entity.attribute.EntityAttribute; +import net.minecraft.entity.attribute.EntityAttributeModifier; +import net.minecraft.item.ArmorItem; @Mixin(ArmorItem.class) public interface ArmorItemAccessor { diff --git a/src/main/java/ru/betterend/mixin/common/EndPortalFeatureMixin.java b/src/main/java/ru/betterend/mixin/common/EndPortalFeatureMixin.java index fc69f5a8..b874e9b8 100644 --- a/src/main/java/ru/betterend/mixin/common/EndPortalFeatureMixin.java +++ b/src/main/java/ru/betterend/mixin/common/EndPortalFeatureMixin.java @@ -14,8 +14,8 @@ import net.minecraft.nbt.NbtHelper; import net.minecraft.structure.Structure; import net.minecraft.structure.StructurePlacementData; import net.minecraft.util.math.BlockPos; -import net.minecraft.world.StructureWorldAccess; import net.minecraft.world.Heightmap.Type; +import net.minecraft.world.StructureWorldAccess; import net.minecraft.world.gen.chunk.ChunkGenerator; import net.minecraft.world.gen.feature.DefaultFeatureConfig; import net.minecraft.world.gen.feature.EndPortalFeature; diff --git a/src/main/java/ru/betterend/mixin/common/EndSpikeFeatureMixin.java b/src/main/java/ru/betterend/mixin/common/EndSpikeFeatureMixin.java index 35d70225..44f69e31 100644 --- a/src/main/java/ru/betterend/mixin/common/EndSpikeFeatureMixin.java +++ b/src/main/java/ru/betterend/mixin/common/EndSpikeFeatureMixin.java @@ -13,6 +13,7 @@ import net.minecraft.block.Blocks; import net.minecraft.block.PaneBlock; import net.minecraft.entity.EntityType; import net.minecraft.entity.decoration.EndCrystalEntity; +import net.minecraft.nbt.CompoundTag; import net.minecraft.structure.Structure; import net.minecraft.structure.StructurePlacementData; import net.minecraft.util.math.BlockPos; @@ -27,6 +28,7 @@ import net.minecraft.world.gen.feature.EndSpikeFeatureConfig; import ru.betterend.BetterEnd; import ru.betterend.util.BlocksHelper; import ru.betterend.util.StructureHelper; +import ru.betterend.util.WorldDataUtil; import ru.betterend.world.generator.GeneratorOptions; @Mixin(EndSpikeFeature.class) @@ -43,7 +45,24 @@ public class EndSpikeFeatureMixin { int x = spike.getCenterX(); int z = spike.getCenterZ(); int radius = spike.getRadius(); - int minY = world.getChunk(x >> 4, z >> 4).sampleHeightmap(Type.WORLD_SURFACE, x & 15, z); + int minY = 0; + + long lx = (long) x; + long lz = (long) z; + if (lx * lx + lz * lz < 10000) { + String pillarID = String.format("%d_%d", x, z); + CompoundTag pillar = WorldDataUtil.getCompoundTag("pillars"); + boolean haveValue = pillar.contains(pillarID); + minY = haveValue ? pillar.getInt(pillarID) : world.getChunk(x >> 4, z >> 4).sampleHeightmap(Type.WORLD_SURFACE, x & 15, z); + if (!haveValue) { + pillar.putInt(pillarID, minY); + WorldDataUtil.saveFile(); + } + } + else { + minY = world.getChunk(x >> 4, z >> 4).sampleHeightmap(Type.WORLD_SURFACE, x & 15, z); + } + int maxY = minY + spike.getHeight() - 64; if (GeneratorOptions.replacePillars() && be_radiusInRange(radius)) { diff --git a/src/main/java/ru/betterend/mixin/common/ServerWorldMixin.java b/src/main/java/ru/betterend/mixin/common/ServerWorldMixin.java index afc357d1..0aab95ac 100644 --- a/src/main/java/ru/betterend/mixin/common/ServerWorldMixin.java +++ b/src/main/java/ru/betterend/mixin/common/ServerWorldMixin.java @@ -34,7 +34,7 @@ import ru.betterend.world.generator.GeneratorOptions; public class ServerWorldMixin { @Inject(method = "*", at = @At("TAIL")) private void be_onServerWorldInit(MinecraftServer server, Executor workerExecutor, LevelStorage.Session session, ServerWorldProperties properties, RegistryKey registryKey, DimensionType dimensionType, WorldGenerationProgressListener worldGenerationProgressListener, ChunkGenerator chunkGenerator, boolean debugWorld, long l, List list, boolean bl, CallbackInfo info) { - File beData = new File(FabricLoader.getInstance().getGameDir().getParent().toString(), "saves/" + properties.getLevelName() + "/betterend_data.nbt"); + File beData = new File(FabricLoader.getInstance().getGameDir().getParent().toString(), "saves/" + properties.getLevelName() + "/data/betterend_data.nbt"); ModMetadata meta = FabricLoader.getInstance().getModContainer(BetterEnd.MOD_ID).get().getMetadata(); String version = BetterEnd.isDevEnvironment() ? "development" : meta.getVersion().toString(); diff --git a/src/main/java/ru/betterend/recipe/CraftingRecipes.java b/src/main/java/ru/betterend/recipe/CraftingRecipes.java index 42e5d801..e510cdc5 100644 --- a/src/main/java/ru/betterend/recipe/CraftingRecipes.java +++ b/src/main/java/ru/betterend/recipe/CraftingRecipes.java @@ -191,6 +191,8 @@ public class CraftingRecipes { GridRecipe.make("filalux_lantern", EndBlocks.FILALUX_LANTERN).setShape("###", "###", "###").addMaterial('#', EndBlocks.FILALUX).build(); GridRecipe.make("silk_moth_hive", EndBlocks.SILK_MOTH_HIVE).setShape("#L#", "LML", "#L#").addMaterial('#', EndBlocks.TENANEA.planks).addMaterial('L', EndBlocks.TENANEA_LEAVES).addMaterial('M', EndItems.SILK_MOTH_MATRIX).build(); + GridRecipe.make("cave_pumpkin_pie", EndItems.CAVE_PUMPKIN_PIE).setShape(" B ", "BPB", " B ").addMaterial('P', EndBlocks.CAVE_PUMPKIN).addMaterial('B', EndItems.BLOSSOM_BERRY, EndItems.SHADOW_BERRY_RAW).build(); + GridRecipe.make("cave_pumpkin_seeds", EndBlocks.CAVE_PUMPKIN_SEED).setOutputCount(4).setList("#").addMaterial('#', EndBlocks.CAVE_PUMPKIN).build(); } private static void registerLantern(String name, Block lantern, Block slab) { diff --git a/src/main/java/ru/betterend/registry/EndBlocks.java b/src/main/java/ru/betterend/registry/EndBlocks.java index 1fac2cb8..f2186f82 100644 --- a/src/main/java/ru/betterend/registry/EndBlocks.java +++ b/src/main/java/ru/betterend/registry/EndBlocks.java @@ -27,6 +27,8 @@ import ru.betterend.blocks.BulbVineBlock; import ru.betterend.blocks.BulbVineLanternBlock; import ru.betterend.blocks.BulbVineLanternColoredBlock; import ru.betterend.blocks.BulbVineSeedBlock; +import ru.betterend.blocks.CavePumpkinBlock; +import ru.betterend.blocks.CavePumpkinVineBlock; import ru.betterend.blocks.ChandelierBlock; import ru.betterend.blocks.CharcoalBlock; import ru.betterend.blocks.CharniaBlock; @@ -302,6 +304,8 @@ public class EndBlocks { public static final Block AMBER_ROOT = registerBlock("amber_root_seed", new EndCropBlock(EndItems.AMBER_ROOT_RAW, AMBER_MOSS)); public static final Block CHORUS_MUSHROOM = registerBlock("chorus_mushroom_seed", new EndCropBlock(EndItems.CHORUS_MUSHROOM_RAW, CHORUS_NYLIUM)); public static final Block PEARLBERRY = registerBlock("pearlberry_seed", new EndCropBlock(EndItems.BLOSSOM_BERRY, END_MOSS, END_MYCELIUM)); + public static final Block CAVE_PUMPKIN_SEED = registerBlock("cave_pumpkin_seed", new CavePumpkinVineBlock()); + public static final Block CAVE_PUMPKIN = registerBlock("cave_pumpkin", new CavePumpkinBlock()); // Water plants public static final Block BUBBLE_CORAL = registerBlock("bubble_coral", new BubbleCoralBlock()); diff --git a/src/main/java/ru/betterend/registry/EndItems.java b/src/main/java/ru/betterend/registry/EndItems.java index d8365766..ab3ed31d 100644 --- a/src/main/java/ru/betterend/registry/EndItems.java +++ b/src/main/java/ru/betterend/registry/EndItems.java @@ -122,6 +122,7 @@ public class EndItems { public final static Item CHORUS_MUSHROOM_RAW = registerFood("chorus_mushroom_raw", 3, 0.5F); public final static Item CHORUS_MUSHROOM_COOKED = registerFood("chorus_mushroom_cooked", FoodComponents.MUSHROOM_STEW); public final static Item BOLUX_MUSHROOM_COOKED = registerFood("bolux_mushroom_cooked", FoodComponents.MUSHROOM_STEW); + public final static Item CAVE_PUMPKIN_PIE = registerFood("cave_pumpkin_pie", FoodComponents.PUMPKIN_PIE); // Drinks // public final static Item UMBRELLA_CLUSTER_JUICE = registerDrink("umbrella_cluster_juice", 5, 0.7F); diff --git a/src/main/java/ru/betterend/util/WorldDataUtil.java b/src/main/java/ru/betterend/util/WorldDataUtil.java index 4ba51df2..cb6b1816 100644 --- a/src/main/java/ru/betterend/util/WorldDataUtil.java +++ b/src/main/java/ru/betterend/util/WorldDataUtil.java @@ -30,6 +30,22 @@ public class WorldDataUtil { return root; } + public static CompoundTag getCompoundTag(String path) { + String[] parts = path.split("\\."); + CompoundTag tag = root; + for (String part: parts) { + if (tag.contains(part)) { + tag = tag.getCompound(part); + } + else { + CompoundTag t = new CompoundTag(); + tag.put(part, t); + tag = t; + } + } + return tag; + } + public static void saveFile() { try { NbtIo.write(root, saveFile); diff --git a/src/main/java/ru/betterend/world/generator/TerrainGenerator.java b/src/main/java/ru/betterend/world/generator/TerrainGenerator.java index e055fdaa..6c72f3cf 100644 --- a/src/main/java/ru/betterend/world/generator/TerrainGenerator.java +++ b/src/main/java/ru/betterend/world/generator/TerrainGenerator.java @@ -11,7 +11,7 @@ public class TerrainGenerator { private static final ReentrantLock LOCKER = new ReentrantLock(); private static final double SCALE_XZ = 8.0; private static final double SCALE_Y = 4.0; - private static final int CENTER = MHelper.floor(500 / SCALE_XZ); + //private static final int CENTER = MHelper.floor(500 / SCALE_XZ); private static IslandLayer largeIslands; private static IslandLayer mediumIslands; @@ -20,7 +20,7 @@ public class TerrainGenerator { private static OpenSimplexNoise noise2; public static boolean canGenerate(int x, int z) { - return GeneratorOptions.noRingVoid() || (long) x + (long) z > CENTER; + return GeneratorOptions.noRingVoid()/* || (long) x + (long) z > CENTER*/; } public static void initNoise(long seed) { diff --git a/src/main/resources/assets/betterend/blockstates/cave_pumpkin.json b/src/main/resources/assets/betterend/blockstates/cave_pumpkin.json new file mode 100644 index 00000000..a845138f --- /dev/null +++ b/src/main/resources/assets/betterend/blockstates/cave_pumpkin.json @@ -0,0 +1,6 @@ +{ + "variants": { + "small=true": { "model": "betterend:block/cave_pumpkin_small" }, + "small=false": { "model": "betterend:block/cave_pumpkin" } + } +} diff --git a/src/main/resources/assets/betterend/blockstates/cave_pumpkin_seed.json b/src/main/resources/assets/betterend/blockstates/cave_pumpkin_seed.json new file mode 100644 index 00000000..05b1ecce --- /dev/null +++ b/src/main/resources/assets/betterend/blockstates/cave_pumpkin_seed.json @@ -0,0 +1,20 @@ +{ + "variants": { + "age=0": [ + { "model": "betterend:block/cave_pumpkin_vine_1" }, + { "model": "betterend:block/cave_pumpkin_vine_2" } + ], + "age=1": [ + { "model": "betterend:block/cave_pumpkin_vine_3" }, + { "model": "betterend:block/cave_pumpkin_vine_4" } + ], + "age=2": [ + { "model": "betterend:block/cave_pumpkin_vine_5" }, + { "model": "betterend:block/cave_pumpkin_vine_6" } + ], + "age=3": [ + { "model": "betterend:block/cave_pumpkin_vine_7" }, + { "model": "betterend:block/cave_pumpkin_vine_8" } + ] + } +} diff --git a/src/main/resources/assets/betterend/materialmaps/block/cave_pumpkin.json b/src/main/resources/assets/betterend/materialmaps/block/cave_pumpkin.json new file mode 100644 index 00000000..256acaf2 --- /dev/null +++ b/src/main/resources/assets/betterend/materialmaps/block/cave_pumpkin.json @@ -0,0 +1,14 @@ +{ + "defaultMap": { + "spriteMap": [ + { + "sprite": "betterend:block/cave_pumpkin_lantern_side", + "material": "betterend:glow_inc" + }, + { + "sprite": "betterend:block/cave_pumpkin_lantern_bottom", + "material": "betterend:glow_inc" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/models/block/cave_pumpkin.json b/src/main/resources/assets/betterend/models/block/cave_pumpkin.json new file mode 100644 index 00000000..aa035548 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/cave_pumpkin.json @@ -0,0 +1,89 @@ +{ + "__comment": "Designed by Paulevs with Cubik Studio - https://cubik.studio", + "parent": "block/block", + "textures": { + "particle": "betterend:block/cave_pumpkin_lantern_side", + "lantern_side": "betterend:block/cave_pumpkin_lantern_side", + "lantern_bottom": "betterend:block/cave_pumpkin_lantern_bottom", + "top": "betterend:block/cave_pumpkin_top", + "side": "betterend:block/cave_pumpkin_side" + }, + "elements": [ + { + "__comment": "Box1", + "from": [ 1, 0, 1 ], + "to": [ 15, 13, 15 ], + "shade": false, + "faces": { + "down": { "uv": [ 1, 1, 15, 15 ], "texture": "#lantern_bottom" }, + "north": { "uv": [ 1, 3, 15, 16 ], "texture": "#lantern_side" }, + "south": { "uv": [ 1, 3, 15, 16 ], "texture": "#lantern_side" }, + "west": { "uv": [ 1, 3, 15, 16 ], "texture": "#lantern_side" }, + "east": { "uv": [ 1, 3, 15, 16 ], "texture": "#lantern_side" } + } + }, + { + "__comment": "Box2", + "from": [ 0, 13, 0 ], + "to": [ 16, 15, 16 ], + "shade": false, + "faces": { + "down": { "uv": [ 0, 0, 16, 16 ], "texture": "#top" }, + "up": { "uv": [ 0, 0, 16, 16 ], "texture": "#top" } + } + }, + { + "__comment": "PlaneX3", + "from": [ 0, 10, 0 ], + "to": [ 0.001, 15, 16 ], + "shade": false, + "faces": { + "west": { "uv": [ 0, 1, 16, 6 ], "texture": "#side" }, + "east": { "uv": [ 0, 1, 16, 6 ], "texture": "#side" } + } + }, + { + "__comment": "PlaneX3", + "from": [ 16, 10, 0 ], + "to": [ 16.001, 15, 16 ], + "shade": false, + "faces": { + "west": { "uv": [ 0, 1, 16, 6 ], "texture": "#side" }, + "east": { "uv": [ 0, 1, 16, 6 ], "texture": "#side" } + } + }, + { + "__comment": "PlaneZ5", + "from": [ 0, 10, 16 ], + "to": [ 16, 15, 16.001 ], + "shade": false, + "faces": { + "north": { "uv": [ 0, 1, 16, 6 ], "texture": "#side" }, + "south": { "uv": [ 0, 1, 16, 6 ], "texture": "#side" } + } + }, + { + "__comment": "PlaneZ5", + "from": [ 0, 10, 0 ], + "to": [ 16, 15, 0.001 ], + "shade": false, + "faces": { + "north": { "uv": [ 0, 1, 16, 6 ], "texture": "#side" }, + "south": { "uv": [ 0, 1, 16, 6 ], "texture": "#side" } + } + }, + { + "__comment": "Box7", + "from": [ 5, 15, 5 ], + "to": [ 11, 16, 11 ], + "shade": false, + "faces": { + "up": { "uv": [ 5, 10, 11, 16 ], "texture": "#side" }, + "north": { "uv": [ 5, 0, 11, 1 ], "texture": "#side" }, + "south": { "uv": [ 5, 0, 11, 1 ], "texture": "#side" }, + "west": { "uv": [ 5, 0, 11, 1 ], "texture": "#side" }, + "east": { "uv": [ 5, 0, 11, 1 ], "texture": "#side" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/models/block/cave_pumpkin_small.json b/src/main/resources/assets/betterend/models/block/cave_pumpkin_small.json new file mode 100644 index 00000000..dc0b57ca --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/cave_pumpkin_small.json @@ -0,0 +1,90 @@ +{ + "__comment": "Designed by Paulevs with Cubik Studio - https://cubik.studio", + "parent": "block/block", + "textures": { + "particle": "betterend:block/cave_pumpkin_lantern_side", + "lantern_side": "betterend:block/cave_pumpkin_lantern_side", + "lantern_bottom": "betterend:block/cave_pumpkin_lantern_bottom", + "top": "betterend:block/cave_pumpkin_top", + "side": "betterend:block/cave_pumpkin_side" + }, + "elements": [ + { + "__comment": "Box8", + "from": [ 5, 7, 5 ], + "to": [ 11, 13, 11 ], + "shade": false, + "faces": { + "down": { "uv": [ 5, 5, 11, 11 ], "texture": "#lantern_bottom" }, + "up": { "uv": [ 5, 5, 11, 11 ], "texture": "#lantern_side" }, + "north": { "uv": [ 5, 10, 11, 16 ], "texture": "#lantern_side" }, + "south": { "uv": [ 5, 10, 11, 16 ], "texture": "#lantern_side" }, + "west": { "uv": [ 5, 10, 11, 16 ], "texture": "#lantern_side" }, + "east": { "uv": [ 5, 10, 11, 16 ], "texture": "#lantern_side" } + } + }, + { + "__comment": "Box9", + "from": [ 4, 13, 4 ], + "to": [ 12, 15, 12 ], + "shade": false, + "faces": { + "down": { "uv": [ 4, 4, 12, 12 ], "texture": "#top" }, + "up": { "uv": [ 4, 4, 12, 12 ], "texture": "#top" } + } + }, + { + "__comment": "PlaneX12", + "from": [ 12, 10, 4 ], + "to": [ 12.001, 15, 12 ], + "shade": false, + "faces": { + "west": { "uv": [ 4, 1, 12, 6 ], "texture": "#side" }, + "east": { "uv": [ 4, 1, 12, 6 ], "texture": "#side" } + } + }, + { + "__comment": "PlaneX12", + "from": [ 4, 10, 4 ], + "to": [ 4.001, 15, 12 ], + "shade": false, + "faces": { + "west": { "uv": [ 4, 1, 12, 6 ], "texture": "#side" }, + "east": { "uv": [ 4, 1, 12, 6 ], "texture": "#side" } + } + }, + { + "__comment": "PlaneZ14", + "from": [ 4, 10, 4 ], + "to": [ 12, 15, 4.001 ], + "shade": false, + "faces": { + "north": { "uv": [ 4, 1, 12, 6 ], "texture": "#side" }, + "south": { "uv": [ 4, 1, 12, 6 ], "texture": "#side" } + } + }, + { + "__comment": "PlaneZ14", + "from": [ 4, 10, 12 ], + "to": [ 12, 15, 12.001 ], + "shade": false, + "faces": { + "north": { "uv": [ 4, 1, 12, 6 ], "texture": "#side" }, + "south": { "uv": [ 4, 1, 12, 6 ], "texture": "#side" } + } + }, + { + "__comment": "Box16", + "from": [ 6, 15, 6 ], + "to": [ 10, 16, 10 ], + "shade": false, + "faces": { + "up": { "uv": [ 6, 11, 10, 15 ], "texture": "#side" }, + "north": { "uv": [ 6, 0, 10, 1 ], "texture": "#side" }, + "south": { "uv": [ 6, 0, 10, 1 ], "texture": "#side" }, + "west": { "uv": [ 6, 0, 10, 1 ], "texture": "#side" }, + "east": { "uv": [ 6, 0, 10, 1 ], "texture": "#side" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_1.json b/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_1.json new file mode 100644 index 00000000..9083c228 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_1.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "betterend:block/cave_pumpkin_stem_0" + } +} diff --git a/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_2.json b/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_2.json new file mode 100644 index 00000000..8c145e38 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_2.json @@ -0,0 +1,6 @@ +{ + "parent": "betterend:block/cross_inverted", + "textures": { + "cross": "betterend:block/cave_pumpkin_stem_0" + } +} diff --git a/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_3.json b/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_3.json new file mode 100644 index 00000000..ebc4a4f6 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_3.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "betterend:block/cave_pumpkin_stem_1" + } +} diff --git a/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_4.json b/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_4.json new file mode 100644 index 00000000..6d1d460a --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_4.json @@ -0,0 +1,6 @@ +{ + "parent": "betterend:block/cross_inverted", + "textures": { + "cross": "betterend:block/cave_pumpkin_stem_1" + } +} diff --git a/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_5.json b/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_5.json new file mode 100644 index 00000000..e338603f --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_5.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "betterend:block/cave_pumpkin_stem_2" + } +} diff --git a/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_6.json b/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_6.json new file mode 100644 index 00000000..c4d07a60 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_6.json @@ -0,0 +1,6 @@ +{ + "parent": "betterend:block/cross_inverted", + "textures": { + "cross": "betterend:block/cave_pumpkin_stem_2" + } +} diff --git a/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_7.json b/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_7.json new file mode 100644 index 00000000..bdfc11b9 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_7.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "betterend:block/cave_pumpkin_stem_3" + } +} diff --git a/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_8.json b/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_8.json new file mode 100644 index 00000000..7c379921 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/cave_pumpkin_vine_8.json @@ -0,0 +1,6 @@ +{ + "parent": "betterend:block/cross_inverted", + "textures": { + "cross": "betterend:block/cave_pumpkin_stem_3" + } +} diff --git a/src/main/resources/assets/betterend/models/item/cave_pumpkin.json b/src/main/resources/assets/betterend/models/item/cave_pumpkin.json new file mode 100644 index 00000000..30275dee --- /dev/null +++ b/src/main/resources/assets/betterend/models/item/cave_pumpkin.json @@ -0,0 +1,3 @@ +{ + "parent": "betterend:block/cave_pumpkin" +} diff --git a/src/main/resources/assets/betterend/models/item/cave_pumpkin_seed.json b/src/main/resources/assets/betterend/models/item/cave_pumpkin_seed.json new file mode 100644 index 00000000..c285f463 --- /dev/null +++ b/src/main/resources/assets/betterend/models/item/cave_pumpkin_seed.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "betterend:item/cave_pumpkin_seed" + } +} diff --git a/src/main/resources/assets/betterend/textures/block/cave_pumpkin_lantern_side.png b/src/main/resources/assets/betterend/textures/block/cave_pumpkin_lantern_side.png index ede34999..96e2e1f4 100644 Binary files a/src/main/resources/assets/betterend/textures/block/cave_pumpkin_lantern_side.png and b/src/main/resources/assets/betterend/textures/block/cave_pumpkin_lantern_side.png differ diff --git a/src/main/resources/assets/betterend/textures/block/cave_pumpkin_side.png b/src/main/resources/assets/betterend/textures/block/cave_pumpkin_side.png index a91ba750..1a75960f 100644 Binary files a/src/main/resources/assets/betterend/textures/block/cave_pumpkin_side.png and b/src/main/resources/assets/betterend/textures/block/cave_pumpkin_side.png differ diff --git a/src/main/resources/assets/betterend/textures/block/cave_pumpkin_stem_0.png b/src/main/resources/assets/betterend/textures/block/cave_pumpkin_stem_0.png new file mode 100644 index 00000000..01b6a719 Binary files /dev/null and b/src/main/resources/assets/betterend/textures/block/cave_pumpkin_stem_0.png differ diff --git a/src/main/resources/assets/betterend/textures/block/cave_pumpkin_stem_1.png b/src/main/resources/assets/betterend/textures/block/cave_pumpkin_stem_1.png new file mode 100644 index 00000000..71f6391c Binary files /dev/null and b/src/main/resources/assets/betterend/textures/block/cave_pumpkin_stem_1.png differ diff --git a/src/main/resources/assets/betterend/textures/block/cave_pumpkin_stem_2.png b/src/main/resources/assets/betterend/textures/block/cave_pumpkin_stem_2.png new file mode 100644 index 00000000..7944679b Binary files /dev/null and b/src/main/resources/assets/betterend/textures/block/cave_pumpkin_stem_2.png differ diff --git a/src/main/resources/assets/betterend/textures/block/cave_pumpkin_stem_3.png b/src/main/resources/assets/betterend/textures/block/cave_pumpkin_stem_3.png new file mode 100644 index 00000000..9b3607bd Binary files /dev/null and b/src/main/resources/assets/betterend/textures/block/cave_pumpkin_stem_3.png differ diff --git a/src/main/resources/assets/betterend/textures/item/cave_pumpkin_pipe.png b/src/main/resources/assets/betterend/textures/item/cave_pumpkin_pipe.png new file mode 100644 index 00000000..d24ce153 Binary files /dev/null and b/src/main/resources/assets/betterend/textures/item/cave_pumpkin_pipe.png differ diff --git a/src/main/resources/assets/betterend/textures/item/cave_pumpkin_seed.png b/src/main/resources/assets/betterend/textures/item/cave_pumpkin_seed.png new file mode 100644 index 00000000..f49ede5b Binary files /dev/null and b/src/main/resources/assets/betterend/textures/item/cave_pumpkin_seed.png differ diff --git a/src/main/resources/assets/betterend/textures/item/shadow_berry_seeds.png b/src/main/resources/assets/betterend/textures/item/shadow_berry_seeds.png index 89c2a68b..20afce5b 100644 Binary files a/src/main/resources/assets/betterend/textures/item/shadow_berry_seeds.png and b/src/main/resources/assets/betterend/textures/item/shadow_berry_seeds.png differ