File tree Expand file tree Collapse file tree 7 files changed +23
-10
lines changed
worldedit-core/src/main/java/com/sk89q/worldedit
src/main/java/com/sk89q/worldedit/fabric Expand file tree Collapse file tree 7 files changed +23
-10
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,9 @@ protected String[] getDefaultDisallowedBlocks() {
121
121
BlockTypes .YELLOW_BED ,
122
122
BlockTypes .POWERED_RAIL ,
123
123
BlockTypes .DETECTOR_RAIL ,
124
+ // Keep grass for <1.20.3 compat
124
125
BlockTypes .GRASS ,
126
+ BlockTypes .SHORT_GRASS ,
125
127
BlockTypes .DEAD_BUSH ,
126
128
BlockTypes .MOVING_PISTON ,
127
129
BlockTypes .PISTON_HEAD ,
Original file line number Diff line number Diff line change @@ -85,7 +85,11 @@ public class MultiStageReorder extends AbstractBufferingExtent implements Reorde
85
85
priorityMap .put (BlockTypes .RED_BED , PlacementPriority .LAST );
86
86
priorityMap .put (BlockTypes .WHITE_BED , PlacementPriority .LAST );
87
87
priorityMap .put (BlockTypes .YELLOW_BED , PlacementPriority .LAST );
88
- priorityMap .put (BlockTypes .GRASS , PlacementPriority .LAST );
88
+ // Keep "grass" for <1.20.3 compat
89
+ @ SuppressWarnings ("deprecation" )
90
+ BlockType grass = BlockTypes .GRASS ;
91
+ priorityMap .put (grass , PlacementPriority .LAST );
92
+ priorityMap .put (BlockTypes .SHORT_GRASS , PlacementPriority .LAST );
89
93
priorityMap .put (BlockTypes .TALL_GRASS , PlacementPriority .LAST );
90
94
priorityMap .put (BlockTypes .ROSE_BUSH , PlacementPriority .LAST );
91
95
priorityMap .put (BlockTypes .DANDELION , PlacementPriority .LAST );
Original file line number Diff line number Diff line change 26
26
import com .sk89q .worldedit .function .pattern .RandomPattern ;
27
27
import com .sk89q .worldedit .math .BlockVector3 ;
28
28
import com .sk89q .worldedit .world .block .BlockState ;
29
+ import com .sk89q .worldedit .world .block .BlockType ;
29
30
import com .sk89q .worldedit .world .block .BlockTypes ;
30
31
31
32
/**
@@ -95,7 +96,12 @@ public static Pattern getDesertPattern() {
95
96
*/
96
97
public static Pattern getTemperatePattern () {
97
98
RandomPattern pattern = new RandomPattern ();
98
- pattern .add (BlockTypes .GRASS .getDefaultState (), 300 );
99
+ BlockType grass = BlockTypes .SHORT_GRASS ;
100
+ if (grass == null ) {
101
+ // Fallback for <1.20.3 compat
102
+ grass = BlockTypes .GRASS ;
103
+ }
104
+ pattern .add (grass .getDefaultState (), 300 );
99
105
pattern .add (BlockTypes .POPPY .getDefaultState (), 5 );
100
106
pattern .add (BlockTypes .DANDELION .getDefaultState (), 5 );
101
107
return pattern ;
Original file line number Diff line number Diff line change @@ -410,7 +410,7 @@ public final class BlockTypes {
410
410
@ Nullable public static final BlockType GRANITE_SLAB = get ("minecraft:granite_slab" );
411
411
@ Nullable public static final BlockType GRANITE_STAIRS = get ("minecraft:granite_stairs" );
412
412
@ Nullable public static final BlockType GRANITE_WALL = get ("minecraft:granite_wall" );
413
- @ Nullable public static final BlockType GRASS = get ("minecraft:grass" );
413
+ @ Deprecated @ Nullable public static final BlockType GRASS = get ("minecraft:grass" );
414
414
@ Nullable public static final BlockType GRASS_BLOCK = get ("minecraft:grass_block" );
415
415
@ Deprecated @ Nullable public static final BlockType GRASS_PATH = get ("minecraft:grass_path" );
416
416
@ Nullable public static final BlockType GRAVEL = get ("minecraft:gravel" );
@@ -839,6 +839,7 @@ public final class BlockTypes {
839
839
@ Nullable public static final BlockType SEA_LANTERN = get ("minecraft:sea_lantern" );
840
840
@ Nullable public static final BlockType SEA_PICKLE = get ("minecraft:sea_pickle" );
841
841
@ Nullable public static final BlockType SEAGRASS = get ("minecraft:seagrass" );
842
+ @ Nullable public static final BlockType SHORT_GRASS = get ("minecraft:short_grass" );
842
843
@ Nullable public static final BlockType SHROOMLIGHT = get ("minecraft:shroomlight" );
843
844
@ Nullable public static final BlockType SHULKER_BOX = get ("minecraft:shulker_box" );
844
845
@ Deprecated @ Nullable public static final BlockType SIGN = get ("minecraft:sign" );
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ applyShadowConfiguration()
22
22
apply (plugin = " fabric-loom" )
23
23
apply (plugin = " java-library" )
24
24
25
- val minecraftVersion = " 1.20.2 "
26
- val loaderVersion = " 0.14.22 "
25
+ val minecraftVersion = " 1.20.3-pre1 "
26
+ val loaderVersion = " 0.14.24 "
27
27
28
28
val fabricApiConfiguration: Configuration = configurations.create(" fabricApi" )
29
29
@@ -64,7 +64,7 @@ dependencies {
64
64
.toSet()
65
65
// [2] Request the matching dependency from fabric-loom
66
66
for (wantedDependency in wantedDependencies) {
67
- val dep = project.the<FabricApiExtension >().module(wantedDependency, " 0.89.1 +1.20.2 " )
67
+ val dep = project.the<FabricApiExtension >().module(wantedDependency, " 0.90.11 +1.20.3 " )
68
68
" include" (dep)
69
69
" modImplementation" (dep)
70
70
}
Original file line number Diff line number Diff line change @@ -610,8 +610,8 @@ public boolean equals(Object o) {
610
610
public List <? extends Entity > getEntities (Region region ) {
611
611
final Level world = getWorld ();
612
612
AABB box = new AABB (
613
- FabricAdapter .toBlockPos (region .getMinimumPoint ()),
614
- FabricAdapter .toBlockPos (region .getMaximumPoint ().add (BlockVector3 .ONE ))
613
+ FabricAdapter .toVec3 (region .getMinimumPoint ()),
614
+ FabricAdapter .toVec3 (region .getMaximumPoint ().add (BlockVector3 .ONE ))
615
615
);
616
616
List <net .minecraft .world .entity .Entity > nmsEntities = world .getEntities (
617
617
(net .minecraft .world .entity .Entity ) null ,
Original file line number Diff line number Diff line change 36
36
public abstract class MixinMinecraftServer implements Watchdog , ExtendedMinecraftServer {
37
37
38
38
@ Shadow
39
- private long nextTickTime ;
39
+ private long nextTickTimeNanos ;
40
40
@ Final
41
41
@ Shadow
42
42
protected LevelStorageSource .LevelStorageAccess storageSource ;
43
43
44
44
@ Unique
45
45
@ Override
46
46
public void tick () {
47
- nextTickTime = Util .getMillis ();
47
+ nextTickTimeNanos = Util .getNanos ();
48
48
}
49
49
50
50
@ Unique
You can’t perform that action at this time.
0 commit comments