diff --git a/build.gradle b/build.gradle index 9aac69f..44c0107 100644 --- a/build.gradle +++ b/build.gradle @@ -80,6 +80,14 @@ repositories { } metadataSources { artifact() } } + ivy { + url = "https://github.com/Gooey-Goo" + patternLayout { + artifact "[organisation]/releases/download/v[revision]/[module]-[revision].jar" + m2compatible = true + } + metadataSources { artifact() } + } } dependencies { @@ -94,6 +102,7 @@ dependencies { modImplementation "com.github.Turnip-Labs:bta-halplibe:${project.halplibe_version}" modImplementation "ModMenu:ModMenu:2.0.6" + implementation("BTANoNameDyes:noname_dyes:1.3") implementation "org.slf4j:slf4j-api:1.8.0-beta4" implementation "org.apache.logging.log4j:log4j-slf4j18-impl:2.16.0" diff --git a/gradle.properties b/gradle.properties index 2f29458..1f1d962 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.jvmargs=-Xmx2G # BTA -bta_version=7.2_01 +bta_version=7.2 # Loader loader_version=0.15.6-babric.6-bta @@ -10,6 +10,6 @@ loader_version=0.15.6-babric.6-bta halplibe_version=4.1.3 # Mod -mod_version=1.0.7 +mod_version=1.0.8 mod_group=Mizuri-n mod_name=Better with Defense diff --git a/src/main/java/mizurin/shieldmod/ShieldMod.java b/src/main/java/mizurin/shieldmod/ShieldMod.java index 4230ae8..ca561f2 100644 --- a/src/main/java/mizurin/shieldmod/ShieldMod.java +++ b/src/main/java/mizurin/shieldmod/ShieldMod.java @@ -29,7 +29,7 @@ public class ShieldMod implements ModInitializer, GameStartEntrypoint, ClientSta public static ArtType paintingRice; static { Properties prop = new Properties(); - prop.setProperty("starting_item_id", "17000"); + prop.setProperty("starting_item_id", "21000"); prop.setProperty("starting_entity_id", "100"); ConfigHandler config = new ConfigHandler(ShieldMod.MOD_ID, prop); itemID = config.getInt("starting_item_id"); diff --git a/src/main/java/mizurin/shieldmod/item/ShieldMaterials.java b/src/main/java/mizurin/shieldmod/item/ShieldMaterials.java index 086e176..c9800ad 100644 --- a/src/main/java/mizurin/shieldmod/item/ShieldMaterials.java +++ b/src/main/java/mizurin/shieldmod/item/ShieldMaterials.java @@ -25,4 +25,5 @@ public ToolMaterial setEfficiency(float efficiency, float guard) { this.guard = guard; return super.setEfficiency(efficiency, guard); } + } diff --git a/src/main/java/mizurin/shieldmod/item/Shields.java b/src/main/java/mizurin/shieldmod/item/Shields.java index 7b32a66..3f1d56f 100644 --- a/src/main/java/mizurin/shieldmod/item/Shields.java +++ b/src/main/java/mizurin/shieldmod/item/Shields.java @@ -4,6 +4,7 @@ import net.minecraft.core.item.Item; import net.minecraft.core.item.ItemSoup; import net.minecraft.core.item.tag.ItemTags; +import net.minecraft.core.util.helper.DamageType; import org.slf4j.LoggerFactory; import turniplabs.halplibe.helper.ItemBuilder; import mizurin.shieldmod.ShieldMod; @@ -102,7 +103,7 @@ public void initializeItems(){ tearShield = new ItemBuilder(MOD_ID) .setItemModel(item -> new ItemModelShield(item, new ItemModelColored.ColoredTextureEntry[] { - new ItemModelColored.ColoredTextureEntry(TextureRegistry.getTexture("shieldmod:item/tearstone_shield"), (s) -> -1) + new ItemModelColored.ColoredTextureEntry(TextureRegistry.getTexture("shieldmod:item/tearstone_shield_test"), (s) -> -1) }).setFull3D()) .build(new ThrowShield("tear.shield", ++itemID, ShieldMaterials.TOOL_TEAR)) .withTags(ItemTags.PREVENT_CREATIVE_MINING); @@ -112,7 +113,7 @@ public void initializeItems(){ .setStackSize(1) .setItemModel(item -> new ItemModelShield(item, new ItemModelColored.ColoredTextureEntry[] { - new ItemModelColored.ColoredTextureEntry(TextureRegistry.getTexture("shieldmod:item/ammotearstone_shield"), (s) -> -1) + new ItemModelColored.ColoredTextureEntry(TextureRegistry.getTexture("shieldmod:item/ammotearstone_shield_test"), (s) -> -1) }).setFull3D()) .build(new Item("tear.shield.ammo", ++itemID)) .withTags(ItemTags.NOT_IN_CREATIVE_MENU); @@ -145,5 +146,6 @@ public void initializeItems(){ })) .build(new ArmorColored("armor.boots.leather", 16429, ArmorMaterial.LEATHER, 3)); + } } diff --git a/src/main/java/mizurin/shieldmod/mixins/ShieldMixin.java b/src/main/java/mizurin/shieldmod/mixins/ShieldMixin.java index d2e4a6e..72f4b6a 100644 --- a/src/main/java/mizurin/shieldmod/mixins/ShieldMixin.java +++ b/src/main/java/mizurin/shieldmod/mixins/ShieldMixin.java @@ -4,6 +4,7 @@ import mizurin.shieldmod.item.ShieldMaterials; import net.minecraft.core.achievement.stat.Stat; import net.minecraft.core.entity.Entity; +import net.minecraft.core.entity.EntityBobber; import net.minecraft.core.entity.EntityLiving; import net.minecraft.core.entity.monster.EntityMonster; import net.minecraft.core.entity.player.EntityPlayer; @@ -57,6 +58,7 @@ public ShieldMixin(World world) { private ChunkCoordinates playerSpawnCoordinate; + // inject at the top(HEAD) of hurt(), allow us to call return(cancel/set return value) @Inject(method = "hurt", at = @At("HEAD"), cancellable = true) public void injectHurt(Entity attacker, int damage, DamageType type, CallbackInfoReturnable ci) { diff --git a/src/main/java/mizurin/shieldmod/recipeColor.java b/src/main/java/mizurin/shieldmod/recipeColor.java index 64c819a..40a9e77 100644 --- a/src/main/java/mizurin/shieldmod/recipeColor.java +++ b/src/main/java/mizurin/shieldmod/recipeColor.java @@ -8,6 +8,8 @@ import net.minecraft.core.item.ItemStack; import net.minecraft.core.player.inventory.InventoryCrafting; import net.minecraft.core.util.helper.Color; +import goocraft4evr.nonamedyes.item.ModItems; +import turniplabs.halplibe.helper.ModVersionHelper; import java.util.ArrayList; import java.util.HashMap; @@ -16,16 +18,37 @@ //Special thanks to UselessBullets for being extremely awesome https://github.com/UselessBullets/Lunacy/tree/7.1 public class recipeColor extends RecipeEntryCraftingDynamic { + public static boolean nonamedyesOn = ModVersionHelper.isModPresent("nonamedyes"); public static HashMap> dyeMap = new HashMap<>(); private static final Map vanillaDye; + private static final Map nonameDye; static { vanillaDye = new HashMap<>(); + nonameDye = new HashMap<>(); ItemDye.field_31002_bk[7] = 13027014; ItemDye.field_31002_bk[15] = 16777215; for (int color = 0; color < 16; color++) { vanillaDye.put(color, new Color().setARGB(ItemDye.field_31002_bk[color])); } + if (nonamedyesOn){ + nonameDye.put(0, new Color().setARGB(11540279)); //crimson + nonameDye.put(1, new Color().setARGB(6627104)); //maroon + nonameDye.put(2, new Color().setARGB(10005149)); //ash.gray + nonameDye.put(3, new Color().setARGB(7236357)); // olive + nonameDye.put(4, new Color().setARGB(13007915)); //ochre + nonameDye.put(5, new Color().setARGB(14063170)); //buff L + nonameDye.put(6, new Color().setARGB(3591599)); //verdigris + nonameDye.put(7, new Color().setARGB(16772730)); //light.yellow L + nonameDye.put(8, new Color().setARGB(3878540)); //indigo + nonameDye.put(9, new Color().setARGB(13887232)); //xanthic + nonameDye.put(10, new Color().setARGB(9191711)); //cinnamon + nonameDye.put(11, new Color().setARGB(2171241)); //navy.blue + nonameDye.put(12, new Color().setARGB(6631797)); //royal.purple + nonameDye.put(13, new Color().setARGB(2788193)); //viridian + + dyeMap.put(ModItems.dye, nonameDye); + } dyeMap.put(Item.dye, vanillaDye); } @Override diff --git a/src/main/java/mizurin/shieldmod/recipes.java b/src/main/java/mizurin/shieldmod/recipes.java index fbcf716..4c71424 100644 --- a/src/main/java/mizurin/shieldmod/recipes.java +++ b/src/main/java/mizurin/shieldmod/recipes.java @@ -1,5 +1,7 @@ package mizurin.shieldmod; +import goocraft4evr.nonamedyes.NoNameDyes; +import goocraft4evr.nonamedyes.crafting.RecipeBuilderBleacher; import net.minecraft.core.block.Block; import net.minecraft.core.data.registry.Registries; import net.minecraft.core.data.registry.recipe.RecipeNamespace; @@ -14,6 +16,7 @@ import mizurin.shieldmod.item.Shields; + public class recipes implements RecipeEntrypoint { public static final String MOD_ID = ShieldMod.MOD_ID; public static final RecipeGroup> WORKBENCH = new RecipeGroup<>(new RecipeSymbol(new ItemStack(Block.workbench))); diff --git a/src/main/resources/assets/shieldmod/textures/armor/leather_1.png b/src/main/resources/assets/shieldmod/textures/armor/leather_1.png index 2042f07..450c835 100644 Binary files a/src/main/resources/assets/shieldmod/textures/armor/leather_1.png and b/src/main/resources/assets/shieldmod/textures/armor/leather_1.png differ diff --git a/src/main/resources/assets/shieldmod/textures/armor/leather_2.png b/src/main/resources/assets/shieldmod/textures/armor/leather_2.png index 154ff73..a5a89c7 100644 Binary files a/src/main/resources/assets/shieldmod/textures/armor/leather_2.png and b/src/main/resources/assets/shieldmod/textures/armor/leather_2.png differ diff --git a/src/main/resources/assets/shieldmod/textures/item/ammotearstone_shield_test.png b/src/main/resources/assets/shieldmod/textures/item/ammotearstone_shield_test.png new file mode 100644 index 0000000..498db8f Binary files /dev/null and b/src/main/resources/assets/shieldmod/textures/item/ammotearstone_shield_test.png differ diff --git a/src/main/resources/assets/shieldmod/textures/item/iron_shield_test.png~ b/src/main/resources/assets/shieldmod/textures/item/iron_shield_test.png~ deleted file mode 100644 index 1bea3ea..0000000 Binary files a/src/main/resources/assets/shieldmod/textures/item/iron_shield_test.png~ and /dev/null differ diff --git a/src/main/resources/assets/shieldmod/textures/item/steel_shield.png~ b/src/main/resources/assets/shieldmod/textures/item/steel_shield.png~ deleted file mode 100644 index c8ffcab..0000000 Binary files a/src/main/resources/assets/shieldmod/textures/item/steel_shield.png~ and /dev/null differ diff --git a/src/main/resources/assets/shieldmod/textures/item/tearstone_shield_test.png b/src/main/resources/assets/shieldmod/textures/item/tearstone_shield_test.png new file mode 100644 index 0000000..0ed1ac8 Binary files /dev/null and b/src/main/resources/assets/shieldmod/textures/item/tearstone_shield_test.png differ