Fix Fluid Hopper contents disappearing on load from disk

This commit is contained in:
Shadowfacts 2017-01-14 19:44:23 -05:00
parent a7c253e986
commit 2bdd96a4e5
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 7 additions and 0 deletions

View File

@ -15,6 +15,7 @@ import net.shadowfacts.shadowmc.ShadowMC
import net.shadowfacts.shadowmc.capability.CapHolder
import net.shadowfacts.shadowmc.fluid.FluidTank
import net.shadowfacts.shadowmc.nbt.AutoSerializeNBT
import net.shadowfacts.shadowmc.network.PacketRequestTEUpdate
import net.shadowfacts.shadowmc.network.PacketUpdateTE
/**
@ -39,6 +40,12 @@ class TileEntityFluidHopper: TileEntityHopperBase(), ITickable {
ShadowMC.network.sendToAllAround(PacketUpdateTE(this), NetworkRegistry.TargetPoint(world.provider.dimension, pos.x.toDouble(), pos.y.toDouble(), pos.z.toDouble(), 64.0))
}
override fun onLoad() {
if (world.isRemote) {
ShadowMC.network.sendToServer(PacketRequestTEUpdate(this))
}
}
override fun update() {
if (!world.isRemote) {
// TODO: redstone me