mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-28 07:35:47 +00:00
Update Forge and Mappings (#2075)
This commit is contained in:
1 parent
8ba478d758
commit
3cd1c30dbc
14 files changed
+18
-18
No files matched your search
@@ -67,7 +67,7 @@ public enum EnumTemperature {
|
||||
if (BiomeHelper.isBiomeHellish(biome)) {
|
||||
return HELLISH;
|
||||
}
|
||||
return getFromValue(biome.getTemperature());
|
||||
return getFromValue(biome.getDefaultTemperature());
|
||||
}
|
||||
|
||||
public static EnumTemperature getFromBiome(Biome biome, World world, BlockPos pos) {
|
||||
|
||||
@@ -64,7 +64,7 @@ public class AIAvoidPlayers extends EntityAIBase {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (player.getDistanceSq(randomTarget.x, randomTarget.y, randomTarget.z) < player.getDistanceSqToEntity(mob)) {
|
||||
if (player.getDistanceSq(randomTarget.x, randomTarget.y, randomTarget.z) < player.getDistance(mob)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ public class AIAvoidPlayers extends EntityAIBase {
|
||||
|
||||
@Override
|
||||
public void updateTask() {
|
||||
if (player != null && mob.getDistanceSqToEntity(player) < 49.0D) {
|
||||
if (player != null && mob.getDistance(player) < 49.0D) {
|
||||
mob.getNavigator().setSpeed(nearSpeed);
|
||||
} else {
|
||||
mob.getNavigator().setSpeed(farSpeed);
|
||||
|
||||
@@ -114,7 +114,7 @@ public abstract class HiveDecorator {
|
||||
}
|
||||
|
||||
Biome biome = world.getBiome(hivePos);
|
||||
EnumTemperature temperature = EnumTemperature.getFromValue(biome.getFloatTemperature(hivePos));
|
||||
EnumTemperature temperature = EnumTemperature.getFromValue(biome.getTemperature(hivePos));
|
||||
if (!hive.isGoodTemperature(temperature)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public class ClimateManager implements IClimateManager {
|
||||
|
||||
private IClimateState getBiomeState(Biome biome) {
|
||||
if (!BIOME_STATES.containsKey(biome)) {
|
||||
BIOME_STATES.put(biome, ClimateStates.of(biome.getTemperature(), biome.getRainfall()));
|
||||
BIOME_STATES.put(biome, ClimateStates.of(biome.getDefaultTemperature(), biome.getRainfall()));
|
||||
}
|
||||
return BIOME_STATES.get(biome);
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public abstract class EntityMinecartContainerForestry extends EntityMinecartFore
|
||||
|
||||
@Override
|
||||
public boolean isUsableByPlayer(EntityPlayer player) {
|
||||
return !isDead && player.getDistanceSqToEntity(this) <= 64.0D;
|
||||
return !isDead && player.getDistance(this) <= 64.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -76,7 +76,7 @@ public class SlotCrafter extends Slot {
|
||||
|
||||
this.amountCrafted = 0;
|
||||
IRecipe irecipe = crafter.getRecipeUsed();
|
||||
if (irecipe != null && !irecipe.isHidden()) {
|
||||
if (irecipe != null && !irecipe.isDynamic()) {
|
||||
this.player.unlockRecipes(Lists.newArrayList(irecipe));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ public class ShapedRecipeCustom extends ShapedOreRecipe implements IDescriptiveR
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isHidden() {
|
||||
public boolean isDynamic() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ public class WidgetClimateBar extends Widget {
|
||||
String spriteName;
|
||||
|
||||
EnumClimate(String spriteName, Biome biome) {
|
||||
climateState = ClimateStates.of(biome.getTemperature(), biome.getRainfall());
|
||||
climateState = ClimateStates.of(biome.getDefaultTemperature(), biome.getRainfall());
|
||||
this.spriteName = spriteName;
|
||||
}
|
||||
|
||||
|
||||
@@ -454,7 +454,7 @@ public class GreenhouseController extends RectangularMultiblockControllerBase im
|
||||
for (int x = minimumCoord.getX(); x <= maximumCoord.getX(); x++) {
|
||||
for (int z = minimumCoord.getZ(); z <= maximumCoord.getZ(); z++) {
|
||||
Biome biome = world.getBiome(new BlockPos(x, 0, z));
|
||||
temperature += biome.getTemperature();
|
||||
temperature += biome.getDefaultTemperature();
|
||||
humidity += biome.getRainfall();
|
||||
biomes++;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class AIButterflyFlee extends AIButterflyMovement {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (player.getDistanceSq(flightTarget.x, flightTarget.y, flightTarget.z) < player.getDistanceSqToEntity(entity)) {
|
||||
if (player.getDistanceSq(flightTarget.x, flightTarget.y, flightTarget.z) < player.getDistance(entity)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public class AIButterflyMate extends AIButterflyInteract {
|
||||
public void updateTask() {
|
||||
if (shouldContinueExecuting()) {
|
||||
if (entity.getButterfly().getMate() == null && targetMate != null) {
|
||||
if (entity.cooldownMate <= 0 && entity.getDistanceSqToEntity(targetMate) < 9.0D) {
|
||||
if (entity.cooldownMate <= 0 && entity.getDistance(targetMate) < 9.0D) {
|
||||
entity.getButterfly().mate(targetMate.getButterfly());
|
||||
targetMate.getButterfly().mate(entity.getButterfly());
|
||||
entity.cooldownMate = EntityButterfly.COOLDOWNS;
|
||||
@@ -113,9 +113,9 @@ public class AIButterflyMate extends AIButterflyInteract {
|
||||
EntityButterfly nextButterfly = null;
|
||||
|
||||
for (EntityButterfly butterfly : nextButterflys) {
|
||||
if (this.entity.canMateWith(butterfly) && this.entity.getDistanceSqToEntity(butterfly) < d0) {
|
||||
if (this.entity.canMateWith(butterfly) && this.entity.getDistance(butterfly) < d0) {
|
||||
nextButterfly = butterfly;
|
||||
d0 = this.entity.getDistanceSqToEntity(butterfly);
|
||||
d0 = this.entity.getDistance(butterfly);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ public abstract class AIButterflyMovement extends AIButterflyBase {
|
||||
// Reset destination if we did collide.
|
||||
if (entity.isInWater()) {
|
||||
flightTarget = getRandomDestinationUpwards();
|
||||
} else if (entity.isCollided) {
|
||||
} else if (entity.collided) {
|
||||
flightTarget = entity.getRNG().nextBoolean() ? getRandomDestination() : null;
|
||||
} else if (entity.world.rand.nextInt(300) == 0) {
|
||||
flightTarget = getRandomDestination();
|
||||
|
||||
@@ -23,7 +23,7 @@ public class AIButterflyRise extends AIButterflyMovement {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!entity.isCollidedHorizontally && entity.getRNG().nextInt(64) != 0) {
|
||||
if (!entity.collidedHorizontally && entity.getRNG().nextInt(64) != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class AIButterflyRise extends AIButterflyMovement {
|
||||
public void updateTask() {
|
||||
if (entity.isInWater()) {
|
||||
flightTarget = getRandomDestinationUpwards();
|
||||
} else if (entity.isCollidedVertically && entity.getRNG().nextInt(62) == 0) {
|
||||
} else if (entity.collidedVertically && entity.getRNG().nextInt(62) == 0) {
|
||||
flightTarget = null;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user