25w31a
This commit is contained in:
1 parent
49840619f5
commit
134d839625
18 files changed
+56
-44
No files matched your search
@@ -1195,7 +1195,8 @@ public class Auxiliary
|
||||
Path zipRoot = zipfs.getPath("/");
|
||||
zipValueToJson(zipRoot.resolve("pack.mcmeta"), MapValue.wrap(
|
||||
Map.of(StringValue.of("pack"), MapValue.wrap(Map.of(
|
||||
StringValue.of("pack_format"), new NumericValue(SharedConstants.getCurrentVersion().packVersion(PackType.SERVER_DATA)),
|
||||
StringValue.of("min_format"), new NumericValue(SharedConstants.getCurrentVersion().packVersion(PackType.SERVER_DATA).major()),
|
||||
StringValue.of("max_format"), new NumericValue(SharedConstants.getCurrentVersion().packVersion(PackType.SERVER_DATA).major()),
|
||||
StringValue.of("description"), StringValue.of(name),
|
||||
StringValue.of("source"), StringValue.of("scarpet")
|
||||
)))
|
||||
|
||||
@@ -1744,7 +1744,7 @@ public class WorldAccess
|
||||
case "erosion" -> router.erosion();
|
||||
case "depth" -> router.depth();
|
||||
case "ridges" -> router.ridges();
|
||||
case "initial_density_without_jaggedness" -> router.initialDensityWithoutJaggedness();
|
||||
case "preliminary_surface_level" -> router.preliminarySurfaceLevel();
|
||||
case "final_density" -> router.finalDensity();
|
||||
case "vein_toggle" -> router.veinToggle();
|
||||
case "vein_ridged" -> router.veinRidged();
|
||||
@@ -1776,7 +1776,7 @@ public class WorldAccess
|
||||
case "erosion" -> router.erosion();
|
||||
case "depth" -> router.depth();
|
||||
case "ridges" -> router.ridges();
|
||||
case "initial_density_without_jaggedness" -> router.initialDensityWithoutJaggedness();
|
||||
case "preliminary_surface_level" -> router.preliminarySurfaceLevel();
|
||||
case "final_density" -> router.finalDensity();
|
||||
case "vein_toggle" -> router.veinToggle();
|
||||
case "vein_ridged" -> router.veinRidged();
|
||||
|
||||
@@ -102,6 +102,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.commands.BossBarCommands;
|
||||
import net.minecraft.server.commands.LootCommand;
|
||||
import net.minecraft.server.players.NameAndId;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import net.minecraft.world.phys.Vec2;
|
||||
@@ -718,10 +719,10 @@ public abstract class CommandArgument
|
||||
@Override
|
||||
protected Value getValueFromContext(CommandContext<CommandSourceStack> context, String param) throws CommandSyntaxException
|
||||
{
|
||||
Collection<GameProfile> profiles = GameProfileArgument.getGameProfiles(context, param);
|
||||
Collection<NameAndId> profiles = GameProfileArgument.getGameProfiles(context, param);
|
||||
if (!single)
|
||||
{
|
||||
return ListValue.wrap(profiles.stream().map(p -> StringValue.of(p.getName())));
|
||||
return ListValue.wrap(profiles.stream().map(p -> StringValue.of(p.name())));
|
||||
}
|
||||
int size = profiles.size();
|
||||
if (size == 0)
|
||||
@@ -730,7 +731,7 @@ public abstract class CommandArgument
|
||||
}
|
||||
if (size == 1)
|
||||
{
|
||||
return StringValue.of(profiles.iterator().next().getName());
|
||||
return StringValue.of(profiles.iterator().next().name());
|
||||
}
|
||||
throw new SimpleCommandExceptionType(Component.literal("Multiple game profiles returned while only one was requested" + " for custom type " + suffix)).create();
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import java.util.function.BiFunction;
|
||||
import net.minecraft.client.Camera;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Font;
|
||||
import net.minecraft.client.gui.components.debug.DebugScreenEntries;
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.client.renderer.ItemBlockRenderTypes;
|
||||
import net.minecraft.client.renderer.LightTexture;
|
||||
@@ -143,7 +144,7 @@ public class ShapesRenderer
|
||||
double cameraX = camera.getPosition().x;
|
||||
double cameraY = camera.getPosition().y;
|
||||
double cameraZ = camera.getPosition().z;
|
||||
boolean entityBoxes = client.getEntityRenderDispatcher().shouldRenderHitBoxes();
|
||||
boolean entityBoxes = client.debugEntries.isCurrentlyEnabled(DebugScreenEntries.ENTITY_HITBOXES);
|
||||
|
||||
if (!shapes.isEmpty())
|
||||
{
|
||||
|
||||
@@ -70,12 +70,12 @@ public class SnoopyCommandSource extends CommandSourceStack
|
||||
{
|
||||
super(player.commandSource(), player.position(), player.getRotationVector(),
|
||||
player.level() instanceof final ServerLevel serverLevel ? serverLevel : null,
|
||||
player.getServer().getProfilePermissions(player.getGameProfile()), player.getName().getString(), player.getDisplayName(),
|
||||
player.getServer().getProfilePermissions(player.nameAndId()), player.getName().getString(), player.getDisplayName(),
|
||||
player.level().getServer(), player);
|
||||
this.output = player.commandSource();
|
||||
this.position = player.position();
|
||||
this.world = player.level() instanceof final ServerLevel serverLevel ? serverLevel : null;
|
||||
this.level = player.getServer().getProfilePermissions(player.getGameProfile());
|
||||
this.level = player.getServer().getProfilePermissions(player.nameAndId());
|
||||
this.simpleName = player.getName().getString();
|
||||
this.name = player.getDisplayName();
|
||||
this.server = player.level().getServer();
|
||||
|
||||
@@ -92,7 +92,8 @@ public class SystemInfo
|
||||
put("game_minor_target", c -> NumericValue.of(Vanilla.MinecraftServer_getReleaseTarget(c.server())[1]));
|
||||
put("game_stable", c -> BooleanValue.of(SharedConstants.getCurrentVersion().stable()));
|
||||
put("game_data_version", c -> NumericValue.of(SharedConstants.getCurrentVersion().dataVersion().version()));
|
||||
put("game_pack_version", c -> NumericValue.of(SharedConstants.getCurrentVersion().packVersion(PackType.SERVER_DATA)));
|
||||
put("game_pack_version", c -> NumericValue.of(SharedConstants.getCurrentVersion().packVersion(PackType.SERVER_DATA).major()));
|
||||
put("game_pack_minor_version", c -> NumericValue.of(SharedConstants.getCurrentVersion().packVersion(PackType.SERVER_DATA).minor()));
|
||||
|
||||
put("server_ip", c -> StringValue.of(c.server().getLocalIp()));
|
||||
put("server_whitelisted", c -> BooleanValue.of(c.server().isEnforceWhitelist()));
|
||||
|
||||
@@ -15,7 +15,6 @@ import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.server.level.progress.ChunkProgressListener;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
import net.minecraft.world.level.CustomSpawner;
|
||||
import net.minecraft.world.level.Level;
|
||||
|
||||
@@ -628,7 +628,7 @@ public class EntityValue extends Value
|
||||
{
|
||||
return new StringValue("singleplayer");
|
||||
}
|
||||
boolean isowner = server.isSingleplayerOwner(p.getGameProfile());
|
||||
boolean isowner = server.isSingleplayerOwner(p.nameAndId());
|
||||
if (isowner)
|
||||
{
|
||||
return new StringValue("lan_host");
|
||||
@@ -1217,7 +1217,7 @@ public class EntityValue extends Value
|
||||
put("mount", (e, v) -> {
|
||||
if (v instanceof EntityValue ev)
|
||||
{
|
||||
e.startRiding(ev.getEntity(), true);
|
||||
e.startRiding(ev.getEntity(), true, true);
|
||||
}
|
||||
if (e instanceof ServerPlayer sp)
|
||||
{
|
||||
@@ -1233,7 +1233,7 @@ public class EntityValue extends Value
|
||||
}
|
||||
if (v instanceof EntityValue ev)
|
||||
{
|
||||
ev.getEntity().startRiding(e);
|
||||
ev.getEntity().startRiding(e, true, true);
|
||||
}
|
||||
else if (v instanceof ListValue lv)
|
||||
{
|
||||
@@ -1241,7 +1241,7 @@ public class EntityValue extends Value
|
||||
{
|
||||
if (element instanceof EntityValue ev)
|
||||
{
|
||||
ev.getEntity().startRiding(e);
|
||||
ev.getEntity().startRiding(e, true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user