Skip to content

Commit

Permalink
Added new blocks/block varients, fixed bugs from 0.1.1
Browse files Browse the repository at this point in the history
Added:
- Bunch of new blocks/stairs/slabs
- Golden foods (Carrot/Beetroot/Sweet Berries)

Fixed:
- Wavy sandstone
- Borite (name WIP)
- Corrite (name WIP)

Needs Fixing:
- All new soul stone block and block varients (slabs/stairs/walls)
  • Loading branch information
Jiingy committed Jan 29, 2021
1 parent 4de60f2 commit 0b79669
Show file tree
Hide file tree
Showing 73 changed files with 1,930 additions and 5 deletions.
10 changes: 10 additions & 0 deletions src/main/java/com/jingy/jineric/BaseJinericStairBlock.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.jingy.jineric;

import net.minecraft.block.BlockState;
import net.minecraft.block.StairsBlock;

class BaseJinericStairBlock extends StairsBlock {
public BaseJinericStairBlock (BlockState baseBlockState, Settings settings) {
super(baseBlockState, settings);
}
};
37 changes: 37 additions & 0 deletions src/main/java/com/jingy/jineric/BlockSettings.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.jingy.jineric;

import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
import net.minecraft.block.Block;
import net.minecraft.block.Material;
import net.minecraft.block.SlabBlock;
import net.minecraft.sound.BlockSoundGroup;

public class BlockSettings {

public static Block StoneSettings() {
return new Block(FabricBlockSettings
.of(Material.STONE)
.breakByTool(FabricToolTags.PICKAXES, 0)
.requiresTool()
.strength(1.5f, 30.0f)
.sounds(BlockSoundGroup.STONE));
}

public static Block SoulSandstoneSettings() {
return new Block(FabricBlockSettings
.of(Material.STONE)
.breakByTool(FabricToolTags.PICKAXES, 0)
.requiresTool()
.strength(0.8f, 4f)
.sounds(BlockSoundGroup.SOUL_SAND));
}
public static SlabBlock SandstoneSettings() {
return new SlabBlock(FabricBlockSettings
.of(Material.STONE)
.breakByTool(FabricToolTags.PICKAXES, 0)
.requiresTool()
.strength(0.8f, 4f)
.sounds(BlockSoundGroup.STONE));
}
}
110 changes: 110 additions & 0 deletions src/main/java/com/jingy/jineric/Blocks.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
package com.jingy.jineric;

import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricMaterialBuilder;
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
import net.minecraft.block.*;
import net.minecraft.block.enums.StairShape;
import net.minecraft.block.piston.PistonBehavior;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.Items;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.tag.Tag;
import net.minecraft.util.DyeColor;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;

import static net.minecraft.block.Blocks.*;

