Replace branch with old 1.7.10 code and assets
This commit is contained in:
@@ -1,20 +1,17 @@
|
||||
package electroblob.wizardry.client;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import cpw.mods.fml.client.config.GuiButtonExt;
|
||||
import cpw.mods.fml.client.config.GuiEditArray;
|
||||
import cpw.mods.fml.client.config.GuiEditArrayEntries;
|
||||
import cpw.mods.fml.client.config.GuiSelectString;
|
||||
import cpw.mods.fml.client.config.GuiUtils;
|
||||
import cpw.mods.fml.client.config.GuiEditArrayEntries.StringEntry;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraftforge.fml.client.config.GuiButtonExt;
|
||||
import net.minecraftforge.fml.client.config.GuiEditArray;
|
||||
import net.minecraftforge.fml.client.config.GuiEditArrayEntries;
|
||||
import net.minecraftforge.fml.client.config.GuiEditArrayEntries.StringEntry;
|
||||
import net.minecraftforge.fml.client.config.GuiSelectString;
|
||||
import net.minecraftforge.fml.client.config.IConfigElement;
|
||||
import cpw.mods.fml.client.config.IConfigElement;
|
||||
|
||||
/** [NYI] Intended as a way of choosing entities by name from all those currently registered, within the config file, so
|
||||
* that users don't have to look up the entity IDs. I can't get this to work correctly at the moment. */
|
||||
public class EntityNameEntry extends StringEntry {
|
||||
|
||||
protected final GuiButtonExt btnValue;
|
||||
@@ -26,9 +23,9 @@ public class EntityNameEntry extends StringEntry {
|
||||
this.btnValue = new GuiButtonExt(0, 0, 0, owningEntryList.controlWidth, 18, I18n.format(this.textFieldValue.getText()));
|
||||
//this.btnValue.enabled = owningScreen.enabled;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected)
|
||||
public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, Tessellator tessellator, int mouseX, int mouseY, boolean isSelected)
|
||||
{
|
||||
//super.drawEntry(slotIndex, x, y, listWidth, slotHeight, tessellator, mouseX, mouseY, isSelected);
|
||||
this.btnValue.xPosition = listWidth / 4;
|
||||
@@ -41,18 +38,19 @@ public class EntityNameEntry extends StringEntry {
|
||||
this.btnValue.displayString = this.textFieldValue.getText();
|
||||
//btnValue.packedFGColour = value ? GuiUtils.getColorCode('2', true) : GuiUtils.getColorCode('4', true);
|
||||
|
||||
this.btnValue.drawButton(owningEntryList.getMC(), mouseX, mouseY);
|
||||
this.btnValue.drawButton(owningEntryList.mc, mouseX, mouseY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the mouse has been pressed on this control.
|
||||
*/
|
||||
@Override
|
||||
public boolean mousePressed(int index, int x, int y, int mouseEvent, int relativeX, int relativeY)
|
||||
{
|
||||
if (this.btnValue.mousePressed(owningEntryList.getMC(), x, y))
|
||||
if (this.btnValue.mousePressed(owningEntryList.mc, x, y))
|
||||
{
|
||||
btnValue.playPressSound(owningEntryList.getMC().getSoundHandler());
|
||||
// Some sort of type incompatiblity meant that I had to do this first.
|
||||
Map<Object, String> map = new HashMap<Object, String>(EntityList.CLASS_TO_NAME);
|
||||
Minecraft.getMinecraft().displayGuiScreen(new GuiSelectString(this.owningScreen, configElement, index, map, this.getValue(), true));
|
||||
btnValue.func_146113_a(owningEntryList.mc.getSoundHandler());
|
||||
Minecraft.getMinecraft().displayGuiScreen(new GuiSelectString(this.owningScreen, configElement, index, EntityList.classToStringMapping, this.getValue(), true));
|
||||
owningEntryList.recalculateState();
|
||||
return true;
|
||||
}
|
||||
@@ -60,6 +58,9 @@ public class EntityNameEntry extends StringEntry {
|
||||
return super.mousePressed(index, x, y, mouseEvent, relativeX, relativeY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when the mouse button is released. Arguments: index, x, y, mouseEvent, relativeX, relativeY
|
||||
*/
|
||||
@Override
|
||||
public void mouseReleased(int index, int x, int y, int mouseEvent, int relativeX, int relativeY)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user