Skip to content
This repository has been archived by the owner on Jun 3, 2023. It is now read-only.

Commit

Permalink
Fixed 1.14 issue regarding grindstone blockdata
Browse files Browse the repository at this point in the history
  • Loading branch information
NichtStudioCode committed Jul 10, 2021
1 parent cf85ffc commit 5d3c2a5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,9 @@ class AsyncDripleaf(material: Material, blockData: Dripleaf) : AsyncBlockData(ma

}

class AsyncGrindstone(material: Material, blockData: Grindstone) : AsyncBlockData(material), AsyncMultiModel, AsyncDirectional {
override val facing = blockData.facing
override val model = blockData.attachedFace.ordinal
class AsyncGrindstone(blockData: BlockData) : AsyncBlockData(Material.GRINDSTONE), AsyncMultiModel, AsyncDirectional {
override val facing = (blockData as Directional).facing
override val model = if (isVersionOrHigher("1.15.0")) (blockData as Grindstone).attachedFace.ordinal else 0
}

class AsyncBell(material: Material, blockData: Bell) : AsyncBlockData(material), AsyncMultiModel, AsyncDirectional {
Expand Down Expand Up @@ -459,6 +459,7 @@ fun Block.toAsyncBlockData(): AsyncBlockData {
material == Material.BEACON -> AsyncBeacon(this)
material == Material.SUNFLOWER -> AsyncSunflower(blockData as Bisected)
material == Material.BAMBOO -> AsyncBamboo(blockData as Bamboo)
material == Material.GRINDSTONE -> AsyncGrindstone(blockData)

material.isFluid() -> AsyncFluid(material, this)
material.isHead() -> AsyncHead(material, this)
Expand Down Expand Up @@ -497,7 +498,6 @@ fun Block.toAsyncBlockData(): AsyncBlockData {
blockData is Observer -> AsyncObserver(material, blockData)
blockData is Cocoa -> AsyncCocoa(material, blockData)
blockData is Bed -> AsyncBed(material, blockData)
blockData is Grindstone -> AsyncGrindstone(material, blockData)
blockData is Bell -> AsyncBell(material, blockData)

isVersionOrHigher("1.17") && blockData is LightningRod -> AsyncLightningRod(material, blockData)
Expand Down

0 comments on commit 5d3c2a5

Please sign in to comment.