Skip to content

Commit

Permalink
Merge pull request #7 from vrglab/dev/tools-and-armors/obsidian
Browse files Browse the repository at this point in the history
Dev/tools and armors/obsidian
  • Loading branch information
vrglab authored Jun 16, 2024
2 parents cd547a0 + ee8fd81 commit 2aac544
Show file tree
Hide file tree
Showing 51 changed files with 466 additions and 28 deletions.
2 changes: 0 additions & 2 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@ dependencies {
modImplementation "dev.architectury:architectury:$rootProject.architectury_api_version"

modImplementation "org.Vrglab:vrglabslib:common-$rootProject.vrglabs_lib_version-mc$rootProject.minecraft_version"
modImplementation "software.bernie.geckolib:geckolib-fabric-$rootProject.geckolib_minecraft_version:$rootProject.geckolib_version"
implementation("com.eliotlash.mclib:mclib:20")

}
1 change: 1 addition & 0 deletions common/src/main/java/com/Vrglab/ExtremeRubyMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.Vrglab.World.Items.ExItemGroups;
import com.Vrglab.World.Items.ExItems;
import com.Vrglab.World.Rendering.ExGeckoRenderers;
import net.minecraft.loot.entry.LootTableEntry;
import org.Vrglab.Modloader.Registration.Registry;

public final class ExtremeRubyMod {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
public enum ArmorMaterials implements net.minecraft.item.ArmorMaterial {
RUBY("ruby", 46, new int[]{4, 7, 9, 4}, 22, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 4.0F, 0.2F, () -> {
return Ingredient.ofItems(new ItemConvertible[]{(Item)TypeTransformer.ObjectToType.accept(ExItems.RUBY)});
});
}),

OBSIDIAN("obsidian", 66, new int[]{5, 8, 10, 5}, 35, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 6.0F, 0.9F, () -> {
return Ingredient.ofItems(new ItemConvertible[]{(Item)TypeTransformer.ObjectToType.accept(ExItems.RUBY)});
})
;



Expand Down
10 changes: 4 additions & 6 deletions common/src/main/java/com/Vrglab/World/Items/ExItemGroups.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
package com.Vrglab.World.Items;

import com.Vrglab.ExtremeRubyMod;
import dev.architectury.registry.CreativeTabRegistry;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Identifier;
import org.Vrglab.Modloader.CreationHelpers.TypeTransformer;

