From b5f9480d1c725a2b6a783cd0ba67cb4d795f8788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Vo=C3=9F?= Date: Wed, 22 Apr 2020 12:21:35 +0200 Subject: [PATCH] support Milk All The Mobs 1.14 variant (other mod id) (issue #10) - add some dependencies --- README.md | 1 + .../compat/MilkAllTheMobs_1_14.java | 26 +++++++++++++++++++ ...lTheMobs.java => MilkAllTheMobs_1_15.java} | 4 +-- .../ceramicbucket/compat/ModCompat.java | 4 +-- src/main/resources/META-INF/mods.toml | 14 +++++++++- 5 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 src/main/java/cech12/ceramicbucket/compat/MilkAllTheMobs_1_14.java rename src/main/java/cech12/ceramicbucket/compat/{MilkAllTheMobs.java => MilkAllTheMobs_1_15.java} (86%) diff --git a/README.md b/README.md index e0118ad..840ec7b 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ All fluids of following mods are official supported: * [Industrial Foregoing (1.14.4-2.1.2-582ea8b & 1.15.2-2.2.1-f27c515)](https://www.curseforge.com/minecraft/mc-mods/industrial-foregoing) * [Mekanism (1.15) (9.9.11.403) (alpha)](https://www.curseforge.com/minecraft/mc-mods/mekanism) * [Mekanism Generators (1.15.2-9.9.16.408) (alpha)](https://www.curseforge.com/minecraft/mc-mods/mekanism-generators) +* [Milk All The Mobs (1.14 & 1.15)](https://www.curseforge.com/minecraft/mc-mods/milk-all-the-mobs) * [MrCrayfish's Vehicle Mod (1.15) (0.42.7)](https://www.curseforge.com/minecraft/mc-mods/mrcrayfishs-vehicle-mod) * [Omega Craft 4.0.9 (1.14 & 1.15)](https://www.curseforge.com/minecraft/mc-mods/omega-craft-mod) * [Silent's Mechanisms (1.15.2-0.7.0+50 & 1.14.4-0.6.13+49) (beta)](https://www.curseforge.com/minecraft/mc-mods/silents-mechanisms) diff --git a/src/main/java/cech12/ceramicbucket/compat/MilkAllTheMobs_1_14.java b/src/main/java/cech12/ceramicbucket/compat/MilkAllTheMobs_1_14.java new file mode 100644 index 0000000..63b2d12 --- /dev/null +++ b/src/main/java/cech12/ceramicbucket/compat/MilkAllTheMobs_1_14.java @@ -0,0 +1,26 @@ +package cech12.ceramicbucket.compat; + +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.passive.PigEntity; +import net.minecraft.entity.passive.SheepEntity; +import net.minecraft.entity.passive.horse.DonkeyEntity; +import net.minecraft.entity.passive.horse.HorseEntity; +import net.minecraft.entity.passive.horse.LlamaEntity; +import net.minecraft.entity.passive.horse.MuleEntity; + +public class MilkAllTheMobs_1_14 extends ModCompat.Mod implements ModCompat.MobMilkingMod { + + public MilkAllTheMobs_1_14() { + super("matm"); + } + + @Override + public boolean canEntityBeMilked(LivingEntity entity) { + return entity instanceof SheepEntity + || entity instanceof LlamaEntity + || entity instanceof PigEntity + || entity instanceof DonkeyEntity + || entity instanceof HorseEntity + || entity instanceof MuleEntity; + } +} diff --git a/src/main/java/cech12/ceramicbucket/compat/MilkAllTheMobs.java b/src/main/java/cech12/ceramicbucket/compat/MilkAllTheMobs_1_15.java similarity index 86% rename from src/main/java/cech12/ceramicbucket/compat/MilkAllTheMobs.java rename to src/main/java/cech12/ceramicbucket/compat/MilkAllTheMobs_1_15.java index 721153a..228dc96 100644 --- a/src/main/java/cech12/ceramicbucket/compat/MilkAllTheMobs.java +++ b/src/main/java/cech12/ceramicbucket/compat/MilkAllTheMobs_1_15.java @@ -8,9 +8,9 @@ import net.minecraft.entity.passive.horse.LlamaEntity; import net.minecraft.entity.passive.horse.MuleEntity; -public class MilkAllTheMobs extends ModCompat.Mod implements ModCompat.MobMilkingMod { +public class MilkAllTheMobs_1_15 extends ModCompat.Mod implements ModCompat.MobMilkingMod { - public MilkAllTheMobs() { + public MilkAllTheMobs_1_15() { super("milkatmobs"); } diff --git a/src/main/java/cech12/ceramicbucket/compat/ModCompat.java b/src/main/java/cech12/ceramicbucket/compat/ModCompat.java index df7d77b..a6dd375 100644 --- a/src/main/java/cech12/ceramicbucket/compat/ModCompat.java +++ b/src/main/java/cech12/ceramicbucket/compat/ModCompat.java @@ -1,13 +1,13 @@ package cech12.ceramicbucket.compat; - import net.minecraft.entity.LivingEntity; import net.minecraftforge.fml.ModList; public class ModCompat { public static final Mod[] MODS = { - new MilkAllTheMobs() + new MilkAllTheMobs_1_14(), + new MilkAllTheMobs_1_15() }; public static boolean canEntityBeMilked(LivingEntity entity) { diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index e7fed76..22bbc72 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -10,4 +10,16 @@ issueTrackerURL="https://github.com/cech12/CeramicBucket/issues" authors="Cech12" description=''' A mod which adds a Ceramic Bucket. - ''' \ No newline at end of file + ''' +[[dependencies.ceramicbucket]] + modId="forge" + mandatory=true + versionRange="[28.1,)" + ordering="NONE" + side="BOTH" +[[dependencies.ceramicbucket]] + modId="minecraft" + mandatory=true + versionRange="[1.14.4,)" + ordering="NONE" + side="BOTH" \ No newline at end of file