mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-15 10:21:45 -04:00
Initialize components in client tile entities when loading / receiving description packet. Should fix #1801.
This commit is contained in:
parent
ca5d95cff5
commit
cdd59cff05
@ -98,6 +98,20 @@ trait ComponentInventory extends Environment with Inventory with inventory.Compo
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------- //
|
// ----------------------------------------------------------------------- //
|
||||||
|
|
||||||
|
override protected def initialize(): Unit = {
|
||||||
|
super.initialize()
|
||||||
|
if (isClient) {
|
||||||
|
connectComponents()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override def dispose(): Unit = {
|
||||||
|
super.dispose()
|
||||||
|
if (isClient) {
|
||||||
|
disconnectComponents()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override def onConnect(node: Node) {
|
override def onConnect(node: Node) {
|
||||||
super.onConnect(node)
|
super.onConnect(node)
|
||||||
if (node == this.node) {
|
if (node == this.node) {
|
||||||
@ -122,5 +136,6 @@ trait ComponentInventory extends Environment with Inventory with inventory.Compo
|
|||||||
override def readFromNBTForClient(nbt: NBTTagCompound) {
|
override def readFromNBTForClient(nbt: NBTTagCompound) {
|
||||||
super.readFromNBTForClient(nbt)
|
super.readFromNBTForClient(nbt)
|
||||||
load(nbt)
|
load(nbt)
|
||||||
|
connectComponents()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user