mirror of
https://github.com/GTNewHorizons/waila.git
synced 2026-11-24 05:54:45 +00:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23da275dfe | ||
|
|
0d36caf2e8 | ||
|
|
1dedb62d46 | ||
|
|
4745e74cc3 | ||
|
|
b6dfa3ea59 | ||
|
|
dfc7add324 | ||
|
|
35eb621ec0 |
No files matched your search
@@ -8,8 +8,7 @@ public final class Constants {
|
||||
public static String BIND_WAILA_CFG = "key.wailaconfig";
|
||||
public static String BIND_WAILA_SHOW = "key.wailadisplay";
|
||||
|
||||
public static String CFG_NEI_SHOW = "world.highlight_tips";
|
||||
public static String BIND_NEI_SHOW = "keys.world.highlight_tips";
|
||||
public static String CFG_NEI_SHOW = "options.inworld tooltips";
|
||||
|
||||
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import net.minecraft.item.Item;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import codechicken.nei.NEIClientConfig;
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.api.ItemInfo;
|
||||
import codechicken.nei.forge.GuiContainerManager;
|
||||
@@ -22,6 +21,7 @@ import mcp.mobius.waila.addons.vanillamc.HUDHandlerVanilla;
|
||||
import mcp.mobius.waila.gui.ConfigKeyHandler;
|
||||
import mcp.mobius.waila.handlers.HUDHandlerExternal;
|
||||
import mcp.mobius.waila.handlers.HUDHandlerWaila;
|
||||
import mcp.mobius.waila.handlers.HandlerEnchantment;
|
||||
import mcp.mobius.waila.handlers.SummaryProviderDefault;
|
||||
import mcp.mobius.waila.handlers.HandlerTechTree;
|
||||
import mcp.mobius.waila.handlers.TooltipHandlerWaila;
|
||||
@@ -42,16 +42,15 @@ public class ProxyClient extends ProxyServer {
|
||||
API.registerHighlightHandler(new HUDHandlerWaila(), ItemInfo.Layout.HEADER);
|
||||
|
||||
KeyBindingRegistry.registerKeyBinding(new ConfigKeyHandler());
|
||||
|
||||
ExternalModulesHandler.instance().registerShortDataProvider(new SummaryProviderDefault(), Item.class);
|
||||
|
||||
// We mute the default keybind for displaying the tooltip
|
||||
NEIClientConfig.getSetting(Constants.BIND_NEI_SHOW).setIntValue(Keyboard.KEY_NONE);
|
||||
|
||||
//GuiContainerManager.addInputHandler(new TechTreeHandler());
|
||||
//API.addKeyBind(Constants.BIND_ENCH, "Display enchantements", Keyboard.KEY_RSHIFT);
|
||||
//API.addKeyBind(Constants.BIND_WIKI, "Display wiki", Keyboard.KEY_RSHIFT);
|
||||
//API.addKeyBind(Constants.BIND_TECH, "Display techtree", Keyboard.KEY_RSHIFT);
|
||||
|
||||
ExternalModulesHandler.instance().registerShortDataProvider(new SummaryProviderDefault(), Item.class);
|
||||
//GuiContainerManager.addInputHandler(new HandlerEnchantment());
|
||||
//GuiContainerManager.addInputHandler(new HandlerWiki());
|
||||
//GuiContainerManager.addInputHandler(new HandlerTechTree());
|
||||
//API.addKeyBind(Constants.BIND_SCREEN_ENCH, "Display enchantements", Keyboard.KEY_NUMPAD7);
|
||||
//API.addKeyBind(Constants.BIND_SCREEN_WIKI, "Display wiki", Keyboard.KEY_NUMPAD8);
|
||||
//API.addKeyBind(Constants.BIND_SCREEN_TECH, "Display techtree", Keyboard.KEY_NUMPAD9);
|
||||
|
||||
this.registerMods();
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class AppEngModule {
|
||||
return;
|
||||
}
|
||||
|
||||
mod_Waila.log.log(Level.INFO, "AppEng mod found.");
|
||||
mod_Waila.log.log(Level.WARNING, "Waila module AppEng succefully hooked.");
|
||||
ExternalModulesHandler.instance().addConfig("Applied Energetic", "appeng.monitorcontent", "Monitor's content");
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDAppEngMonitor(), TileStorageMonitor);
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ public class BCModule {
|
||||
public static Class TileGenericPipe = null;
|
||||
public static Class TileEngine = null;
|
||||
|
||||
public static Method TileTank_getTankInfo = null;
|
||||
//public static Method IPowerReceptor_PowerRequest = null;
|
||||
public static Method TileTank_GetTanks = null;
|
||||
public static Method IPowerReceptor_PowerRequest = null;
|
||||
|
||||
public static void register(){
|
||||
try {
|
||||
@@ -34,8 +34,8 @@ public class BCModule {
|
||||
TileGenericPipe = Class.forName("buildcraft.transport.TileGenericPipe");
|
||||
TileEngine = Class.forName("buildcraft.energy.TileEngine");
|
||||
|
||||
TileTank_getTankInfo = TileTank.getMethod("getTankInfo", ForgeDirection.class);
|
||||
//IPowerReceptor_PowerRequest = IPowerReceptor.getMethod("powerRequest", ForgeDirection.class);
|
||||
TileTank_GetTanks = TileTank.getMethod("getTanks", ForgeDirection.class);
|
||||
IPowerReceptor_PowerRequest = IPowerReceptor.getMethod("powerRequest", ForgeDirection.class);
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
mod_Waila.log.log(Level.WARNING, "[BC] Class not found. " + e);
|
||||
@@ -47,10 +47,10 @@ public class BCModule {
|
||||
|
||||
ExternalModulesHandler.instance().addConfig("Buildcraft", "bc.tankamount", "Liquid amount");
|
||||
ExternalModulesHandler.instance().addConfig("Buildcraft", "bc.tanktype", "Liquid type");
|
||||
//ExternalModulesHandler.instance().addConfigRemote("Buildcraft", "bc.powerpipe", "Power pipes");
|
||||
ExternalModulesHandler.instance().addConfigRemote("Buildcraft", "bc.powerpipe", "Power pipes");
|
||||
ExternalModulesHandler.instance().registerHeadProvider(new HUDHandlerBCTanks(), TileTank);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerBCTanks(), TileTank);
|
||||
//ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerBCPipes(), TileGenericPipe);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerBCPipes(), TileGenericPipe);
|
||||
//ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerBCEngine(), TileEngine);
|
||||
//ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerBCIPowerReceptor(), PipeTransportPower);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class HUDHandlerBCIPowerReceptor implements IWailaDataProvider {
|
||||
// }
|
||||
// currenttip.add(String.valueOf(powerRequest));
|
||||
|
||||
// NBTTagCompound tag = accessor.getNBTData();
|
||||
NBTTagCompound tag = accessor.getNBTData();
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
package mcp.mobius.waila.addons.buildcraft;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.tools.Reflect;
|
||||
|
||||
public class HUDHandlerBCPipes implements IWailaDataProvider {
|
||||
@Override
|
||||
@@ -32,8 +30,7 @@ public class HUDHandlerBCPipes implements IWailaDataProvider {
|
||||
}
|
||||
|
||||
public boolean hasPartialKey(NBTTagCompound tag, String key){
|
||||
Map tagMap = (Map)Reflect.getFieldValue("net.minecraft.nbt.NBTTagCompound", "tagMap", tag);
|
||||
for (Object k : tagMap.keySet())
|
||||
for (Object k : tag.tagMap.keySet())
|
||||
if (((String)k).contains(key))
|
||||
return true;
|
||||
return false;
|
||||
@@ -41,8 +38,7 @@ public class HUDHandlerBCPipes implements IWailaDataProvider {
|
||||
|
||||
public double getPartialKeySum(NBTTagCompound tag, String key){
|
||||
double retVal = 0;
|
||||
Map tagMap = (Map)Reflect.getFieldValue("net.minecraft.nbt.NBTTagCompound", "tagMap", tag);
|
||||
for (Object k : tagMap.keySet())
|
||||
for (Object k : tag.tagMap.keySet())
|
||||
if (((String)k).contains(key))
|
||||
retVal += tag.getDouble((String)k);
|
||||
return retVal;
|
||||
|
||||
@@ -5,9 +5,6 @@ import java.util.logging.Level;
|
||||
|
||||
//import buildcraft.factory.TileTank;
|
||||
|
||||
|
||||
|
||||
|
||||
import mcp.mobius.waila.mod_Waila;
|
||||
import mcp.mobius.waila.addons.ConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
@@ -15,9 +12,6 @@ import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import net.minecraftforge.liquids.ILiquidTank;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
|
||||
@@ -30,13 +24,12 @@ public class HUDHandlerBCTanks implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
FluidTankInfo tank = this.getTank(accessor);
|
||||
FluidStack stack = tank != null ? tank.fluid : null;
|
||||
|
||||
ILiquidTank tank = this.getTank(accessor);
|
||||
LiquidStack stack = tank != null ? tank.getLiquid() : null;
|
||||
|
||||
String name = currenttip.get(0);
|
||||
if (stack != null && ConfigHandler.instance().getConfig("bc.tanktype"))
|
||||
name = name + " (" + stack.getFluid().getName() + ")";
|
||||
name = name + " (" + stack.asItemStack().getDisplayName() + ")";
|
||||
else if (stack == null && ConfigHandler.instance().getConfig("bc.tanktype"))
|
||||
name = name + " <Empty>";
|
||||
currenttip.set(0, name);
|
||||
@@ -45,10 +38,10 @@ public class HUDHandlerBCTanks implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
FluidTankInfo tank = this.getTank(accessor);
|
||||
FluidStack stack = tank != null ? tank.fluid : null;
|
||||
int liquidAmount = stack != null ? stack.amount:0;
|
||||
int capacity = tank != null ? tank.capacity : 0;
|
||||
ILiquidTank tank = this.getTank(accessor);
|
||||
LiquidStack stack = tank != null ? tank.getLiquid() : null;
|
||||
int liquidAmount = stack != null ? stack.amount:0;
|
||||
int capacity = tank != null ? tank.getCapacity() : 0;
|
||||
|
||||
if (ConfigHandler.instance().getConfig("bc.tankamount"))
|
||||
currenttip.add(String.valueOf(liquidAmount) + "/" + String.valueOf(capacity) + " mB");
|
||||
@@ -56,10 +49,10 @@ public class HUDHandlerBCTanks implements IWailaDataProvider {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
public FluidTankInfo getTank(IWailaDataAccessor accessor){
|
||||
FluidTankInfo tank = null;
|
||||
public ILiquidTank getTank(IWailaDataAccessor accessor){
|
||||
ILiquidTank tank = null;
|
||||
try{
|
||||
tank = ((FluidTankInfo[])BCModule.TileTank_getTankInfo.invoke(BCModule.TileTank.cast(accessor.getTileEntity()), ForgeDirection.UNKNOWN))[0];
|
||||
tank = ((ILiquidTank[])BCModule.TileTank_GetTanks.invoke(BCModule.TileTank.cast(accessor.getTileEntity()), ForgeDirection.UNKNOWN))[0];
|
||||
} catch (Exception e){
|
||||
mod_Waila.log.log(Level.SEVERE, "[BC] Unhandled exception trying to access a tank for display !.\n" + String.valueOf(e));
|
||||
return null;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class HUDHandlerVanilla implements IWailaDataProvider {
|
||||
/* Mob spawner handler */
|
||||
if (blockID == mobSpawnerID && accessor.getTileEntity() instanceof TileEntityMobSpawner && config.getConfig("vanilla.spawntype")){
|
||||
String name = currenttip.get(0);
|
||||
String mobname = ((TileEntityMobSpawner)accessor.getTileEntity()).getSpawnerLogic().getEntityNameToSpawn();
|
||||
String mobname = ((TileEntityMobSpawner)accessor.getTileEntity()).func_98049_a().getEntityNameToSpawn();
|
||||
currenttip.set(0, String.format("%s (%s)", name, mobname));
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.RenderEngine;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
|
||||
public abstract class BaseWidget implements IWidget {
|
||||
|
||||
@@ -20,7 +20,7 @@ public abstract class BaseWidget implements IWidget {
|
||||
protected int posX, posY, posZ;
|
||||
protected GuiScreen parent;
|
||||
protected FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer;;
|
||||
protected TextureManager renderEngine = Minecraft.getMinecraft().renderEngine;
|
||||
protected RenderEngine renderEngine = Minecraft.getMinecraft().renderEngine;
|
||||
protected HashMap<String, IWidget> widgets = new HashMap<String, IWidget>();
|
||||
protected IWidget[] focusWidget = new IWidget[Mouse.getButtonCount()];
|
||||
protected IWidget mainFocusWidget = null;
|
||||
|
||||
@@ -4,6 +4,7 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.RenderEngine;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
|
||||
@@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL11;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class Button2States extends GuiButton {
|
||||
|
||||
@@ -51,11 +50,7 @@ public class Button2States extends GuiButton {
|
||||
if (this.drawButton)
|
||||
{
|
||||
FontRenderer fontrenderer = par1Minecraft.fontRenderer;
|
||||
|
||||
//DONE : Changed from v1.5.2 to 1.6.2 resource handling
|
||||
//par1Minecraft.renderEngine.bindTexture("/gui/gui.png");
|
||||
ResourceLocation guipng = new ResourceLocation("textures/gui/widgets.png");
|
||||
par1Minecraft.renderEngine.func_110577_a(guipng);
|
||||
par1Minecraft.renderEngine.bindTexture("/gui/gui.png");
|
||||
|
||||
if (this.labelSize == -1)
|
||||
labelSize = fontrenderer.getStringWidth(this.label) + 5;
|
||||
|
||||
@@ -50,7 +50,7 @@ public class HandlerEnchantment implements IContainerInputHandler {
|
||||
|
||||
Enchantment[] enchants = null;
|
||||
if (stackover.getItem() == Item.book)
|
||||
enchants = Enchantment.enchantmentsBookList;
|
||||
enchants = Enchantment.field_92090_c;
|
||||
else
|
||||
enchants = Enchantment.enchantmentsList;
|
||||
|
||||
|
||||
@@ -24,22 +24,7 @@ import codechicken.nei.forge.IContainerInputHandler;
|
||||
|
||||
public class HandlerTechTree implements IContainerInputHandler {
|
||||
|
||||
public HandlerTechTree() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean keyTyped(GuiContainer gui, char keyChar, int keyCode) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onKeyTyped(GuiContainer gui, char keyChar, int keyID) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public HandlerTechTree() {}
|
||||
|
||||
@Override
|
||||
public boolean lastKeyTyped(GuiContainer gui, char keyChar, int keyID) {
|
||||
@@ -54,42 +39,6 @@ public class HandlerTechTree implements IContainerInputHandler {
|
||||
LinkedHashMap<Integer, ArrayList<CraftingTreeNode>> layers = new LinkedHashMap<Integer, ArrayList<CraftingTreeNode>> ();
|
||||
CraftingTreeNode tree = new CraftingTreeNode(null, stackover, 0, layers);
|
||||
|
||||
/*
|
||||
LinkedHashMap<Integer, ArrayList<CraftingTreeNode>> curratedLayers = new LinkedHashMap<Integer, ArrayList<CraftingTreeNode>> ();
|
||||
|
||||
for (int layer : layers.keySet())
|
||||
curratedLayers.put(layer, new ArrayList<CraftingTreeNode>());
|
||||
|
||||
for (int i = 0; i < (layers.size() - 1) ; i++)
|
||||
for (CraftingTreeNode node : layers.get(i)){
|
||||
if (node.bottomNodes.size() != 0){
|
||||
curratedLayers.get(i).add(node);
|
||||
|
||||
}
|
||||
else{
|
||||
node.layer += 1;
|
||||
layers.get(i+1).add(node);
|
||||
}
|
||||
}
|
||||
|
||||
for (CraftingTreeNode node : layers.get(layers.keySet().size()-1))
|
||||
curratedLayers.get(layers.keySet().size()-1).add(node);
|
||||
|
||||
System.out.printf("%s\n", curratedLayers);
|
||||
*/
|
||||
|
||||
/*
|
||||
for (int layer = curratedLayers.keySet().size() - 1; layer >= 0; layer--){
|
||||
int offsetX = 0;
|
||||
for (int icompo = 0; icompo < curratedLayers.get(layer).size(); icompo++){
|
||||
ComponentDisplay componentDisplay = new ComponentDisplay(techScreen, curratedLayers.get(layer).get(icompo));
|
||||
componentDisplay.setBackgroundColor(0xddeeeed1);
|
||||
techScreen.widViewport.addWidget(componentDisplay, offsetX, layer*32, 0);
|
||||
offsetX += componentDisplay.getWidth() + 8;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
for (int layer = layers.keySet().size() - 1; layer >= 0; layer--){
|
||||
int offsetX = 0;
|
||||
for (int icompo = 0; icompo < layers.get(layer).size(); icompo++){
|
||||
@@ -107,46 +56,22 @@ public class HandlerTechTree implements IContainerInputHandler {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean mouseClicked(GuiContainer gui, int mousex, int mousey,
|
||||
int button) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean keyTyped(GuiContainer gui, char keyChar, int keyCode) { return false; }
|
||||
@Override
|
||||
public void onMouseClicked(GuiContainer gui, int mousex, int mousey,
|
||||
int button) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public void onKeyTyped(GuiContainer gui, char keyChar, int keyID) { }
|
||||
@Override
|
||||
public void onMouseUp(GuiContainer gui, int mousex, int mousey, int button) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public boolean mouseClicked(GuiContainer gui, int mousex, int mousey, int button) { return false; }
|
||||
@Override
|
||||
public boolean mouseScrolled(GuiContainer gui, int mousex, int mousey,
|
||||
int scrolled) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
public void onMouseClicked(GuiContainer gui, int mousex, int mousey, int button) { }
|
||||
@Override
|
||||
public void onMouseScrolled(GuiContainer gui, int mousex, int mousey,
|
||||
int scrolled) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public void onMouseUp(GuiContainer gui, int mousex, int mousey, int button) { }
|
||||
@Override
|
||||
public void onMouseDragged(GuiContainer gui, int mousex, int mousey,
|
||||
int button, long heldTime) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
public boolean mouseScrolled(GuiContainer gui, int mousex, int mousey, int scrolled) { return false; }
|
||||
@Override
|
||||
public void onMouseScrolled(GuiContainer gui, int mousex, int mousey, int scrolled) { }
|
||||
@Override
|
||||
public void onMouseDragged(GuiContainer gui, int mousex, int mousey, int button, long heldTime) { }
|
||||
|
||||
}
|
||||
@@ -82,56 +82,20 @@ public class HandlerWiki implements IContainerInputHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean keyTyped(GuiContainer gui, char keyChar, int keyCode) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean keyTyped(GuiContainer gui, char keyChar, int keyCode) { return false; }
|
||||
@Override
|
||||
public void onKeyTyped(GuiContainer gui, char keyChar, int keyID) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public void onKeyTyped(GuiContainer gui, char keyChar, int keyID) { }
|
||||
@Override
|
||||
public boolean mouseClicked(GuiContainer gui, int mousex, int mousey,
|
||||
int button) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean mouseClicked(GuiContainer gui, int mousex, int mousey, int button) { return false; }
|
||||
@Override
|
||||
public void onMouseClicked(GuiContainer gui, int mousex, int mousey,
|
||||
int button) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public void onMouseClicked(GuiContainer gui, int mousex, int mousey, int button) { }
|
||||
@Override
|
||||
public void onMouseUp(GuiContainer gui, int mousex, int mousey, int button) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public void onMouseUp(GuiContainer gui, int mousex, int mousey, int button) { }
|
||||
@Override
|
||||
public boolean mouseScrolled(GuiContainer gui, int mousex, int mousey,
|
||||
int scrolled) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean mouseScrolled(GuiContainer gui, int mousex, int mousey, int scrolled) { return false; }
|
||||
@Override
|
||||
public void onMouseScrolled(GuiContainer gui, int mousex, int mousey,
|
||||
int scrolled) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public void onMouseScrolled(GuiContainer gui, int mousex, int mousey, int scrolled) { }
|
||||
@Override
|
||||
public void onMouseDragged(GuiContainer gui, int mousex, int mousey,
|
||||
int button, long heldTime) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
public void onMouseDragged(GuiContainer gui, int mousex, int mousey, int button, long heldTime) { }
|
||||
|
||||
}
|
||||
@@ -176,7 +176,7 @@ public class SummaryProviderDefault implements IWailaSummaryProvider {
|
||||
return material!=null?material.getEnchantability():null;
|
||||
}
|
||||
|
||||
public Float getDamageVsEntity(ItemStack stack){
|
||||
public Integer getDamageVsEntity(ItemStack stack){
|
||||
EnumToolMaterial material = this.getToolMaterial(stack);
|
||||
return material!=null?material.getDamageVsEntity():null;
|
||||
}
|
||||
|
||||
@@ -34,8 +34,8 @@ import cpw.mods.fml.common.registry.GameData;
|
||||
import cpw.mods.fml.common.registry.ItemData;
|
||||
|
||||
@Mod(modid="Waila", name="Waila", version="1.3.9")
|
||||
@NetworkMod(channels = {"Waila"},clientSideRequired=false, serverSideRequired=false, connectionHandler = WailaConnectionHandler.class,
|
||||
packetHandler = WailaPacketHandler.class, versionBounds="[1.3.0,)")
|
||||
@NetworkMod(channels = {"Waila"},clientSideRequired=false, serverSideRequired=false,
|
||||
connectionHandler = WailaConnectionHandler.class, packetHandler = WailaPacketHandler.class, versionBounds="[1.3.0,)")
|
||||
|
||||
public class mod_Waila {
|
||||
// The instance of your mod that Forge uses.
|
||||
|
||||
@@ -36,7 +36,7 @@ public class Packet0x01TERequest {
|
||||
|
||||
try{
|
||||
outputStream.writeByte(0x01);
|
||||
outputStream.writeInt(world.provider.dimensionId);
|
||||
outputStream.writeInt(world.getWorldInfo().getDimension());
|
||||
outputStream.writeInt(mop.blockX);
|
||||
outputStream.writeInt(mop.blockY);
|
||||
outputStream.writeInt(mop.blockZ);
|
||||
|
||||
Reference in new issue
Block a user