Skip to content

Commit

Permalink
🐛 Fixed Traveler's Backpack item group icon appearing without fluids …
Browse files Browse the repository at this point in the history
…in tank
  • Loading branch information
Tiviacz1337 committed Apr 8, 2024
1 parent 7370325 commit 5f87ba9
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,17 @@ public static void registerItemGroup()
public static ItemStack createTabStack()
{
ItemStack stack = new ItemStack(ModItems.STANDARD_TRAVELERS_BACKPACK);
stack.getOrCreateNbt().getCompound(ITravelersBackpackInventory.LEFT_TANK).put("variant", FluidVariant.of(Fluids.WATER).toNbt());
stack.getOrCreateNbt().getCompound(ITravelersBackpackInventory.LEFT_TANK).putLong("amount", TravelersBackpackConfig.getConfig().backpackSettings.leather.tankCapacity);
stack.getOrCreateNbt().getCompound(ITravelersBackpackInventory.RIGHT_TANK).put("variant", FluidVariant.of(Fluids.LAVA).toNbt());
stack.getOrCreateNbt().getCompound(ITravelersBackpackInventory.RIGHT_TANK).putLong("amount", TravelersBackpackConfig.getConfig().backpackSettings.leather.tankCapacity);

NbtCompound leftTank = new NbtCompound();
leftTank.put("variant", FluidVariant.of(Fluids.WATER).toNbt());
leftTank.putLong("amount", TravelersBackpackConfig.getConfig().backpackSettings.leather.tankCapacity);
stack.getOrCreateNbt().put(ITravelersBackpackInventory.LEFT_TANK, leftTank);

NbtCompound rightTank = new NbtCompound();
rightTank.put("variant", FluidVariant.of(Fluids.LAVA).toNbt());
rightTank.putLong("amount", TravelersBackpackConfig.getConfig().backpackSettings.leather.tankCapacity);
stack.getOrCreateNbt().put(ITravelersBackpackInventory.RIGHT_TANK, rightTank);

return stack;
}

Expand Down

0 comments on commit 5f87ba9

Please sign in to comment.