Ported to 1.16.2-pre

This commit is contained in:
Sebastian Hartte
2020-08-01 17:14:12 +02:00
parent 3d1a919e69
commit 1b31185cdb
90 changed files with 356 additions and 258 deletions
@@ -39,7 +39,6 @@ import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.RayTraceContext;
import net.minecraft.world.World;
import appeng.api.definitions.IBlockDefinition;
import appeng.api.parts.*;
import appeng.api.util.AEPartLocation;
@@ -566,7 +566,7 @@ public class AnnihilationPlanePart extends BasicStatePart implements IGridTickab
// breaking
// i.e. our cable-buses do this (bad practice, really)
final Box box = new Box(pos).expand(0.2);
for (final Object ei : w.getEntities(ItemEntity.class, box, null)) {
for (final Object ei : w.getEntitiesByClass(ItemEntity.class, box, null)) {
if (ei instanceof ItemEntity) {
final ItemEntity entityItem = (ItemEntity) ei;
this.storeEntityItem(entityItem);
@@ -616,12 +616,12 @@ public class AnnihilationPlanePart extends BasicStatePart implements IGridTickab
}
public static boolean isBlockBlacklisted(Block b) {
Tag<Block> tag = BlockTags.getContainer().getOrCreate(TAG_BLACKLIST);
Tag<Block> tag = BlockTags.getTagGroup().getTagOrEmpty(TAG_BLACKLIST);
return b.isIn(tag);
}
public static boolean isItemBlacklisted(Item i) {
Tag<Item> tag = ItemTags.getContainer().getOrCreate(TAG_BLACKLIST);
Tag<Item> tag = ItemTags.getTagGroup().getTagOrEmpty(TAG_BLACKLIST);
return i.isIn(tag);
}
@@ -346,7 +346,7 @@ public class FormationPlanePart extends AbstractFormationPlanePart<IAEItemStack>
private int countEntitesAround(World world, BlockPos pos) {
final Box t = new Box(pos).expand(8);
final List<Entity> list = world.getEntities(Entity.class, t, null);
final List<Entity> list = world.getEntitiesByClass(Entity.class, t, null);
return list.size();
}