forked from huin/chunkymonkey
/
block_void.go
42 lines (30 loc) · 985 Bytes
/
block_void.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package gamerules
import . "chunkymonkey/types"
func makeVoidAspect() (aspect IBlockAspect) {
return &VoidAspect{}
}
// Behaviour of a "void" block which has no behaviour.
type VoidAspect struct{}
func (aspect *VoidAspect) setAttrs(blockAttrs *BlockAttrs) {
}
func (aspect *VoidAspect) Name() string {
return "Void"
}
func (aspect *VoidAspect) Check() error {
return nil
}
func (aspect *VoidAspect) Hit(instance *BlockInstance, player IPlayerClient, digStatus DigStatus) (destroyed bool) {
destroyed = false
return
}
func (aspect *VoidAspect) Interact(instance *BlockInstance, player IPlayerClient) {
}
func (aspect *VoidAspect) InventoryClick(instance *BlockInstance, player IPlayerClient, click *Click) {
}
func (aspect *VoidAspect) InventoryUnsubscribed(instance *BlockInstance, player IPlayerClient) {
}
func (aspect *VoidAspect) Destroy(instance *BlockInstance) {
}
func (aspect *VoidAspect) Tick(instance *BlockInstance) bool {
return false
}