Skip to content

Commit

Permalink
fix #16 (i think)
Browse files Browse the repository at this point in the history
Fix several bugs which amounted to #16.
  • Loading branch information
BarchamMal committed Jul 26, 2024
1 parent c6538c3 commit 2dac6fc
Show file tree
Hide file tree
Showing 85 changed files with 89 additions and 66 deletions.
6 changes: 3 additions & 3 deletions src/main/java/barch/mc_extended/Glue/BlockBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
public class BlockBuilder {


private static FabricBlockSettings Settings;
private static Block.Settings Settings;


public static FabricBlockSettings CloneBlock(Block block) {
public static Block.Settings CloneBlock(Block block) {

Settings = FabricBlockSettings.create()
Settings = Block.Settings.create()
.sounds(block.getDefaultState().getSoundGroup())
.strength(block.getHardness())
.resistance(block.getBlastResistance())
Expand Down
13 changes: 9 additions & 4 deletions src/main/java/barch/mc_extended/Minerals/Ruby.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,29 @@
import barch.mc_extended.Glue.ItemGrouped;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.block.ExperienceDroppingBlock;
import net.minecraft.block.MapColor;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroups;
import net.minecraft.item.Items;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.util.DyeColor;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.intprovider.ConstantIntProvider;
import net.minecraft.util.math.intprovider.UniformIntProvider;

import static barch.mc_extended.MCExtended.*;

public class Ruby {

public static final Block RUBY_ORE = new Block(BlockBuilder.CloneBlock(Blocks.DIAMOND_ORE).mapColor(DyeColor.LIGHT_GRAY).requiresTool().resistance(1200).hardness(30));
public static final Block DEEPSLATE_RUBY_ORE = new Block(BlockBuilder.CloneBlock(Blocks.DEEPSLATE_DIAMOND_ORE).mapColor(DyeColor.GRAY).requiresTool().resistance(1200).hardness(30));
public static final Block RUBY_BLOCK = new Block(BlockBuilder.CloneBlock(Blocks.DIAMOND_BLOCK).mapColor(DyeColor.RED).requiresTool().resistance(1200).hardness(30));
public static final Block RUBY_ORE = new ExperienceDroppingBlock(UniformIntProvider.create(3, 7), BlockBuilder.CloneBlock(Blocks.DIAMOND_ORE).mapColor(DyeColor.LIGHT_GRAY).requiresTool().strength(3,3));
public static final Block DEEPSLATE_RUBY_ORE = new ExperienceDroppingBlock(UniformIntProvider.create(3, 7), BlockBuilder.CloneBlock(Blocks.DEEPSLATE_DIAMOND_ORE).mapColor(DyeColor.GRAY).requiresTool().strength(5, 6));
public static final Block RUBY_BLOCK = new Block(BlockBuilder.CloneBlock(Blocks.DIAMOND_BLOCK).mapColor(DyeColor.RED).requiresTool().strength(5,6));

public static final Item RUBY = new Item(new Item.Settings());
public static final Item RUBY = new Item(new Item.Settings());

public static void RegisterAll() {

Expand Down
8 changes: 5 additions & 3 deletions src/main/java/barch/mc_extended/Minerals/Sapphire.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,24 @@
import barch.mc_extended.Glue.ItemGrouped;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.block.ExperienceDroppingBlock;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroups;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.util.DyeColor;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.intprovider.UniformIntProvider;

import static barch.mc_extended.MCExtended.NAMESPACE;
import static barch.mc_extended.Minerals.Ruby.*;

public class Sapphire {

public static final Block SAPPHIRE_ORE = new Block(BlockBuilder.CloneBlock(Blocks.DIAMOND_ORE).mapColor(DyeColor.LIGHT_GRAY).requiresTool().resistance(1200).hardness(30));
public static final Block DEEPSLATE_SAPPHIRE_ORE = new Block(BlockBuilder.CloneBlock(Blocks.DEEPSLATE_DIAMOND_ORE).mapColor(DyeColor.GRAY).requiresTool().resistance(1200).hardness(30));
public static final Block SAPPHIRE_BLOCK = new Block(BlockBuilder.CloneBlock(Blocks.DIAMOND_BLOCK).mapColor(DyeColor.RED).requiresTool().resistance(1200).hardness(30));
public static final Block SAPPHIRE_ORE = new ExperienceDroppingBlock(UniformIntProvider.create(3, 7), BlockBuilder.CloneBlock(Blocks.DIAMOND_ORE).mapColor(DyeColor.LIGHT_GRAY).requiresTool().strength(3,3));
public static final Block DEEPSLATE_SAPPHIRE_ORE = new ExperienceDroppingBlock(UniformIntProvider.create(3, 7), BlockBuilder.CloneBlock(Blocks.DEEPSLATE_DIAMOND_ORE).mapColor(DyeColor.GRAY).requiresTool().strength(5,6));
public static final Block SAPPHIRE_BLOCK = new Block(BlockBuilder.CloneBlock(Blocks.DIAMOND_BLOCK).mapColor(DyeColor.RED).requiresTool().strength(5,6));

public static final Item SAPPHIRE = new Item(new Item.Settings());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
}
]
]
}
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
}
]
]
}
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
}
]
]
}
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
}
]
]
}
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
}
]
]
}
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
}
]
]
}
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
}
]
]
}
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
}
]
]
}
}
}
],
Expand Down

0 comments on commit 2dac6fc

Please sign in to comment.