Fix Fluid Hopper contents disappearing on load from disk
This commit is contained in:
parent
a7c253e986
commit
2bdd96a4e5
|
@ -15,6 +15,7 @@ import net.shadowfacts.shadowmc.ShadowMC
|
||||||
import net.shadowfacts.shadowmc.capability.CapHolder
|
import net.shadowfacts.shadowmc.capability.CapHolder
|
||||||
import net.shadowfacts.shadowmc.fluid.FluidTank
|
import net.shadowfacts.shadowmc.fluid.FluidTank
|
||||||
import net.shadowfacts.shadowmc.nbt.AutoSerializeNBT
|
import net.shadowfacts.shadowmc.nbt.AutoSerializeNBT
|
||||||
|
import net.shadowfacts.shadowmc.network.PacketRequestTEUpdate
|
||||||
import net.shadowfacts.shadowmc.network.PacketUpdateTE
|
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))
|
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() {
|
override fun update() {
|
||||||
if (!world.isRemote) {
|
if (!world.isRemote) {
|
||||||
// TODO: redstone me
|
// TODO: redstone me
|
||||||
|
|
Loading…
Reference in New Issue