public class Blocks {

/*
templates
block: public static final Block POLISHED_STONE = register("polished_stone", new Block(FabricBlockSettings.copy(STONE_BRICKS)));
slab: public static final Block POLISHED_STONE_SLAB = register("polished_stone_slab", new SlabBlock(FabricBlockSettings.copy(STONE_BRICKS)));
stairs: public static final Block POLISHED_STONE_STAIRS = register("polished_stone_stairs", new BaseConsistencyStairBlock(STONE_BRICKS.getDefaultState(),FabricBlockSettings.copy(STONE_BRICKS)));
pillar: public static final Block STONE_BRICK_PILLAR = register("stone_brick_pillar", new PillarBlock(FabricBlockSettings.copy(STONE_BRICKS)));
wall: public static final Block STONE_WALL = register("stone_wall", new WallBlock(FabricBlockSettings.copy(STONE_BRICKS)));
*/

//SAND
//CUT SANDSTONE
public static final Block CUT_SANDSTONE_STAIRS = register("cut_sandstone_stairs", new BaseJinericStairBlock(CUT_SANDSTONE.getDefaultState(),FabricBlockSettings.copy(CUT_SANDSTONE)));
public static final Block CUT_SANDSTONE_WALL = register("cut_sandstone_wall", new WallBlock(FabricBlockSettings.copy(CUT_SANDSTONE)));

//CHISELED SOUL SANDSTONE
public static final Block CHISELED_SANDSTONE_STAIRS = register("chiseled_sandstone_stairs", new BaseJinericStairBlock(CHISELED_SANDSTONE.getDefaultState(),FabricBlockSettings.copy(CHISELED_SANDSTONE)));
public static final Block CHISELED_SANDSTONE_SLAB = register("chiseled_sandstone_slab", new SlabBlock(FabricBlockSettings.copy(CHISELED_SANDSTONE)));
public static final Block CHISELED_SANDSTONE_WALL = register("chiseled_sandstone_wall", new WallBlock(FabricBlockSettings.copy(CHISELED_SANDSTONE)));

//WAVY SANDSTONE
public static final Block WAVY_SANDSTONE = register("wavy_sandstone", new Block(FabricBlockSettings.copy(BlockSettings.SandstoneSettings())));
public static final Block WAVY_SANDSTONE_STAIRS = register("wavy_sandstone_stairs", new BaseJinericStairBlock(WAVY_SANDSTONE.getDefaultState(),FabricBlockSettings.copy(WAVY_SANDSTONE)));
public static final Block WAVY_SANDSTONE_SLAB = register("wavy_sandstone_slab", new SlabBlock(FabricBlockSettings.copy(WAVY_SANDSTONE)));
public static final Block WAVY_SANDSTONE_WALL = register("wavy_sandstone_wall", new WallBlock(FabricBlockSettings.copy(WAVY_SANDSTONE)));

//SMOOTH SANDSTONE
public static final Block SMOOTH_SANDSTONE_WALL = register("smooth_sandstone_wall", new WallBlock(FabricBlockSettings.copy(SMOOTH_SANDSTONE)));


//RED SAND
//WAVY RED SANDSTONE
public static final Block WAVY_RED_SANDSTONE = register("wavy_red_sandstone", new Block(FabricBlockSettings.copy(BlockSettings.SandstoneSettings())));
public static final Block WAVY_RED_SANDSTONE_STAIRS = register("wavy_red_sandstone_stairs", new BaseJinericStairBlock(WAVY_RED_SANDSTONE.getDefaultState(),FabricBlockSettings.copy(WAVY_SANDSTONE)));
public static final Block WAVY_RED_SANDSTONE_SLAB = register("wavy_red_sandstone_slab", new SlabBlock(FabricBlockSettings.copy(WAVY_RED_SANDSTONE)));
public static final Block WAVY_RED_SANDSTONE_WALL = register("wavy_red_sandstone_wall", new WallBlock(FabricBlockSettings.copy(WAVY_RED_SANDSTONE)));

//SOUL SAND
//SOUL SANDSTONE
public static final Block SOUL_SANDSTONE = register("soul_sandstone", new Block(FabricBlockSettings.copy(BlockSettings.SoulSandstoneSettings())));
public static final Block SOUL_SANDSTONE_STAIRS = register("soul_sandstone_stairs", new BaseJinericStairBlock(SOUL_SANDSTONE.getDefaultState(),FabricBlockSettings.copy(SOUL_SANDSTONE)));
public static final Block SOUL_SANDSTONE_SLAB = register("soul_sandstone_slab", new SlabBlock(FabricBlockSettings.copy(SOUL_SANDSTONE)));
public static final Block SOUL_SANDSTONE_WALL = register("soul_sandstone_wall", new WallBlock(FabricBlockSettings.copy(SOUL_SANDSTONE)));

//CUT SOUL SANDSTONE
public static final Block CUT_SOUL_SANDSTONE = register("cut_soul_sandstone", new Block(FabricBlockSettings.copy(BlockSettings.SoulSandstoneSettings())));
public static final Block CUT_SOUL_SANDSTONE_STAIRS = register("cut_soul_sandstone_stairs", new BaseJinericStairBlock(SOUL_SANDSTONE.getDefaultState(),FabricBlockSettings.copy(SOUL_SANDSTONE)));
public static final Block CUT_SOUL_SANDSTONE_SLAB = register("cut_soul_sandstone_slab", new SlabBlock(FabricBlockSettings.copy(SOUL_SANDSTONE)));
public static final Block CUT_SOUL_SANDSTONE_WALL = register("cut_soul_sandstone_wall", new WallBlock(FabricBlockSettings.copy(SOUL_SANDSTONE)));

//CHISELED SOUL SANDSTONE
public static final Block CHISELED_SOUL_SANDSTONE = register("chiseled_soul_sandstone", new Block(FabricBlockSettings.copy(BlockSettings.SoulSandstoneSettings())));
public static final Block CHISELED_SOUL_SANDSTONE_STAIRS = register("chiseled_soul_sandstone_stairs", new BaseJinericStairBlock(SOUL_SANDSTONE.getDefaultState(),FabricBlockSettings.copy(SOUL_SANDSTONE)));
public static final Block CHISELED_SOUL_SANDSTONE_SLAB = register("chiseled_soul_sandstone_slab", new SlabBlock(FabricBlockSettings.copy(SOUL_SANDSTONE)));
public static final Block CHISELED_SOUL_SANDSTONE_WALL = register("chiseled_soul_sandstone_wall", new WallBlock(FabricBlockSettings.copy(SOUL_SANDSTONE)));

//SMOOTH SOUL SANDSTONE
public static final Block SMOOTH_SOUL_SANDSTONE = register("smooth_soul_sandstone", new Block(FabricBlockSettings.copy(BlockSettings.SoulSandstoneSettings())));
public static final Block SMOOTH_SOUL_SANDSTONE_STAIRS = register("smooth_soul_sandstone_stairs", new BaseJinericStairBlock(SOUL_SANDSTONE.getDefaultState(),FabricBlockSettings.copy(SOUL_SANDSTONE)));
public static final Block SMOOTH_SOUL_SANDSTONE_SLAB = register("smooth_soul_sandstone_slab", new SlabBlock(FabricBlockSettings.copy(SOUL_SANDSTONE)));
public static final Block SMOOTH_SOUL_SANDSTONE_WALL = register("smooth_soul_sandstone_wall", new WallBlock(FabricBlockSettings.copy(SOUL_SANDSTONE)));

//WAVY SOUL SANDSTONE
public static final Block WAVY_SOUL_SANDSTONE = register("wavy_soul_sandstone", new Block(FabricBlockSettings.copy(BlockSettings.SoulSandstoneSettings())));
public static final Block WAVY_SOUL_SANDSTONE_STAIRS = register("wavy_soul_sandstone_stairs", new BaseJinericStairBlock(SOUL_SANDSTONE.getDefaultState(),FabricBlockSettings.copy(SOUL_SANDSTONE)));
public static final Block WAVY_SOUL_SANDSTONE_SLAB = register("wavy_soul_sandstone_slab", new SlabBlock(FabricBlockSettings.copy(SOUL_SANDSTONE)));
public static final Block WAVY_SOUL_SANDSTONE_WALL = register("wavy_soul_sandstone_wall", new WallBlock(FabricBlockSettings.copy(SOUL_SANDSTONE)));

//STONE TYPES:
//CORRITE
public static final Block CORRITE = register("corrite", new Block(FabricBlockSettings.copy(STONE)));
public static final Block CORRITE_STAIRS = register("corrite_stairs", new BaseJinericStairBlock(STONE.getDefaultState(),FabricBlockSettings.copy(STONE)));
public static final Block CORRITE_SLAB = register("corrite_slab", new SlabBlock(FabricBlockSettings.copy(STONE)));
public static final Block CORRITE_WALL = register("corrite_wall", new WallBlock(FabricBlockSettings.copy(STONE)));

//BORITE
public static final Block BORITE = register("borite", new Block(FabricBlockSettings.copy(STONE)));
public static final Block BORITE_STAIRS = register("borite_stairs", new BaseJinericStairBlock(STONE.getDefaultState(),FabricBlockSettings.copy(STONE)));
public static final Block BORITE_SLAB = register("borite_slab", new SlabBlock(FabricBlockSettings.copy(STONE)));
public static final Block BORITE_WALL = register("borite_wall", new WallBlock(FabricBlockSettings.copy(STONE)));



private static Block register(String name, Block block) {
return Registry.register(Registry.BLOCK, new Identifier("jineric", name), block);
}
public static void init() {
}
}
28 changes: 28 additions & 0 deletions src/main/java/com/jingy/jineric/ItemGroups.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.jingy.jineric;

