mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-11 15:57:55 +00:00
fix NPE in FluidPatternDetails (#163)
This commit is contained in:
1 parent
8186653910
commit
a4892aee06
2 files changed
+4
-1
No files matched your search
+3
@@ -258,6 +258,9 @@ public abstract class FCContainerEncodeTerminal extends ContainerItemMonitor
|
||||
}
|
||||
|
||||
protected ItemStack stampAuthor(ItemStack patternStack) {
|
||||
if (patternStack.stackTagCompound == null) {
|
||||
patternStack.stackTagCompound = new NBTTagCompound();
|
||||
}
|
||||
patternStack.stackTagCompound.setString("author", getPlayerInv().player.getCommandSenderName());
|
||||
return patternStack;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class FluidPatternDetails implements ICraftingPatternDetails, Comparable<
|
||||
|
||||
public FluidPatternDetails(ItemStack stack) {
|
||||
this.patternStack = stack;
|
||||
if (stack.stackTagCompound.hasKey("author")) {
|
||||
if (stack.stackTagCompound != null && stack.stackTagCompound.hasKey("author")) {
|
||||
final ItemStack forComparison = this.patternStack.copy();
|
||||
forComparison.stackTagCompound.removeTag("author");
|
||||
this.patternStackAe = Objects.requireNonNull(AEItemStack.create(forComparison)); // s2g
|
||||
|
||||
Reference in new issue
Block a user