remove Windows support, revert new guava to small version

This commit is contained in:
Sen 2025-03-25 11:31:48 +01:00
parent fd84384f10
commit 920405d8c5
264 changed files with 22715 additions and 377 deletions

View file

@ -6,8 +6,8 @@ import java.util.Map;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import game.collect.Lists;
import game.collect.Maps;
import game.item.ItemStack;
import game.network.PacketBuffer;

View file

@ -4,7 +4,7 @@ import java.util.Collection;
import java.util.List;
import java.util.Set;
import com.google.common.collect.Sets;
import game.collect.Sets;
import game.entity.attributes.AttributeInstance;
import game.entity.attributes.AttributeMap;

View file

@ -2,7 +2,7 @@ package game.entity.animal;
import java.util.List;
import com.google.common.collect.Lists;
import game.collect.Lists;
import game.entity.DamageSource;
import game.entity.Entity;

View file

@ -1,6 +1,6 @@
package game.entity.animal;
import com.google.common.base.Predicate;
import java.util.function.Predicate;
import game.ai.EntityAIFollowParent;
import game.ai.EntityAILookIdle;
@ -44,7 +44,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic
{
private static final Predicate<Entity> horseBreedingSelector = new Predicate<Entity>()
{
public boolean apply(Entity p_apply_1_)
public boolean test(Entity p_apply_1_)
{
return p_apply_1_ instanceof EntityHorse && ((EntityHorse)p_apply_1_).isBreeding();
}

View file

@ -1,6 +1,6 @@
package game.entity.animal;
import com.google.common.base.Predicate;
import java.util.function.Predicate;
import game.ai.EntityAIAvoidEntity;
import game.ai.EntityAIFollowOwner;
@ -56,7 +56,7 @@ public class EntityOcelot extends EntityTameable
this.tasks.addTask(10, new EntityAIWander(this, 0.8D));
this.tasks.addTask(11, new EntityAIWatchClosest(this, null, 10.0F));
this.targets.addTask(1, new EntityAITargetNonTamed(this, EntityAnimal.class, false, new Predicate<EntityAnimal>() {
public boolean apply(EntityAnimal entity) {
public boolean test(EntityAnimal entity) {
return entity instanceof EntityChicken || entity instanceof EntityMouse;
}
}));
@ -368,7 +368,7 @@ public class EntityOcelot extends EntityTameable
{
this.avoidEntity = new EntityAIAvoidEntity(this, EntityNPC.class,
// new Predicate<EntityNPC>() {
// public boolean apply(EntityNPC entity) {
// public boolean test(EntityNPC entity) {
// return !entity.capabilities.disableTarget;
// }
// } ,

View file

@ -1,6 +1,6 @@
package game.entity.animal;
import com.google.common.base.Predicate;
import java.util.function.Predicate;
import game.ai.EntityAIAttackOnCollide;
import game.ai.EntityAIAvoidEntity;
@ -336,7 +336,7 @@ public class EntityRabbit extends EntityAnimal {
this.grow(this.rand.range(250, 350));
if(Config.rabbitMateChance > 0 && this.rand.chance(Config.rabbitMateChance) && this.getGrowingAge() == 0 && !this.isInLove() &&
!this.worldObj.getEntitiesWithinAABB(EntityRabbit.class, this.getEntityBoundingBox().expand(15.0f, 15.0f, 15.0f), new Predicate<EntityRabbit>() {
public boolean apply(EntityRabbit entity) {
public boolean test(EntityRabbit entity) {
return entity != EntityRabbit.this && entity.getGrowingAge() == 0;
}
}).isEmpty())

View file

@ -2,7 +2,7 @@ package game.entity.animal;
import java.util.Map;
import com.google.common.collect.Maps;
import game.collect.Maps;
import game.ai.EntityAIEatGrass;
import game.ai.EntityAIFollowParent;

View file

@ -1,6 +1,6 @@
package game.entity.animal;
import com.google.common.base.Predicate;
import java.util.function.Predicate;
import game.ai.EntityAIAttackOnCollide;
import game.ai.EntityAIBeg;
@ -74,7 +74,7 @@ public class EntityWolf extends EntityTameable
this.targets.addTask(3, new EntityAIHurtByTarget(this, true));
this.targets.addTask(4, new EntityAITargetNonTamed(this, EntityAnimal.class, false, new Predicate<Entity>()
{
public boolean apply(Entity p_apply_1_)
public boolean test(Entity p_apply_1_)
{
return p_apply_1_ instanceof EntitySheep || p_apply_1_ instanceof EntityRabbit;
}

View file

@ -2,7 +2,7 @@ package game.entity.attributes;
import java.util.Map;
import com.google.common.collect.Maps;
import game.collect.Maps;
import game.util.ExtMath;

View file

@ -4,9 +4,9 @@ import java.util.Collection;
import java.util.Map;
import java.util.Set;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import game.collect.Lists;
import game.collect.Maps;
import game.collect.Sets;
public class AttributeInstance
{

View file

@ -5,8 +5,8 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import game.collect.Maps;
import game.collect.Sets;
public class AttributeMap
{

View file

@ -4,7 +4,7 @@ import java.util.Collection;
import java.util.Map;
import java.util.Set;
import com.google.common.collect.Maps;
import game.collect.Maps;
public class LowerStringMap<V> implements Map<String, V>
{

View file

@ -2,7 +2,7 @@ package game.entity.item;
import java.util.List;
import com.google.common.collect.Lists;
import game.collect.Lists;
import game.block.Block;
import game.block.BlockAnvil;

View file

@ -2,7 +2,7 @@ package game.entity.item;
import java.util.List;
import com.google.common.base.Predicate;
import java.util.function.Predicate;
import game.entity.DamageSource;
import game.entity.npc.EntityNPC;
@ -175,7 +175,7 @@ public class EntityHopperCart extends EntityCartContainer implements IHopper
else
{
List<EntityItem> list = this.worldObj.<EntityItem>getEntitiesWithinAABB(EntityItem.class, this.getEntityBoundingBox().expand(0.25D, 0.0D, 0.25D), new Predicate<EntityItem>() {
public boolean apply(EntityItem entity) {
public boolean test(EntityItem entity) {
return entity.isEntityAlive();
}
});

View file

@ -122,7 +122,7 @@ public class EntityXp extends Entity implements IObjectData
// {
// List<EntityXp> list = this.worldObj.getEntitiesWithinAABB(EntityXp.class,
// this.getEntityBoundingBox().expand(1.5D, 1.0D, 1.5D), new Predicate<EntityXp>() {
// public boolean apply(EntityXp entity) {
// public boolean test(EntityXp entity) {
// return entity != EntityXp.this && entity.isEntityAlive() && EntityXp.this.xpValue + entity.xpValue <= 2477;
// }
// });

View file

@ -2,7 +2,7 @@ package game.entity.npc;
import java.util.Map;
import com.google.common.collect.Maps;
import game.collect.Maps;
import game.color.TextColor;

View file

@ -2,7 +2,7 @@ package game.entity.npc;
import java.util.List;
import com.google.common.collect.Lists;
import game.collect.Lists;
import game.item.RngLoot;
import game.rng.WeightedList;

View file

@ -2,7 +2,7 @@ package game.entity.npc;
import java.util.List;
import com.google.common.collect.Lists;
import game.collect.Lists;
import game.entity.attributes.Attributes;
import game.init.SpeciesRegistry;

View file

@ -303,7 +303,7 @@ public abstract class EntityMobNPC extends EntityNPC
// public AITargetAggressor(EntityMobNPC p_i45829_1_)
// {
// super(p_i45829_1_, EntityLiving.class, 10, true, false, new Predicate<EntityLiving>() {
// public boolean apply(EntityLiving entity) {
// public boolean test(EntityLiving entity) {
// return entity.isPlayer(); // || entity instanceof EntityNPC;
// }
// });

View file

@ -3,7 +3,7 @@ package game.entity.npc;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import com.google.common.base.Predicate;
import java.util.function.Predicate;
import game.Game;
import game.ai.AIRangedAttack;
@ -275,7 +275,7 @@ public abstract class EntityNPC extends EntityLiving
// this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityLivingBase.class, 0.6D, true, true));
this.tasks.addTask(1, new EntityAINpcMate(this));
this.tasks.addTask(2, new EntityAIAvoidEntity(this, EntityLiving.class, new Predicate<EntityLiving>() {
public boolean apply(EntityLiving entity) {
public boolean test(EntityLiving entity) {
return entity != EntityNPC.this && EntityNPC.this.shouldFlee(entity);
}
}, 8.0F, 1.1D, 1.1D) {
@ -302,7 +302,7 @@ public abstract class EntityNPC extends EntityLiving
// }
});
this.tasks.addTask(3, new EntityAIAvoidEntity(this, EntityLiving.class, new Predicate<EntityLiving>() {
public boolean apply(EntityLiving entity) {
public boolean test(EntityLiving entity) {
return entity != EntityNPC.this && EntityNPC.this.shouldFlee(entity);
}
}, 8.0F, 1.1D, 1.1D) {
@ -365,7 +365,7 @@ public abstract class EntityNPC extends EntityLiving
}
});
this.targets.addTask(2, new EntityAINearestAttackableTarget(this, EntityLiving.class, 10, true, false, new Predicate<EntityLiving>() {
public boolean apply(EntityLiving entity) {
public boolean test(EntityLiving entity) {
if(entity != null && entity != EntityNPC.this && EntityNPC.this.shouldFlee(entity)) {
EntityNPC.this.setAttackTarget(null);
EntityNPC.this.fleeing = true;

View file

@ -2,7 +2,7 @@ package game.entity.npc;
import java.util.List;
import com.google.common.collect.Lists;
import game.collect.Lists;
import game.entity.attributes.Attributes;
import game.properties.IStringSerializable;

View file

@ -2,7 +2,7 @@ package game.entity.npc;
import java.util.List;
import com.google.common.collect.Lists;
import game.collect.Lists;
import game.entity.attributes.Attributes;
import game.init.SpeciesRegistry;

View file

@ -2,7 +2,7 @@ package game.entity.npc;
import java.util.List;
import com.google.common.base.Predicate;
import java.util.function.Predicate;
import game.ai.EntityAIMoveThroughVillage;
import game.entity.DamageSource;
@ -212,7 +212,7 @@ public class EntityZombie extends EntityNPC
if ((double)this.worldObj.rand.floatv() < 0.05D)
{
List<EntityChicken> list = this.worldObj.<EntityChicken>getEntitiesWithinAABB(EntityChicken.class, this.getEntityBoundingBox().expand(5.0D, 3.0D, 5.0D), new Predicate<EntityChicken>() {
public boolean apply(EntityChicken entity) {
public boolean test(EntityChicken entity) {
return entity.isEntityAlive() && entity.passenger == null && entity.vehicle == null;
}
});

View file

@ -3,10 +3,10 @@ package game.entity.npc;
import java.util.List;
import java.util.Map;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import game.collect.BiMap;
import game.collect.HashBiMap;
import game.collect.Lists;
import game.collect.Maps;
import game.block.Block;
import game.init.SpeciesRegistry;

View file

@ -2,7 +2,7 @@ package game.entity.types;
import java.util.Set;
import com.google.common.collect.Sets;
import game.collect.Sets;
import game.block.Block;
import game.entity.DamageSource;

View file

@ -5,9 +5,9 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import com.google.common.base.Predicate;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import java.util.function.Predicate;
import game.collect.Lists;
import game.collect.Maps;
import game.ai.EntityAIBase;
import game.ai.EntityAIMoveTowardsRestriction;
@ -2125,7 +2125,7 @@ public abstract class EntityLiving extends Entity
{
List<Entity> list = this.worldObj.getEntitiesInAABBexcluding(this, this.getEntityBoundingBox().expand(0.20000000298023224D, 0.0D, 0.20000000298023224D), new Predicate<Entity>()
{
public boolean apply(Entity p_apply_1_)
public boolean test(Entity p_apply_1_)
{
return p_apply_1_.canBePushed();
}