public class ExItemGroups {
public static ItemGroup EXTREME_RUBY_CREATIVE_GROUP = new ItemGroup(4, "extremeruby_creative_tab") {
@Override
public ItemStack createIcon() {
return new ItemStack((Item)TypeTransformer.ObjectToType.accept(ExItems.RUBY));
}
};
public static ItemGroup EXTREME_RUBY_CREATIVE_GROUP = CreativeTabRegistry.create(new Identifier(ExtremeRubyMod.MOD_ID, "creative_tab"), ()->new ItemStack((Item)TypeTransformer.ObjectToType.accept(ExItems.RUBY)));

public static void init() {
}
Expand Down
32 changes: 30 additions & 2 deletions common/src/main/java/com/Vrglab/World/Items/ExItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ public class ExItems {
/** INGOT BASED ITEMS **/
public static Object RUBY = Registry.RegisterItem("ruby", ExtremeRubyMod.MOD_ID,
()->new Item(getBaseSettings()));
public static Object OBSIDIANBITS = Registry.RegisterItem("obsidianbits", ExtremeRubyMod.MOD_ID,
()->new Item(getBaseSettings()));


/**** TOOLS ****/

/** TOOLS **/
/** RUBY **/
public static Object RUBY_SWORD = Registry.RegisterItem("ruby_sword", ExtremeRubyMod.MOD_ID,
()->new SwordItem(ToolMaterials.RUBY, 5, -2.9f, getBaseSettings()));
public static Object RUBY_PICKAXE = Registry.RegisterItem("ruby_pickaxe", ExtremeRubyMod.MOD_ID,
Expand All @@ -27,7 +31,21 @@ public class ExItems {
public static Object RUBY_HOE = Registry.RegisterItem("ruby_hoe", ExtremeRubyMod.MOD_ID,
()->new HoeItem(ToolMaterials.RUBY, 2, -1, getBaseSettings()));

/** ARMOUR **/
/** OBSIDIAN **/
public static Object OBSIDIAN_SWORD = Registry.RegisterItem("obsidian_sword", ExtremeRubyMod.MOD_ID,
()->new SwordItem(ToolMaterials.OBSIDIAN, 8, -2f, getBaseSettings()));
public static Object OBSIDIAN_PICKAXE = Registry.RegisterItem("obsidian_pickaxe", ExtremeRubyMod.MOD_ID,
()->new PickaxeItem(ToolMaterials.OBSIDIAN, 3, -2.4f, getBaseSettings()));
public static Object OBSIDIAN_AXE = Registry.RegisterItem("obsidian_axe", ExtremeRubyMod.MOD_ID,
()->new AxeItem(ToolMaterials.OBSIDIAN, 10, -3, getBaseSettings()));
public static Object OBSIDIAN_SHOVEL = Registry.RegisterItem("obsidian_shovel", ExtremeRubyMod.MOD_ID,
()->new ShovelItem(ToolMaterials.OBSIDIAN, 2, -1, getBaseSettings()));
public static Object OBSIDIAN_HOE = Registry.RegisterItem("obsidian_hoe", ExtremeRubyMod.MOD_ID,
()->new HoeItem(ToolMaterials.OBSIDIAN, 2, -1, getBaseSettings()));

/**** ARMOUR ****/

/** RUBY **/
public static Object RUBY_HELMET = Registry.RegisterItem("ruby_helmet", ExtremeRubyMod.MOD_ID,
()->new RubyArmorItem(ArmorMaterials.RUBY, EquipmentSlot.HEAD, getBaseSettings()));
public static Object RUBY_CHESTPLATE = Registry.RegisterItem("ruby_chestplate", ExtremeRubyMod.MOD_ID,
Expand All @@ -38,6 +56,16 @@ public class ExItems {
()->new RubyArmorItem(ArmorMaterials.RUBY, EquipmentSlot.FEET, getBaseSettings()));


/** OBSIDIAN **/
public static Object OBSIDIAN_HELMET = Registry.RegisterItem("obsidian_helmet", ExtremeRubyMod.MOD_ID,
()->new RubyArmorItem(ArmorMaterials.OBSIDIAN, EquipmentSlot.HEAD, getBaseSettings()));
public static Object OBSIDIAN_CHESTPLATE = Registry.RegisterItem("obsidian_chestplate", ExtremeRubyMod.MOD_ID,
()->new RubyArmorItem(ArmorMaterials.OBSIDIAN, EquipmentSlot.CHEST, getBaseSettings()));
public static Object OBSIDIAN_LEGGINGS = Registry.RegisterItem("obsidian_leggings", ExtremeRubyMod.MOD_ID,
()->new RubyArmorItem(ArmorMaterials.OBSIDIAN, EquipmentSlot.LEGS, getBaseSettings()));
public static Object OBSIDIAN_BOOTS = Registry.RegisterItem("obsidian_boots", ExtremeRubyMod.MOD_ID,
()->new RubyArmorItem(ArmorMaterials.OBSIDIAN, EquipmentSlot.FEET, getBaseSettings()));

private static Item.Settings getBaseSettings(){
return new Item.Settings().group(ExItemGroups.EXTREME_RUBY_CREATIVE_GROUP);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
public enum ToolMaterials implements net.minecraft.item.ToolMaterial {
RUBY(5, 3031,10.0f, 5.0f, 22, ()-> {
return Ingredient.ofItems(new ItemConvertible[]{(Item)TypeTransformer.ObjectToType.accept(ExItems.RUBY)});
}),

OBSIDIAN(6, 5031,13.0f, 10.0f, 35, ()-> {
return Ingredient.ofItems(new ItemConvertible[]{(Item)TypeTransformer.ObjectToType.accept(ExItems.OBSIDIANBITS)});
})
;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.Vrglab.World.loottable;

import com.Vrglab.ExtremeRubyMod;
import net.minecraft.util.Identifier;

public class LootTableReplacebles {

public static final Identifier ORIGINAL_OBSIDIAN = new Identifier("minecraft", "blocks/obsidian");
public static final Identifier NEW_OBSIDIAN = new Identifier(ExtremeRubyMod.MOD_ID, "blocks/obsidian");
}
14 changes: 12 additions & 2 deletions common/src/main/resources/assets/extreme_ruby/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"itemGroup.extremeruby_creative_tab": "Extreme Ruby",
"itemGroup.extreme_ruby.creative_tab": "Extreme Ruby",
"item.extreme_ruby.ruby": "Ruby",
"item.extreme_ruby.ruby_sword": "Ruby Sword",
"item.extreme_ruby.ruby_pickaxe": "Ruby Pickaxe",
Expand All @@ -12,5 +12,15 @@
"item.extreme_ruby.ruby_chestplate": "Ruby Chestplate",
"block.extreme_ruby.ruby_block": "Ruby Block",
"block.extreme_ruby.ruby_ore": "Ruby Ore",
"block.extreme_ruby.deepslate_ruby_ore": "Deepslate Ruby Ore"
"block.extreme_ruby.deepslate_ruby_ore": "Deepslate Ruby Ore",
"item.extreme_ruby.obsidianbits": "Obsidian Bits",
"item.extreme_ruby.obsidian_sword": "Obsidian Sword",
"item.extreme_ruby.obsidian_pickaxe": "Obsidian Pickaxe",
"item.extreme_ruby.obsidian_axe": "Obsidian Axe",
"item.extreme_ruby.obsidian_shovel": "Obsidian Shovel",
"item.extreme_ruby.obsidian_hoe": "Obsidian Hoe",
"item.extreme_ruby.obsidian_helmet": "Obsidian Helmet",
"item.extreme_ruby.obsidian_boots": "Obsidian Boots",
"item.extreme_ruby.obsidian_leggings": "Obsidian Leggings",
"item.extreme_ruby.obsidian_chestplate": "Obsidian Chestplate"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "extreme_ruby:item/obsidian_axe"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "extreme_ruby:item/obsidian_boots"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "extreme_ruby:item/obsidian_chestplate"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "extreme_ruby:item/obsidian_helmet"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "extreme_ruby:item/obsidian_hoe"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "extreme_ruby:item/obsidian_leggings"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "extreme_ruby:item/obsidian_pickaxe"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "extreme_ruby:item/obsidian_shovel"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "extreme_ruby:item/obsidian_sword"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "extreme_ruby:item/obsidianbits"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:obsidian"
}
],
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
]
},
{
"rolls": {
"min": 2,
"max": 4
},
"entries": [
{
"type": "minecraft:item",
"name": "extreme_ruby:obsidianbits"
}
],
"conditions": [
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
]
}
]
}
16 changes: 16 additions & 0 deletions common/src/main/resources/data/extreme_ruby/recipes/obsidian.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"oo",
"oo"
],
"key": {
"o": {
"item": "extreme_ruby:obsidianbits"
}
},
"result": {
"item": "minecraft:obsidian",
"count": 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"oo ",
"os ",
" s "
],
"key": {
"s": {
"item": "minecraft:stick"
},
"o": {
"item": "extreme_ruby:obsidianbits"
}
},
"result": {
"item": "extreme_ruby:obsidian_axe",
"count": 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"o o",
"o o"
],
"key": {
"o": {
"item": "extreme_ruby:obsidianbits"
}
},
"result": {
"item": "extreme_ruby:obsidian_boots",
"count": 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"o o",
"ooo",
"ooo"
],
"key": {
"o": {
"item": "extreme_ruby:obsidianbits"
}
},
"result": {
"item": "extreme_ruby:obsidian_chestplate",
"count": 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"ooo",
"o o"
],
"key": {
"o": {
"item": "extreme_ruby:obsidianbits"
}
},
"result": {
"item": "extreme_ruby:obsidian_helmet",
"count": 1
}
}
Loading

0 comments on commit 2aac544

Please sign in to comment.