mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 02:45:13 +00:00
Use ==
This commit is contained in:
1 parent
11d327dcce
commit
be09676053
3 files changed
+6
-14
No files matched your search
@@ -78,17 +78,12 @@ public class RecipeManaInfusion {
|
||||
return mana;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RecipeManaInfusion#setCatalyst(IBlockState)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public void setAlchemy(boolean alchemy) {
|
||||
if (alchemy)
|
||||
catalystState = alchemyState;
|
||||
else
|
||||
catalystState = null;
|
||||
catalystState = alchemy ? alchemyState : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -96,7 +91,7 @@ public class RecipeManaInfusion {
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean isAlchemy() {
|
||||
return catalystState != null && catalystState.equals(alchemyState);
|
||||
return catalystState == alchemyState;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -104,10 +99,7 @@ public class RecipeManaInfusion {
|
||||
*/
|
||||
@Deprecated
|
||||
public void setConjuration(boolean conjuration) {
|
||||
if (conjuration)
|
||||
catalystState = conjurationState;
|
||||
else
|
||||
catalystState = null;
|
||||
catalystState = conjuration ? conjurationState : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -115,7 +107,7 @@ public class RecipeManaInfusion {
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean isConjuration() {
|
||||
return catalystState != null && catalystState.equals(conjurationState);
|
||||
return catalystState == conjurationState;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ public final class HUDHandler {
|
||||
profiler.startSection("poolRecipe");
|
||||
for(RecipeManaInfusion recipe : BotaniaAPI.manaInfusionRecipes) {
|
||||
if(recipe.matches(stack)) {
|
||||
if(recipe.getCatalyst() == null || tile.getWorld().getBlockState(tile.getPos().down()).equals(recipe.getCatalyst())) {
|
||||
if(recipe.getCatalyst() == tile.getWorld().getBlockState(tile.getPos().down())) {
|
||||
int x = res.getScaledWidth() / 2 - 11;
|
||||
int y = res.getScaledHeight() / 2 + 10;
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ public class TilePool extends TileMod implements IManaPool, IDyablePool, IKeyLoc
|
||||
return false;
|
||||
|
||||
for(RecipeManaInfusion recipe : BotaniaAPI.manaInfusionRecipes) {
|
||||
if(recipe.matches(stack) && (recipe.getCatalyst() == null || worldObj.getBlockState(pos.down()).equals(recipe.getCatalyst()))) {
|
||||
if(recipe.matches(stack) && (recipe.getCatalyst() == null || worldObj.getBlockState(pos.down()) == recipe.getCatalyst())) {
|
||||
int mana = recipe.getManaToConsume();
|
||||
if(getCurrentMana() >= mana) {
|
||||
recieveMana(-mana);
|
||||
|
||||
Reference in new issue
Block a user