mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-25 22:44:44 +00:00
More sounds for more things. Lexicon and Mana Blaster.
This commit is contained in:
1 parent
a6144eca6d
commit
4c5857701f
7 files changed
+43
-6
No files matched your search
@@ -15,7 +15,10 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.audio.SoundHandler;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -23,7 +26,7 @@ import org.lwjgl.opengl.GL11;
|
||||
import vazkii.botania.client.core.helper.RenderHelper;
|
||||
import vazkii.botania.client.gui.lexicon.GuiLexicon;
|
||||
|
||||
public class GuiButtonBack extends GuiButton {
|
||||
public class GuiButtonBack extends GuiButtonLexicon {
|
||||
|
||||
public GuiButtonBack(int par1, int par2, int par3) {
|
||||
super(par1, par2, par3, 18, 9, "");
|
||||
@@ -43,7 +46,7 @@ public class GuiButtonBack extends GuiButton {
|
||||
if(k == 2)
|
||||
RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip);
|
||||
}
|
||||
|
||||
|
||||
public List<String> getTooltip() {
|
||||
return Arrays.asList(StatCollector.translateToLocal("botaniamisc.back"));
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import net.minecraft.util.StatCollector;
|
||||
import vazkii.botania.client.core.helper.RenderHelper;
|
||||
import vazkii.botania.client.gui.lexicon.GuiLexicon;
|
||||
|
||||
public class GuiButtonBookmark extends GuiButton {
|
||||
public class GuiButtonBookmark extends GuiButtonLexicon {
|
||||
|
||||
GuiLexicon gui = new GuiLexicon();
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ package vazkii.botania.client.gui.lexicon.button;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
|
||||
public class GuiButtonInvisible extends GuiButton {
|
||||
public class GuiButtonInvisible extends GuiButtonLexicon {
|
||||
|
||||
public GuiButtonInvisible(int par1, int par2, int par3, int par4, int par5, String par6Str) {
|
||||
super(par1, par2, par3, par4, par5, par6Str);
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Aug 7, 2014, 5:53:16 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.gui.lexicon.button;
|
||||
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.audio.SoundHandler;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GuiButtonLexicon extends GuiButton {
|
||||
|
||||
public GuiButtonLexicon(int p_i1021_1_, int p_i1021_2_, int p_i1021_3_, int p_i1021_4_, int p_i1021_5_, String p_i1021_6_) {
|
||||
super(p_i1021_1_, p_i1021_2_, p_i1021_3_, p_i1021_4_, p_i1021_5_, p_i1021_6_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_146113_a(SoundHandler p_146113_1_) {
|
||||
p_146113_1_.playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("botania:lexiconPage"), 1.0F));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,7 +22,7 @@ import org.lwjgl.opengl.GL11;
|
||||
import vazkii.botania.client.core.helper.RenderHelper;
|
||||
import vazkii.botania.client.gui.lexicon.GuiLexicon;
|
||||
|
||||
public class GuiButtonPage extends GuiButton {
|
||||
public class GuiButtonPage extends GuiButtonLexicon {
|
||||
|
||||
boolean right;
|
||||
|
||||
|
||||
@@ -59,6 +59,8 @@ public class ItemLexicon extends ItemMod implements ILexicon, IElvenItem {
|
||||
if(entry != null) {
|
||||
Botania.proxy.setEntryToOpen(entry);
|
||||
par2EntityPlayer.openGui(Botania.instance, LibGuiIDs.LEXICON, par3World, 0, 0, 0);
|
||||
if(!par3World.isRemote)
|
||||
par3World.playSoundAtEntity(par2EntityPlayer, "botania:lexiconOpen", 0.5F, 1F);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -118,6 +120,8 @@ public class ItemLexicon extends ItemMod implements ILexicon, IElvenItem {
|
||||
forceMessage(par1ItemStack, false);
|
||||
}
|
||||
par3EntityPlayer.openGui(Botania.instance, LibGuiIDs.LEXICON, par2World, 0, 0, 0);
|
||||
if(!par2World.isRemote)
|
||||
par2World.playSoundAtEntity(par3EntityPlayer, "botania:lexiconOpen", 0.5F, 1F);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ public class ItemManaGun extends ItemMod implements IManaUsingItem {
|
||||
EntityManaBurst burst = getBurst(par3EntityPlayer, par1ItemStack, true);
|
||||
if(burst != null && ManaItemHandler.requestManaExact(par1ItemStack, par3EntityPlayer, burst.getMana(), true)) {
|
||||
if(!par2World.isRemote) {
|
||||
par2World.playSoundAtEntity(par3EntityPlayer, "random.explode", 0.9F, 3F);
|
||||
par2World.playSoundAtEntity(par3EntityPlayer, "botania:manaBlaster", 0.6F, 1F);
|
||||
par2World.spawnEntityInWorld(burst);
|
||||
} else {
|
||||
par3EntityPlayer.swingItem();
|
||||
|
||||
Reference in new issue
Block a user