@@ -38,30 +38,30 @@ public class CustomClientCommandSource extends ClientSuggestionProvider implemen
3838 private final Entity entity ;
3939 private final Vec3 position ;
4040 private final Vec2 rotation ;
41- private final ClientLevel world ;
41+ private final ClientLevel level ;
4242 private final Map <String , Object > meta ;
4343
44- public CustomClientCommandSource (ClientPacketListener listener , Minecraft minecraft , Entity entity , Vec3 position , Vec2 rotation , ClientLevel world , PermissionSet permissionSet , Map <String , Object > meta ) {
44+ public CustomClientCommandSource (ClientPacketListener listener , Minecraft minecraft , Entity entity , Vec3 position , Vec2 rotation , ClientLevel level , PermissionSet permissionSet , Map <String , Object > meta ) {
4545 super (listener , minecraft , permissionSet );
4646
4747 this .client = minecraft ;
4848 this .entity = entity ;
4949 this .position = position ;
5050 this .rotation = rotation ;
51- this .world = world ;
51+ this .level = level ;
5252 this .meta = meta ;
5353 }
5454
5555 public static CustomClientCommandSource of (FabricClientCommandSource source ) {
5656 if (source instanceof CustomClientCommandSource custom ) {
5757 return custom ;
5858 }
59- return new CustomClientCommandSource (source .getClient ().getConnection (), source .getClient (), source .getEntity (), source .getPosition (), source .getRotation (), source .getWorld (), source .permissions (), new HashMap <>());
59+ return new CustomClientCommandSource (source .getClient ().getConnection (), source .getClient (), source .getEntity (), source .getPosition (), source .getRotation (), source .getLevel (), source .permissions (), new HashMap <>());
6060 }
6161
6262 @ Override
6363 public void sendFeedback (Component message ) {
64- this .client .gui .getChat ().addMessage (message );
64+ this .client .gui .getChat ().addClientSystemMessage (message );
6565 this .client .getNarrator ().saySystemChatQueued (message );
6666 }
6767
@@ -96,8 +96,8 @@ public Vec2 getRotation() {
9696 }
9797
9898 @ Override
99- public ClientLevel getWorld () {
100- return this .world ;
99+ public ClientLevel getLevel () {
100+ return this .level ;
101101 }
102102
103103 @ Override
@@ -106,19 +106,19 @@ public ClientLevel getWorld() {
106106 }
107107
108108 public CustomClientCommandSource withEntity (Entity entity ) {
109- return new CustomClientCommandSource (this .client .getConnection (), this .client , entity , this .position , this .rotation , this .world , this .permissions (), this .meta );
109+ return new CustomClientCommandSource (this .client .getConnection (), this .client , entity , this .position , this .rotation , this .level , this .permissions (), this .meta );
110110 }
111111
112112 public CustomClientCommandSource withPosition (Vec3 position ) {
113- return new CustomClientCommandSource (this .client .getConnection (), this .client , this .entity , position , this .rotation , this .world , this .permissions (), this .meta );
113+ return new CustomClientCommandSource (this .client .getConnection (), this .client , this .entity , position , this .rotation , this .level , this .permissions (), this .meta );
114114 }
115115
116116 public CustomClientCommandSource withRotation (Vec2 rotation ) {
117- return new CustomClientCommandSource (this .client .getConnection (), this .client , this .entity , this .position , rotation , this .world , this .permissions (), this .meta );
117+ return new CustomClientCommandSource (this .client .getConnection (), this .client , this .entity , this .position , rotation , this .level , this .permissions (), this .meta );
118118 }
119119
120- public CustomClientCommandSource withWorld (ClientLevel world ) {
121- return new CustomClientCommandSource (this .client .getConnection (), this .client , this .entity , this .position , this .rotation , world , this .permissions (), this .meta );
120+ public CustomClientCommandSource withLevel (ClientLevel level ) {
121+ return new CustomClientCommandSource (this .client .getConnection (), this .client , this .entity , this .position , this .rotation , level , this .permissions (), this .meta );
122122 }
123123
124124 public CustomClientCommandSource withMeta (String key , Object value ) {
@@ -139,7 +139,7 @@ public Pair<SeedResolutionArgument.SeedResolution.Method, SeedIdentifier> getSee
139139 case ONLINE_DATABASE -> {
140140 // match SeedCrackerX's key format
141141 String key = this .client .getConnection ().getConnection ().getRemoteAddress ().toString ();
142- yield SeedDatabaseHelper .getSeed (key , this .getWorld ().getBiomeManager ().biomeZoomSeed );
142+ yield SeedDatabaseHelper .getSeed (key , this .getLevel ().getBiomeManager ().biomeZoomSeed );
143143 }
144144 };
145145 if (seed != null ) {
@@ -155,10 +155,10 @@ public int getDimension() throws CommandSyntaxException {
155155 return (int ) dimensionMeta ;
156156 }
157157 try {
158- return DimensionArgument .dimension ().parse (new StringReader (this .getWorld ().dimension ().identifier ().getPath ()));
158+ return DimensionArgument .dimension ().parse (new StringReader (this .getLevel ().dimension ().identifier ().getPath ()));
159159 } catch (CommandSyntaxException _) {
160160 }
161- return inferDimension (this .getWorld ().dimensionType ());
161+ return inferDimension (this .getLevel ().dimensionType ());
162162 }
163163
164164 public int getVersion () throws CommandSyntaxException {
0 commit comments