Fix most non rendering issues

This commit is contained in:
Vincent Lee committed 2020-01-09 21:49:02 -06:00
1 parent bafd2bfa6d
commit 24e777cab5
88 files changed
+397 -454

No files matched your search

@@ -105,7 +105,7 @@ public class EntitySpark extends EntitySparkBase implements ISparkEntity {
switch(upgrade) {
case DISPERSIVE : {
List<PlayerEntity> players = SparkHelper.getEntitiesAround(PlayerEntity.class, world, posX, posY + (getHeight() / 2.0), posZ);
List<PlayerEntity> players = SparkHelper.getEntitiesAround(PlayerEntity.class, world, getX(), getY() + (getHeight() / 2.0), getZ());
Map<PlayerEntity, Map<ItemStack, Integer>> receivingPlayers = new HashMap<>();
@@ -159,7 +159,7 @@ public class EntitySpark extends EntitySparkBase implements ISparkEntity {
break;
}
case DOMINANT : {
List<ISparkEntity> validSparks = SparkHelper.getSparksAround(world, posX, posY + (getHeight() / 2), posZ, getNetwork())
List<ISparkEntity> validSparks = SparkHelper.getSparksAround(world, getX(), getY() + (getHeight() / 2), getZ(), getNetwork())
.filter(s -> {
SparkUpgradeType otherUpgrade = s.getUpgrade();
return s != this && otherUpgrade == SparkUpgradeType.NONE && s.getAttachedTile() instanceof IManaPool;
@@ -171,7 +171,7 @@ public class EntitySpark extends EntitySparkBase implements ISparkEntity {
break;
}
case RECESSIVE : {
SparkHelper.getSparksAround(world, posX, posY + (getHeight() / 2), posZ, getNetwork())
SparkHelper.getSparksAround(world, getX(), getY() + (getHeight() / 2), getZ(), getNetwork())
.filter(s -> {
SparkUpgradeType otherUpgrade = s.getUpgrade();
return s != this
@@ -216,7 +216,7 @@ public class EntitySpark extends EntitySparkBase implements ISparkEntity {
private void particlesTowards(Entity e) {
PacketHandler.sendToNearby(world, this,
new PacketBotaniaEffect(PacketBotaniaEffect.EffectType.SPARK_MANA_FLOW, posX, posY, posZ,
new PacketBotaniaEffect(PacketBotaniaEffect.EffectType.SPARK_MANA_FLOW, getX(), getY(), getZ(),
getEntityId(), e.getEntityId()));
}
@@ -260,7 +260,7 @@ public class EntitySpark extends EntitySparkBase implements ISparkEntity {
} else dropAndKill();
return true;
} else {
SparkHelper.getSparksAround(world, posX, posY + (getHeight() / 2), posZ, getNetwork())
SparkHelper.getSparksAround(world, getX(), getY() + (getHeight() / 2), getZ(), getNetwork())
.forEach(s -> particleBeam(player, this, (Entity) s));
return true;
}
@@ -304,9 +304,9 @@ public class EntitySpark extends EntitySparkBase implements ISparkEntity {
@Override
public ISparkAttachable getAttachedTile() {
int x = MathHelper.floor(posX);
int y = MathHelper.floor(posY) - 1;
int z = MathHelper.floor(posZ);
int x = MathHelper.floor(getX());
int y = MathHelper.floor(getY()) - 1;
int z = MathHelper.floor(getZ());
TileEntity tile = world.getTileEntity(new BlockPos(x, y, z));
if(tile instanceof ISparkAttachable)
return (ISparkAttachable) tile;