Fluid API rework (#5983)

- Moved forge fluids into FluidAttributes companion object to the vanilla Fluid. By gigaherz
- Redesigned the Fluid API to be closer to the Items API. By King Lemming
Co-authored-by: King Lemming <[email protected]>
This commit is contained in:
David Quintana committed 2019-08-29 03:18:41 +02:00
1 parent e784a7f606
commit b7e1cc5f6b
48 files changed
+1077 -2193

No files matched your search

@@ -27,6 +27,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.entity.Entity;
import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.Fluids;
import net.minecraft.fluid.IFluidState;
import net.minecraft.tags.Tag;
import net.minecraft.util.BlockRenderLayer;
@@ -35,6 +36,7 @@ import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.Explosion;
import net.minecraft.world.IWorldReader;
import net.minecraftforge.fluids.FluidAttributes;
public interface IForgeFluid
{
@@ -117,4 +119,9 @@ public interface IForgeFluid
* This should be used in favor of TagCollection.getOwningTags, as this caches the result and automatically updates when the TagCollection changes.
*/
Set<ResourceLocation> getTags();
/**
* Retrieves the non-vanilla fluid attributes, including localized name.
*/
FluidAttributes getAttributes();
}