To fix "issues"

otherwise after smeltery.fill(dir,resource,true);
resource.amount=10; <-- modifies the amount of liquid in the smeltery directly.