File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
src/main/kotlin/net/pdevita/creeperheal2 Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -203,11 +203,13 @@ private class Blocks13: VersionBlocks() {
203
203
Material .LIGHT_GRAY_WALL_BANNER to Behind ,
204
204
Material .LIME_WALL_BANNER to Behind ,
205
205
Material .MAGENTA_WALL_BANNER to Behind ,
206
- Material .MOVING_PISTON to Behind ,
207
206
Material .ORANGE_WALL_BANNER to Behind ,
208
207
Material .PAINTING to Behind ,
209
208
Material .PINK_WALL_BANNER to Behind ,
210
- Material .PISTON_HEAD to Behind ,
209
+ // Material.PISTON_HEAD to Behind,
210
+ // Material.MOVING_PISTON to Behind,
211
+ Material .PISTON to Piston ,
212
+ Material .STICKY_PISTON to Piston ,
211
213
Material .PLAYER_WALL_HEAD to Behind ,
212
214
Material .PURPLE_WALL_BANNER to Behind ,
213
215
Material .RED_WALL_BANNER to Behind ,
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import org.bukkit.block.data.Directional
9
9
import org.bukkit.block.data.FaceAttachable
10
10
import org.bukkit.block.data.MultipleFacing
11
11
import org.bukkit.block.data.type.Bed
12
+ import org.bukkit.block.data.type.Piston
12
13
import org.bukkit.block.data.type.Switch
13
14
14
15
interface FindDependentBlock {
@@ -108,4 +109,16 @@ object Door:FindDependentBlock {
108
109
}
109
110
}
110
111
112
+ object Piston:FindDependentBlock {
113
+ override fun reorient (state : BlockState ): Location ? {
114
+ if (state.blockData is org.bukkit.block.data.type.Piston ) {
115
+ val piston = state.blockData as org.bukkit.block.data.type.Piston
116
+ if (piston.isExtended) {
117
+ return state.block.getRelative(piston.facing).location
118
+ }
119
+ }
120
+ return null
121
+ }
122
+ }
123
+
111
124
You can’t perform that action at this time.
0 commit comments