Optionally add a milk fluid to the vanilla bucket (#7294)

Fixes the previous broken code that was supposed to make mod registered milk returned by the vanilla bucket by allowing mods to enable a milk fluid.
This commit is contained in:
KnightMiner authored and GitHub committed 2021-01-17 16:05:24 -05:00
1 parent f173bde812
commit 19f8d2a793
13 files changed
+189 -8

No files matched your search

@@ -0,0 +1,46 @@
/*
* Minecraft Forge
* Copyright (c) 2016-2020.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraftforge.common.data;
import net.minecraft.data.DataGenerator;
import net.minecraft.data.FluidTagsProvider;
import net.minecraftforge.common.ForgeMod;
import static net.minecraftforge.common.Tags.Fluids.MILK;
public class ForgeFluidTagsProvider extends FluidTagsProvider
{
public ForgeFluidTagsProvider(DataGenerator gen, ExistingFileHelper existingFileHelper)
{
super(gen, "forge", existingFileHelper);
}
@Override
public void registerTags()
{
getOrCreateBuilder(MILK).addOptional(ForgeMod.MILK.getId()).addOptional(ForgeMod.FLOWING_MILK.getId());
}
@Override
public String getName()
{
return "Forge Fluid Tags";
}
}