mappings
This commit is contained in:
1 parent
0e8cf69539
commit
e67ec14285
25 files changed
+49
-50
No files matched your search
+1
-1
@@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
# check these on https://fabricmc.net/use
|
# check these on https://fabricmc.net/use
|
||||||
# or better: https://modmuss50.me/fabric.html
|
# or better: https://modmuss50.me/fabric.html
|
||||||
minecraft_version=20w29a
|
minecraft_version=20w29a
|
||||||
yarn_mappings=20w29a+build.1
|
yarn_mappings=20w29a+build.13
|
||||||
loader_version=0.9.0+build.204
|
loader_version=0.9.0+build.204
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
|||||||
import net.minecraft.network.packet.s2c.play.EntityVelocityUpdateS2CPacket;
|
import net.minecraft.network.packet.s2c.play.EntityVelocityUpdateS2CPacket;
|
||||||
import net.minecraft.network.packet.s2c.play.RemoveEntityStatusEffectS2CPacket;
|
import net.minecraft.network.packet.s2c.play.RemoveEntityStatusEffectS2CPacket;
|
||||||
import net.minecraft.server.command.ServerCommandSource;
|
import net.minecraft.server.command.ServerCommandSource;
|
||||||
import net.minecraft.command.arguments.EntityArgumentType;
|
import net.minecraft.command.argument.EntityArgumentType;
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
import net.minecraft.entity.effect.StatusEffects;
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import carpet.utils.DistanceCalculator;
|
|||||||
import com.mojang.brigadier.CommandDispatcher;
|
import com.mojang.brigadier.CommandDispatcher;
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import net.minecraft.server.command.ServerCommandSource;
|
import net.minecraft.server.command.ServerCommandSource;
|
||||||
import net.minecraft.command.arguments.Vec3ArgumentType;
|
import net.minecraft.command.argument.Vec3ArgumentType;
|
||||||
|
|
||||||
import static net.minecraft.server.command.CommandManager.argument;
|
import static net.minecraft.server.command.CommandManager.argument;
|
||||||
import static net.minecraft.server.command.CommandManager.literal;
|
import static net.minecraft.server.command.CommandManager.literal;
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
|||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.pattern.CachedBlockPosition;
|
import net.minecraft.block.pattern.CachedBlockPosition;
|
||||||
import net.minecraft.server.command.ServerCommandSource;
|
import net.minecraft.server.command.ServerCommandSource;
|
||||||
import net.minecraft.command.arguments.BlockPosArgumentType;
|
import net.minecraft.command.argument.BlockPosArgumentType;
|
||||||
import net.minecraft.command.arguments.BlockPredicateArgumentType;
|
import net.minecraft.command.argument.BlockPredicateArgumentType;
|
||||||
import net.minecraft.command.arguments.BlockStateArgument;
|
import net.minecraft.command.argument.BlockStateArgument;
|
||||||
import net.minecraft.command.arguments.BlockStateArgumentType;
|
import net.minecraft.command.argument.BlockStateArgumentType;
|
||||||
import net.minecraft.inventory.Inventory;
|
import net.minecraft.inventory.Inventory;
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import com.mojang.brigadier.CommandDispatcher;
|
|||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import net.minecraft.text.BaseText;
|
import net.minecraft.text.BaseText;
|
||||||
import net.minecraft.server.command.ServerCommandSource;
|
import net.minecraft.server.command.ServerCommandSource;
|
||||||
import net.minecraft.command.arguments.BlockPosArgumentType;
|
import net.minecraft.command.argument.BlockPosArgumentType;
|
||||||
import net.minecraft.command.arguments.EntityArgumentType;
|
import net.minecraft.command.argument.EntityArgumentType;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import carpet.utils.MobAI;
|
|||||||
import com.mojang.brigadier.CommandDispatcher;
|
import com.mojang.brigadier.CommandDispatcher;
|
||||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import net.minecraft.command.arguments.EntitySummonArgumentType;
|
import net.minecraft.command.argument.EntitySummonArgumentType;
|
||||||
import net.minecraft.server.command.ServerCommandSource;
|
import net.minecraft.server.command.ServerCommandSource;
|
||||||
import net.minecraft.util.registry.Registry;
|
import net.minecraft.util.registry.Registry;
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import net.minecraft.entity.Entity;
|
|||||||
import net.minecraft.entity.EntityType;
|
import net.minecraft.entity.EntityType;
|
||||||
import net.minecraft.entity.mob.MobEntity;
|
import net.minecraft.entity.mob.MobEntity;
|
||||||
import net.minecraft.server.command.ServerCommandSource;
|
import net.minecraft.server.command.ServerCommandSource;
|
||||||
import net.minecraft.command.arguments.BlockPosArgumentType;
|
import net.minecraft.command.argument.BlockPosArgumentType;
|
||||||
import net.minecraft.command.arguments.EntitySummonArgumentType;
|
import net.minecraft.command.argument.EntitySummonArgumentType;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ import com.mojang.brigadier.arguments.StringArgumentType;
|
|||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import com.mojang.brigadier.context.CommandContext;
|
import com.mojang.brigadier.context.CommandContext;
|
||||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||||
import net.minecraft.command.arguments.DimensionArgumentType;
|
import net.minecraft.command.argument.DimensionArgumentType;
|
||||||
import net.minecraft.command.arguments.RotationArgumentType;
|
import net.minecraft.command.argument.RotationArgumentType;
|
||||||
import net.minecraft.command.arguments.Vec3ArgumentType;
|
import net.minecraft.command.argument.Vec3ArgumentType;
|
||||||
import net.minecraft.server.PlayerManager;
|
import net.minecraft.server.PlayerManager;
|
||||||
import net.minecraft.server.command.ServerCommandSource;
|
import net.minecraft.server.command.ServerCommandSource;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ import com.mojang.brigadier.suggestion.Suggestions;
|
|||||||
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.pattern.CachedBlockPosition;
|
import net.minecraft.block.pattern.CachedBlockPosition;
|
||||||
import net.minecraft.command.arguments.BlockPosArgumentType;
|
import net.minecraft.command.argument.BlockPosArgumentType;
|
||||||
import net.minecraft.command.arguments.BlockPredicateArgumentType;
|
import net.minecraft.command.argument.BlockPredicateArgumentType;
|
||||||
import net.minecraft.command.arguments.BlockStateArgument;
|
import net.minecraft.command.argument.BlockStateArgument;
|
||||||
import net.minecraft.command.arguments.BlockStateArgumentType;
|
import net.minecraft.command.argument.BlockStateArgumentType;
|
||||||
import net.minecraft.server.command.ServerCommandSource;
|
import net.minecraft.server.command.ServerCommandSource;
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
import net.minecraft.util.Clearable;
|
import net.minecraft.util.Clearable;
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import com.mojang.brigadier.arguments.BoolArgumentType;
|
|||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||||
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
|
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
|
||||||
import net.minecraft.command.arguments.BlockPosArgumentType;
|
import net.minecraft.command.argument.BlockPosArgumentType;
|
||||||
import net.minecraft.command.arguments.DimensionArgumentType;
|
import net.minecraft.command.argument.DimensionArgumentType;
|
||||||
import net.minecraft.entity.SpawnGroup;
|
import net.minecraft.entity.SpawnGroup;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.server.command.ServerCommandSource;
|
import net.minecraft.server.command.ServerCommandSource;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package carpet.helpers;
|
|||||||
|
|
||||||
import carpet.fakes.ServerPlayerEntityInterface;
|
import carpet.fakes.ServerPlayerEntityInterface;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.command.arguments.EntityAnchorArgumentType;
|
import net.minecraft.command.argument.EntityAnchorArgumentType;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.passive.HorseBaseEntity;
|
import net.minecraft.entity.passive.HorseBaseEntity;
|
||||||
import net.minecraft.entity.player.PlayerInventory;
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
@@ -167,12 +167,12 @@ public class EntityPlayerActionPack
|
|||||||
List<Entity> entities;
|
List<Entity> entities;
|
||||||
if (onlyRideables)
|
if (onlyRideables)
|
||||||
{
|
{
|
||||||
entities = player.world.getEntities(player, player.getBoundingBox().expand(3.0D, 1.0D, 3.0D),
|
entities = player.world.getOtherEntities(player, player.getBoundingBox().expand(3.0D, 1.0D, 3.0D),
|
||||||
e -> e instanceof MinecartEntity || e instanceof BoatEntity || e instanceof HorseBaseEntity);
|
e -> e instanceof MinecartEntity || e instanceof BoatEntity || e instanceof HorseBaseEntity);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
entities = player.world.getEntities(player, player.getBoundingBox().expand(3.0D, 1.0D, 3.0D));
|
entities = player.world.getOtherEntities(player, player.getBoundingBox().expand(3.0D, 1.0D, 3.0D));
|
||||||
}
|
}
|
||||||
if (entities.size()==0)
|
if (entities.size()==0)
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import net.minecraft.world.biome.source.BiomeAccess;
|
|||||||
import net.minecraft.world.gen.ChunkRandom;
|
import net.minecraft.world.gen.ChunkRandom;
|
||||||
import net.minecraft.world.gen.chunk.ChunkGenerator;
|
import net.minecraft.world.gen.chunk.ChunkGenerator;
|
||||||
import net.minecraft.world.gen.chunk.StructureConfig;
|
import net.minecraft.world.gen.chunk.StructureConfig;
|
||||||
import net.minecraft.world.gen.decorator.BeehiveTreeDecorator;
|
import net.minecraft.world.gen.tree.BeehiveTreeDecorator;
|
||||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||||
import net.minecraft.world.gen.feature.ConfiguredFeatures;
|
import net.minecraft.world.gen.feature.ConfiguredFeatures;
|
||||||
import net.minecraft.world.gen.feature.ConfiguredStructureFeature;
|
import net.minecraft.world.gen.feature.ConfiguredStructureFeature;
|
||||||
@@ -175,9 +175,9 @@ public class FeatureGenerator
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static final Map<String, Thing> featureMap = new HashMap<String, Thing>() {{
|
private static final Map<String, Thing> featureMap = new HashMap<String, Thing>() {{
|
||||||
put("oak_bees", simpleTree(ConfiguredFeatures.OAK.method_30381().setTreeDecorators(ImmutableList.of(new BeehiveTreeDecorator(1.0F)))));
|
put("oak_bees", simpleTree(ConfiguredFeatures.OAK.getConfig().setTreeDecorators(ImmutableList.of(new BeehiveTreeDecorator(1.0F)))));
|
||||||
put("fancy_oak_bees", simpleTree(ConfiguredFeatures.FANCY_OAK.method_30381().setTreeDecorators(ImmutableList.of(new BeehiveTreeDecorator(1.0F)))));
|
put("fancy_oak_bees", simpleTree(ConfiguredFeatures.FANCY_OAK.getConfig().setTreeDecorators(ImmutableList.of(new BeehiveTreeDecorator(1.0F)))));
|
||||||
put("birch_bees", simpleTree(ConfiguredFeatures.BIRCH.method_30381().setTreeDecorators(ImmutableList.of(new BeehiveTreeDecorator(1.0F)))));
|
put("birch_bees", simpleTree(ConfiguredFeatures.BIRCH.getConfig().setTreeDecorators(ImmutableList.of(new BeehiveTreeDecorator(1.0F)))));
|
||||||
put("coral_tree", simplePlop(Feature.CORAL_TREE.configure(FeatureConfig.DEFAULT)));
|
put("coral_tree", simplePlop(Feature.CORAL_TREE.configure(FeatureConfig.DEFAULT)));
|
||||||
put("coral_claw", simplePlop(Feature.CORAL_CLAW.configure(FeatureConfig.DEFAULT)));
|
put("coral_claw", simplePlop(Feature.CORAL_CLAW.configure(FeatureConfig.DEFAULT)));
|
||||||
put("coral_mushroom", simplePlop(Feature.CORAL_MUSHROOM.configure(FeatureConfig.DEFAULT)));
|
put("coral_mushroom", simplePlop(Feature.CORAL_MUSHROOM.configure(FeatureConfig.DEFAULT)));
|
||||||
|
|||||||
@@ -102,8 +102,7 @@ public class OptimizedExplosion
|
|||||||
if (vec3dmem == null || !vec3dmem.equals(vec3d) || tickmem != eAccess.getWorld().getTime()) {
|
if (vec3dmem == null || !vec3dmem.equals(vec3d) || tickmem != eAccess.getWorld().getTime()) {
|
||||||
vec3dmem = vec3d;
|
vec3dmem = vec3d;
|
||||||
tickmem = eAccess.getWorld().getTime();
|
tickmem = eAccess.getWorld().getTime();
|
||||||
entitylist = eAccess.getWorld().getEntities((Entity)null,
|
entitylist = eAccess.getWorld().getOtherEntities(null, new Box(k1, i2, j2, l1, i1, j1));
|
||||||
new Box((double) k1, (double) i2, (double) j2, (double) l1, (double) i1, (double) j1));
|
|
||||||
explosionSound = 0;
|
explosionSound = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package carpet.helpers;
|
|||||||
|
|
||||||
import com.mojang.brigadier.StringReader;
|
import com.mojang.brigadier.StringReader;
|
||||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||||
import net.minecraft.command.arguments.ParticleArgumentType;
|
import net.minecraft.command.argument.ParticleArgumentType;
|
||||||
import net.minecraft.particle.ParticleEffect;
|
import net.minecraft.particle.ParticleEffect;
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
import net.minecraft.server.world.ServerWorld;
|
import net.minecraft.server.world.ServerWorld;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public class Tracer
|
|||||||
double targetDistance = maxSqDistance;
|
double targetDistance = maxSqDistance;
|
||||||
Entity target = null;
|
Entity target = null;
|
||||||
Vec3d targetHitPos = null;
|
Vec3d targetHitPos = null;
|
||||||
for (Entity current : world.getEntities(source, box, predicate))
|
for (Entity current : world.getOtherEntities(source, box, predicate))
|
||||||
{
|
{
|
||||||
Box currentBox = current.getBoundingBox().expand(current.getTargetingMargin());
|
Box currentBox = current.getBoundingBox().expand(current.getTargetingMargin());
|
||||||
Optional<Vec3d> currentHit = currentBox.rayTrace(start, end);
|
Optional<Vec3d> currentHit = currentBox.rayTrace(start, end);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import carpet.helpers.ParticleDisplay;
|
|||||||
import carpet.logging.LoggerRegistry;
|
import carpet.logging.LoggerRegistry;
|
||||||
import com.mojang.brigadier.StringReader;
|
import com.mojang.brigadier.StringReader;
|
||||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||||
import net.minecraft.command.arguments.ParticleArgumentType;
|
import net.minecraft.command.argument.ParticleArgumentType;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.particle.ParticleEffect;
|
import net.minecraft.particle.ParticleEffect;
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public abstract class LivingEntity_maxCollisionsMixin extends Entity
|
|||||||
@Inject(method = "tickCramming", cancellable = true, at = @At("HEAD"))
|
@Inject(method = "tickCramming", cancellable = true, at = @At("HEAD"))
|
||||||
private void tickPushingReplacement(CallbackInfo ci)
|
private void tickPushingReplacement(CallbackInfo ci)
|
||||||
{
|
{
|
||||||
List<Entity> list_1 = this.world.getEntities((Entity)this, this.getBoundingBox(), EntityPredicates.canBePushedBy(this));
|
List<Entity> list_1 = this.world.getOtherEntities(this, this.getBoundingBox(), EntityPredicates.canBePushedBy(this));
|
||||||
if (!list_1.isEmpty()) {
|
if (!list_1.isEmpty()) {
|
||||||
int int_1 = this.world.getGameRules().getInt(GameRules.MAX_ENTITY_CRAMMING);
|
int int_1 = this.world.getGameRules().getInt(GameRules.MAX_ENTITY_CRAMMING);
|
||||||
int int_2;
|
int int_2;
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public abstract class TntEntityMixin extends Entity implements TntEntityInterfac
|
|||||||
Vec3d velocity = getVelocity();
|
Vec3d velocity = getVelocity();
|
||||||
if(!world.isClient && mergeBool && velocity.x == 0 && velocity.y == 0 && velocity.z == 0){
|
if(!world.isClient && mergeBool && velocity.x == 0 && velocity.y == 0 && velocity.z == 0){
|
||||||
mergeBool = false;
|
mergeBool = false;
|
||||||
for(Entity entity : world.getEntities(this, this.getBoundingBox())){
|
for(Entity entity : world.getOtherEntities(this, this.getBoundingBox())){
|
||||||
if(entity instanceof TntEntity && !entity.removed){
|
if(entity instanceof TntEntity && !entity.removed){
|
||||||
TntEntity entityTNTPrimed = (TntEntity)entity;
|
TntEntity entityTNTPrimed = (TntEntity)entity;
|
||||||
Vec3d tntVelocity = entityTNTPrimed.getVelocity();
|
Vec3d tntVelocity = entityTNTPrimed.getVelocity();
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ import net.minecraft.item.SwordItem;
|
|||||||
import net.minecraft.item.TridentItem;
|
import net.minecraft.item.TridentItem;
|
||||||
import net.minecraft.network.packet.s2c.play.ScreenHandlerSlotUpdateS2CPacket;
|
import net.minecraft.network.packet.s2c.play.ScreenHandlerSlotUpdateS2CPacket;
|
||||||
import net.minecraft.network.packet.s2c.play.PlaySoundIdS2CPacket;
|
import net.minecraft.network.packet.s2c.play.PlaySoundIdS2CPacket;
|
||||||
import net.minecraft.command.arguments.ItemStackArgument;
|
import net.minecraft.command.argument.ItemStackArgument;
|
||||||
import net.minecraft.enchantment.Enchantments;
|
import net.minecraft.enchantment.Enchantments;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityType;
|
import net.minecraft.entity.EntityType;
|
||||||
@@ -2074,7 +2074,7 @@ public class CarpetExpression
|
|||||||
{
|
{
|
||||||
throw new InternalExpressionException("Unknown entity selection criterion: "+who);
|
throw new InternalExpressionException("Unknown entity selection criterion: "+who);
|
||||||
}
|
}
|
||||||
List<Entity> entityList = ((CarpetContext)c).s.getWorld().getEntities(pair.getKey(), pair.getValue());
|
List<Entity> entityList = ((CarpetContext)c).s.getWorld().getEntitiesByType(pair.getKey(), pair.getValue());
|
||||||
Value retval = ListValue.wrap(entityList.stream().map(EntityValue::new).collect(Collectors.toList()));
|
Value retval = ListValue.wrap(entityList.stream().map(EntityValue::new).collect(Collectors.toList()));
|
||||||
return (_c, _t ) -> retval;
|
return (_c, _t ) -> retval;
|
||||||
});
|
});
|
||||||
@@ -2096,7 +2096,7 @@ public class CarpetExpression
|
|||||||
{
|
{
|
||||||
throw new InternalExpressionException("Unknown entity selection criterion: "+who);
|
throw new InternalExpressionException("Unknown entity selection criterion: "+who);
|
||||||
}
|
}
|
||||||
List<Entity> entityList = ((CarpetContext)c).s.getWorld().getEntities((EntityType<Entity>) pair.getKey(), area, pair.getValue());
|
List<Entity> entityList = ((CarpetContext)c).s.getWorld().getEntitiesByType((EntityType<Entity>) pair.getKey(), area, pair.getValue());
|
||||||
Value retval = ListValue.wrap(entityList.stream().map(EntityValue::new).collect(Collectors.toList()));
|
Value retval = ListValue.wrap(entityList.stream().map(EntityValue::new).collect(Collectors.toList()));
|
||||||
return (_c, _t ) -> retval;
|
return (_c, _t ) -> retval;
|
||||||
});
|
});
|
||||||
@@ -2975,7 +2975,7 @@ public class CarpetExpression
|
|||||||
CarpetContext cc = (CarpetContext)c;
|
CarpetContext cc = (CarpetContext)c;
|
||||||
int total = 0;
|
int total = 0;
|
||||||
String markerName = MARKER_STRING+"_"+((cc.host.getName()==null)?"":cc.host.getName());
|
String markerName = MARKER_STRING+"_"+((cc.host.getName()==null)?"":cc.host.getName());
|
||||||
for (Entity e : cc.s.getWorld().getEntities(EntityType.ARMOR_STAND, (as) -> as.getScoreboardTags().contains(markerName)))
|
for (Entity e : cc.s.getWorld().getEntitiesByType(EntityType.ARMOR_STAND, (as) -> as.getScoreboardTags().contains(markerName)))
|
||||||
{
|
{
|
||||||
total ++;
|
total ++;
|
||||||
e.remove();
|
e.remove();
|
||||||
|
|||||||
@@ -349,7 +349,7 @@ public class CarpetScriptHost extends ScriptHost
|
|||||||
String markerName = CarpetExpression.MARKER_STRING+"_"+((getName()==null)?"":getName());
|
String markerName = CarpetExpression.MARKER_STRING+"_"+((getName()==null)?"":getName());
|
||||||
for (ServerWorld world : scriptServer.server.getWorlds())
|
for (ServerWorld world : scriptServer.server.getWorlds())
|
||||||
{
|
{
|
||||||
for (Entity e : world.getEntities(EntityType.ARMOR_STAND, (as) -> as.getScoreboardTags().contains(markerName)))
|
for (Entity e : world.getEntitiesByType(EntityType.ARMOR_STAND, (as) -> as.getScoreboardTags().contains(markerName)))
|
||||||
{
|
{
|
||||||
e.remove();
|
e.remove();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import com.google.common.collect.ImmutableSet;
|
|||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import com.mojang.brigadier.StringReader;
|
import com.mojang.brigadier.StringReader;
|
||||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||||
import net.minecraft.command.arguments.ParticleArgumentType;
|
import net.minecraft.command.argument.ParticleArgumentType;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.nbt.ByteTag;
|
import net.minecraft.nbt.ByteTag;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import com.mojang.brigadier.StringReader;
|
|||||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
import net.minecraft.command.arguments.BlockArgumentParser;
|
import net.minecraft.command.argument.BlockArgumentParser;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.item.ItemPlacementContext;
|
import net.minecraft.item.ItemPlacementContext;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ import net.minecraft.block.ChestBlock;
|
|||||||
import net.minecraft.block.InventoryProvider;
|
import net.minecraft.block.InventoryProvider;
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
import net.minecraft.block.entity.ChestBlockEntity;
|
import net.minecraft.block.entity.ChestBlockEntity;
|
||||||
import net.minecraft.command.arguments.ItemStackArgument;
|
import net.minecraft.command.argument.ItemStackArgument;
|
||||||
import net.minecraft.command.arguments.ItemStringReader;
|
import net.minecraft.command.argument.ItemStringReader;
|
||||||
import net.minecraft.command.arguments.NbtPathArgumentType;
|
import net.minecraft.command.argument.NbtPathArgumentType;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.passive.VillagerEntity;
|
import net.minecraft.entity.passive.VillagerEntity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
@@ -156,8 +156,8 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (inventory == null) {
|
if (inventory == null) {
|
||||||
List<Entity> list = world.getEntities(
|
List<Entity> list = world.getOtherEntities(
|
||||||
(Entity)null,
|
null,
|
||||||
new Box(
|
new Box(
|
||||||
blockPos.getX() - 0.5D, blockPos.getY() - 0.5D, blockPos.getZ() - 0.5D,
|
blockPos.getX() - 0.5D, blockPos.getY() - 0.5D, blockPos.getZ() - 0.5D,
|
||||||
blockPos.getX() + 0.5D, blockPos.getY() + 0.5D, blockPos.getZ() + 0.5D),
|
blockPos.getX() + 0.5D, blockPos.getY() + 0.5D, blockPos.getZ() + 0.5D),
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public class MobAI
|
|||||||
aiTrackers.remove(etype);
|
aiTrackers.remove(etype);
|
||||||
for(ServerWorld world : CarpetServer.minecraft_server.getWorlds() )
|
for(ServerWorld world : CarpetServer.minecraft_server.getWorlds() )
|
||||||
{
|
{
|
||||||
for (Entity e: world.getEntities(etype, Entity::hasCustomName))
|
for (Entity e: world.getEntitiesByType(etype, Entity::hasCustomName))
|
||||||
{
|
{
|
||||||
e.setCustomNameVisible(false);
|
e.setCustomNameVisible(false);
|
||||||
e.setCustomName(null);
|
e.setCustomName(null);
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ public class SpawnReporter
|
|||||||
{
|
{
|
||||||
List<BaseText> lst = new ArrayList<>();
|
List<BaseText> lst = new ArrayList<>();
|
||||||
lst.add( Messenger.s(String.format("Loaded entities for %s class:", get_type_string(cat))));
|
lst.add( Messenger.s(String.format("Loaded entities for %s class:", get_type_string(cat))));
|
||||||
for (Entity entity : ((ServerWorld)worldIn).getEntities(null, (e) -> e.getType().getSpawnGroup()==cat))
|
for (Entity entity : ((ServerWorld)worldIn).getEntitiesByType(null, (e) -> e.getType().getSpawnGroup()==cat))
|
||||||
{
|
{
|
||||||
boolean persistent = entity instanceof MobEntity && ( ((MobEntity) entity).isPersistent() || ((MobEntity) entity).cannotDespawn());
|
boolean persistent = entity instanceof MobEntity && ( ((MobEntity) entity).isPersistent() || ((MobEntity) entity).cannotDespawn());
|
||||||
if (!all && persistent)
|
if (!all && persistent)
|
||||||
@@ -406,7 +406,7 @@ public class SpawnReporter
|
|||||||
}
|
}
|
||||||
if (entity instanceof OcelotEntity)
|
if (entity instanceof OcelotEntity)
|
||||||
{
|
{
|
||||||
for (Entity e: entity.getEntityWorld().getEntities(entity, entity.getBoundingBox()))
|
for (Entity e: entity.getEntityWorld().getOtherEntities(entity, entity.getBoundingBox()))
|
||||||
{
|
{
|
||||||
e.remove();
|
e.remove();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user