Pennyw95 Posted August 19, 2016 Share Posted August 19, 2016 Hi, I need some help understanding what's not working here... Basically I wanted to rewrite my tank multiblock's onBlockActivated code so that it also works with TConstruct buckets (which use the universalBucket). I got them working, but now FluidUtil.interactWithTank returns false with vanilla buckets (water,lava)! I tried debugging, but I'm still clueless...I couldn't find much info about the universalBucket, so I might be missing some obvious details, I hope you can help me. (Naturally TileFountain implements IFluidHandler) Original code: if (world.isRemote) true val master = (for { x <- -1 to 1 z <- -1 to 1 } yield world.getTileEntity (pos.add (x, 3, z))) collectFirst { case f: TileFountain => f } val item = Option.apply (player.getHeldItem) master exists (t => item exists (i => if (FluidUtil.interactWithTank(i, player, t, side.getOpposite)) true else FluidContainerRegistry.isFilledContainer(i) || i.getItem.isInstanceOf[iFluidContainerItem])) Trimmed java version: if (world.isRemote()) return true; IFluidHandler master = ...; // code ItemStack item = player.getHeldItem(); if (master != null && item != null) { if (FluidUtil.interactWithTank(item, player, master, side.getOpposite())) return true; else return FluidContainerRegistry.isFilledContainer(item) || item.getItem() instanceof IFluidContainerItem; } Link to comment Share on other sites More sharing options...
Pennyw95 Posted August 20, 2016 Author Share Posted August 20, 2016 Update to 1.10.2 and use the fluid capabilities. I am working on an addon for another mod that is currently 1.8.9 only, so that is unfortunately not an option. Link to comment Share on other sites More sharing options...
Recommended Posts