File tree Expand file tree Collapse file tree 9 files changed +18
-63
lines changed
worldedit-bukkit/adapters
adapter-1.20.2/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/v1_20_R2
adapter-1.20.4/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/v1_20_R3
adapter-1.20.6/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/v1_20_R4
adapter-1.21.3/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/v1_21_3
adapter-1.21.4/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/v1_21_4
adapter-1.21/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/v1_21
worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric
worldedit-neoforge/src/main/java/com/sk89q/worldedit/neoforge
worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge Expand file tree Collapse file tree 9 files changed +18
-63
lines changed Original file line number Diff line number Diff line change 23
23
import net .minecraft .core .BlockPos ;
24
24
import net .minecraft .world .Clearable ;
25
25
import net .minecraft .world .level .EmptyBlockGetter ;
26
+ import net .minecraft .world .level .block .Block ;
26
27
import net .minecraft .world .level .block .EntityBlock ;
27
28
import net .minecraft .world .level .block .state .BlockState ;
28
29
import net .minecraft .world .level .material .PushReaction ;
29
- import net .minecraft .world .phys .AABB ;
30
- import net .minecraft .world .phys .Vec3 ;
31
- import net .minecraft .world .phys .shapes .VoxelShape ;
32
30
33
31
public class PaperweightBlockMaterial implements BlockMaterial {
34
32
35
- private static final AABB FULL_CUBE = AABB .unitCubeFromLowerCorner (Vec3 .ZERO );
36
-
37
33
private final BlockState block ;
38
34
39
35
public PaperweightBlockMaterial (BlockState block ) {
@@ -47,8 +43,7 @@ public boolean isAir() {
47
43
48
44
@ Override
49
45
public boolean isFullCube () {
50
- VoxelShape vs = block .getCollisionShape (EmptyBlockGetter .INSTANCE , BlockPos .ZERO );
51
- return !vs .isEmpty () && vs .bounds ().equals (FULL_CUBE );
46
+ return Block .isShapeFullBlock (block .getShape (EmptyBlockGetter .INSTANCE , BlockPos .ZERO ));
52
47
}
53
48
54
49
@ Override
Original file line number Diff line number Diff line change 23
23
import net .minecraft .core .BlockPos ;
24
24
import net .minecraft .world .Clearable ;
25
25
import net .minecraft .world .level .EmptyBlockGetter ;
26
+ import net .minecraft .world .level .block .Block ;
26
27
import net .minecraft .world .level .block .EntityBlock ;
27
28
import net .minecraft .world .level .block .state .BlockState ;
28
29
import net .minecraft .world .level .material .PushReaction ;
29
- import net .minecraft .world .phys .AABB ;
30
- import net .minecraft .world .phys .Vec3 ;
31
- import net .minecraft .world .phys .shapes .VoxelShape ;
32
30
33
31
public class PaperweightBlockMaterial implements BlockMaterial {
34
32
35
- private static final AABB FULL_CUBE = AABB .unitCubeFromLowerCorner (Vec3 .ZERO );
36
-
37
33
private final BlockState block ;
38
34
39
35
public PaperweightBlockMaterial (BlockState block ) {
@@ -47,8 +43,7 @@ public boolean isAir() {
47
43
48
44
@ Override
49
45
public boolean isFullCube () {
50
- VoxelShape vs = block .getCollisionShape (EmptyBlockGetter .INSTANCE , BlockPos .ZERO );
51
- return !vs .isEmpty () && vs .bounds ().equals (FULL_CUBE );
46
+ return Block .isShapeFullBlock (block .getShape (EmptyBlockGetter .INSTANCE , BlockPos .ZERO ));
52
47
}
53
48
54
49
@ Override
Original file line number Diff line number Diff line change 23
23
import net .minecraft .core .BlockPos ;
24
24
import net .minecraft .world .Clearable ;
25
25
import net .minecraft .world .level .EmptyBlockGetter ;
26
+ import net .minecraft .world .level .block .Block ;
26
27
import net .minecraft .world .level .block .EntityBlock ;
27
28
import net .minecraft .world .level .block .state .BlockState ;
28
29
import net .minecraft .world .level .material .PushReaction ;
29
- import net .minecraft .world .phys .AABB ;
30
- import net .minecraft .world .phys .Vec3 ;
31
- import net .minecraft .world .phys .shapes .VoxelShape ;
32
30
33
31
public class PaperweightBlockMaterial implements BlockMaterial {
34
32
35
- private static final AABB FULL_CUBE = AABB .unitCubeFromLowerCorner (Vec3 .ZERO );
36
-
37
33
private final BlockState block ;
38
34
39
35
public PaperweightBlockMaterial (BlockState block ) {
@@ -47,8 +43,7 @@ public boolean isAir() {
47
43
48
44
@ Override
49
45
public boolean isFullCube () {
50
- VoxelShape vs = block .getCollisionShape (EmptyBlockGetter .INSTANCE , BlockPos .ZERO );
51
- return !vs .isEmpty () && vs .bounds ().equals (FULL_CUBE );
46
+ return Block .isShapeFullBlock (block .getShape (EmptyBlockGetter .INSTANCE , BlockPos .ZERO ));
52
47
}
53
48
54
49
@ Override
Original file line number Diff line number Diff line change 23
23
import net .minecraft .core .BlockPos ;
24
24
import net .minecraft .world .Clearable ;
25
25
import net .minecraft .world .level .EmptyBlockGetter ;
26
+ import net .minecraft .world .level .block .Block ;
26
27
import net .minecraft .world .level .block .EntityBlock ;
27
28
import net .minecraft .world .level .block .state .BlockState ;
28
29
import net .minecraft .world .level .material .PushReaction ;
29
- import net .minecraft .world .phys .AABB ;
30
- import net .minecraft .world .phys .Vec3 ;
31
- import net .minecraft .world .phys .shapes .VoxelShape ;
32
30
33
31
public class PaperweightBlockMaterial implements BlockMaterial {
34
32
35
- private static final AABB FULL_CUBE = AABB .unitCubeFromLowerCorner (Vec3 .ZERO );
36
-
37
33
private final BlockState block ;
38
34
39
35
public PaperweightBlockMaterial (BlockState block ) {
@@ -47,8 +43,7 @@ public boolean isAir() {
47
43
48
44
@ Override
49
45
public boolean isFullCube () {
50
- VoxelShape vs = block .getCollisionShape (EmptyBlockGetter .INSTANCE , BlockPos .ZERO );
51
- return !vs .isEmpty () && vs .bounds ().equals (FULL_CUBE );
46
+ return Block .isShapeFullBlock (block .getShape (EmptyBlockGetter .INSTANCE , BlockPos .ZERO ));
52
47
}
53
48
54
49
@ Override
Original file line number Diff line number Diff line change 23
23
import net .minecraft .core .BlockPos ;
24
24
import net .minecraft .world .Clearable ;
25
25
import net .minecraft .world .level .EmptyBlockGetter ;
26
+ import net .minecraft .world .level .block .Block ;
26
27
import net .minecraft .world .level .block .EntityBlock ;
27
28
import net .minecraft .world .level .block .state .BlockState ;
28
29
import net .minecraft .world .level .material .PushReaction ;
29
- import net .minecraft .world .phys .AABB ;
30
- import net .minecraft .world .phys .Vec3 ;
31
- import net .minecraft .world .phys .shapes .VoxelShape ;
32
30
33
31
public class PaperweightBlockMaterial implements BlockMaterial {
34
32
35
- private static final AABB FULL_CUBE = AABB .unitCubeFromLowerCorner (Vec3 .ZERO );
36
-
37
33
private final BlockState block ;
38
34
39
35
public PaperweightBlockMaterial (BlockState block ) {
@@ -47,8 +43,7 @@ public boolean isAir() {
47
43
48
44
@ Override
49
45
public boolean isFullCube () {
50
- VoxelShape vs = block .getCollisionShape (EmptyBlockGetter .INSTANCE , BlockPos .ZERO );
51
- return !vs .isEmpty () && vs .bounds ().equals (FULL_CUBE );
46
+ return Block .isShapeFullBlock (block .getShape (EmptyBlockGetter .INSTANCE , BlockPos .ZERO ));
52
47
}
53
48
54
49
@ Override
Original file line number Diff line number Diff line change 23
23
import net .minecraft .core .BlockPos ;
24
24
import net .minecraft .world .Clearable ;
25
25
import net .minecraft .world .level .EmptyBlockGetter ;
26
+ import net .minecraft .world .level .block .Block ;
26
27
import net .minecraft .world .level .block .EntityBlock ;
27
28
import net .minecraft .world .level .block .state .BlockState ;
28
29
import net .minecraft .world .level .material .PushReaction ;
29
- import net .minecraft .world .phys .AABB ;
30
- import net .minecraft .world .phys .Vec3 ;
31
- import net .minecraft .world .phys .shapes .VoxelShape ;
32
30
33
31
public class PaperweightBlockMaterial implements BlockMaterial {
34
32
35
- private static final AABB FULL_CUBE = AABB .unitCubeFromLowerCorner (Vec3 .ZERO );
36
-
37
33
private final BlockState block ;
38
34
39
35
public PaperweightBlockMaterial (BlockState block ) {
@@ -47,8 +43,7 @@ public boolean isAir() {
47
43
48
44
@ Override
49
45
public boolean isFullCube () {
50
- VoxelShape vs = block .getCollisionShape (EmptyBlockGetter .INSTANCE , BlockPos .ZERO );
51
- return !vs .isEmpty () && vs .bounds ().equals (FULL_CUBE );
46
+ return Block .isShapeFullBlock (block .getShape (EmptyBlockGetter .INSTANCE , BlockPos .ZERO ));
52
47
}
53
48
54
49
@ Override
Original file line number Diff line number Diff line change 23
23
import net .minecraft .core .BlockPos ;
24
24
import net .minecraft .world .Clearable ;
25
25
import net .minecraft .world .level .EmptyBlockGetter ;
26
+ import net .minecraft .world .level .block .Block ;
26
27
import net .minecraft .world .level .block .EntityBlock ;
27
28
import net .minecraft .world .level .block .state .BlockState ;
28
29
import net .minecraft .world .level .material .PushReaction ;
29
- import net .minecraft .world .phys .AABB ;
30
- import net .minecraft .world .phys .Vec3 ;
31
- import net .minecraft .world .phys .shapes .VoxelShape ;
32
30
33
31
/**
34
32
* Fabric block material that pulls as much info as possible from the Minecraft
37
35
*/
38
36
public class FabricBlockMaterial implements BlockMaterial {
39
37
40
- private static final AABB FULL_CUBE = AABB .unitCubeFromLowerCorner (Vec3 .ZERO );
41
-
42
38
private final BlockState block ;
43
39
44
40
public FabricBlockMaterial (BlockState block ) {
@@ -52,8 +48,7 @@ public boolean isAir() {
52
48
53
49
@ Override
54
50
public boolean isFullCube () {
55
- VoxelShape vs = block .getCollisionShape (EmptyBlockGetter .INSTANCE , BlockPos .ZERO );
56
- return !vs .isEmpty () && vs .bounds ().equals (FULL_CUBE );
51
+ return Block .isShapeFullBlock (block .getShape (EmptyBlockGetter .INSTANCE , BlockPos .ZERO ));
57
52
}
58
53
59
54
@ Override
Original file line number Diff line number Diff line change 23
23
import net .minecraft .core .BlockPos ;
24
24
import net .minecraft .world .Clearable ;
25
25
import net .minecraft .world .level .EmptyBlockGetter ;
26
+ import net .minecraft .world .level .block .Block ;
26
27
import net .minecraft .world .level .block .EntityBlock ;
27
28
import net .minecraft .world .level .block .state .BlockState ;
28
29
import net .minecraft .world .level .material .PushReaction ;
29
- import net .minecraft .world .phys .AABB ;
30
- import net .minecraft .world .phys .Vec3 ;
31
- import net .minecraft .world .phys .shapes .VoxelShape ;
32
30
33
31
/**
34
32
* Forge block material that pulls as much info as possible from the Minecraft
37
35
*/
38
36
public class NeoForgeBlockMaterial implements BlockMaterial {
39
37
40
- private static final AABB FULL_CUBE = AABB .unitCubeFromLowerCorner (Vec3 .ZERO );
41
-
42
38
private final BlockState block ;
43
39
44
40
public NeoForgeBlockMaterial (BlockState block ) {
@@ -52,8 +48,7 @@ public boolean isAir() {
52
48
53
49
@ Override
54
50
public boolean isFullCube () {
55
- VoxelShape vs = block .getCollisionShape (EmptyBlockGetter .INSTANCE , BlockPos .ZERO );
56
- return !vs .isEmpty () && vs .bounds ().equals (FULL_CUBE );
51
+ return Block .isShapeFullBlock (block .getShape (EmptyBlockGetter .INSTANCE , BlockPos .ZERO ));
57
52
}
58
53
59
54
@ Override
Original file line number Diff line number Diff line change 23
23
import net .minecraft .core .BlockPos ;
24
24
import net .minecraft .world .Clearable ;
25
25
import net .minecraft .world .level .EmptyBlockGetter ;
26
+ import net .minecraft .world .level .block .Block ;
26
27
import net .minecraft .world .level .block .EntityBlock ;
27
28
import net .minecraft .world .level .block .state .BlockState ;
28
29
import net .minecraft .world .level .material .PushReaction ;
29
- import net .minecraft .world .phys .AABB ;
30
- import net .minecraft .world .phys .Vec3 ;
31
- import net .minecraft .world .phys .shapes .VoxelShape ;
32
30
33
31
/**
34
32
* Sponge block material that pulls as much info as possible from the Minecraft
37
35
*/
38
36
public class SpongeBlockMaterial implements BlockMaterial {
39
37
40
- private static final AABB FULL_CUBE = AABB .unitCubeFromLowerCorner (Vec3 .ZERO );
41
-
42
38
private final BlockState block ;
43
39
44
40
public SpongeBlockMaterial (BlockState block ) {
@@ -52,8 +48,7 @@ public boolean isAir() {
52
48
53
49
@ Override
54
50
public boolean isFullCube () {
55
- VoxelShape vs = block .getCollisionShape (EmptyBlockGetter .INSTANCE , BlockPos .ZERO );
56
- return !vs .isEmpty () && vs .bounds ().equals (FULL_CUBE );
51
+ return Block .isShapeFullBlock (block .getShape (EmptyBlockGetter .INSTANCE , BlockPos .ZERO ));
57
52
}
58
53
59
54
@ Override
You can’t perform that action at this time.
0 commit comments