mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-11 00:09:44 -04:00
update changelog, add empty table check to ConverterFluidContainerItem
This commit is contained in:
parent
39739b7003
commit
9c95f10879
@ -3,6 +3,7 @@
|
|||||||
* [#3533] Added support for observing the contents of fluid container items.
|
* [#3533] Added support for observing the contents of fluid container items.
|
||||||
* [#3620] Fixed OC 1.8.0+ regression involving API arguments and numbers.
|
* [#3620] Fixed OC 1.8.0+ regression involving API arguments and numbers.
|
||||||
* [#3013] Fixed rare server-side deadlock when sending disk activity update packets.
|
* [#3013] Fixed rare server-side deadlock when sending disk activity update packets.
|
||||||
|
* Added Spanish translation.
|
||||||
* Fixed string.gmatch not supporting the "init" argument on Lua 5.4.
|
* Fixed string.gmatch not supporting the "init" argument on Lua 5.4.
|
||||||
* Update GNU Unifont to 15.0.04.
|
* Update GNU Unifont to 15.0.04.
|
||||||
|
|
||||||
@ -13,4 +14,4 @@
|
|||||||
|
|
||||||
## List of contributors
|
## List of contributors
|
||||||
|
|
||||||
asie, ds84182, Possseidon, repo-alt
|
asie, ds84182, Possseidon, repo-alt, sanmofe
|
||||||
|
@ -16,8 +16,12 @@ object ConverterFluidContainerItem extends api.driver.Converter {
|
|||||||
output += "capacity" -> Int.box(fc.getCapacity(stack))
|
output += "capacity" -> Int.box(fc.getCapacity(stack))
|
||||||
val fluidStack = fc.getFluid(stack)
|
val fluidStack = fc.getFluid(stack)
|
||||||
if (fluidStack != null) {
|
if (fluidStack != null) {
|
||||||
output += "fluid" -> Registry.convert(Array[AnyRef](fluidStack))(0)
|
val fluidData = Registry.convert(Array[AnyRef](fluidStack))
|
||||||
} else {
|
if (fluidData.nonEmpty) {
|
||||||
|
output += "fluid" -> fluidData(0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!output.containsKey("fluid")) {
|
||||||
val fluidMap = new util.HashMap[AnyRef, AnyRef]()
|
val fluidMap = new util.HashMap[AnyRef, AnyRef]()
|
||||||
fluidMap += "amount" -> Int.box(0)
|
fluidMap += "amount" -> Int.box(0)
|
||||||
output += "fluid" -> fluidMap
|
output += "fluid" -> fluidMap
|
||||||
|
Loading…
x
Reference in New Issue
Block a user