20w21a ohboi
This commit is contained in:
1 parent
838211edba
commit
bec5259216
40 files changed
+445
-347
No files matched your search
@@ -15,6 +15,7 @@ import com.mojang.brigadier.arguments.StringArgumentType;
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
import com.mojang.brigadier.context.CommandContext;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import net.minecraft.class_5321;
|
||||
import net.minecraft.command.arguments.DimensionArgumentType;
|
||||
import net.minecraft.command.arguments.RotationArgumentType;
|
||||
import net.minecraft.command.arguments.Vec3ArgumentType;
|
||||
@@ -234,7 +235,7 @@ public class PlayerCommand
|
||||
() -> RotationArgumentType.getRotation(context, "direction").toAbsoluteRotation(context.getSource()),
|
||||
source::getRotation
|
||||
);
|
||||
DimensionType dim = tryGetArg(
|
||||
class_5321<DimensionType> dimType = tryGetArg(
|
||||
() -> DimensionArgumentType.getDimensionArgument(context, "dimension"),
|
||||
() -> source.getWorld().method_27983() // dimension.getType()
|
||||
);
|
||||
@@ -252,7 +253,7 @@ public class PlayerCommand
|
||||
return 0;
|
||||
}
|
||||
MinecraftServer server = source.getMinecraftServer();
|
||||
PlayerEntity player = EntityPlayerMPFake.createFake(playerName, server, pos.x, pos.y, pos.z, facing.y, facing.x, dim, mode);
|
||||
PlayerEntity player = EntityPlayerMPFake.createFake(playerName, server, pos.x, pos.y, pos.z, facing.y, facing.x, dimType, mode);
|
||||
if (player == null)
|
||||
{
|
||||
Messenger.m(context.getSource(), "rb Player " + StringArgumentType.getString(context, "player") + " doesn't exist " +
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.mojang.brigadier.arguments.BoolArgumentType;
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
|
||||
import net.minecraft.class_5321;
|
||||
import net.minecraft.command.arguments.BlockPosArgumentType;
|
||||
import net.minecraft.command.arguments.DimensionArgumentType;
|
||||
import net.minecraft.entity.SpawnGroup;
|
||||
@@ -257,9 +258,9 @@ public class SpawnCommand
|
||||
return 1;
|
||||
}
|
||||
|
||||
private static int mobcapsForDimension(ServerCommandSource source, DimensionType dim)
|
||||
private static int mobcapsForDimension(ServerCommandSource source, class_5321<DimensionType> dim)
|
||||
{
|
||||
Messenger.send(source, SpawnReporter.printMobcapsForDimension(source.getWorld(), true));
|
||||
Messenger.send(source, SpawnReporter.printMobcapsForDimension(source.getMinecraftServer().getWorld(dim), true));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user