Cleaned and generalised item loading/searching

Reimplemented subsets
Added regex searching
Fixed format error on delete all
Fixed GuiButton handling clicks before NEI widgets could override
Re-Implemented banned blocks implementation
Added brewing recipes again
note test obf ASM beacons
Fixed some calls being intercepted by item panel when mouse was over a gui element
Fixed crash on closing potion window with escape
Disabled fast transfer, scrolling, and drag 'n' drop in creative
Added item panel sorting
Removed TMI uninstaller
Fixed /give command
Updated to 1.7.10
This commit is contained in:
Chicken-Bomes committed 2014-06-29 20:42:02 +10:00
1 parent 3c9ebc6961
commit 3c84527806
67 files changed
+3251 -2319

No files matched your search

+21 -33
View File
@@ -1,76 +1,64 @@
package codechicken.nei;
import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.util.ResourceLocation;
import java.util.List;
import static codechicken.lib.gui.GuiDraw.getStringWidth;
public abstract class Button extends Widget
{
public Button(String s)
{
public Button(String s) {
label = s;
}
public Button()
{
public Button() {
label = "";
}
public int contentWidth()
{
public int contentWidth() {
return getRenderIcon() == null ? getStringWidth(label) : getRenderIcon().width;
}
@Override
public void draw(int mousex, int mousey)
{
public void draw(int mousex, int mousey) {
LayoutManager.getLayoutStyle().drawButton(this, mousex, mousey);
}
@Override
public boolean handleClick(int i, int j, int k)
{
if(k == 1 || k == 0)
if(onButtonPress(k == 1))
NEIClientUtils.mc().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
public boolean handleClick(int mx, int my, int button) {
if (button == 1 || button == 0)
if (onButtonPress(button == 1))
NEIClientUtils.playClickSound();
return true;
}
public abstract boolean onButtonPress(boolean rightclick);
public Image getRenderIcon()
{
public Image getRenderIcon() {
return icon;
}
@Override
public List<String> handleTooltip(int mx, int my, List<String> tooltip)
{
if(!contains(mx, my))
public List<String> handleTooltip(int mx, int my, List<String> tooltip) {
if (!contains(mx, my))
return tooltip;
String tip = getButtonTip();
if(tip != null)
if (tip != null)
tooltip.add(tip);
return tooltip;
}
public String getButtonTip()
{
public String getButtonTip() {
return null;
}
public String getRenderLabel()
{
public String getRenderLabel() {
return label;
}
public String label;
public Image icon;
/**
* 0x4 = state flag, as opposed to 1 click
* 0 = normal