Copper age backport integration
- Remove copper armour and nugget - Separate copper paxel to copper and stone - Add copper age backport as a dependency
14
build.gradle
|
|
@ -16,6 +16,17 @@ repositories {
|
|||
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
|
||||
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
|
||||
// for more information about repositories.
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven {
|
||||
name = "Modrinth"
|
||||
url = "https://api.modrinth.com/maven"
|
||||
}
|
||||
}
|
||||
filter {
|
||||
includeGroup "maven.modrinth"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
loom {
|
||||
|
|
@ -44,7 +55,8 @@ dependencies {
|
|||
|
||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
|
||||
|
||||
|
||||
modImplementation "maven.modrinth:backport-copper-age:1.21.1-0.1.4"
|
||||
}
|
||||
|
||||
processResources {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ public class MCRebalance implements ModInitializer {
|
|||
|
||||
ModItems.init(); // Initialise: load all static values
|
||||
ModBlocks.init();
|
||||
ModArmourMats.init();
|
||||
LOGGER.info("Hello Fabric world!");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
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,7 +6,6 @@ import net.minecraft.core.registries.BuiltInRegistries;
|
|||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.ArmorItem;
|
||||
import net.minecraft.world.item.CreativeModeTabs;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.Items;
|
||||
|
|
@ -15,18 +14,13 @@ public class ModItems {
|
|||
public static void init(){
|
||||
// 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.STONE_HOE, ModItems.Paxel_Copper));
|
||||
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.TOOLS_AND_UTILITIES).register((itemGroup) -> itemGroup.addAfter(Items.STONE_HOE, ModItems.Paxel_Stone));
|
||||
// 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.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.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) {
|
||||
|
|
@ -40,16 +34,10 @@ 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
|
||||
public static final Item Paxel_Wood = register("wooden_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_Stone = register("stone_paxel", new Item.Properties() );
|
||||
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_Gold = register("golden_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() ); // 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());
|
||||
}
|
||||
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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,14 +8,10 @@
|
|||
"advancements.nether.thanks_emerald.title":"Thank You and Farewell",
|
||||
"advancements.nether.thanks_emerald.description":"Kill the Wither and earn a developer item",
|
||||
"item.mc_rebalance.wooden_paxel": "Wooden Paxel",
|
||||
"item.mc_rebalance.stone_paxel": "Copper Paxel",
|
||||
"item.mc_rebalance.stone_paxel": "Stone Paxel",
|
||||
"item.mc_rebalance.copper_paxel": "Copper Paxel",
|
||||
"item.mc_rebalance.iron_paxel": "Iron Paxel",
|
||||
"item.mc_rebalance.golden_paxel": "Golden Paxel",
|
||||
"item.mc_rebalance.diamond_paxel": "Diamond 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"
|
||||
"item.mc_rebalance.netherite_paxel": "Dendrite Paxel"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "mc_rebalance:item/copper_boots"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "mc_rebalance:item/copper_chestplate"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "mc_rebalance:item/copper_helmet"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "mc_rebalance:item/copper_leggings"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "mc_rebalance:item/copper_nugget"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/handheld",
|
||||
"textures": {
|
||||
"layer0": "mc_rebalance:item/copper_paxel"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 171 B |
|
Before Width: | Height: | Size: 189 B |
|
Before Width: | Height: | Size: 160 B |
|
Before Width: | Height: | Size: 177 B |
|
Before Width: | Height: | Size: 138 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 423 B |
|
Before Width: | Height: | Size: 258 B |
|
|
@ -36,6 +36,7 @@
|
|||
"fabricloader": ">=0.18.4",
|
||||
"minecraft": "~1.21.1",
|
||||
"java": ">=21",
|
||||
"fabric-api": "*"
|
||||
"fabric-api": "*",
|
||||
"copperagebackport": "*"
|
||||
}
|
||||
}
|
||||
|
|
|
|||