From e67ec142859dace48f37c7ba11ea176959605748 Mon Sep 17 00:00:00 2001 From: gnembon Date: Mon, 20 Jul 2020 21:06:03 -0300 Subject: [PATCH] mappings --- gradle.properties | 2 +- src/main/java/carpet/commands/CameraModeCommand.java | 2 +- src/main/java/carpet/commands/DistanceCommand.java | 2 +- src/main/java/carpet/commands/DrawCommand.java | 8 ++++---- src/main/java/carpet/commands/InfoCommand.java | 4 ++-- src/main/java/carpet/commands/MobAICommand.java | 2 +- .../java/carpet/commands/PerimeterInfoCommand.java | 4 ++-- src/main/java/carpet/commands/PlayerCommand.java | 6 +++--- src/main/java/carpet/commands/ScriptCommand.java | 8 ++++---- src/main/java/carpet/commands/SpawnCommand.java | 4 ++-- .../java/carpet/helpers/EntityPlayerActionPack.java | 6 +++--- src/main/java/carpet/helpers/FeatureGenerator.java | 8 ++++---- src/main/java/carpet/helpers/OptimizedExplosion.java | 3 +-- src/main/java/carpet/helpers/ParticleDisplay.java | 2 +- src/main/java/carpet/helpers/Tracer.java | 2 +- .../logging/logHelpers/PathfindingVisualizer.java | 2 +- .../carpet/mixins/LivingEntity_maxCollisionsMixin.java | 2 +- src/main/java/carpet/mixins/TntEntityMixin.java | 2 +- src/main/java/carpet/script/CarpetExpression.java | 8 ++++---- src/main/java/carpet/script/CarpetScriptHost.java | 2 +- src/main/java/carpet/script/utils/ShapeDispatcher.java | 2 +- src/main/java/carpet/script/value/BlockValue.java | 2 +- .../java/carpet/script/value/NBTSerializableValue.java | 10 +++++----- src/main/java/carpet/utils/MobAI.java | 2 +- src/main/java/carpet/utils/SpawnReporter.java | 4 ++-- 25 files changed, 49 insertions(+), 50 deletions(-) diff --git a/gradle.properties b/gradle.properties index e98262a5..35a02da4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx1G # check these on https://fabricmc.net/use # or better: https://modmuss50.me/fabric.html minecraft_version=20w29a - yarn_mappings=20w29a+build.1 + yarn_mappings=20w29a+build.13 loader_version=0.9.0+build.204 # Mod Properties diff --git a/src/main/java/carpet/commands/CameraModeCommand.java b/src/main/java/carpet/commands/CameraModeCommand.java index 49ce0c25..0d701c2c 100644 --- a/src/main/java/carpet/commands/CameraModeCommand.java +++ b/src/main/java/carpet/commands/CameraModeCommand.java @@ -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.RemoveEntityStatusEffectS2CPacket; 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.StatusEffectInstance; import net.minecraft.server.network.ServerPlayerEntity; diff --git a/src/main/java/carpet/commands/DistanceCommand.java b/src/main/java/carpet/commands/DistanceCommand.java index 97b8174a..77f947e6 100644 --- a/src/main/java/carpet/commands/DistanceCommand.java +++ b/src/main/java/carpet/commands/DistanceCommand.java @@ -6,7 +6,7 @@ import carpet.utils.DistanceCalculator; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.builder.LiteralArgumentBuilder; 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.literal; diff --git a/src/main/java/carpet/commands/DrawCommand.java b/src/main/java/carpet/commands/DrawCommand.java index cce35dff..7547d10a 100644 --- a/src/main/java/carpet/commands/DrawCommand.java +++ b/src/main/java/carpet/commands/DrawCommand.java @@ -15,10 +15,10 @@ import com.mojang.brigadier.exceptions.CommandSyntaxException; import net.minecraft.block.Block; import net.minecraft.block.pattern.CachedBlockPosition; import net.minecraft.server.command.ServerCommandSource; -import net.minecraft.command.arguments.BlockPosArgumentType; -import net.minecraft.command.arguments.BlockPredicateArgumentType; -import net.minecraft.command.arguments.BlockStateArgument; -import net.minecraft.command.arguments.BlockStateArgumentType; +import net.minecraft.command.argument.BlockPosArgumentType; +import net.minecraft.command.argument.BlockPredicateArgumentType; +import net.minecraft.command.argument.BlockStateArgument; +import net.minecraft.command.argument.BlockStateArgumentType; import net.minecraft.inventory.Inventory; import net.minecraft.block.entity.BlockEntity; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/carpet/commands/InfoCommand.java b/src/main/java/carpet/commands/InfoCommand.java index d6d08780..0e83b9be 100644 --- a/src/main/java/carpet/commands/InfoCommand.java +++ b/src/main/java/carpet/commands/InfoCommand.java @@ -9,8 +9,8 @@ import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.builder.LiteralArgumentBuilder; import net.minecraft.text.BaseText; import net.minecraft.server.command.ServerCommandSource; -import net.minecraft.command.arguments.BlockPosArgumentType; -import net.minecraft.command.arguments.EntityArgumentType; +import net.minecraft.command.argument.BlockPosArgumentType; +import net.minecraft.command.argument.EntityArgumentType; import net.minecraft.entity.Entity; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/carpet/commands/MobAICommand.java b/src/main/java/carpet/commands/MobAICommand.java index 34ab36da..5bdbf823 100644 --- a/src/main/java/carpet/commands/MobAICommand.java +++ b/src/main/java/carpet/commands/MobAICommand.java @@ -6,7 +6,7 @@ import carpet.utils.MobAI; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.StringArgumentType; 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.util.registry.Registry; diff --git a/src/main/java/carpet/commands/PerimeterInfoCommand.java b/src/main/java/carpet/commands/PerimeterInfoCommand.java index 27b80b45..0157fccd 100644 --- a/src/main/java/carpet/commands/PerimeterInfoCommand.java +++ b/src/main/java/carpet/commands/PerimeterInfoCommand.java @@ -11,8 +11,8 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; import net.minecraft.entity.mob.MobEntity; import net.minecraft.server.command.ServerCommandSource; -import net.minecraft.command.arguments.BlockPosArgumentType; -import net.minecraft.command.arguments.EntitySummonArgumentType; +import net.minecraft.command.argument.BlockPosArgumentType; +import net.minecraft.command.argument.EntitySummonArgumentType; import net.minecraft.nbt.CompoundTag; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; diff --git a/src/main/java/carpet/commands/PlayerCommand.java b/src/main/java/carpet/commands/PlayerCommand.java index e6ae4cf6..cb6dee57 100644 --- a/src/main/java/carpet/commands/PlayerCommand.java +++ b/src/main/java/carpet/commands/PlayerCommand.java @@ -15,9 +15,9 @@ 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.command.arguments.DimensionArgumentType; -import net.minecraft.command.arguments.RotationArgumentType; -import net.minecraft.command.arguments.Vec3ArgumentType; +import net.minecraft.command.argument.DimensionArgumentType; +import net.minecraft.command.argument.RotationArgumentType; +import net.minecraft.command.argument.Vec3ArgumentType; import net.minecraft.server.PlayerManager; import net.minecraft.server.command.ServerCommandSource; import net.minecraft.entity.player.PlayerEntity; diff --git a/src/main/java/carpet/commands/ScriptCommand.java b/src/main/java/carpet/commands/ScriptCommand.java index e28ae596..b565020b 100644 --- a/src/main/java/carpet/commands/ScriptCommand.java +++ b/src/main/java/carpet/commands/ScriptCommand.java @@ -15,10 +15,10 @@ import com.mojang.brigadier.suggestion.Suggestions; import com.mojang.brigadier.suggestion.SuggestionsBuilder; import net.minecraft.block.Block; import net.minecraft.block.pattern.CachedBlockPosition; -import net.minecraft.command.arguments.BlockPosArgumentType; -import net.minecraft.command.arguments.BlockPredicateArgumentType; -import net.minecraft.command.arguments.BlockStateArgument; -import net.minecraft.command.arguments.BlockStateArgumentType; +import net.minecraft.command.argument.BlockPosArgumentType; +import net.minecraft.command.argument.BlockPredicateArgumentType; +import net.minecraft.command.argument.BlockStateArgument; +import net.minecraft.command.argument.BlockStateArgumentType; import net.minecraft.server.command.ServerCommandSource; import net.minecraft.block.entity.BlockEntity; import net.minecraft.util.Clearable; diff --git a/src/main/java/carpet/commands/SpawnCommand.java b/src/main/java/carpet/commands/SpawnCommand.java index d67fd7b9..ee28b3a5 100644 --- a/src/main/java/carpet/commands/SpawnCommand.java +++ b/src/main/java/carpet/commands/SpawnCommand.java @@ -11,8 +11,8 @@ 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.command.arguments.BlockPosArgumentType; -import net.minecraft.command.arguments.DimensionArgumentType; +import net.minecraft.command.argument.BlockPosArgumentType; +import net.minecraft.command.argument.DimensionArgumentType; import net.minecraft.entity.SpawnGroup; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.server.command.ServerCommandSource; diff --git a/src/main/java/carpet/helpers/EntityPlayerActionPack.java b/src/main/java/carpet/helpers/EntityPlayerActionPack.java index 7dbcfce6..64083201 100644 --- a/src/main/java/carpet/helpers/EntityPlayerActionPack.java +++ b/src/main/java/carpet/helpers/EntityPlayerActionPack.java @@ -2,7 +2,7 @@ package carpet.helpers; import carpet.fakes.ServerPlayerEntityInterface; 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.passive.HorseBaseEntity; import net.minecraft.entity.player.PlayerInventory; @@ -167,12 +167,12 @@ public class EntityPlayerActionPack List entities; 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); } 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) return this; diff --git a/src/main/java/carpet/helpers/FeatureGenerator.java b/src/main/java/carpet/helpers/FeatureGenerator.java index f9527260..73467f12 100644 --- a/src/main/java/carpet/helpers/FeatureGenerator.java +++ b/src/main/java/carpet/helpers/FeatureGenerator.java @@ -22,7 +22,7 @@ import net.minecraft.world.biome.source.BiomeAccess; import net.minecraft.world.gen.ChunkRandom; import net.minecraft.world.gen.chunk.ChunkGenerator; 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.ConfiguredFeatures; import net.minecraft.world.gen.feature.ConfiguredStructureFeature; @@ -175,9 +175,9 @@ public class FeatureGenerator } private static final Map featureMap = new HashMap() {{ - put("oak_bees", simpleTree(ConfiguredFeatures.OAK.method_30381().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("birch_bees", simpleTree(ConfiguredFeatures.BIRCH.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.getConfig().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_claw", simplePlop(Feature.CORAL_CLAW.configure(FeatureConfig.DEFAULT))); put("coral_mushroom", simplePlop(Feature.CORAL_MUSHROOM.configure(FeatureConfig.DEFAULT))); diff --git a/src/main/java/carpet/helpers/OptimizedExplosion.java b/src/main/java/carpet/helpers/OptimizedExplosion.java index bcf1b85c..8f344064 100644 --- a/src/main/java/carpet/helpers/OptimizedExplosion.java +++ b/src/main/java/carpet/helpers/OptimizedExplosion.java @@ -102,8 +102,7 @@ public class OptimizedExplosion if (vec3dmem == null || !vec3dmem.equals(vec3d) || tickmem != eAccess.getWorld().getTime()) { vec3dmem = vec3d; tickmem = eAccess.getWorld().getTime(); - entitylist = eAccess.getWorld().getEntities((Entity)null, - new Box((double) k1, (double) i2, (double) j2, (double) l1, (double) i1, (double) j1)); + entitylist = eAccess.getWorld().getOtherEntities(null, new Box(k1, i2, j2, l1, i1, j1)); explosionSound = 0; } diff --git a/src/main/java/carpet/helpers/ParticleDisplay.java b/src/main/java/carpet/helpers/ParticleDisplay.java index fe05385c..80f3519f 100644 --- a/src/main/java/carpet/helpers/ParticleDisplay.java +++ b/src/main/java/carpet/helpers/ParticleDisplay.java @@ -2,7 +2,7 @@ package carpet.helpers; import com.mojang.brigadier.StringReader; 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.server.network.ServerPlayerEntity; import net.minecraft.server.world.ServerWorld; diff --git a/src/main/java/carpet/helpers/Tracer.java b/src/main/java/carpet/helpers/Tracer.java index b415012e..dbbc4690 100644 --- a/src/main/java/carpet/helpers/Tracer.java +++ b/src/main/java/carpet/helpers/Tracer.java @@ -48,7 +48,7 @@ public class Tracer double targetDistance = maxSqDistance; Entity target = 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()); Optional currentHit = currentBox.rayTrace(start, end); diff --git a/src/main/java/carpet/logging/logHelpers/PathfindingVisualizer.java b/src/main/java/carpet/logging/logHelpers/PathfindingVisualizer.java index 08715519..c4f0972a 100644 --- a/src/main/java/carpet/logging/logHelpers/PathfindingVisualizer.java +++ b/src/main/java/carpet/logging/logHelpers/PathfindingVisualizer.java @@ -4,7 +4,7 @@ import carpet.helpers.ParticleDisplay; import carpet.logging.LoggerRegistry; import com.mojang.brigadier.StringReader; 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.particle.ParticleEffect; import net.minecraft.server.network.ServerPlayerEntity; diff --git a/src/main/java/carpet/mixins/LivingEntity_maxCollisionsMixin.java b/src/main/java/carpet/mixins/LivingEntity_maxCollisionsMixin.java index e6190b1d..cff8cb60 100644 --- a/src/main/java/carpet/mixins/LivingEntity_maxCollisionsMixin.java +++ b/src/main/java/carpet/mixins/LivingEntity_maxCollisionsMixin.java @@ -30,7 +30,7 @@ public abstract class LivingEntity_maxCollisionsMixin extends Entity @Inject(method = "tickCramming", cancellable = true, at = @At("HEAD")) private void tickPushingReplacement(CallbackInfo ci) { - List list_1 = this.world.getEntities((Entity)this, this.getBoundingBox(), EntityPredicates.canBePushedBy(this)); + List list_1 = this.world.getOtherEntities(this, this.getBoundingBox(), EntityPredicates.canBePushedBy(this)); if (!list_1.isEmpty()) { int int_1 = this.world.getGameRules().getInt(GameRules.MAX_ENTITY_CRAMMING); int int_2; diff --git a/src/main/java/carpet/mixins/TntEntityMixin.java b/src/main/java/carpet/mixins/TntEntityMixin.java index 2e67b1e5..e9285e7e 100644 --- a/src/main/java/carpet/mixins/TntEntityMixin.java +++ b/src/main/java/carpet/mixins/TntEntityMixin.java @@ -92,7 +92,7 @@ public abstract class TntEntityMixin extends Entity implements TntEntityInterfac Vec3d velocity = getVelocity(); if(!world.isClient && mergeBool && velocity.x == 0 && velocity.y == 0 && velocity.z == 0){ mergeBool = false; - for(Entity entity : world.getEntities(this, this.getBoundingBox())){ + for(Entity entity : world.getOtherEntities(this, this.getBoundingBox())){ if(entity instanceof TntEntity && !entity.removed){ TntEntity entityTNTPrimed = (TntEntity)entity; Vec3d tntVelocity = entityTNTPrimed.getVelocity(); diff --git a/src/main/java/carpet/script/CarpetExpression.java b/src/main/java/carpet/script/CarpetExpression.java index ee72e8ed..704a1926 100644 --- a/src/main/java/carpet/script/CarpetExpression.java +++ b/src/main/java/carpet/script/CarpetExpression.java @@ -70,7 +70,7 @@ import net.minecraft.item.SwordItem; import net.minecraft.item.TridentItem; import net.minecraft.network.packet.s2c.play.ScreenHandlerSlotUpdateS2CPacket; 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.entity.Entity; import net.minecraft.entity.EntityType; @@ -2074,7 +2074,7 @@ public class CarpetExpression { throw new InternalExpressionException("Unknown entity selection criterion: "+who); } - List entityList = ((CarpetContext)c).s.getWorld().getEntities(pair.getKey(), pair.getValue()); + List entityList = ((CarpetContext)c).s.getWorld().getEntitiesByType(pair.getKey(), pair.getValue()); Value retval = ListValue.wrap(entityList.stream().map(EntityValue::new).collect(Collectors.toList())); return (_c, _t ) -> retval; }); @@ -2096,7 +2096,7 @@ public class CarpetExpression { throw new InternalExpressionException("Unknown entity selection criterion: "+who); } - List entityList = ((CarpetContext)c).s.getWorld().getEntities((EntityType) pair.getKey(), area, pair.getValue()); + List entityList = ((CarpetContext)c).s.getWorld().getEntitiesByType((EntityType) pair.getKey(), area, pair.getValue()); Value retval = ListValue.wrap(entityList.stream().map(EntityValue::new).collect(Collectors.toList())); return (_c, _t ) -> retval; }); @@ -2975,7 +2975,7 @@ public class CarpetExpression CarpetContext cc = (CarpetContext)c; int total = 0; 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 ++; e.remove(); diff --git a/src/main/java/carpet/script/CarpetScriptHost.java b/src/main/java/carpet/script/CarpetScriptHost.java index 25892565..27a74848 100644 --- a/src/main/java/carpet/script/CarpetScriptHost.java +++ b/src/main/java/carpet/script/CarpetScriptHost.java @@ -349,7 +349,7 @@ public class CarpetScriptHost extends ScriptHost String markerName = CarpetExpression.MARKER_STRING+"_"+((getName()==null)?"":getName()); 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(); } diff --git a/src/main/java/carpet/script/utils/ShapeDispatcher.java b/src/main/java/carpet/script/utils/ShapeDispatcher.java index 28f836cd..980592f3 100644 --- a/src/main/java/carpet/script/utils/ShapeDispatcher.java +++ b/src/main/java/carpet/script/utils/ShapeDispatcher.java @@ -18,7 +18,7 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; import com.mojang.brigadier.StringReader; 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.nbt.ByteTag; import net.minecraft.nbt.CompoundTag; diff --git a/src/main/java/carpet/script/value/BlockValue.java b/src/main/java/carpet/script/value/BlockValue.java index e7bba07b..f86158a0 100644 --- a/src/main/java/carpet/script/value/BlockValue.java +++ b/src/main/java/carpet/script/value/BlockValue.java @@ -7,7 +7,7 @@ import com.mojang.brigadier.StringReader; import com.mojang.brigadier.exceptions.CommandSyntaxException; import net.minecraft.block.BlockState; 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.item.ItemPlacementContext; import net.minecraft.item.ItemStack; diff --git a/src/main/java/carpet/script/value/NBTSerializableValue.java b/src/main/java/carpet/script/value/NBTSerializableValue.java index d23938c9..f2c5aa92 100644 --- a/src/main/java/carpet/script/value/NBTSerializableValue.java +++ b/src/main/java/carpet/script/value/NBTSerializableValue.java @@ -11,9 +11,9 @@ import net.minecraft.block.ChestBlock; import net.minecraft.block.InventoryProvider; import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.ChestBlockEntity; -import net.minecraft.command.arguments.ItemStackArgument; -import net.minecraft.command.arguments.ItemStringReader; -import net.minecraft.command.arguments.NbtPathArgumentType; +import net.minecraft.command.argument.ItemStackArgument; +import net.minecraft.command.argument.ItemStringReader; +import net.minecraft.command.argument.NbtPathArgumentType; import net.minecraft.entity.Entity; import net.minecraft.entity.passive.VillagerEntity; import net.minecraft.entity.player.PlayerEntity; @@ -156,8 +156,8 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa } if (inventory == null) { - List list = world.getEntities( - (Entity)null, + List list = world.getOtherEntities( + null, 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), diff --git a/src/main/java/carpet/utils/MobAI.java b/src/main/java/carpet/utils/MobAI.java index 97c8cca4..c332755c 100644 --- a/src/main/java/carpet/utils/MobAI.java +++ b/src/main/java/carpet/utils/MobAI.java @@ -44,7 +44,7 @@ public class MobAI aiTrackers.remove(etype); 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.setCustomName(null); diff --git a/src/main/java/carpet/utils/SpawnReporter.java b/src/main/java/carpet/utils/SpawnReporter.java index 93e1c530..9575ae4c 100644 --- a/src/main/java/carpet/utils/SpawnReporter.java +++ b/src/main/java/carpet/utils/SpawnReporter.java @@ -272,7 +272,7 @@ public class SpawnReporter { List lst = new ArrayList<>(); 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()); if (!all && persistent) @@ -406,7 +406,7 @@ public class SpawnReporter } if (entity instanceof OcelotEntity) { - for (Entity e: entity.getEntityWorld().getEntities(entity, entity.getBoundingBox())) + for (Entity e: entity.getEntityWorld().getOtherEntities(entity, entity.getBoundingBox())) { e.remove(); }