Cleaned up a lot of different inspections
This commit is contained in:
parent
0dd0854bd9
commit
70d98455b7
207 changed files with 603 additions and 731 deletions
|
@ -28,7 +28,7 @@ import java.util.*;
|
|||
*/
|
||||
public class AlchemyArrayEffectAttractor extends AlchemyArrayEffect {
|
||||
private FakePlayer target;
|
||||
private Set<EntityLiving> tracking = new HashSet<EntityLiving>();
|
||||
private Set<EntityLiving> tracking = new HashSet<>();
|
||||
|
||||
private int counter = 0;
|
||||
private int maxMobsAttracted = 10000;
|
||||
|
@ -48,9 +48,7 @@ public class AlchemyArrayEffectAttractor extends AlchemyArrayEffect {
|
|||
BlockPos pos = tile.getPos();
|
||||
counter++;
|
||||
if (counter < 10) {
|
||||
Iterator<EntityLiving> itr = tracking.iterator();
|
||||
while (itr.hasNext()) {
|
||||
EntityLiving ent = itr.next();
|
||||
for (EntityLiving ent : tracking) {
|
||||
onEntityTick(pos, ent);
|
||||
}
|
||||
|
||||
|
@ -61,7 +59,7 @@ public class AlchemyArrayEffectAttractor extends AlchemyArrayEffect {
|
|||
|
||||
World world = tile.getWorld();
|
||||
|
||||
Set<EntityLiving> trackingThisTick = new HashSet<EntityLiving>();
|
||||
Set<EntityLiving> trackingThisTick = new HashSet<>();
|
||||
List<EntityLiving> entsInBounds = world.getEntitiesWithinAABB(EntityLiving.class, getBounds(pos));
|
||||
|
||||
for (EntityLiving ent : entsInBounds) {
|
||||
|
@ -268,7 +266,7 @@ public class AlchemyArrayEffectAttractor extends AlchemyArrayEffect {
|
|||
private void cancelCurrentTasks(EntityLiving ent) {
|
||||
Iterator<EntityAITaskEntry> iterator = ent.tasks.taskEntries.iterator();
|
||||
|
||||
List<EntityAITasks.EntityAITaskEntry> currentTasks = new ArrayList<EntityAITasks.EntityAITaskEntry>();
|
||||
List<EntityAITasks.EntityAITaskEntry> currentTasks = new ArrayList<>();
|
||||
while (iterator.hasNext()) {
|
||||
EntityAITaskEntry entityaitaskentry = iterator.next();
|
||||
if (entityaitaskentry != null) {
|
||||
|
|
|
@ -25,12 +25,7 @@ import java.util.List;
|
|||
* Credits for the initial code go to Crazy Pants of EIO.
|
||||
*/
|
||||
public class AlchemyArrayEffectSkeletonTurret extends AlchemyArrayEffect {
|
||||
public static Predicate<EntityMob> checkSkeleton = new Predicate<EntityMob>() {
|
||||
@Override
|
||||
public boolean apply(EntityMob input) {
|
||||
return !(input instanceof EntitySkeleton);
|
||||
}
|
||||
};
|
||||
public static Predicate<EntityMob> checkSkeleton = input -> !(input instanceof EntitySkeleton);
|
||||
private EntitySkeleton turret;
|
||||
|
||||
public AlchemyArrayEffectSkeletonTurret(String key) {
|
||||
|
@ -105,7 +100,7 @@ public class AlchemyArrayEffectSkeletonTurret extends AlchemyArrayEffect {
|
|||
private void cancelCurrentTargetTasks(EntityLiving entity) {
|
||||
Iterator<EntityAITaskEntry> iterator = entity.targetTasks.taskEntries.iterator();
|
||||
|
||||
List<EntityAITasks.EntityAITaskEntry> currentTasks = new ArrayList<EntityAITasks.EntityAITaskEntry>();
|
||||
List<EntityAITasks.EntityAITaskEntry> currentTasks = new ArrayList<>();
|
||||
while (iterator.hasNext()) {
|
||||
EntityAITaskEntry entityaitaskentry = iterator.next();
|
||||
if (entityaitaskentry != null)// && entityaitaskentry.action instanceof EntityAITarget)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue