mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 02:55:17 +00:00
Clean up null issues, add more annotations (#3590)
This commit is contained in:
1 parent
43efa3cfc4
commit
c545b8ecd4
130 files changed
+629
-262
No files matched your search
@@ -49,6 +49,8 @@ import net.minecraftforge.fml.common.ModContainer;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraftforge.fml.common.registry.RegistryDelegate;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Handles Fluid registrations. Fluids MUST be registered in order to function.
|
||||
*/
|
||||
@@ -219,6 +221,7 @@ public abstract class FluidRegistry
|
||||
return getFluidName(stack.getFluid());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static FluidStack getFluidStack(String fluidName, int amount)
|
||||
{
|
||||
if (!fluids.containsKey(fluidName))
|
||||
@@ -255,7 +258,9 @@ public abstract class FluidRegistry
|
||||
{
|
||||
if (Loader.instance().hasReachedState(LoaderState.PREINITIALIZATION))
|
||||
{
|
||||
FMLLog.getLogger().log(Level.ERROR, "Trying to activate the universal filled bucket too late. Call it statically in your Mods class. Mod: {}", Loader.instance().activeModContainer().getName());
|
||||
ModContainer modContainer = Loader.instance().activeModContainer();
|
||||
String modContainerName = modContainer == null ? null : modContainer.getName();
|
||||
FMLLog.getLogger().log(Level.ERROR, "Trying to activate the universal filled bucket too late. Call it statically in your Mods class. Mod: {}", modContainerName);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user