import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Identifier;

public class ItemGroups {
public static final ItemGroup JINERIC_BLOCKS = FabricItemGroupBuilder.build(
new Identifier("blocks", "jineric"),
() -> new ItemStack(Items.CORRITE));

public static Item.Settings jinericBlocks() {
return new Item.Settings().group(JINERIC_BLOCKS);

}
public static final ItemGroup JINERIC_ITEMS = FabricItemGroupBuilder.build(
new Identifier("items", "jineric"),

() -> new ItemStack(Items.GOLDEN_SWEET_BERRIES));
public static Item.Settings jinericItems() {
return new Item.Settings().group(JINERIC_ITEMS);
}
public static void init() {
}

}
21 changes: 21 additions & 0 deletions src/main/java/com/jingy/jineric/ItemSettings.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.jingy.jineric;

import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;

public class ItemSettings {
public static Item.Settings BuildingBlocks() {
return new Item.Settings().group(ItemGroup.BUILDING_BLOCKS);
}

public static Item.Settings Misc() {
return new Item.Settings().group(ItemGroup.MISC);
}
public static Item.Settings Decoration() {
return new Item.Settings().group(ItemGroup.DECORATIONS);
}
public static Item.Settings Food() {
return new Item.Settings().group(ItemGroup.FOOD);
}

}
Loading

0 comments on commit 0b79669

Please sign in to comment.