blocks codegen
This commit is contained in:
11
level/block/acacia_button.go
Normal file
11
level/block/acacia_button.go
Normal file
@ -0,0 +1,11 @@
|
||||
package block
|
||||
|
||||
type AcaciaButton struct {
|
||||
Face string
|
||||
Facing string
|
||||
Powered string
|
||||
}
|
||||
|
||||
func (AcaciaButton) ID() string {
|
||||
return "minecraft:acacia_button"
|
||||
}
|
13
level/block/acacia_door.go
Normal file
13
level/block/acacia_door.go
Normal file
@ -0,0 +1,13 @@
|
||||
package block
|
||||
|
||||
type AcaciaDoor struct {
|
||||
Facing string
|
||||
Half string
|
||||
Hinge string
|
||||
Open string
|
||||
Powered string
|
||||
}
|
||||
|
||||
func (AcaciaDoor) ID() string {
|
||||
return "minecraft:acacia_door"
|
||||
}
|
13
level/block/acacia_fence.go
Normal file
13
level/block/acacia_fence.go
Normal file
@ -0,0 +1,13 @@
|
||||
package block
|
||||
|
||||
type AcaciaFence struct {
|
||||
East string
|
||||
North string
|
||||
South string
|
||||
Waterlogged string
|
||||
West string
|
||||
}
|
||||
|
||||
func (AcaciaFence) ID() string {
|
||||
return "minecraft:acacia_fence"
|
||||
}
|
12
level/block/acacia_fence_gate.go
Normal file
12
level/block/acacia_fence_gate.go
Normal file
@ -0,0 +1,12 @@
|
||||
package block
|
||||
|
||||
type AcaciaFenceGate struct {
|
||||
Facing string
|
||||
In_wall string
|
||||
Open string
|
||||
Powered string
|
||||
}
|
||||
|
||||
func (AcaciaFenceGate) ID() string {
|
||||
return "minecraft:acacia_fence_gate"
|
||||
}
|
10
level/block/acacia_leaves.go
Normal file
10
level/block/acacia_leaves.go
Normal file
@ -0,0 +1,10 @@
|
||||
package block
|
||||
|
||||
type AcaciaLeaves struct {
|
||||
Distance string
|
||||
Persistent string
|
||||
}
|
||||
|
||||
func (AcaciaLeaves) ID() string {
|
||||
return "minecraft:acacia_leaves"
|
||||
}
|
9
level/block/acacia_log.go
Normal file
9
level/block/acacia_log.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type AcaciaLog struct {
|
||||
Axis string
|
||||
}
|
||||
|
||||
func (AcaciaLog) ID() string {
|
||||
return "minecraft:acacia_log"
|
||||
}
|
8
level/block/acacia_planks.go
Normal file
8
level/block/acacia_planks.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type AcaciaPlanks struct {
|
||||
}
|
||||
|
||||
func (AcaciaPlanks) ID() string {
|
||||
return "minecraft:acacia_planks"
|
||||
}
|
9
level/block/acacia_pressure_plate.go
Normal file
9
level/block/acacia_pressure_plate.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type AcaciaPressurePlate struct {
|
||||
Powered string
|
||||
}
|
||||
|
||||
func (AcaciaPressurePlate) ID() string {
|
||||
return "minecraft:acacia_pressure_plate"
|
||||
}
|
9
level/block/acacia_sapling.go
Normal file
9
level/block/acacia_sapling.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type AcaciaSapling struct {
|
||||
Stage string
|
||||
}
|
||||
|
||||
func (AcaciaSapling) ID() string {
|
||||
return "minecraft:acacia_sapling"
|
||||
}
|
10
level/block/acacia_sign.go
Normal file
10
level/block/acacia_sign.go
Normal file
@ -0,0 +1,10 @@
|
||||
package block
|
||||
|
||||
type AcaciaSign struct {
|
||||
Rotation string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (AcaciaSign) ID() string {
|
||||
return "minecraft:acacia_sign"
|
||||
}
|
10
level/block/acacia_slab.go
Normal file
10
level/block/acacia_slab.go
Normal file
@ -0,0 +1,10 @@
|
||||
package block
|
||||
|
||||
type AcaciaSlab struct {
|
||||
Type string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (AcaciaSlab) ID() string {
|
||||
return "minecraft:acacia_slab"
|
||||
}
|
12
level/block/acacia_stairs.go
Normal file
12
level/block/acacia_stairs.go
Normal file
@ -0,0 +1,12 @@
|
||||
package block
|
||||
|
||||
type AcaciaStairs struct {
|
||||
Facing string
|
||||
Half string
|
||||
Shape string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (AcaciaStairs) ID() string {
|
||||
return "minecraft:acacia_stairs"
|
||||
}
|
13
level/block/acacia_trapdoor.go
Normal file
13
level/block/acacia_trapdoor.go
Normal file
@ -0,0 +1,13 @@
|
||||
package block
|
||||
|
||||
type AcaciaTrapdoor struct {
|
||||
Facing string
|
||||
Half string
|
||||
Open string
|
||||
Powered string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (AcaciaTrapdoor) ID() string {
|
||||
return "minecraft:acacia_trapdoor"
|
||||
}
|
10
level/block/acacia_wall_sign.go
Normal file
10
level/block/acacia_wall_sign.go
Normal file
@ -0,0 +1,10 @@
|
||||
package block
|
||||
|
||||
type AcaciaWallSign struct {
|
||||
Facing string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (AcaciaWallSign) ID() string {
|
||||
return "minecraft:acacia_wall_sign"
|
||||
}
|
9
level/block/acacia_wood.go
Normal file
9
level/block/acacia_wood.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type AcaciaWood struct {
|
||||
Axis string
|
||||
}
|
||||
|
||||
func (AcaciaWood) ID() string {
|
||||
return "minecraft:acacia_wood"
|
||||
}
|
11
level/block/activator_rail.go
Normal file
11
level/block/activator_rail.go
Normal file
@ -0,0 +1,11 @@
|
||||
package block
|
||||
|
||||
type ActivatorRail struct {
|
||||
Powered string
|
||||
Shape string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (ActivatorRail) ID() string {
|
||||
return "minecraft:activator_rail"
|
||||
}
|
8
level/block/air.go
Normal file
8
level/block/air.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type Air struct {
|
||||
}
|
||||
|
||||
func (Air) ID() string {
|
||||
return "minecraft:air"
|
||||
}
|
8
level/block/allium.go
Normal file
8
level/block/allium.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type Allium struct {
|
||||
}
|
||||
|
||||
func (Allium) ID() string {
|
||||
return "minecraft:allium"
|
||||
}
|
8
level/block/amethyst_block.go
Normal file
8
level/block/amethyst_block.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type AmethystBlock struct {
|
||||
}
|
||||
|
||||
func (AmethystBlock) ID() string {
|
||||
return "minecraft:amethyst_block"
|
||||
}
|
10
level/block/amethyst_cluster.go
Normal file
10
level/block/amethyst_cluster.go
Normal file
@ -0,0 +1,10 @@
|
||||
package block
|
||||
|
||||
type AmethystCluster struct {
|
||||
Facing string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (AmethystCluster) ID() string {
|
||||
return "minecraft:amethyst_cluster"
|
||||
}
|
8
level/block/ancient_debris.go
Normal file
8
level/block/ancient_debris.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type AncientDebris struct {
|
||||
}
|
||||
|
||||
func (AncientDebris) ID() string {
|
||||
return "minecraft:ancient_debris"
|
||||
}
|
8
level/block/andesite.go
Normal file
8
level/block/andesite.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type Andesite struct {
|
||||
}
|
||||
|
||||
func (Andesite) ID() string {
|
||||
return "minecraft:andesite"
|
||||
}
|
10
level/block/andesite_slab.go
Normal file
10
level/block/andesite_slab.go
Normal file
@ -0,0 +1,10 @@
|
||||
package block
|
||||
|
||||
type AndesiteSlab struct {
|
||||
Type string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (AndesiteSlab) ID() string {
|
||||
return "minecraft:andesite_slab"
|
||||
}
|
12
level/block/andesite_stairs.go
Normal file
12
level/block/andesite_stairs.go
Normal file
@ -0,0 +1,12 @@
|
||||
package block
|
||||
|
||||
type AndesiteStairs struct {
|
||||
Facing string
|
||||
Half string
|
||||
Shape string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (AndesiteStairs) ID() string {
|
||||
return "minecraft:andesite_stairs"
|
||||
}
|
14
level/block/andesite_wall.go
Normal file
14
level/block/andesite_wall.go
Normal file
@ -0,0 +1,14 @@
|
||||
package block
|
||||
|
||||
type AndesiteWall struct {
|
||||
East string
|
||||
North string
|
||||
South string
|
||||
Up string
|
||||
Waterlogged string
|
||||
West string
|
||||
}
|
||||
|
||||
func (AndesiteWall) ID() string {
|
||||
return "minecraft:andesite_wall"
|
||||
}
|
9
level/block/anvil.go
Normal file
9
level/block/anvil.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type Anvil struct {
|
||||
Facing string
|
||||
}
|
||||
|
||||
func (Anvil) ID() string {
|
||||
return "minecraft:anvil"
|
||||
}
|
9
level/block/attached_melon_stem.go
Normal file
9
level/block/attached_melon_stem.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type AttachedMelonStem struct {
|
||||
Facing string
|
||||
}
|
||||
|
||||
func (AttachedMelonStem) ID() string {
|
||||
return "minecraft:attached_melon_stem"
|
||||
}
|
9
level/block/attached_pumpkin_stem.go
Normal file
9
level/block/attached_pumpkin_stem.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type AttachedPumpkinStem struct {
|
||||
Facing string
|
||||
}
|
||||
|
||||
func (AttachedPumpkinStem) ID() string {
|
||||
return "minecraft:attached_pumpkin_stem"
|
||||
}
|
8
level/block/azalea.go
Normal file
8
level/block/azalea.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type Azalea struct {
|
||||
}
|
||||
|
||||
func (Azalea) ID() string {
|
||||
return "minecraft:azalea"
|
||||
}
|
10
level/block/azalea_leaves.go
Normal file
10
level/block/azalea_leaves.go
Normal file
@ -0,0 +1,10 @@
|
||||
package block
|
||||
|
||||
type AzaleaLeaves struct {
|
||||
Distance string
|
||||
Persistent string
|
||||
}
|
||||
|
||||
func (AzaleaLeaves) ID() string {
|
||||
return "minecraft:azalea_leaves"
|
||||
}
|
8
level/block/azure_bluet.go
Normal file
8
level/block/azure_bluet.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type AzureBluet struct {
|
||||
}
|
||||
|
||||
func (AzureBluet) ID() string {
|
||||
return "minecraft:azure_bluet"
|
||||
}
|
11
level/block/bamboo.go
Normal file
11
level/block/bamboo.go
Normal file
@ -0,0 +1,11 @@
|
||||
package block
|
||||
|
||||
type Bamboo struct {
|
||||
Age string
|
||||
Leaves string
|
||||
Stage string
|
||||
}
|
||||
|
||||
func (Bamboo) ID() string {
|
||||
return "minecraft:bamboo"
|
||||
}
|
8
level/block/bamboo_sapling.go
Normal file
8
level/block/bamboo_sapling.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type BambooSapling struct {
|
||||
}
|
||||
|
||||
func (BambooSapling) ID() string {
|
||||
return "minecraft:bamboo_sapling"
|
||||
}
|
10
level/block/barrel.go
Normal file
10
level/block/barrel.go
Normal file
@ -0,0 +1,10 @@
|
||||
package block
|
||||
|
||||
type Barrel struct {
|
||||
Facing string
|
||||
Open string
|
||||
}
|
||||
|
||||
func (Barrel) ID() string {
|
||||
return "minecraft:barrel"
|
||||
}
|
8
level/block/barrier.go
Normal file
8
level/block/barrier.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type Barrier struct {
|
||||
}
|
||||
|
||||
func (Barrier) ID() string {
|
||||
return "minecraft:barrier"
|
||||
}
|
9
level/block/basalt.go
Normal file
9
level/block/basalt.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type Basalt struct {
|
||||
Axis string
|
||||
}
|
||||
|
||||
func (Basalt) ID() string {
|
||||
return "minecraft:basalt"
|
||||
}
|
8
level/block/beacon.go
Normal file
8
level/block/beacon.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type Beacon struct {
|
||||
}
|
||||
|
||||
func (Beacon) ID() string {
|
||||
return "minecraft:beacon"
|
||||
}
|
8
level/block/bedrock.go
Normal file
8
level/block/bedrock.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type Bedrock struct {
|
||||
}
|
||||
|
||||
func (Bedrock) ID() string {
|
||||
return "minecraft:bedrock"
|
||||
}
|
10
level/block/bee_nest.go
Normal file
10
level/block/bee_nest.go
Normal file
@ -0,0 +1,10 @@
|
||||
package block
|
||||
|
||||
type BeeNest struct {
|
||||
Facing string
|
||||
Honey_level string
|
||||
}
|
||||
|
||||
func (BeeNest) ID() string {
|
||||
return "minecraft:bee_nest"
|
||||
}
|
10
level/block/beehive.go
Normal file
10
level/block/beehive.go
Normal file
@ -0,0 +1,10 @@
|
||||
package block
|
||||
|
||||
type Beehive struct {
|
||||
Facing string
|
||||
Honey_level string
|
||||
}
|
||||
|
||||
func (Beehive) ID() string {
|
||||
return "minecraft:beehive"
|
||||
}
|
9
level/block/beetroots.go
Normal file
9
level/block/beetroots.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type Beetroots struct {
|
||||
Age string
|
||||
}
|
||||
|
||||
func (Beetroots) ID() string {
|
||||
return "minecraft:beetroots"
|
||||
}
|
11
level/block/bell.go
Normal file
11
level/block/bell.go
Normal file
@ -0,0 +1,11 @@
|
||||
package block
|
||||
|
||||
type Bell struct {
|
||||
Attachment string
|
||||
Facing string
|
||||
Powered string
|
||||
}
|
||||
|
||||
func (Bell) ID() string {
|
||||
return "minecraft:bell"
|
||||
}
|
11
level/block/big_dripleaf.go
Normal file
11
level/block/big_dripleaf.go
Normal file
@ -0,0 +1,11 @@
|
||||
package block
|
||||
|
||||
type BigDripleaf struct {
|
||||
Facing string
|
||||
Tilt string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (BigDripleaf) ID() string {
|
||||
return "minecraft:big_dripleaf"
|
||||
}
|
10
level/block/big_dripleaf_stem.go
Normal file
10
level/block/big_dripleaf_stem.go
Normal file
@ -0,0 +1,10 @@
|
||||
package block
|
||||
|
||||
type BigDripleafStem struct {
|
||||
Facing string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (BigDripleafStem) ID() string {
|
||||
return "minecraft:big_dripleaf_stem"
|
||||
}
|
11
level/block/birch_button.go
Normal file
11
level/block/birch_button.go
Normal file
@ -0,0 +1,11 @@
|
||||
package block
|
||||
|
||||
type BirchButton struct {
|
||||
Face string
|
||||
Facing string
|
||||
Powered string
|
||||
}
|
||||
|
||||
func (BirchButton) ID() string {
|
||||
return "minecraft:birch_button"
|
||||
}
|
13
level/block/birch_door.go
Normal file
13
level/block/birch_door.go
Normal file
@ -0,0 +1,13 @@
|
||||
package block
|
||||
|
||||
type BirchDoor struct {
|
||||
Facing string
|
||||
Half string
|
||||
Hinge string
|
||||
Open string
|
||||
Powered string
|
||||
}
|
||||
|
||||
func (BirchDoor) ID() string {
|
||||
return "minecraft:birch_door"
|
||||
}
|
13
level/block/birch_fence.go
Normal file
13
level/block/birch_fence.go
Normal file
@ -0,0 +1,13 @@
|
||||
package block
|
||||
|
||||
type BirchFence struct {
|
||||
East string
|
||||
North string
|
||||
South string
|
||||
Waterlogged string
|
||||
West string
|
||||
}
|
||||
|
||||
func (BirchFence) ID() string {
|
||||
return "minecraft:birch_fence"
|
||||
}
|
12
level/block/birch_fence_gate.go
Normal file
12
level/block/birch_fence_gate.go
Normal file
@ -0,0 +1,12 @@
|
||||
package block
|
||||
|
||||
type BirchFenceGate struct {
|
||||
Facing string
|
||||
In_wall string
|
||||
Open string
|
||||
Powered string
|
||||
}
|
||||
|
||||
func (BirchFenceGate) ID() string {
|
||||
return "minecraft:birch_fence_gate"
|
||||
}
|
10
level/block/birch_leaves.go
Normal file
10
level/block/birch_leaves.go
Normal file
@ -0,0 +1,10 @@
|
||||
package block
|
||||
|
||||
type BirchLeaves struct {
|
||||
Distance string
|
||||
Persistent string
|
||||
}
|
||||
|
||||
func (BirchLeaves) ID() string {
|
||||
return "minecraft:birch_leaves"
|
||||
}
|
9
level/block/birch_log.go
Normal file
9
level/block/birch_log.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type BirchLog struct {
|
||||
Axis string
|
||||
}
|
||||
|
||||
func (BirchLog) ID() string {
|
||||
return "minecraft:birch_log"
|
||||
}
|
8
level/block/birch_planks.go
Normal file
8
level/block/birch_planks.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type BirchPlanks struct {
|
||||
}
|
||||
|
||||
func (BirchPlanks) ID() string {
|
||||
return "minecraft:birch_planks"
|
||||
}
|
9
level/block/birch_pressure_plate.go
Normal file
9
level/block/birch_pressure_plate.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type BirchPressurePlate struct {
|
||||
Powered string
|
||||
}
|
||||
|
||||
func (BirchPressurePlate) ID() string {
|
||||
return "minecraft:birch_pressure_plate"
|
||||
}
|
9
level/block/birch_sapling.go
Normal file
9
level/block/birch_sapling.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type BirchSapling struct {
|
||||
Stage string
|
||||
}
|
||||
|
||||
func (BirchSapling) ID() string {
|
||||
return "minecraft:birch_sapling"
|
||||
}
|
10
level/block/birch_sign.go
Normal file
10
level/block/birch_sign.go
Normal file
@ -0,0 +1,10 @@
|
||||
package block
|
||||
|
||||
type BirchSign struct {
|
||||
Rotation string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (BirchSign) ID() string {
|
||||
return "minecraft:birch_sign"
|
||||
}
|
10
level/block/birch_slab.go
Normal file
10
level/block/birch_slab.go
Normal file
@ -0,0 +1,10 @@
|
||||
package block
|
||||
|
||||
type BirchSlab struct {
|
||||
Type string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (BirchSlab) ID() string {
|
||||
return "minecraft:birch_slab"
|
||||
}
|
12
level/block/birch_stairs.go
Normal file
12
level/block/birch_stairs.go
Normal file
@ -0,0 +1,12 @@
|
||||
package block
|
||||
|
||||
type BirchStairs struct {
|
||||
Facing string
|
||||
Half string
|
||||
Shape string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (BirchStairs) ID() string {
|
||||
return "minecraft:birch_stairs"
|
||||
}
|
13
level/block/birch_trapdoor.go
Normal file
13
level/block/birch_trapdoor.go
Normal file
@ -0,0 +1,13 @@
|
||||
package block
|
||||
|
||||
type BirchTrapdoor struct {
|
||||
Facing string
|
||||
Half string
|
||||
Open string
|
||||
Powered string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (BirchTrapdoor) ID() string {
|
||||
return "minecraft:birch_trapdoor"
|
||||
}
|
10
level/block/birch_wall_sign.go
Normal file
10
level/block/birch_wall_sign.go
Normal file
@ -0,0 +1,10 @@
|
||||
package block
|
||||
|
||||
type BirchWallSign struct {
|
||||
Facing string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (BirchWallSign) ID() string {
|
||||
return "minecraft:birch_wall_sign"
|
||||
}
|
9
level/block/birch_wood.go
Normal file
9
level/block/birch_wood.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type BirchWood struct {
|
||||
Axis string
|
||||
}
|
||||
|
||||
func (BirchWood) ID() string {
|
||||
return "minecraft:birch_wood"
|
||||
}
|
9
level/block/black_banner.go
Normal file
9
level/block/black_banner.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type BlackBanner struct {
|
||||
Rotation string
|
||||
}
|
||||
|
||||
func (BlackBanner) ID() string {
|
||||
return "minecraft:black_banner"
|
||||
}
|
11
level/block/black_bed.go
Normal file
11
level/block/black_bed.go
Normal file
@ -0,0 +1,11 @@
|
||||
package block
|
||||
|
||||
type BlackBed struct {
|
||||
Facing string
|
||||
Occupied string
|
||||
Part string
|
||||
}
|
||||
|
||||
func (BlackBed) ID() string {
|
||||
return "minecraft:black_bed"
|
||||
}
|
11
level/block/black_candle.go
Normal file
11
level/block/black_candle.go
Normal file
@ -0,0 +1,11 @@
|
||||
package block
|
||||
|
||||
type BlackCandle struct {
|
||||
Candles string
|
||||
Lit string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (BlackCandle) ID() string {
|
||||
return "minecraft:black_candle"
|
||||
}
|
9
level/block/black_candle_cake.go
Normal file
9
level/block/black_candle_cake.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type BlackCandleCake struct {
|
||||
Lit string
|
||||
}
|
||||
|
||||
func (BlackCandleCake) ID() string {
|
||||
return "minecraft:black_candle_cake"
|
||||
}
|
8
level/block/black_carpet.go
Normal file
8
level/block/black_carpet.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type BlackCarpet struct {
|
||||
}
|
||||
|
||||
func (BlackCarpet) ID() string {
|
||||
return "minecraft:black_carpet"
|
||||
}
|
8
level/block/black_concrete.go
Normal file
8
level/block/black_concrete.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type BlackConcrete struct {
|
||||
}
|
||||
|
||||
func (BlackConcrete) ID() string {
|
||||
return "minecraft:black_concrete"
|
||||
}
|
8
level/block/black_concrete_powder.go
Normal file
8
level/block/black_concrete_powder.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type BlackConcretePowder struct {
|
||||
}
|
||||
|
||||
func (BlackConcretePowder) ID() string {
|
||||
return "minecraft:black_concrete_powder"
|
||||
}
|
9
level/block/black_glazed_terracotta.go
Normal file
9
level/block/black_glazed_terracotta.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type BlackGlazedTerracotta struct {
|
||||
Facing string
|
||||
}
|
||||
|
||||
func (BlackGlazedTerracotta) ID() string {
|
||||
return "minecraft:black_glazed_terracotta"
|
||||
}
|
9
level/block/black_shulker_box.go
Normal file
9
level/block/black_shulker_box.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type BlackShulkerBox struct {
|
||||
Facing string
|
||||
}
|
||||
|
||||
func (BlackShulkerBox) ID() string {
|
||||
return "minecraft:black_shulker_box"
|
||||
}
|
8
level/block/black_stained_glass.go
Normal file
8
level/block/black_stained_glass.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type BlackStainedGlass struct {
|
||||
}
|
||||
|
||||
func (BlackStainedGlass) ID() string {
|
||||
return "minecraft:black_stained_glass"
|
||||
}
|
13
level/block/black_stained_glass_pane.go
Normal file
13
level/block/black_stained_glass_pane.go
Normal file
@ -0,0 +1,13 @@
|
||||
package block
|
||||
|
||||
type BlackStainedGlassPane struct {
|
||||
East string
|
||||
North string
|
||||
South string
|
||||
Waterlogged string
|
||||
West string
|
||||
}
|
||||
|
||||
func (BlackStainedGlassPane) ID() string {
|
||||
return "minecraft:black_stained_glass_pane"
|
||||
}
|
8
level/block/black_terracotta.go
Normal file
8
level/block/black_terracotta.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type BlackTerracotta struct {
|
||||
}
|
||||
|
||||
func (BlackTerracotta) ID() string {
|
||||
return "minecraft:black_terracotta"
|
||||
}
|
9
level/block/black_wall_banner.go
Normal file
9
level/block/black_wall_banner.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type BlackWallBanner struct {
|
||||
Facing string
|
||||
}
|
||||
|
||||
func (BlackWallBanner) ID() string {
|
||||
return "minecraft:black_wall_banner"
|
||||
}
|
8
level/block/black_wool.go
Normal file
8
level/block/black_wool.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type BlackWool struct {
|
||||
}
|
||||
|
||||
func (BlackWool) ID() string {
|
||||
return "minecraft:black_wool"
|
||||
}
|
8
level/block/blackstone.go
Normal file
8
level/block/blackstone.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type Blackstone struct {
|
||||
}
|
||||
|
||||
func (Blackstone) ID() string {
|
||||
return "minecraft:blackstone"
|
||||
}
|
10
level/block/blackstone_slab.go
Normal file
10
level/block/blackstone_slab.go
Normal file
@ -0,0 +1,10 @@
|
||||
package block
|
||||
|
||||
type BlackstoneSlab struct {
|
||||
Type string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (BlackstoneSlab) ID() string {
|
||||
return "minecraft:blackstone_slab"
|
||||
}
|
12
level/block/blackstone_stairs.go
Normal file
12
level/block/blackstone_stairs.go
Normal file
@ -0,0 +1,12 @@
|
||||
package block
|
||||
|
||||
type BlackstoneStairs struct {
|
||||
Facing string
|
||||
Half string
|
||||
Shape string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (BlackstoneStairs) ID() string {
|
||||
return "minecraft:blackstone_stairs"
|
||||
}
|
14
level/block/blackstone_wall.go
Normal file
14
level/block/blackstone_wall.go
Normal file
@ -0,0 +1,14 @@
|
||||
package block
|
||||
|
||||
type BlackstoneWall struct {
|
||||
East string
|
||||
North string
|
||||
South string
|
||||
Up string
|
||||
Waterlogged string
|
||||
West string
|
||||
}
|
||||
|
||||
func (BlackstoneWall) ID() string {
|
||||
return "minecraft:blackstone_wall"
|
||||
}
|
10
level/block/blast_furnace.go
Normal file
10
level/block/blast_furnace.go
Normal file
@ -0,0 +1,10 @@
|
||||
package block
|
||||
|
||||
type BlastFurnace struct {
|
||||
Facing string
|
||||
Lit string
|
||||
}
|
||||
|
||||
func (BlastFurnace) ID() string {
|
||||
return "minecraft:blast_furnace"
|
||||
}
|
28
level/block/block.go
Normal file
28
level/block/block.go
Normal file
@ -0,0 +1,28 @@
|
||||
package block
|
||||
|
||||
type Block interface {
|
||||
ID() string
|
||||
}
|
||||
|
||||
var toStateID = make(map[Block]int)
|
||||
var fromStateID []Block
|
||||
var fromID = make(map[string]Block)
|
||||
|
||||
func init() {
|
||||
//regState := func(s Block) {
|
||||
// if _, ok := toStateID[s]; ok {
|
||||
// panic(fmt.Errorf("state %#v already exist", s))
|
||||
// }
|
||||
// toStateID[s] = len(fromStateID)
|
||||
// fromStateID = append(fromStateID, s)
|
||||
//}
|
||||
//regBlock := func(b Block) {
|
||||
// fromID[b.ID()] = b
|
||||
// b.forEachState(regState)
|
||||
//}
|
||||
//regBlock(Air{})
|
||||
}
|
||||
|
||||
func NewFromStateID(stateID int) Block {
|
||||
return fromStateID[stateID]
|
||||
}
|
40
level/block/block_states_test.go
Normal file
40
level/block/block_states_test.go
Normal file
@ -0,0 +1,40 @@
|
||||
package block
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/Tnze/go-mc/nbt"
|
||||
)
|
||||
|
||||
func TestNewFromStateID(t *testing.T) {
|
||||
f, err := os.Open("testdata/block_states.nbt")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
var states []struct {
|
||||
Name string
|
||||
Properties nbt.RawMessage
|
||||
}
|
||||
|
||||
_, err = nbt.NewDecoder(f).Decode(&states)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
for i, v := range states {
|
||||
state1 := NewFromStateID(i)
|
||||
if id := "minecraft:" + state1.ID(); id != v.Name {
|
||||
t.Errorf("StateID [%d] Name not match: %v != %v", i, id, v.Name)
|
||||
}
|
||||
state2 := state1
|
||||
if err := v.Properties.Unmarshal(&state2); err != nil {
|
||||
t.Errorf("Decode error: %v", err)
|
||||
}
|
||||
if state1 != state2 {
|
||||
t.Errorf("StateID [%d] Properties not match: %v != %v", i, state1, state2)
|
||||
}
|
||||
}
|
||||
}
|
9
level/block/blue_banner.go
Normal file
9
level/block/blue_banner.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type BlueBanner struct {
|
||||
Rotation string
|
||||
}
|
||||
|
||||
func (BlueBanner) ID() string {
|
||||
return "minecraft:blue_banner"
|
||||
}
|
11
level/block/blue_bed.go
Normal file
11
level/block/blue_bed.go
Normal file
@ -0,0 +1,11 @@
|
||||
package block
|
||||
|
||||
type BlueBed struct {
|
||||
Facing string
|
||||
Occupied string
|
||||
Part string
|
||||
}
|
||||
|
||||
func (BlueBed) ID() string {
|
||||
return "minecraft:blue_bed"
|
||||
}
|
11
level/block/blue_candle.go
Normal file
11
level/block/blue_candle.go
Normal file
@ -0,0 +1,11 @@
|
||||
package block
|
||||
|
||||
type BlueCandle struct {
|
||||
Candles string
|
||||
Lit string
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (BlueCandle) ID() string {
|
||||
return "minecraft:blue_candle"
|
||||
}
|
9
level/block/blue_candle_cake.go
Normal file
9
level/block/blue_candle_cake.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type BlueCandleCake struct {
|
||||
Lit string
|
||||
}
|
||||
|
||||
func (BlueCandleCake) ID() string {
|
||||
return "minecraft:blue_candle_cake"
|
||||
}
|
8
level/block/blue_carpet.go
Normal file
8
level/block/blue_carpet.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type BlueCarpet struct {
|
||||
}
|
||||
|
||||
func (BlueCarpet) ID() string {
|
||||
return "minecraft:blue_carpet"
|
||||
}
|
8
level/block/blue_concrete.go
Normal file
8
level/block/blue_concrete.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type BlueConcrete struct {
|
||||
}
|
||||
|
||||
func (BlueConcrete) ID() string {
|
||||
return "minecraft:blue_concrete"
|
||||
}
|
8
level/block/blue_concrete_powder.go
Normal file
8
level/block/blue_concrete_powder.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type BlueConcretePowder struct {
|
||||
}
|
||||
|
||||
func (BlueConcretePowder) ID() string {
|
||||
return "minecraft:blue_concrete_powder"
|
||||
}
|
9
level/block/blue_glazed_terracotta.go
Normal file
9
level/block/blue_glazed_terracotta.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type BlueGlazedTerracotta struct {
|
||||
Facing string
|
||||
}
|
||||
|
||||
func (BlueGlazedTerracotta) ID() string {
|
||||
return "minecraft:blue_glazed_terracotta"
|
||||
}
|
8
level/block/blue_ice.go
Normal file
8
level/block/blue_ice.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type BlueIce struct {
|
||||
}
|
||||
|
||||
func (BlueIce) ID() string {
|
||||
return "minecraft:blue_ice"
|
||||
}
|
8
level/block/blue_orchid.go
Normal file
8
level/block/blue_orchid.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type BlueOrchid struct {
|
||||
}
|
||||
|
||||
func (BlueOrchid) ID() string {
|
||||
return "minecraft:blue_orchid"
|
||||
}
|
9
level/block/blue_shulker_box.go
Normal file
9
level/block/blue_shulker_box.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type BlueShulkerBox struct {
|
||||
Facing string
|
||||
}
|
||||
|
||||
func (BlueShulkerBox) ID() string {
|
||||
return "minecraft:blue_shulker_box"
|
||||
}
|
8
level/block/blue_stained_glass.go
Normal file
8
level/block/blue_stained_glass.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type BlueStainedGlass struct {
|
||||
}
|
||||
|
||||
func (BlueStainedGlass) ID() string {
|
||||
return "minecraft:blue_stained_glass"
|
||||
}
|
13
level/block/blue_stained_glass_pane.go
Normal file
13
level/block/blue_stained_glass_pane.go
Normal file
@ -0,0 +1,13 @@
|
||||
package block
|
||||
|
||||
type BlueStainedGlassPane struct {
|
||||
East string
|
||||
North string
|
||||
South string
|
||||
Waterlogged string
|
||||
West string
|
||||
}
|
||||
|
||||
func (BlueStainedGlassPane) ID() string {
|
||||
return "minecraft:blue_stained_glass_pane"
|
||||
}
|
8
level/block/blue_terracotta.go
Normal file
8
level/block/blue_terracotta.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type BlueTerracotta struct {
|
||||
}
|
||||
|
||||
func (BlueTerracotta) ID() string {
|
||||
return "minecraft:blue_terracotta"
|
||||
}
|
9
level/block/blue_wall_banner.go
Normal file
9
level/block/blue_wall_banner.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type BlueWallBanner struct {
|
||||
Facing string
|
||||
}
|
||||
|
||||
func (BlueWallBanner) ID() string {
|
||||
return "minecraft:blue_wall_banner"
|
||||
}
|
8
level/block/blue_wool.go
Normal file
8
level/block/blue_wool.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type BlueWool struct {
|
||||
}
|
||||
|
||||
func (BlueWool) ID() string {
|
||||
return "minecraft:blue_wool"
|
||||
}
|
9
level/block/bone_block.go
Normal file
9
level/block/bone_block.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type BoneBlock struct {
|
||||
Axis string
|
||||
}
|
||||
|
||||
func (BoneBlock) ID() string {
|
||||
return "minecraft:bone_block"
|
||||
}
|
8
level/block/bookshelf.go
Normal file
8
level/block/bookshelf.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type Bookshelf struct {
|
||||
}
|
||||
|
||||
func (Bookshelf) ID() string {
|
||||
return "minecraft:bookshelf"
|
||||
}
|
9
level/block/brain_coral.go
Normal file
9
level/block/brain_coral.go
Normal file
@ -0,0 +1,9 @@
|
||||
package block
|
||||
|
||||
type BrainCoral struct {
|
||||
Waterlogged string
|
||||
}
|
||||
|
||||
func (BrainCoral) ID() string {
|
||||
return "minecraft:brain_coral"
|
||||
}
|
8
level/block/brain_coral_block.go
Normal file
8
level/block/brain_coral_block.go
Normal file
@ -0,0 +1,8 @@
|
||||
package block
|
||||
|
||||
type BrainCoralBlock struct {
|
||||
}
|
||||
|
||||
func (BrainCoralBlock) ID() string {
|
||||
return "minecraft:brain_coral_block"
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user