Merge branch 'master' into 1.16
This commit is contained in:
commit
a4626df004
8 files changed
+31
-5
No files matched your search
@@ -2502,6 +2502,10 @@ Returns `null` if the argument is not a player, otherwise:
|
||||
* `shadow`: any carpet-shadowed real player
|
||||
* `realms`: ?
|
||||
|
||||
### `query(e,'ping')`
|
||||
|
||||
Player's ping in milliseconds, or `null` if its not a player.
|
||||
|
||||
### `query(e,'permission_level')`
|
||||
|
||||
Player's permission level, or `null` if not applicable for this entity.
|
||||
|
||||
@@ -265,6 +265,10 @@ Returns `null` if the argument is not a player, otherwise:
|
||||
* `shadow`: any carpet-shadowed real player
|
||||
* `realms`: ?
|
||||
|
||||
### `query(e,'ping')`
|
||||
|
||||
Player's ping in milliseconds, or `null` if its not a player.
|
||||
|
||||
### `query(e,'permission_level')`
|
||||
|
||||
Player's permission level, or `null` if not applicable for this entity.
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ org.gradle.jvmargs=-Xmx1G
|
||||
loader_version=0.7.8+build.189
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.3.16+v200325
|
||||
mod_version = 1.3.17+v200401
|
||||
maven_group = carpet
|
||||
archives_base_name = fabric-carpet
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import static carpet.settings.RuleCategory.CLIENT;
|
||||
@SuppressWarnings("CanBeFinal")
|
||||
public class CarpetSettings
|
||||
{
|
||||
public static final String carpetVersion = "1.3.16+v200325";
|
||||
public static final String carpetVersion = "1.3.17+v200401";
|
||||
public static final Logger LOG = LogManager.getLogger();
|
||||
public static boolean skipGenerationChecks = false;
|
||||
public static boolean impendingFillSkipUpdates = false;
|
||||
|
||||
@@ -7,6 +7,7 @@ import carpet.utils.PerimeterDiagnostics;
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
import net.minecraft.command.suggestion.SuggestionProviders;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.mob.MobEntity;
|
||||
import net.minecraft.server.command.ServerCommandSource;
|
||||
@@ -51,15 +52,17 @@ public class PerimeterInfoCommand
|
||||
if (mobId != null)
|
||||
{
|
||||
nbttagcompound.putString("id", mobId);
|
||||
entityliving = (MobEntity) EntityType.loadEntityWithPassengers(nbttagcompound, source.getWorld(), (entity_1x) -> {
|
||||
Entity baseEntity = EntityType.loadEntityWithPassengers(nbttagcompound, source.getWorld(), (entity_1x) -> {
|
||||
entity_1x.refreshPositionAndAngles(pos.offset(Direction.UP,2), entity_1x.yaw, entity_1x.pitch);
|
||||
return !source.getWorld().tryLoadEntity(entity_1x) ? null : entity_1x;
|
||||
});
|
||||
if (entityliving == null)
|
||||
if (!(baseEntity instanceof MobEntity))
|
||||
{
|
||||
Messenger.m(source, "r Failed to spawn test entity");
|
||||
if (baseEntity != null) baseEntity.remove();
|
||||
return 0;
|
||||
}
|
||||
entityliving = (MobEntity) baseEntity;
|
||||
}
|
||||
PerimeterDiagnostics.Result res = PerimeterDiagnostics.countSpots(source.getWorld(), pos, entityliving);
|
||||
|
||||
|
||||
@@ -246,12 +246,18 @@ public class PlayerCommand
|
||||
}
|
||||
catch (CommandSyntaxException ignored) {}
|
||||
String playerName = StringArgumentType.getString(context, "player");
|
||||
if (playerName.length()>40)
|
||||
{
|
||||
Messenger.m(context.getSource(), "rb Player name: "+playerName+" is too long");
|
||||
return 0;
|
||||
}
|
||||
MinecraftServer server = source.getMinecraftServer();
|
||||
PlayerEntity player = EntityPlayerMPFake.createFake(playerName, server, pos.x, pos.y, pos.z, facing.y, facing.x, dim, mode);
|
||||
if (player == null)
|
||||
{
|
||||
Messenger.m(context.getSource(), "rb Player " + StringArgumentType.getString(context, "player") + " doesn't exist " +
|
||||
"and cannot spawn in online mode. Turn the server offline to spawn non-existing players");
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -331,6 +331,15 @@ public class EntityValue extends Value
|
||||
return Value.NULL;
|
||||
});
|
||||
|
||||
put("ping", (e, a) -> {
|
||||
if (e instanceof ServerPlayerEntity)
|
||||
{
|
||||
ServerPlayerEntity spe = (ServerPlayerEntity) e;
|
||||
return new NumericValue(spe.pingMilliseconds);
|
||||
}
|
||||
return Value.NULL;
|
||||
});
|
||||
|
||||
//spectating_entity
|
||||
// isGlowing
|
||||
put("effect", (e, a) ->
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "carpet",
|
||||
"version": "1.3.16",
|
||||
"version": "1.3.17",
|
||||
|
||||
"name": "Carpet Mod in Fabric",
|
||||
"description": "Carpet made out of fabric",
|
||||
|
||||
Reference in new issue
Block a user