Skip to content

Commit

Permalink
Fix some heater desyncs by melting blocks on the client.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaargolo committed Jul 16, 2023
1 parent e5c0605 commit de4bb51
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class Heater: BlockWithEntity(FabricBlockSettings.copyOf(Blocks.COBBLESTONE).lum

override fun createBlockEntity(pos: BlockPos, state: BlockState) = HeaterBlockEntity(this, pos, state)

override fun <T : BlockEntity?> getTicker(world: World?, blockState: BlockState?, blockEntityType: BlockEntityType<T>?): BlockEntityTicker<T>? {
return checkType(blockEntityType, getEntityType(this)) { wrld, pos, state, blockEntity -> HeaterBlockEntity.tick(wrld, pos, state, blockEntity as HeaterBlockEntity) }
override fun <T : BlockEntity?> getTicker(world: World, blockState: BlockState?, blockEntityType: BlockEntityType<T>?): BlockEntityTicker<T>? {
return if(!world.isClient) checkType(blockEntityType, getEntityType(this)) { wrld, pos, state, blockEntity -> HeaterBlockEntity.tick(wrld, pos, state, blockEntity as HeaterBlockEntity) } else null
}

init {
Expand Down

0 comments on commit de4bb51

Please sign in to comment.