Skip to content

Commit

Permalink
support Milk All The Mobs 1.14 variant (other mod id) (issue #10)
Browse files Browse the repository at this point in the history
- add some dependencies
  • Loading branch information
cech12 committed Apr 22, 2020
1 parent e78fbd5 commit b5f9480
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
26 changes: 26 additions & 0 deletions src/main/java/cech12/ceramicbucket/compat/MilkAllTheMobs_1_14.java
Original file line number Diff line number Diff line change
@@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/cech12/ceramicbucket/compat/ModCompat.java
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
14 changes: 13 additions & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,16 @@ issueTrackerURL="https://github.com/cech12/CeramicBucket/issues"
authors="Cech12"
description='''
A mod which adds a Ceramic Bucket.
'''
'''
[[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"

0 comments on commit b5f9480

Please sign in to comment.