mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-26 06:53:26 +00:00
Add Custom Renderer API for Fluids (#1059)
This commit is contained in:
1 parent
a105a60a1a
commit
c020ecbf1f
7 files changed
+151
-65
No files matched your search
@@ -73,7 +73,7 @@ public class ItemFluidDisplay extends Item implements IFluidContainerItem {
|
||||
@Override
|
||||
public FluidStack getFluid(ItemStack stack) {
|
||||
|
||||
if (stack == null || !(stack.getItem() instanceof ItemFluidDisplay) || !stack.hasTagCompound()) {
|
||||
if (stack == null || !(stack.getItem() instanceof ItemFluidDisplay)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ public class ItemFluidDisplay extends Item implements IFluidContainerItem {
|
||||
final NBTTagCompound nbTag = stack.getTagCompound();
|
||||
final FluidStack fluidStack = new FluidStack(
|
||||
fluid,
|
||||
(int) Math.min(nbTag.getLong("neiFluidDisplayAmount"), Integer.MAX_VALUE));
|
||||
(int) Math.min(nbTag != null ? nbTag.getLong("neiFluidDisplayAmount") : 0, Integer.MAX_VALUE));
|
||||
|
||||
return fluidStack;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user