Prevent NPE in fluid lookup for block
This commit is contained in:
parent
a066018c9f
commit
ac58bb2f5a
1 changed files with 1 additions and 1 deletions
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package net.minecraftforge.fluids;
|
package net.minecraftforge.fluids;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -133,6 +132,7 @@ public abstract class FluidRegistry
|
||||||
{
|
{
|
||||||
if (fluidBlocks == null)
|
if (fluidBlocks == null)
|
||||||
{
|
{
|
||||||
|
fluidBlocks = new BiMap<Block, Fluid>();
|
||||||
for (Fluid fluid : fluids.values())
|
for (Fluid fluid : fluids.values())
|
||||||
{
|
{
|
||||||
if (fluid.canBePlacedInWorld() && Block.blocksList[fluid.getBlockID()] != null)
|
if (fluid.canBePlacedInWorld() && Block.blocksList[fluid.getBlockID()] != null)
|
||||||
|
|
Loading…
Reference in a new issue