Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added EntityPlayer in getThermalStrength for more hooks. #3782

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public interface IItemThermal
/**
* The thermal strength of this armor. Value for first tier thermal padding is 1.
*/
int getThermalStrength();
int getThermalStrength(EntityPlayer player);

/**
* Returns whether the provided itemstack is valid for the armor slot:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,19 +561,19 @@ protected void checkThermalStatus(EntityPlayerMP player, GCPlayerStats playerSta
{
if (thermalPaddingHelm.getItem() instanceof IItemThermal)
{
lowestThermalStrength += ((IItemThermal) thermalPaddingHelm.getItem()).getThermalStrength();
lowestThermalStrength += ((IItemThermal) thermalPaddingHelm.getItem()).getThermalStrength(player);
}
if (thermalPaddingChestplate.getItem() instanceof IItemThermal)
{
lowestThermalStrength += ((IItemThermal) thermalPaddingChestplate.getItem()).getThermalStrength();
lowestThermalStrength += ((IItemThermal) thermalPaddingChestplate.getItem()).getThermalStrength(player);
}
if (thermalPaddingLeggings.getItem() instanceof IItemThermal)
{
lowestThermalStrength += ((IItemThermal) thermalPaddingLeggings.getItem()).getThermalStrength();
lowestThermalStrength += ((IItemThermal) thermalPaddingLeggings.getItem()).getThermalStrength(player);
}
if (thermalPaddingBoots.getItem() instanceof IItemThermal)
{
lowestThermalStrength += ((IItemThermal) thermalPaddingBoots.getItem()).getThermalStrength();
lowestThermalStrength += ((IItemThermal) thermalPaddingBoots.getItem()).getThermalStrength(player);
}
lowestThermalStrength /= 4.0F;
lowestThermalStrength = Math.abs(lowestThermalStrength); //It shouldn't be negative, but just in case!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public int getMetadata(int par1)
}

@Override
public int getThermalStrength()
public int getThermalStrength(EntityPlayer player)
{
return 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public int getMetadata(int par1)
}

@Override
public int getThermalStrength()
public int getThermalStrength(EntityPlayer player)
{
return 2;
}
Expand Down