26.2-pre-5
This commit is contained in:
1 parent
b3309f83cb
commit
ff37e4f9c4
3 files changed
+6
-4
No files matched your search
+2
-2
@@ -7,8 +7,8 @@ org.gradle.configuration-cache=false
|
||||
|
||||
# Fabric Properties
|
||||
# check https://fabricmc.net/develop/
|
||||
minecraft_version=26.2-pre-1
|
||||
loader_version=0.19.2
|
||||
minecraft_version=26.2-pre-5
|
||||
loader_version=0.19.3
|
||||
loom_version=1.15-SNAPSHOT
|
||||
|
||||
# Mod Properties
|
||||
|
||||
@@ -15,6 +15,7 @@ import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntitySpawnReason;
|
||||
import net.minecraft.world.entity.EntitySpawnRequest;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.Mob;
|
||||
|
||||
@@ -55,7 +56,7 @@ public class PerimeterInfoCommand
|
||||
if (mobId != null)
|
||||
{
|
||||
nbttagcompound.putString("id", mobId);
|
||||
Entity baseEntity = EntityType.loadEntityRecursive(nbttagcompound, source.getLevel(), EntitySpawnReason.COMMAND, (entity_1x) -> {
|
||||
Entity baseEntity = EntityType.loadEntityRecursive(nbttagcompound, source.getLevel(), new EntitySpawnRequest(EntitySpawnReason.COMMAND, true), (entity_1x) -> {
|
||||
entity_1x.snapTo(new BlockPos(pos.getX(), source.getLevel().getMinY()-10, pos.getZ()), entity_1x.getYRot(), entity_1x. getXRot());
|
||||
return !source.getLevel().addWithUUID(entity_1x) ? null : entity_1x;
|
||||
});
|
||||
|
||||
@@ -34,6 +34,7 @@ import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntitySelector;
|
||||
import net.minecraft.world.entity.EntitySpawnReason;
|
||||
import net.minecraft.world.entity.EntitySpawnRequest;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.Mob;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
@@ -142,7 +143,7 @@ public class Entities
|
||||
Vec3 vec3d = position.vec;
|
||||
|
||||
ServerLevel serverWorld = cc.level();
|
||||
Entity entity = EntityType.loadEntityRecursive(tag, serverWorld, EntitySpawnReason.COMMAND, e -> {
|
||||
Entity entity = EntityType.loadEntityRecursive(tag, serverWorld, new EntitySpawnRequest(EntitySpawnReason.COMMAND, true), e -> {
|
||||
e.snapTo(vec3d.x, vec3d.y, vec3d.z, e.getYRot(), e.getXRot());
|
||||
return e;
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user