diff --git a/src/main/java/cech12/ceramicbucket/compat/CreaturesAndBeastsCompat.java b/src/main/java/cech12/ceramicbucket/compat/CreaturesAndBeastsCompat.java new file mode 100644 index 0000000..87294ef --- /dev/null +++ b/src/main/java/cech12/ceramicbucket/compat/CreaturesAndBeastsCompat.java @@ -0,0 +1,38 @@ +package cech12.ceramicbucket.compat; + +import cech12.ceramicbucket.api.data.ObtainableEntityType; +import net.minecraft.entity.Entity; +import net.minecraft.entity.LivingEntity; +import net.minecraft.fluid.Fluid; +import net.minecraft.fluid.Fluids; +import net.minecraft.tags.FluidTags; +import net.minecraft.util.ResourceLocation; + +import javax.annotation.Nonnull; +import java.util.ArrayList; +import java.util.List; + +public class CreaturesAndBeastsCompat extends ModCompat.Mod implements ModCompat.EntityTypeObtainingMod { + + private final List obtainableEntityTypes = new ArrayList<>(); + + public CreaturesAndBeastsCompat() { + super("cnb"); + this.obtainableEntityTypes.add(new ObtainableEntityType.Builder(new ResourceLocation(this.name, "cindershell"), Fluids.LAVA).addFluidTag(FluidTags.LAVA).build()); + } + + @Override + public List getObtainableEntityTypes() { + return this.obtainableEntityTypes; + } + + //TODO let only children be spawned out of a "creative" bucket + + @Override + public boolean canEntityBeObtained(@Nonnull Fluid fluid, @Nonnull Entity entity) { + //only support children to be obtainable + return ModCompat.EntityTypeObtainingMod.super.canEntityBeObtained(fluid, entity) + && entity instanceof LivingEntity && ((LivingEntity) entity).isChild(); + } + +} diff --git a/src/main/java/cech12/ceramicbucket/compat/ModCompat.java b/src/main/java/cech12/ceramicbucket/compat/ModCompat.java index 070a089..2f6cdab 100644 --- a/src/main/java/cech12/ceramicbucket/compat/ModCompat.java +++ b/src/main/java/cech12/ceramicbucket/compat/ModCompat.java @@ -23,6 +23,7 @@ public class ModCompat { new CavesAndCliffs117ConceptCompat(), new CavesAndCliffsBackportCompat(), new CombustiveFishingCompat(), + new CreaturesAndBeastsCompat(), new EnvironmentalCompat(), new FinsAndTrailsCompat(), new MilkAllTheMobs(), diff --git a/src/main/resources/assets/ceramicbucket/textures/item/bucket_content/cnb/cindershell.png b/src/main/resources/assets/ceramicbucket/textures/item/bucket_content/cnb/cindershell.png new file mode 100644 index 0000000..eec4035 Binary files /dev/null and b/src/main/resources/assets/ceramicbucket/textures/item/bucket_content/cnb/cindershell.png differ