Initial 1.11.2 update

This commit is contained in:
Electroblob
2018-02-07 21:15:50 +00:00
parent 67f6be0671
commit 3df5597dcc
368 changed files with 17234 additions and 15082 deletions
@@ -11,32 +11,34 @@ import net.minecraftforge.fml.relauncher.SideOnly;
/** Class for all potions that work on events only. */
public class PotionMagicEffect extends Potion {
private static final ResourceLocation ICONS = new ResourceLocation(Wizardry.MODID, "textures/gui/potion_icons.png");
private final int textureIndex;
public PotionMagicEffect(boolean isBadEffect, int liquidColour, int textureIndex) {
public PotionMagicEffect(boolean isBadEffect, int liquidColour, int textureIndex){
super(isBadEffect, liquidColour);
this.textureIndex = textureIndex;
}
@Override
public void performEffect(EntityLivingBase entitylivingbase, int strength) {
public void performEffect(EntityLivingBase entitylivingbase, int strength){
// Nothing here because this potion works on events.
}
}
@Override
@SideOnly(Side.CLIENT)
public void renderInventoryEffect(int x, int y, PotionEffect effect, net.minecraft.client.Minecraft mc){
mc.renderEngine.bindTexture(ICONS);
WizardryUtilities.drawTexturedRect(x + 6, y + 7, 18*(textureIndex%4), 18*(textureIndex/4), 18, 18, 72, 72);
}
@Override
@SideOnly(Side.CLIENT)
public void renderHUDEffect(int x, int y, PotionEffect effect, net.minecraft.client.Minecraft mc, float alpha) {
public void renderInventoryEffect(int x, int y, PotionEffect effect, net.minecraft.client.Minecraft mc){
mc.renderEngine.bindTexture(ICONS);
WizardryUtilities.drawTexturedRect(x + 3, y + 3, 18*(textureIndex%4), 18*(textureIndex/4), 18, 18, 72, 72);
WizardryUtilities.drawTexturedRect(x + 6, y + 7, 18 * (textureIndex % 4), 18 * (textureIndex / 4), 18, 18, 72,
72);
}
@Override
@SideOnly(Side.CLIENT)
public void renderHUDEffect(int x, int y, PotionEffect effect, net.minecraft.client.Minecraft mc, float alpha){
mc.renderEngine.bindTexture(ICONS);
WizardryUtilities.drawTexturedRect(x + 3, y + 3, 18 * (textureIndex % 4), 18 * (textureIndex / 4), 18, 18, 72,
72);
}
}