More minor fixes, 370

This commit is contained in:
modmuss50 2019-02-22 14:11:55 +00:00
parent d68c65641d
commit a5b2adac78
8 changed files with 23 additions and 24 deletions
src/main/java/techreborn/items

View file

@ -70,9 +70,9 @@ public class DynamicCell extends Item {
//TODO: Property ItemUtils.isItemEquals tags equality handling?
if (stack.hasTag()) {
NBTTagCompound tag = stack.getTag();
if (tag.getSize() != 1 || tag.hasKey("Fluid")) {
if (tag.size() != 1 || tag.contains("Fluid")) {
NBTTagCompound clearTag = new NBTTagCompound();
clearTag.setTag("Fluid", tag.getCompoundTag("Fluid"));
clearTag.put("Fluid", tag.getCompound("Fluid"));
stack.setTag(clearTag);
}
}

View file

@ -58,8 +58,8 @@ public class ItemFrequencyTransmitter extends Item {
@Override
@OnlyIn(Dist.CLIENT)
public float call(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
if (!stack.isEmpty() && stack.hasTag() && stack.getTag() != null && stack.getTag().hasKey("x")
&& stack.getTag().hasKey("y") && stack.getTag().hasKey("z") && stack.getTag().hasKey("dim")) {
if (!stack.isEmpty() && stack.hasTag() && stack.getTag() != null && stack.getTag().contains("x")
&& stack.getTag().contains("y") && stack.getTag().contains("z") && stack.getTag().contains("dim")) {
return 1.0F;
}
return 0.0F;