diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fae08049..a5952066 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/fr/hugman/mubble/MubbleClient.java b/src/main/java/fr/hugman/mubble/MubbleClient.java index d679720e..79adbab9 100644 --- a/src/main/java/fr/hugman/mubble/MubbleClient.java +++ b/src/main/java/fr/hugman/mubble/MubbleClient.java @@ -2,23 +2,40 @@ import fr.hugman.mubble.client.gui.screen.BumpableBlockScreen; import fr.hugman.mubble.client.render.BumpableBlockEntityRenderer; +import fr.hugman.mubble.entity.BeanstalkEntityModel; +import fr.hugman.mubble.entity.BeanstalkEntityRenderer; import fr.hugman.mubble.registry.SuperMario; import net.fabricmc.api.ClientModInitializer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; +import net.fabricmc.fabric.api.client.rendering.v1.EntityModelLayerRegistry; +import net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry; import net.minecraft.client.gui.screen.ingame.HandledScreens; import net.minecraft.client.render.RenderLayer; import net.minecraft.client.render.block.entity.BlockEntityRendererFactories; +import net.minecraft.client.render.entity.model.EntityModelLayer; +import net.minecraft.util.Identifier; @Environment(EnvType.CLIENT) public class MubbleClient implements ClientModInitializer { + public static final EntityModelLayer MODEL_CUBE_LAYER = new EntityModelLayer( + new Identifier("mubble", "beanstalk"), "main" + ); + @Override public void onInitializeClient() { BlockRenderLayerMap.INSTANCE.putBlock(SuperMario.RED_BEEP_BLOCK, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(SuperMario.BLUE_BEEP_BLOCK, RenderLayer.getCutout()); + BlockRenderLayerMap.INSTANCE.putBlock(SuperMario.BEANSTALK, RenderLayer.getCutout()); HandledScreens.register(SuperMario.BUMPABLE_BLOCK_SCREEN_HANDLER, BumpableBlockScreen::new); BlockEntityRendererFactories.register(SuperMario.BUMPABLE_BLOCK_ENTITY_TYPE, BumpableBlockEntityRenderer::new); + + EntityRendererRegistry.register(SuperMario.BEANSTALK_ENTITY, BeanstalkEntityRenderer::new); + + EntityRendererRegistry.register(SuperMario.BEANSTALK_ENTITY, BeanstalkEntityRenderer::new); + + EntityModelLayerRegistry.registerModelLayer(MODEL_CUBE_LAYER, BeanstalkEntityModel::getTexturedModelData); } } diff --git a/src/main/java/fr/hugman/mubble/block/BeanstalkBlock.java b/src/main/java/fr/hugman/mubble/block/BeanstalkBlock.java new file mode 100644 index 00000000..87a7b555 --- /dev/null +++ b/src/main/java/fr/hugman/mubble/block/BeanstalkBlock.java @@ -0,0 +1,102 @@ +package fr.hugman.mubble.block; + +import fr.hugman.mubble.registry.SuperMario; +import fr.hugman.mubble.tag.MubbleBlockTags; +import net.minecraft.block.*; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.util.math.random.Random; +import net.minecraft.util.shape.VoxelShape; +import net.minecraft.util.shape.VoxelShapes; +import net.minecraft.world.*; + +/** + * Most of the functions of this code were + * essentially copied from BambooBlock. + * + * @author MaxBrick + * @since v4.0.0 + */ + +public class BeanstalkBlock extends Block implements Fertilizable { + public BeanstalkBlock(AbstractBlock.Settings settings) { + super(settings); + } + + public boolean isTransparent(BlockState state, BlockView world, BlockPos pos) { + return true; + } + + public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { + return VoxelShapes.fullCube(); + } + + public VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { + return VoxelShapes.empty(); + } + + public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) { + if (!state.canPlaceAt(world, pos)) { + world.breakBlock(pos, true); + } + } + + public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) { + return world.getBlockState(pos.down()).isIn(MubbleBlockTags.BEANSTALK_PLANTABLE_ON); + } + + + protected int countBeanstalksAbove(BlockView world, BlockPos pos) { + int i; + for(i = 0; i < 16 && world.getBlockState(pos.up(i + 1)).isOf(SuperMario.BEANSTALK); ++i) { + } + + return i; + } + protected int countBeanstalksBelow(BlockView world, BlockPos pos) { + int i; + for(i = 0; i < 16 && world.getBlockState(pos.down(i + 1)).isOf(SuperMario.BEANSTALK); ++i) { + } + + return i; + } + + public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) { + if (!state.canPlaceAt(world, pos)) { + world.scheduleBlockTick(pos, this, 1); + } + return super.getStateForNeighborUpdate(state, direction, neighborState, world, pos, neighborPos); + } + + //This function as well as the count functions are ripped from BambooBlock.class + public boolean isFertilizable(WorldView world, BlockPos pos, BlockState state, boolean isClient) { + int i = this.countBeanstalksAbove(world, pos); + int j = this.countBeanstalksBelow(world, pos); + return i + j + 1 < 16; + } + + public boolean canGrow(World world, Random random, BlockPos pos, BlockState state) { + return true; + } + + //Here I took the logic I needed from BambooBlock.class + public void grow(ServerWorld world, Random random, BlockPos pos, BlockState state) { + int i = this.countBeanstalksAbove(world, pos); + int j = this.countBeanstalksBelow(world, pos); + int k = i + j + 1; + int l = 1 + random.nextInt(2); + + + for(int m = 0; m < l; ++m) { + BlockPos blockPos = pos.up(i); + if (k >= 16 || !world.isAir(blockPos.up())) { + return; + } + + world.setBlockState(blockPos.up(1), state); + ++i; + ++k; + } + } +} \ No newline at end of file diff --git a/src/main/java/fr/hugman/mubble/block/BumpableBlock.java b/src/main/java/fr/hugman/mubble/block/BumpableBlock.java index 54dcd750..457044f1 100644 --- a/src/main/java/fr/hugman/mubble/block/BumpableBlock.java +++ b/src/main/java/fr/hugman/mubble/block/BumpableBlock.java @@ -1,6 +1,7 @@ package fr.hugman.mubble.block; import fr.hugman.mubble.block.entity.BumpableBlockEntity; +import fr.hugman.mubble.entity.BeanstalkEntity; import fr.hugman.mubble.registry.MubbleSounds; import fr.hugman.mubble.registry.SuperMario; import net.fabricmc.api.EnvType; @@ -16,6 +17,7 @@ import net.minecraft.client.MinecraftClient; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.SpawnReason; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.inventory.Inventory; import net.minecraft.item.ItemStack; @@ -33,11 +35,13 @@ import net.minecraft.world.event.GameEvent; import org.jetbrains.annotations.Nullable; +import java.util.Objects; import java.util.Optional; /** * @author haykam * @author Hugman + * @author MaxBrick * @since v4.0.0 */ public class BumpableBlock extends BlockWithEntity implements HittableBlock { @@ -199,13 +203,15 @@ public void onBumpEnd(World world, BlockPos pos, BlockState state, BumpableBlock return; } var newState = blockEntity.getBumpedState(); - if(newState != null) { - world.setBlockState(pos, newState); + + this.loot(world, pos, state, blockEntity); + + if(newState != null) { + world.setBlockState(pos, newState); } else { - world.setBlockState(pos, state.with(BUMPING, false)); + world.setBlockState(pos, state.with(BUMPING, false)); } - this.loot(world, pos, state, blockEntity); } } @@ -230,15 +236,36 @@ public void loot(World world, BlockPos pos, BlockState state, BumpableBlockEntit } var actualState = world.getBlockState(pos); var center = pos.toCenterPos(); + + + if(actualState.isAir()) { ItemScatterer.spawn(world, pos, blockEntity); } else { + var direction = blockEntity.getBumpDirection(); var x = center.getX() + direction.getOffsetX() * 0.75D; var y = center.getY() + direction.getOffsetY() * 0.75D; var z = center.getZ() + direction.getOffsetZ() * 0.75D; for(int i = 0; i < blockEntity.size(); ++i) { + /* + This should check if the container holds beanstalks. + If it does, and blockEntity.getBumpedState() is not air, + it will spawn a beanstalk, setting its growth value + to the amount of beanstalks in the container, + and finally empties the blockEntity. + */ + if( + blockEntity.getStack(i).isOf(SuperMario.BEANSTALK.asItem()) && (blockEntity.getBumpedState() == null || !blockEntity.getBumpedState().isAir()) + ) { + Objects.requireNonNull(SuperMario.BEANSTALK_ENTITY.spawn(world.getServer().getWorld(world.getRegistryKey()), pos, SpawnReason.TRIGGERED)).growth = blockEntity.count(SuperMario.BEANSTALK.asItem()); + //TODO: make custom sound for beanstalk + world.playSound(null, center.getX(), center.getY(), center.getZ(), MubbleSounds.BUMPABLE_BLOCK_LOOT, SoundCategory.BLOCKS, 1.0F, 1.0F); + blockEntity.clear(); + return; + } + ItemScatterer.spawn(world, x, y, z, blockEntity.getStack(i)); } } diff --git a/src/main/java/fr/hugman/mubble/entity/BeanstalkEntity.java b/src/main/java/fr/hugman/mubble/entity/BeanstalkEntity.java new file mode 100644 index 00000000..cec2cdc0 --- /dev/null +++ b/src/main/java/fr/hugman/mubble/entity/BeanstalkEntity.java @@ -0,0 +1,76 @@ +package fr.hugman.mubble.entity; + +import fr.hugman.mubble.registry.SuperMario; +import net.minecraft.block.Blocks; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.MovementType; +import net.minecraft.fluid.Fluids; +import net.minecraft.nbt.NbtCompound; +import net.minecraft.world.World; + +/** + * This class is made by copying and modifying + * methods from FallingBlockEntity + * Real creative, I know :) + * + * @author MaxBrick + * @since v4.0.0 + */ + +public class BeanstalkEntity extends Entity { + + //This will determine how high the entity will grow. It should be set upon spawning + public int growth = 0; + + //This should always be set to its y position when spawned + private final int spawnHeight = (int) this.getY(); + + private int travelDistance = 0; + + public BeanstalkEntity(EntityType entityType, World world) { + super(entityType, world); + } + + @Override + protected void initDataTracker() { + + } + + protected Entity.MoveEffect getMoveEffect() { + return MoveEffect.NONE; + } + + public void tick() { + //I don't know why, but I have to use the move function to actually make it move + this.setVelocity(0.0D, 0.3D, 0.0D); + this.move(MovementType.SELF, this.getVelocity()); + + if(!this.getWorld().getBlockState(this.getBlockPos().up()).isAir() || growth < 1) { + this.discard(); + } + + //Checks if its current position is one block higher than where it previously was before placing block + if(this.getY() > spawnHeight + travelDistance + 1 && this.getWorld().getBlockState(this.getBlockPos()).isAir()) { + travelDistance++; + + this.getWorld().setBlockState(this.getBlockPos(), SuperMario.BEANSTALK.getDefaultState()); + + growth--; + } + } + + @Override + protected void writeCustomDataToNbt(NbtCompound nbt) { + nbt.putInt("Growth", this.growth); + } + + @Override + protected void readCustomDataFromNbt(NbtCompound nbt) { + this.growth = nbt.getInt("Growth"); + } + + public boolean isAttackable() { + return false; + } +} \ No newline at end of file diff --git a/src/main/java/fr/hugman/mubble/entity/BeanstalkEntityModel.java b/src/main/java/fr/hugman/mubble/entity/BeanstalkEntityModel.java new file mode 100644 index 00000000..6eb0da0a --- /dev/null +++ b/src/main/java/fr/hugman/mubble/entity/BeanstalkEntityModel.java @@ -0,0 +1,54 @@ +package fr.hugman.mubble.entity; + +import com.google.common.collect.ImmutableList; +import net.minecraft.client.model.*; +import net.minecraft.client.render.VertexConsumer; +import net.minecraft.client.render.entity.model.EntityModel; +import net.minecraft.client.render.entity.model.EntityModelPartNames; +import net.minecraft.client.util.math.MatrixStack; + +/** + * @author MaxBrick + * @since v4.0.0 + */ + +//I have no idea what I'm doing! +//TODO: fix the model so it's identical to BeanstalkBlock's model +public class BeanstalkEntityModel extends EntityModel{ + private final ModelPart base; + + public BeanstalkEntityModel(ModelPart modelPart) { + this.base = modelPart.getChild(EntityModelPartNames.CUBE); + } + + public static TexturedModelData getTexturedModelData() { + ModelData modelData = new ModelData(); + ModelPartData modelPartData = modelData.getRoot(); + modelPartData.addChild( + EntityModelPartNames.CUBE, ModelPartBuilder.create().uv( + 0, 0 + ).cuboid( + -8F, 8F, -8F, 16F, 16F, 16F + ), ModelTransform.pivot(8F, 0F, 8F) + ); + modelPartData.addChild( + EntityModelPartNames.CUBE, ModelPartBuilder.create().uv( + 0, 0 + ).cuboid( + -8F, 8F, -8F, 16F, 16F, 16F + ), ModelTransform.pivot(-8F, 0F, -8F) + ); + return TexturedModelData.of(modelData, 16, 16); + } + + @Override + public void setAngles(BeanstalkEntity entity, float limbAngle, float limbDistance, float animationProgress, float headYaw, float headPitch) { + } + + @Override + public void render(MatrixStack matrices, VertexConsumer vertices, int light, int overlay, float red, float green, float blue, float alpha) { + ImmutableList.of(this.base).forEach((modelRenderer) -> { + modelRenderer.render(matrices, vertices, light, overlay, red, green, blue, alpha); + }); + } +} diff --git a/src/main/java/fr/hugman/mubble/entity/BeanstalkEntityRenderer.java b/src/main/java/fr/hugman/mubble/entity/BeanstalkEntityRenderer.java new file mode 100644 index 00000000..600d5dbf --- /dev/null +++ b/src/main/java/fr/hugman/mubble/entity/BeanstalkEntityRenderer.java @@ -0,0 +1,17 @@ +package fr.hugman.mubble.entity; + +import net.minecraft.client.render.entity.EntityRenderer; +import net.minecraft.client.render.entity.EntityRendererFactory; +import net.minecraft.util.Identifier; + +public class BeanstalkEntityRenderer extends EntityRenderer { + + public BeanstalkEntityRenderer(EntityRendererFactory.Context context) { + super(context); + } + + @Override + public Identifier getTexture(BeanstalkEntity entity) { + return new Identifier("mubble", "textures/block/beanstalk.png"); + } +} diff --git a/src/main/java/fr/hugman/mubble/registry/SuperMario.java b/src/main/java/fr/hugman/mubble/registry/SuperMario.java index e98f709e..4b23080f 100644 --- a/src/main/java/fr/hugman/mubble/registry/SuperMario.java +++ b/src/main/java/fr/hugman/mubble/registry/SuperMario.java @@ -5,19 +5,21 @@ import fr.hugman.dawn.block.DawnBlockSettings; import fr.hugman.dawn.item.DawnItemSettings; import fr.hugman.mubble.Mubble; -import fr.hugman.mubble.block.BeepBlock; -import fr.hugman.mubble.block.EmptyBlock; -import fr.hugman.mubble.block.DecoratedBumpableBlock; -import fr.hugman.mubble.block.NoteBlock; -import fr.hugman.mubble.block.SnakeBlock; +import fr.hugman.mubble.block.*; import fr.hugman.mubble.block.entity.BumpableBlockEntity; +import fr.hugman.mubble.entity.BeanstalkEntity; import fr.hugman.mubble.item.CapeFeatherItem; import fr.hugman.mubble.screen.BumpableBlockScreenHandler; import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup; import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder; +import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry; +import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder; import net.minecraft.block.Blocks; import net.minecraft.block.MapColor; import net.minecraft.block.entity.BlockEntityType; +import net.minecraft.entity.EntityDimensions; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.SpawnGroup; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; @@ -30,6 +32,7 @@ import net.minecraft.resource.featuretoggle.FeatureFlags; import net.minecraft.screen.ScreenHandlerType; import net.minecraft.text.Text; +import net.minecraft.util.Identifier; import net.minecraft.util.Rarity; public class SuperMario { @@ -48,6 +51,7 @@ public class SuperMario { public static final SnakeBlock SLOW_SNAKE_BLOCK = new SnakeBlock(DawnBlockSettings.copy(Blocks.IRON_BLOCK).mapColor(MapColor.RED).item()); public static final BeepBlock RED_BEEP_BLOCK = new BeepBlock(MapColor.RED, false); public static final BeepBlock BLUE_BEEP_BLOCK = new BeepBlock(MapColor.BLUE, true); + public static final BeanstalkBlock BEANSTALK = new BeanstalkBlock(DawnBlockSettings.copy(Blocks.SUGAR_CANE).mapColor(MapColor.GREEN).item().nonOpaque()); public static final ScreenHandlerType BUMPABLE_BLOCK_SCREEN_HANDLER = new ScreenHandlerType<>(BumpableBlockScreenHandler::new, FeatureFlags.VANILLA_FEATURES); public static final BlockEntityType BUMPABLE_BLOCK_ENTITY_TYPE = @@ -56,6 +60,16 @@ public class SuperMario { public static final CapeFeatherItem CAPE_FEATHER = new CapeFeatherItem(new Item.Settings(), false); public static final CapeFeatherItem SUPER_CAPE_FEATHER = new CapeFeatherItem(new Item.Settings().rarity(Rarity.EPIC), true); + // ENTITY + + //This probably should be changed to be more consistent with the rest of the registries + public static final EntityType BEANSTALK_ENTITY = Registry.register( + Registries.ENTITY_TYPE, + new Identifier("mubble", "beanstalk"), + FabricEntityTypeBuilder.create( + SpawnGroup.MISC, BeanstalkEntity::new).dimensions(EntityDimensions.fixed(1.0f, 1.0f) + ).build() + ); // ITEM GROUP public static final RegistryKey ITEM_GROUP = RegistryKey.of(RegistryKeys.ITEM_GROUP, Mubble.id("super_mario")); @@ -74,6 +88,7 @@ public static void init(Registrar r) { r.add("slow_snake_block", SLOW_SNAKE_BLOCK); r.add("red_beep_block", RED_BEEP_BLOCK); r.add("blue_beep_block", BLUE_BEEP_BLOCK); + r.add("beanstalk", BEANSTALK); Registry.register(Registries.SCREEN_HANDLER, r.id("bumpable_block"), BUMPABLE_BLOCK_SCREEN_HANDLER); //TODO: create a registrar method for screen handlers in Dawn API r.add("bumpable_block", BUMPABLE_BLOCK_ENTITY_TYPE); @@ -101,6 +116,7 @@ public static void appendItemGroups() { entries.add(SuperMario.SLOW_SNAKE_BLOCK); entries.add(SuperMario.RED_BEEP_BLOCK); entries.add(SuperMario.BLUE_BEEP_BLOCK); + entries.add(SuperMario.BEANSTALK); entries.add(SuperMario.CAPE_FEATHER); entries.add(SuperMario.SUPER_CAPE_FEATHER); }) diff --git a/src/main/java/fr/hugman/mubble/tag/MubbleBlockTags.java b/src/main/java/fr/hugman/mubble/tag/MubbleBlockTags.java new file mode 100644 index 00000000..653ffe35 --- /dev/null +++ b/src/main/java/fr/hugman/mubble/tag/MubbleBlockTags.java @@ -0,0 +1,10 @@ +package fr.hugman.mubble.tag; + +import net.minecraft.block.Block; +import net.minecraft.registry.RegistryKeys; +import net.minecraft.registry.tag.TagKey; +import net.minecraft.util.Identifier; + +public class MubbleBlockTags { + public static final TagKey BEANSTALK_PLANTABLE_ON = TagKey.of(RegistryKeys.BLOCK, new Identifier("mubble", "beanstalk_plantable_on")); +} diff --git a/src/main/resources/assets/mubble/blockstates/beanstalk.json b/src/main/resources/assets/mubble/blockstates/beanstalk.json new file mode 100644 index 00000000..2f0a8fba --- /dev/null +++ b/src/main/resources/assets/mubble/blockstates/beanstalk.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "mubble:block/beanstalk" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/mubble/lang/en_us.json b/src/main/resources/assets/mubble/lang/en_us.json index 55bb9ca4..8d8d0342 100644 --- a/src/main/resources/assets/mubble/lang/en_us.json +++ b/src/main/resources/assets/mubble/lang/en_us.json @@ -16,6 +16,7 @@ "block.mubble.slow_snake_block": "Slow Snake Block", "block.mubble.red_beep_block": "Red Beep Block", "block.mubble.blue_beep_block": "Blue Beep Block", + "block.mubble.beanstalk": "Beanstalk", "item.mubble.cape_feather": "Cape Feather", "item.mubble.super_cape_feather": "Super Cape Feather", diff --git a/src/main/resources/assets/mubble/models/block/beanstalk.json b/src/main/resources/assets/mubble/models/block/beanstalk.json new file mode 100644 index 00000000..895284e2 --- /dev/null +++ b/src/main/resources/assets/mubble/models/block/beanstalk.json @@ -0,0 +1,29 @@ +{ + "ambientocclusion": false, + "textures": { + "all": "mubble:block/beanstalk", + "particle": "mubble:block/beanstalk" + }, + "elements": [ + { + "from": [ 0.8, 0, 8 ], + "to": [ 15.2, 16, 8 ], + "rotation": { "origin": [ 8, 8, 8 ], "axis": "y", "angle": 45, "rescale": true }, + "shade": false, + "faces": { + "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#all" }, + "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#all" } + } + }, + { + "from": [ 8, 0, 0.8 ], + "to": [ 8, 16, 15.2 ], + "rotation": { "origin": [ 8, 8, 8 ], "axis": "y", "angle": 45, "rescale": true }, + "shade": false, + "faces": { + "west": { "uv": [ 0, 0, 16, 16 ], "texture": "#all" }, + "east": { "uv": [ 0, 0, 16, 16 ], "texture": "#all" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/mubble/models/item/beanstalk.json b/src/main/resources/assets/mubble/models/item/beanstalk.json new file mode 100644 index 00000000..74ee3de8 --- /dev/null +++ b/src/main/resources/assets/mubble/models/item/beanstalk.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "mubble:block/beanstalk" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/mubble/textures/block/beanstalk.png b/src/main/resources/assets/mubble/textures/block/beanstalk.png new file mode 100644 index 00000000..77d81bb3 Binary files /dev/null and b/src/main/resources/assets/mubble/textures/block/beanstalk.png differ diff --git a/src/main/resources/data/minecraft/tags/blocks/climbable.json b/src/main/resources/data/minecraft/tags/blocks/climbable.json new file mode 100644 index 00000000..af55cba4 --- /dev/null +++ b/src/main/resources/data/minecraft/tags/blocks/climbable.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "mubble:beanstalk" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/mubble/tags/blocks/beanstalk_plantable_on.json b/src/main/resources/data/mubble/tags/blocks/beanstalk_plantable_on.json new file mode 100644 index 00000000..0cf325e8 --- /dev/null +++ b/src/main/resources/data/mubble/tags/blocks/beanstalk_plantable_on.json @@ -0,0 +1,15 @@ +{ + "replace": false, + "values": [ + "mubble:empty_block", + "mubble:beanstalk", + "mubble:exclamation_block", + "mubble:note_block", + "#minecraft:dirt", + "#minecraft:base_stone_overworld", + "#minecraft:sand", + "#minecraft:snow", + "minecraft:gravel", + "minecraft:suspicious_gravel" + ] +} \ No newline at end of file