Compare commits
No commits in common. "ca8b19249e10aa87bfd57d5960a74037e4bf676f" and "8d3d3821f24f7e3a917ae2568a042786675be776" have entirely different histories.
ca8b19249e
...
8d3d3821f2
14
build.gradle
|
|
@ -16,17 +16,6 @@ repositories {
|
||||||
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
|
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
|
||||||
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
|
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
|
||||||
// for more information about repositories.
|
// for more information about repositories.
|
||||||
exclusiveContent {
|
|
||||||
forRepository {
|
|
||||||
maven {
|
|
||||||
name = "Modrinth"
|
|
||||||
url = "https://api.modrinth.com/maven"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
filter {
|
|
||||||
includeGroup "maven.modrinth"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loom {
|
loom {
|
||||||
|
|
@ -55,8 +44,7 @@ dependencies {
|
||||||
|
|
||||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
|
||||||
|
|
||||||
modImplementation "maven.modrinth:backport-copper-age:1.21.1-0.1.4"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ public class MCRebalance implements ModInitializer {
|
||||||
|
|
||||||
ModItems.init(); // Initialise: load all static values
|
ModItems.init(); // Initialise: load all static values
|
||||||
ModBlocks.init();
|
ModBlocks.init();
|
||||||
|
ModArmourMats.init();
|
||||||
LOGGER.info("Hello Fabric world!");
|
LOGGER.info("Hello Fabric world!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
package xyz.nearmisses.patience.mc_rebalance;
|
||||||
|
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
|
import net.minecraft.core.Registry;
|
||||||
|
import net.minecraft.core.registries.BuiltInRegistries;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.sounds.SoundEvent;
|
||||||
|
import net.minecraft.sounds.SoundEvents;
|
||||||
|
import net.minecraft.world.item.ArmorItem;
|
||||||
|
import net.minecraft.world.item.ArmorMaterial;
|
||||||
|
import net.minecraft.world.item.Items;
|
||||||
|
import net.minecraft.world.item.crafting.Ingredient;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
public class ModArmourMats {
|
||||||
|
public static void init(){}
|
||||||
|
|
||||||
|
// Speeds up the process of making new armour.
|
||||||
|
public static Holder<ArmorMaterial> registerMaterial(
|
||||||
|
String id,
|
||||||
|
Map<ArmorItem.Type, Integer> defensePoints,
|
||||||
|
int enchantability,
|
||||||
|
Holder<SoundEvent> equipSound,
|
||||||
|
Supplier<Ingredient> repairIngredientSupplier,
|
||||||
|
float toughness,
|
||||||
|
float knockbackResistance,
|
||||||
|
boolean dyeable
|
||||||
|
) {
|
||||||
|
// Get the supported layers for the armor material
|
||||||
|
List<ArmorMaterial.Layer> layers = List.of(
|
||||||
|
new ArmorMaterial.Layer(ResourceLocation.fromNamespaceAndPath(MCRebalance.MOD_ID, id), "", dyeable) // ID, suffix(?), dyeable
|
||||||
|
);
|
||||||
|
|
||||||
|
ArmorMaterial material = new ArmorMaterial(defensePoints, enchantability, equipSound, repairIngredientSupplier, layers, toughness, knockbackResistance);
|
||||||
|
|
||||||
|
// Check why/if this is necessary later.
|
||||||
|
material = Registry.register(BuiltInRegistries.ARMOR_MATERIAL, ResourceLocation.fromNamespaceAndPath(MCRebalance.MOD_ID, id), material);
|
||||||
|
return Holder.direct(material);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Holder<ArmorMaterial> Copper = registerMaterial("copper",
|
||||||
|
Map.of( // Armour values
|
||||||
|
ArmorItem.Type.HELMET, 2,
|
||||||
|
ArmorItem.Type.CHESTPLATE, 4,
|
||||||
|
ArmorItem.Type.LEGGINGS, 3,
|
||||||
|
ArmorItem.Type.BOOTS, 1
|
||||||
|
),
|
||||||
|
9, // Enchantability
|
||||||
|
SoundEvents.ARMOR_EQUIP_IRON,
|
||||||
|
() -> Ingredient.of(Items.COPPER_INGOT),
|
||||||
|
0.0F, // Toughness
|
||||||
|
0.0F, // Knockback resistance
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
|
// Armor items defined in ModItems.
|
||||||
|
}
|
||||||
|
|
@ -6,6 +6,7 @@ import net.minecraft.core.registries.BuiltInRegistries;
|
||||||
import net.minecraft.core.registries.Registries;
|
import net.minecraft.core.registries.Registries;
|
||||||
import net.minecraft.resources.ResourceKey;
|
import net.minecraft.resources.ResourceKey;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.world.item.ArmorItem;
|
||||||
import net.minecraft.world.item.CreativeModeTabs;
|
import net.minecraft.world.item.CreativeModeTabs;
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
import net.minecraft.world.item.Items;
|
import net.minecraft.world.item.Items;
|
||||||
|
|
@ -14,13 +15,18 @@ public class ModItems {
|
||||||
public static void init(){
|
public static void init(){
|
||||||
// Add items to creative tabs
|
// Add items to creative tabs
|
||||||
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.TOOLS_AND_UTILITIES).register((itemGroup) -> itemGroup.addAfter(Items.WOODEN_HOE, ModItems.Paxel_Wood));
|
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.TOOLS_AND_UTILITIES).register((itemGroup) -> itemGroup.addAfter(Items.WOODEN_HOE, ModItems.Paxel_Wood));
|
||||||
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.TOOLS_AND_UTILITIES).register((itemGroup) -> itemGroup.addAfter(Items.STONE_HOE, ModItems.Paxel_Stone));
|
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.TOOLS_AND_UTILITIES).register((itemGroup) -> itemGroup.addAfter(Items.STONE_HOE, ModItems.Paxel_Copper));
|
||||||
// Ugly, but java has no import aliasing and the mod uses the exact same class name
|
|
||||||
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.TOOLS_AND_UTILITIES).register((itemGroup) -> itemGroup.addAfter(com.github.smallinger.copperagebackport.registry.ModItems.COPPER_HOE.get(), ModItems.Paxel_Copper));
|
|
||||||
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.TOOLS_AND_UTILITIES).register((itemGroup) -> itemGroup.addAfter(Items.IRON_HOE, ModItems.Paxel_Iron));
|
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.TOOLS_AND_UTILITIES).register((itemGroup) -> itemGroup.addAfter(Items.IRON_HOE, ModItems.Paxel_Iron));
|
||||||
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.TOOLS_AND_UTILITIES).register((itemGroup) -> itemGroup.addAfter(Items.GOLDEN_HOE, ModItems.Paxel_Gold));
|
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.TOOLS_AND_UTILITIES).register((itemGroup) -> itemGroup.addAfter(Items.GOLDEN_HOE, ModItems.Paxel_Gold));
|
||||||
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.TOOLS_AND_UTILITIES).register((itemGroup) -> itemGroup.addAfter(Items.DIAMOND_HOE, ModItems.Paxel_Diamond));
|
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.TOOLS_AND_UTILITIES).register((itemGroup) -> itemGroup.addAfter(Items.DIAMOND_HOE, ModItems.Paxel_Diamond));
|
||||||
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.TOOLS_AND_UTILITIES).register((itemGroup) -> itemGroup.addAfter(Items.NETHERITE_HOE, ModItems.Paxel_Dendrite));
|
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.TOOLS_AND_UTILITIES).register((itemGroup) -> itemGroup.addAfter(Items.NETHERITE_HOE, ModItems.Paxel_Dendrite));
|
||||||
|
|
||||||
|
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.COMBAT).register((itemGroup) -> itemGroup.addAfter(Items.LEATHER_BOOTS, ModItems.Armour_Copper_Helm));
|
||||||
|
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.COMBAT).register((itemGroup) -> itemGroup.addAfter(ModItems.Armour_Copper_Helm, ModItems.Armour_Copper_Chest));
|
||||||
|
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.COMBAT).register((itemGroup) -> itemGroup.addAfter(ModItems.Armour_Copper_Chest, ModItems.Armour_Copper_Legs));
|
||||||
|
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.COMBAT).register((itemGroup) -> itemGroup.addAfter(ModItems.Armour_Copper_Legs, ModItems.Armour_Copper_Boots));
|
||||||
|
|
||||||
|
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.INGREDIENTS).register((itemGroup) -> itemGroup.addAfter(Items.COPPER_INGOT, ModItems.Copper_Nugget));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Item register(String id, Item.Properties item) {
|
public static Item register(String id, Item.Properties item) {
|
||||||
|
|
@ -34,10 +40,16 @@ public class ModItems {
|
||||||
|
|
||||||
// Paxel stats are supplied solely with data, this is just to give them an ID so they're nice and easy to meddle with
|
// Paxel stats are supplied solely with data, this is just to give them an ID so they're nice and easy to meddle with
|
||||||
public static final Item Paxel_Wood = register("wooden_paxel", new Item.Properties() );
|
public static final Item Paxel_Wood = register("wooden_paxel", new Item.Properties() );
|
||||||
public static final Item Paxel_Stone = register("stone_paxel", new Item.Properties() );
|
public static final Item Paxel_Copper = register("stone_paxel", new Item.Properties() ); // Not strictly right in this pack but we're keeping up with naming conventions
|
||||||
public static final Item Paxel_Copper = register("copper_paxel", new Item.Properties() );
|
|
||||||
public static final Item Paxel_Iron = register("iron_paxel", new Item.Properties() );
|
public static final Item Paxel_Iron = register("iron_paxel", new Item.Properties() );
|
||||||
public static final Item Paxel_Gold = register("golden_paxel", new Item.Properties() );
|
public static final Item Paxel_Gold = register("golden_paxel", new Item.Properties() );
|
||||||
public static final Item Paxel_Diamond = register("diamond_paxel", new Item.Properties() );
|
public static final Item Paxel_Diamond = register("diamond_paxel", new Item.Properties() );
|
||||||
public static final Item Paxel_Dendrite = register("netherite_paxel", new Item.Properties() ); // Not strictly right in this pack but we're keeping up with naming conventions
|
public static final Item Paxel_Dendrite = register("netherite_paxel", new Item.Properties() ); // As with copper
|
||||||
}
|
|
||||||
|
public static final Item Armour_Copper_Helm = register("copper_helmet", new ArmorItem(ModArmourMats.Copper, ArmorItem.Type.HELMET, new Item.Properties().durability(ArmorItem.Type.HELMET.getDurability(10))) );
|
||||||
|
public static final Item Armour_Copper_Chest = register("copper_chestplate", new ArmorItem(ModArmourMats.Copper, ArmorItem.Type.CHESTPLATE, new Item.Properties().durability(ArmorItem.Type.CHESTPLATE.getDurability(10))) );
|
||||||
|
public static final Item Armour_Copper_Legs = register("copper_leggings", new ArmorItem(ModArmourMats.Copper, ArmorItem.Type.LEGGINGS, new Item.Properties().durability(ArmorItem.Type.LEGGINGS.getDurability(10))) );
|
||||||
|
public static final Item Armour_Copper_Boots = register("copper_boots", new ArmorItem(ModArmourMats.Copper, ArmorItem.Type.BOOTS, new Item.Properties().durability(ArmorItem.Type.BOOTS.getDurability(10))) );
|
||||||
|
|
||||||
|
public static final Item Copper_Nugget = register("copper_nugget", new Item.Properties());
|
||||||
|
}
|
||||||
|
|
@ -8,10 +8,14 @@
|
||||||
"advancements.nether.thanks_emerald.title":"Thank You and Farewell",
|
"advancements.nether.thanks_emerald.title":"Thank You and Farewell",
|
||||||
"advancements.nether.thanks_emerald.description":"Kill the Wither and earn a developer item",
|
"advancements.nether.thanks_emerald.description":"Kill the Wither and earn a developer item",
|
||||||
"item.mc_rebalance.wooden_paxel": "Wooden Paxel",
|
"item.mc_rebalance.wooden_paxel": "Wooden Paxel",
|
||||||
"item.mc_rebalance.stone_paxel": "Stone Paxel",
|
"item.mc_rebalance.stone_paxel": "Copper Paxel",
|
||||||
"item.mc_rebalance.copper_paxel": "Copper Paxel",
|
|
||||||
"item.mc_rebalance.iron_paxel": "Iron Paxel",
|
"item.mc_rebalance.iron_paxel": "Iron Paxel",
|
||||||
"item.mc_rebalance.golden_paxel": "Golden Paxel",
|
"item.mc_rebalance.golden_paxel": "Golden Paxel",
|
||||||
"item.mc_rebalance.diamond_paxel": "Diamond Paxel",
|
"item.mc_rebalance.diamond_paxel": "Diamond Paxel",
|
||||||
"item.mc_rebalance.netherite_paxel": "Dendrite Paxel"
|
"item.mc_rebalance.netherite_paxel": "Dendrite Paxel",
|
||||||
|
"item.mc_rebalance.copper_nugget": "Copper Nugget",
|
||||||
|
"item.mc_rebalance.copper_helmet": "Copper Helmet",
|
||||||
|
"item.mc_rebalance.copper_chestplate": "Copper Chestplate",
|
||||||
|
"item.mc_rebalance.copper_leggings": "Copper Leggings",
|
||||||
|
"item.mc_rebalance.copper_boots": "Copper Boots"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "mc_rebalance:item/copper_boots"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "mc_rebalance:item/copper_chestplate"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "mc_rebalance:item/copper_helmet"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "mc_rebalance:item/copper_leggings"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "mc_rebalance:item/copper_nugget"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "minecraft:item/handheld",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "mc_rebalance:item/copper_paxel"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
After Width: | Height: | Size: 171 B |
|
After Width: | Height: | Size: 189 B |
|
After Width: | Height: | Size: 160 B |
|
After Width: | Height: | Size: 177 B |
|
After Width: | Height: | Size: 138 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 423 B |
|
After Width: | Height: | Size: 258 B |
|
|
@ -3,16 +3,15 @@
|
||||||
"id": "mc_rebalance",
|
"id": "mc_rebalance",
|
||||||
"version": "${version}",
|
"version": "${version}",
|
||||||
"name": "MC Rebalance",
|
"name": "MC Rebalance",
|
||||||
"description": "Mod assets for the MC Rebalanced modpack",
|
"description": "This is an example description! Tell everyone what your mod is about!",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Sergeant Acoustic",
|
"Me!"
|
||||||
"Emerald Quartz"
|
|
||||||
],
|
],
|
||||||
"contact": {
|
"contact": {
|
||||||
"homepage": "https://discord.gg/XfHZhbQDrz",
|
"homepage": "https://fabricmc.net/",
|
||||||
"sources": "https://patience.nearmisses.xyz/SergeantAcoustic/tinkers_tinkering"
|
"sources": "https://github.com/FabricMC/fabric-example-mod"
|
||||||
},
|
},
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "CC0-1.0",
|
||||||
"icon": "assets/mc_rebalance/icon.png",
|
"icon": "assets/mc_rebalance/icon.png",
|
||||||
"environment": "*",
|
"environment": "*",
|
||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
|
|
@ -37,7 +36,6 @@
|
||||||
"fabricloader": ">=0.18.4",
|
"fabricloader": ">=0.18.4",
|
||||||
"minecraft": "~1.21.1",
|
"minecraft": "~1.21.1",
|
||||||
"java": ">=21",
|
"java": ">=21",
|
||||||
"fabric-api": "*",
|
"fabric-api": "*"
|
||||||
"copperagebackport": "*"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||