mirror of
https://github.com/GTNewHorizons/waila.git
synced 2026-11-15 17:44:46 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72c91a3700 | ||
|
|
bf6d309038 | ||
|
|
5bb7f7221a | ||
|
|
6278e4d575 | ||
|
|
7a46d914db | ||
|
|
d30d8ba100 | ||
|
|
490a176446 | ||
|
|
453a8f50a7 | ||
|
|
d946500c0d | ||
|
|
487829a16e |
No files matched your search
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
implementation('com.github.GTNewHorizons:NotEnoughItems:2.7.45-GTNH:dev')
|
||||
implementation('com.github.GTNewHorizons:NotEnoughItems:2.7.59-GTNH:dev')
|
||||
|
||||
shadowImplementation('au.com.bytecode:opencsv:2.4')
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package mcp.mobius.waila;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
@@ -8,11 +7,7 @@ import net.minecraftforge.common.MinecraftForge;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import com.google.common.eventbus.EventBus;
|
||||
import com.google.common.eventbus.Subscribe;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.FMLModContainer;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
@@ -69,18 +64,10 @@ public class Waila {
|
||||
|
||||
@EventHandler
|
||||
public void initialize(FMLInitializationEvent event) {
|
||||
try {
|
||||
Field eBus = FMLModContainer.class.getDeclaredField("eventBus");
|
||||
eBus.setAccessible(true);
|
||||
EventBus FMLbus = (EventBus) eBus.get(FMLCommonHandler.instance().findContainerFor(this));
|
||||
FMLbus.register(this);
|
||||
} catch (Throwable ignored) {}
|
||||
|
||||
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) {
|
||||
MinecraftForge.EVENT_BUS.register(new DecoratorRenderer());
|
||||
FMLCommonHandler.instance().bus().register(new KeyEvent());
|
||||
FMLCommonHandler.instance().bus().register(WailaTickHandler.instance());
|
||||
|
||||
FMLCommonHandler.instance().bus().register(new WailaTickHandler());
|
||||
}
|
||||
FMLCommonHandler.instance().bus().register(new NetworkHandler());
|
||||
}
|
||||
@@ -91,7 +78,7 @@ public class Waila {
|
||||
ModIdentification.init();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
@EventHandler
|
||||
public void loadComplete(FMLLoadCompleteEvent event) {
|
||||
proxy.registerMods();
|
||||
proxy.registerIMCs();
|
||||
|
||||
@@ -134,6 +134,10 @@ public class ConfigHandler implements IWailaConfigHandler {
|
||||
return getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, true);
|
||||
}
|
||||
|
||||
public boolean showIcon() {
|
||||
return getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOWICON, true);
|
||||
}
|
||||
|
||||
/* Default config loading */
|
||||
|
||||
public void loadDefaultConfig(FMLPreInitializationEvent event) {
|
||||
@@ -145,6 +149,7 @@ public class ConfigHandler implements IWailaConfigHandler {
|
||||
config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_METADATA, false);
|
||||
config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_KEYBIND, true);
|
||||
config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_NEWFILTERS, true);
|
||||
config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOWICON, true);
|
||||
|
||||
OverlayConfig.posX = config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_POSX, 5000).getInt();
|
||||
OverlayConfig.posY = config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_POSY, 100).getInt();
|
||||
|
||||
@@ -10,6 +10,7 @@ import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.InputEvent.KeyInputEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import mcp.mobius.waila.api.impl.ConfigHandler;
|
||||
import mcp.mobius.waila.gui.screens.config.ScreenConfig;
|
||||
import mcp.mobius.waila.handlers.nei.NEIHandler;
|
||||
@@ -70,4 +71,15 @@ public class KeyEvent {
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void tickClient(TickEvent.ClientTickEvent event) {
|
||||
if (event.phase == TickEvent.Phase.START) return;
|
||||
if (!KeyEvent.key_show.getIsKeyPressed()
|
||||
&& !ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_MODE, false)
|
||||
&& ConfigHandler.instance()
|
||||
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, false)) {
|
||||
ConfigHandler.instance().setConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -68,7 +68,9 @@ public class ProxyClient extends ProxyServer {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onWorldUnload(WorldEvent.Unload event) {
|
||||
DataAccessorCommon.instance = new DataAccessorCommon();
|
||||
if (event.world.isRemote) {
|
||||
DataAccessorCommon.instance = new DataAccessorCommon();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,6 +84,16 @@ public class ScreenWailaConfig extends ScreenBase {
|
||||
"screen.button.no",
|
||||
"screen.button.yes"),
|
||||
"choice.shifttoggledents");
|
||||
buttonContainer.addButton(
|
||||
new ButtonBooleanConfig(
|
||||
this.getRoot(),
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
Constants.CFG_WAILA_SHOWICON,
|
||||
true,
|
||||
false,
|
||||
"screen.button.no",
|
||||
"screen.button.yes"),
|
||||
"choice.showicon");
|
||||
|
||||
this.getRoot().addWidget("LayoutConfigPos", new LayoutBase(this.getRoot()));
|
||||
this.getRoot().getWidget("LayoutConfigPos")
|
||||
|
||||
@@ -16,17 +16,13 @@ public class OverlayConfig {
|
||||
public static int fontcolor;
|
||||
public static float scale;
|
||||
|
||||
// spotless:off
|
||||
public static void updateColors() {
|
||||
OverlayConfig.alpha = (int) (ConfigHandler.instance()
|
||||
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_ALPHA, 0) / 100.0f
|
||||
* 256) << 24;
|
||||
OverlayConfig.bgcolor = OverlayConfig.alpha
|
||||
+ ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_BGCOLOR, 0);
|
||||
OverlayConfig.gradient1 = OverlayConfig.alpha
|
||||
+ ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_GRADIENT1, 0);
|
||||
OverlayConfig.gradient2 = OverlayConfig.alpha
|
||||
+ ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_GRADIENT2, 0);
|
||||
OverlayConfig.fontcolor = OverlayConfig.alpha
|
||||
+ ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_FONTCOLOR, 0);
|
||||
alpha = (int) (ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_ALPHA, 0) / 100.0f * 255f) << 24;
|
||||
bgcolor = alpha + ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_BGCOLOR, 0);
|
||||
gradient1 = alpha + ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_GRADIENT1, 0);
|
||||
gradient2 = alpha + ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_GRADIENT2, 0);
|
||||
fontcolor = ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_FONTCOLOR, 0);
|
||||
}
|
||||
// spotless:on
|
||||
}
|
||||
@@ -11,16 +11,11 @@ import mcp.mobius.waila.api.impl.ConfigHandler;
|
||||
|
||||
public class OverlayRenderer {
|
||||
|
||||
protected static boolean hasBlending;
|
||||
protected static boolean hasLight;
|
||||
protected static boolean hasDepthTest;
|
||||
protected static boolean hasLight0;
|
||||
protected static boolean hasLight1;
|
||||
protected static boolean hasRescaleNormal;
|
||||
protected static boolean hasColorMaterial;
|
||||
protected static int boundTexIndex;
|
||||
private static boolean hasBlending;
|
||||
private static boolean hasDepthTest;
|
||||
private static int boundTexIndex;
|
||||
|
||||
public static void renderOverlay() {
|
||||
public static void renderOverlay(Tooltip tooltip) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
if (!(mc.currentScreen == null && mc.theWorld != null
|
||||
&& Minecraft.isGuiEnabled()
|
||||
@@ -31,16 +26,16 @@ public class OverlayRenderer {
|
||||
|
||||
if (RayTracing.instance().getTarget().typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK
|
||||
&& RayTracing.instance().getTargetStack() != null) {
|
||||
renderOverlay(WailaTickHandler.instance().tooltip);
|
||||
doRenderOverlay(tooltip);
|
||||
}
|
||||
|
||||
if (RayTracing.instance().getTarget().typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY
|
||||
&& ConfigHandler.instance().getConfig("general.showents")) {
|
||||
renderOverlay(WailaTickHandler.instance().tooltip);
|
||||
doRenderOverlay(tooltip);
|
||||
}
|
||||
}
|
||||
|
||||
public static void renderOverlay(Tooltip tooltip) {
|
||||
private static void doRenderOverlay(Tooltip tooltip) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
saveGLState();
|
||||
@@ -80,26 +75,23 @@ public class OverlayRenderer {
|
||||
|
||||
}
|
||||
|
||||
public static void saveGLState() {
|
||||
private static void saveGLState() {
|
||||
hasBlending = GL11.glGetBoolean(GL11.GL_BLEND);
|
||||
hasLight = GL11.glGetBoolean(GL11.GL_LIGHTING);
|
||||
hasDepthTest = GL11.glGetBoolean(GL11.GL_DEPTH_TEST);
|
||||
boundTexIndex = GL11.glGetInteger(GL11.GL_TEXTURE_BINDING_2D);
|
||||
GL11.glPushAttrib(GL11.GL_CURRENT_BIT);
|
||||
}
|
||||
|
||||
public static void loadGLState() {
|
||||
private static void loadGLState() {
|
||||
if (hasBlending) GL11.glEnable(GL11.GL_BLEND);
|
||||
else GL11.glDisable(GL11.GL_BLEND);
|
||||
if (hasLight1) GL11.glEnable(GL11.GL_LIGHT1);
|
||||
else GL11.glDisable(GL11.GL_LIGHT1);
|
||||
if (hasDepthTest) GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
else GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, boundTexIndex);
|
||||
GL11.glPopAttrib();
|
||||
}
|
||||
|
||||
public static void drawTooltipBox(int x, int y, int w, int h, int bg, int grad1, int grad2) {
|
||||
private static void drawTooltipBox(int x, int y, int w, int h, int bg, int grad1, int grad2) {
|
||||
DisplayUtil.drawGradientRect(x + 1, y, w - 1, 1, bg, bg);
|
||||
DisplayUtil.drawGradientRect(x + 1, y + h, w - 1, 1, bg, bg);
|
||||
DisplayUtil.drawGradientRect(x + 1, y + 1, w - 1, h - 1, bg, bg);// center
|
||||
@@ -107,7 +99,6 @@ public class OverlayRenderer {
|
||||
DisplayUtil.drawGradientRect(x + w, y + 1, 1, h - 1, bg, bg);
|
||||
DisplayUtil.drawGradientRect(x + 1, y + 2, 1, h - 3, grad1, grad2);
|
||||
DisplayUtil.drawGradientRect(x + w - 1, y + 2, 1, h - 3, grad1, grad2);
|
||||
|
||||
DisplayUtil.drawGradientRect(x + 1, y + 1, w - 1, 1, grad1, grad1);
|
||||
DisplayUtil.drawGradientRect(x + 1, y + h - 1, w - 1, 1, grad2, grad2);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import mcp.mobius.waila.utils.Constants;
|
||||
|
||||
public class RayTracing {
|
||||
|
||||
private MovingObjectPosition target = null;
|
||||
private static RayTracing _instance;
|
||||
|
||||
private RayTracing() {}
|
||||
@@ -35,22 +36,22 @@ public class RayTracing {
|
||||
return _instance;
|
||||
}
|
||||
|
||||
private MovingObjectPosition target = null;
|
||||
private final Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
public void fire() {
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
if (mc.objectMouseOver != null && mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY
|
||||
&& !shouldHidePlayer(mc.objectMouseOver.entityHit)) {
|
||||
this.target = mc.objectMouseOver;
|
||||
return;
|
||||
}
|
||||
|
||||
EntityLivingBase viewpoint = mc.renderViewEntity;
|
||||
if (viewpoint == null) return;
|
||||
|
||||
this.target = this.rayTrace(viewpoint, mc.playerController.getBlockReachDistance(), 0);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
target = null;
|
||||
}
|
||||
|
||||
private static boolean shouldHidePlayer(Entity targetEnt) {
|
||||
// Check if entity is player with invisibility effect
|
||||
if (targetEnt instanceof EntityPlayer thePlayer) {
|
||||
@@ -116,7 +117,7 @@ public class RayTracing {
|
||||
|
||||
if (this.target == null) return items;
|
||||
|
||||
World world = mc.theWorld;
|
||||
World world = Minecraft.getMinecraft().theWorld;
|
||||
|
||||
int x = this.target.blockX;
|
||||
int y = this.target.blockY;
|
||||
|
||||
@@ -106,6 +106,8 @@ public class Tooltip {
|
||||
|
||||
public Tooltip(List<String> textData, boolean hasIcon) {
|
||||
|
||||
if (hasIcon) hasIcon = ConfigHandler.instance().showIcon();
|
||||
|
||||
columnsWidth.add(0); // Small init of the arrays to have at least one element
|
||||
columnsPos.add(0);
|
||||
|
||||
|
||||
@@ -12,165 +12,138 @@ import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import mcp.mobius.waila.api.impl.ConfigHandler;
|
||||
import mcp.mobius.waila.api.impl.DataAccessorCommon;
|
||||
import mcp.mobius.waila.api.impl.MetaDataProvider;
|
||||
import mcp.mobius.waila.api.impl.TipList;
|
||||
import mcp.mobius.waila.cbcore.Layout;
|
||||
import mcp.mobius.waila.client.KeyEvent;
|
||||
import mcp.mobius.waila.utils.Constants;
|
||||
|
||||
public class WailaTickHandler {
|
||||
|
||||
public Tooltip tooltip = null;
|
||||
public MetaDataProvider handler = new MetaDataProvider();
|
||||
private final Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
private static WailaTickHandler _instance;
|
||||
|
||||
private WailaTickHandler() {}
|
||||
|
||||
public static WailaTickHandler instance() {
|
||||
if (_instance == null) _instance = new WailaTickHandler();
|
||||
return _instance;
|
||||
}
|
||||
private Tooltip tooltip = null;
|
||||
private final MetaDataProvider handler = new MetaDataProvider();
|
||||
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void tickRender(TickEvent.RenderTickEvent event) {
|
||||
OverlayRenderer.renderOverlay();
|
||||
if (event.phase == TickEvent.Phase.END) {
|
||||
OverlayRenderer.renderOverlay(tooltip);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void tickClient(TickEvent.ClientTickEvent event) {
|
||||
|
||||
if (!Keyboard.isKeyDown(KeyEvent.key_show.getKeyCode())
|
||||
&& !ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_MODE, false)
|
||||
&& ConfigHandler.instance()
|
||||
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, false)) {
|
||||
ConfigHandler.instance().setConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, false);
|
||||
}
|
||||
if (event.phase == TickEvent.Phase.START) return;
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
World world = mc.theWorld;
|
||||
EntityPlayer player = mc.thePlayer;
|
||||
if (world != null && player != null) {
|
||||
RayTracing.instance().fire();
|
||||
MovingObjectPosition target = RayTracing.instance().getTarget();
|
||||
if (world == null || player == null) {
|
||||
this.tooltip = null;
|
||||
RayTracing.instance().clear();
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> currenttip;
|
||||
List<String> currenttipHead;
|
||||
List<String> currenttipBody;
|
||||
List<String> currenttipTail;
|
||||
if (target != null && target.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
DataAccessorCommon accessor = DataAccessorCommon.instance;
|
||||
accessor.set(world, player, target);
|
||||
ItemStack targetStack = RayTracing.instance().getTargetStack(); // Here we get either the proper stack
|
||||
// or the override
|
||||
RayTracing.instance().fire();
|
||||
MovingObjectPosition target = RayTracing.instance().getTarget();
|
||||
|
||||
if (targetStack != null) {
|
||||
currenttip = new TipList<String, String>();
|
||||
currenttipHead = new TipList<String, String>();
|
||||
currenttipBody = new TipList<String, String>();
|
||||
currenttipTail = new TipList<String, String>();
|
||||
List<String> currenttip;
|
||||
List<String> currenttipHead;
|
||||
List<String> currenttipBody;
|
||||
List<String> currenttipTail;
|
||||
if (target != null && target.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
DataAccessorCommon accessor = DataAccessorCommon.instance;
|
||||
accessor.set(world, player, target);
|
||||
ItemStack targetStack = RayTracing.instance().getTargetStack(); // Here we get either the proper stack
|
||||
// or the override
|
||||
|
||||
currenttipHead = handler.handleBlockTextData(
|
||||
targetStack,
|
||||
world,
|
||||
player,
|
||||
target,
|
||||
accessor,
|
||||
currenttipHead,
|
||||
Layout.HEADER);
|
||||
currenttipBody = handler.handleBlockTextData(
|
||||
targetStack,
|
||||
world,
|
||||
player,
|
||||
target,
|
||||
accessor,
|
||||
currenttipBody,
|
||||
Layout.BODY);
|
||||
currenttipTail = handler.handleBlockTextData(
|
||||
targetStack,
|
||||
world,
|
||||
player,
|
||||
target,
|
||||
accessor,
|
||||
currenttipTail,
|
||||
Layout.FOOTER);
|
||||
if (targetStack != null) {
|
||||
currenttip = new TipList<String, String>();
|
||||
currenttipHead = new TipList<String, String>();
|
||||
currenttipBody = new TipList<String, String>();
|
||||
currenttipTail = new TipList<String, String>();
|
||||
|
||||
if (ConfigHandler.instance()
|
||||
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHIFTBLOCK, false)
|
||||
&& !currenttipBody.isEmpty()
|
||||
&& !accessor.getPlayer().isSneaking()) {
|
||||
currenttipBody.clear();
|
||||
currenttipBody.add(ITALIC + "Press shift for more data");
|
||||
}
|
||||
currenttipHead = handler.handleBlockTextData(
|
||||
targetStack,
|
||||
world,
|
||||
player,
|
||||
target,
|
||||
accessor,
|
||||
currenttipHead,
|
||||
Layout.HEADER);
|
||||
currenttipBody = handler
|
||||
.handleBlockTextData(targetStack, world, player, target, accessor, currenttipBody, Layout.BODY);
|
||||
currenttipTail = handler.handleBlockTextData(
|
||||
targetStack,
|
||||
world,
|
||||
player,
|
||||
target,
|
||||
accessor,
|
||||
currenttipTail,
|
||||
Layout.FOOTER);
|
||||
|
||||
currenttip.addAll(currenttipHead);
|
||||
currenttip.addAll(currenttipBody);
|
||||
currenttip.addAll(currenttipTail);
|
||||
|
||||
this.tooltip = new Tooltip(currenttip, targetStack);
|
||||
if (ConfigHandler.instance()
|
||||
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHIFTBLOCK, false)
|
||||
&& !currenttipBody.isEmpty()
|
||||
&& !accessor.getPlayer().isSneaking()) {
|
||||
currenttipBody.clear();
|
||||
currenttipBody.add(ITALIC + "Press shift for more data");
|
||||
}
|
||||
} else if (target != null && target.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY) {
|
||||
DataAccessorCommon accessor = DataAccessorCommon.instance;
|
||||
accessor.set(world, player, target);
|
||||
|
||||
Entity targetEnt = RayTracing.instance().getTargetEntity(); // This need to be replaced by the override
|
||||
// check.
|
||||
currenttip.addAll(currenttipHead);
|
||||
currenttip.addAll(currenttipBody);
|
||||
currenttip.addAll(currenttipTail);
|
||||
|
||||
if (targetEnt != null) {
|
||||
currenttip = new TipList<String, String>();
|
||||
currenttipHead = new TipList<String, String>();
|
||||
currenttipBody = new TipList<String, String>();
|
||||
currenttipTail = new TipList<String, String>();
|
||||
this.tooltip = new Tooltip(currenttip, targetStack);
|
||||
}
|
||||
} else if (target != null && target.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY) {
|
||||
DataAccessorCommon accessor = DataAccessorCommon.instance;
|
||||
accessor.set(world, player, target);
|
||||
|
||||
currenttipHead = handler.handleEntityTextData(
|
||||
targetEnt,
|
||||
world,
|
||||
player,
|
||||
target,
|
||||
accessor,
|
||||
currenttipHead,
|
||||
Layout.HEADER);
|
||||
currenttipBody = handler.handleEntityTextData(
|
||||
targetEnt,
|
||||
world,
|
||||
player,
|
||||
target,
|
||||
accessor,
|
||||
currenttipBody,
|
||||
Layout.BODY);
|
||||
currenttipTail = handler.handleEntityTextData(
|
||||
targetEnt,
|
||||
world,
|
||||
player,
|
||||
target,
|
||||
accessor,
|
||||
currenttipTail,
|
||||
Layout.FOOTER);
|
||||
Entity targetEnt = RayTracing.instance().getTargetEntity(); // This need to be replaced by the override
|
||||
// check.
|
||||
|
||||
if (ConfigHandler.instance()
|
||||
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHIFTENTS, false)
|
||||
&& !currenttipBody.isEmpty()
|
||||
&& !accessor.getPlayer().isSneaking()) {
|
||||
currenttipBody.clear();
|
||||
currenttipBody.add(ITALIC + "Press shift for more data");
|
||||
}
|
||||
if (targetEnt != null) {
|
||||
currenttip = new TipList<String, String>();
|
||||
currenttipHead = new TipList<String, String>();
|
||||
currenttipBody = new TipList<String, String>();
|
||||
currenttipTail = new TipList<String, String>();
|
||||
|
||||
currenttip.addAll(currenttipHead);
|
||||
currenttip.addAll(currenttipBody);
|
||||
currenttip.addAll(currenttipTail);
|
||||
currenttipHead = handler.handleEntityTextData(
|
||||
targetEnt,
|
||||
world,
|
||||
player,
|
||||
target,
|
||||
accessor,
|
||||
currenttipHead,
|
||||
Layout.HEADER);
|
||||
currenttipBody = handler
|
||||
.handleEntityTextData(targetEnt, world, player, target, accessor, currenttipBody, Layout.BODY);
|
||||
currenttipTail = handler.handleEntityTextData(
|
||||
targetEnt,
|
||||
world,
|
||||
player,
|
||||
target,
|
||||
accessor,
|
||||
currenttipTail,
|
||||
Layout.FOOTER);
|
||||
|
||||
this.tooltip = new Tooltip(currenttip, false);
|
||||
if (ConfigHandler.instance()
|
||||
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHIFTENTS, false)
|
||||
&& !currenttipBody.isEmpty()
|
||||
&& !accessor.getPlayer().isSneaking()) {
|
||||
currenttipBody.clear();
|
||||
currenttipBody.add(ITALIC + "Press shift for more data");
|
||||
}
|
||||
|
||||
currenttip.addAll(currenttipHead);
|
||||
currenttip.addAll(currenttipBody);
|
||||
currenttip.addAll(currenttipTail);
|
||||
|
||||
this.tooltip = new Tooltip(currenttip, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ public final class Constants {
|
||||
public static String CFG_WAILA_LIQUID = "waila.cfg.liquid";
|
||||
public static String CFG_WAILA_METADATA = "waila.cfg.metadata";
|
||||
public static String CFG_WAILA_KEYBIND = "waila.cfg.keybind";
|
||||
public static String CFG_WAILA_SHOWICON = "waila.cfg.showicon";
|
||||
public static String CFG_WAILA_POSX = "waila.cfg.posx";
|
||||
public static String CFG_WAILA_POSY = "waila.cfg.posy";
|
||||
public static String CFG_WAILA_SCALE = "waila.cfg.scale";
|
||||
|
||||
@@ -1,148 +1,148 @@
|
||||
screen.button.waila=Waila
|
||||
screen.button.modules=Moduly
|
||||
screen.label.scale=Mìøítko
|
||||
screen.label.dragtuto=Chytni HUD pro nastavení jeho pozice.
|
||||
screen.label.scale=Mìøítko
|
||||
screen.label.dragtuto=Chytni HUD pro nastavení jeho pozice.
|
||||
|
||||
screen.button.default=Defaultní
|
||||
screen.button.cancel=Zrušit
|
||||
screen.button.default=Defaultní
|
||||
screen.button.cancel=Zrušit
|
||||
screen.button.ok=Ok
|
||||
screen.button.yes=Ano
|
||||
screen.button.no=Ne
|
||||
screen.button.back=Zpìt
|
||||
screen.button.hidden=Skrytý
|
||||
screen.button.visible=Viditelný
|
||||
screen.button.maintained=Spravované
|
||||
screen.button.toggled=Pøepnuté
|
||||
screen.button.back=Zpìt
|
||||
screen.button.hidden=Skrytý
|
||||
screen.button.visible=Viditelný
|
||||
screen.button.maintained=Spravované
|
||||
screen.button.toggled=Pøepnuté
|
||||
|
||||
choice.showhidewaila=Zobrazit/Skrýt Wailu
|
||||
choice.showhidewaila=Zobrazit/Skrýt Wailu
|
||||
choice.showhideidmeta=Zobrazit ID:Metadata
|
||||
choice.toggledmaintained=Pøepnuté/Spravované
|
||||
choice.toggledmaintained=Pøepnuté/Spravované
|
||||
choice.showliquids=Tekutiny
|
||||
choice.shifttoggledblock=Pliž se pro pøepnutí blokù
|
||||
choice.shifttoggledents=Pliž se pro pøepnutí entit
|
||||
screen.button.configureaspect=Nastavení vzhledu...
|
||||
choice.shifttoggledblock=Pliž se pro pøepnutí blokù
|
||||
choice.shifttoggledents=Pliž se pro pøepnutí entit
|
||||
screen.button.configureaspect=Nastavení vzhledu...
|
||||
|
||||
enchant.title.name=Jméno
|
||||
enchant.title.minlvl=Minimální lvl
|
||||
enchant.title.maxlvl=Maximální lvl
|
||||
enchant.title.name=Jméno
|
||||
enchant.title.minlvl=Minimální lvl
|
||||
enchant.title.maxlvl=Maximální lvl
|
||||
enchant.title.weight=Hmotnost
|
||||
enchant.label.enchantability=Oèarovatelnost
|
||||
enchant.label.enchantability=Oèarovatelnost
|
||||
|
||||
waila.keybind.wailaconfig=[Waila] Nastavení obrazu
|
||||
waila.keybind.wailadisplay=[Waila] Zobrazit/Skrýt
|
||||
waila.keybind.wailaconfig=[Waila] Nastavení obrazu
|
||||
waila.keybind.wailadisplay=[Waila] Zobrazit/Skrýt
|
||||
waila.keybind.liquid=[Waila] Zobrazit tekutiny
|
||||
waila.keybind.recipe=[Waila] Zobrazit recept
|
||||
waila.keybind.usage=[Waila] Zobrazit použití
|
||||
waila.keybind.testing=[Waila] Testování
|
||||
waila.keybind.usage=[Waila] Zobrazit použití
|
||||
waila.keybind.testing=[Waila] Testování
|
||||
|
||||
client.msg.norecipe=Nenalezen žádný recept.
|
||||
client.msg.nousage=Nenalezeno žádné využití.
|
||||
client.msg.norecipe=Nenalezen žádný recept.
|
||||
client.msg.nousage=Nenalezeno žádné využití.
|
||||
|
||||
hud.msg.none=<Nic>
|
||||
hud.msg.empty=<Prázdný>
|
||||
hud.msg.output=Výstup
|
||||
hud.msg.empty=<Prázdný>
|
||||
hud.msg.output=Výstup
|
||||
hud.msg.input=Vstup
|
||||
hud.msg.out=Ven
|
||||
hud.msg.in=Dovnitø
|
||||
hud.msg.in=Dovnitø
|
||||
hud.msg.power=Energie
|
||||
hud.msg.storage=Úložištì
|
||||
hud.msg.stored=Uloženo
|
||||
hud.msg.any=Jakýkoliv
|
||||
hud.msg.mode=Mód
|
||||
hud.msg.maxpower=Maximální Energie
|
||||
hud.msg.trigger=Spouštìè
|
||||
hud.msg.maxio=Maximální propustnost
|
||||
hud.msg.storage=Úložištì
|
||||
hud.msg.stored=Uloženo
|
||||
hud.msg.any=Jakýkoliv
|
||||
hud.msg.mode=Mód
|
||||
hud.msg.maxpower=Maximální Energie
|
||||
hud.msg.trigger=Spouštìè
|
||||
hud.msg.maxio=Maximální propustnost
|
||||
|
||||
hud.msg.send=Odeslat
|
||||
hud.msg.recv=Obdržet
|
||||
hud.msg.item=Pøedmìt
|
||||
hud.msg.recv=Obdržet
|
||||
hud.msg.item=Pøedmìt
|
||||
hud.msg.fluid=Tekutina
|
||||
hud.msg.energ=Energie
|
||||
hud.msg.frequency=Frekvence
|
||||
|
||||
hud.msg.owner=Vlastník
|
||||
hud.msg.public=Veøejné
|
||||
hud.msg.restricted=Omezené
|
||||
hud.msg.private=Soukromé
|
||||
hud.msg.owner=Vlastník
|
||||
hud.msg.public=Veøejné
|
||||
hud.msg.restricted=Omezené
|
||||
hud.msg.private=Soukromé
|
||||
|
||||
hud.msg.white=Bílá
|
||||
hud.msg.orange=Oranžová
|
||||
hud.msg.magenta=Purpurová
|
||||
hud.msg.lblue=Svìtle modrá
|
||||
hud.msg.yellow=Žlutá
|
||||
hud.msg.lime=Svìtle zelená
|
||||
hud.msg.pink=Rùžová
|
||||
hud.msg.gray=Šedá
|
||||
hud.msg.lgray=Svìtle šedá
|
||||
hud.msg.cyan=Tyrkysová
|
||||
hud.msg.purple=Fialová
|
||||
hud.msg.blue=Modrá
|
||||
hud.msg.brown=Hnìdá
|
||||
hud.msg.green=Zelená
|
||||
hud.msg.red=Èervená
|
||||
hud.msg.black=Èerná
|
||||
hud.msg.white=Bílá
|
||||
hud.msg.orange=Oranžová
|
||||
hud.msg.magenta=Purpurová
|
||||
hud.msg.lblue=Svìtle modrá
|
||||
hud.msg.yellow=Žlutá
|
||||
hud.msg.lime=Svìtle zelená
|
||||
hud.msg.pink=Rùžová
|
||||
hud.msg.gray=Šedá
|
||||
hud.msg.lgray=Svìtle šedá
|
||||
hud.msg.cyan=Tyrkysová
|
||||
hud.msg.purple=Fialová
|
||||
hud.msg.blue=Modrá
|
||||
hud.msg.brown=Hnìdá
|
||||
hud.msg.green=Zelená
|
||||
hud.msg.red=Èervená
|
||||
hud.msg.black=Èerná
|
||||
|
||||
hud.msg.growth=Rùst
|
||||
hud.msg.mature=Stáøí
|
||||
hud.msg.growth=Rùst
|
||||
hud.msg.mature=Stáøí
|
||||
hud.msg.off=Vypnuto
|
||||
hud.msg.on=Zapnuto
|
||||
hud.msg.state=Stav
|
||||
hud.msg.delay=Prodleva
|
||||
hud.msg.comparator=Porovnávaè
|
||||
hud.msg.comparator=Porovnávaè
|
||||
hud.msg.substractor=Substraktor
|
||||
hud.msg.record=Záznam
|
||||
hud.msg.record=Záznam
|
||||
|
||||
hud.msg.offers=Poskytuje
|
||||
hud.msg.demands=Požaduje
|
||||
hud.msg.demands=Požaduje
|
||||
|
||||
option.appeng.monitorcontent=Obsah monitoru
|
||||
option.bb.content=Obsah barelu
|
||||
option.bc.tankamount=Množství tekutiny
|
||||
option.bc.tankamount=Množství tekutiny
|
||||
option.bc.tanktype=Typ tekutiny
|
||||
option.enderstorage.colors=Barvy
|
||||
option.ic2.inputeumach=Maximální pøíjem EU [Stroje]
|
||||
option.ic2.inputeuother=Maximální pøíjem EU [Ostatní]
|
||||
option.ic2.inputeu=Maximální pøijem EU
|
||||
option.ic2.outputeu=Maximální výstup EU
|
||||
option.ic2.storage=Uloženo energie
|
||||
option.ic2.consump=Zobrazit spotøebu
|
||||
option.ic2.tradeomat=Zobrazit Trade-O-Mat požadavek
|
||||
option.thaumcraft.storedvis=Úložištì kondenzátoru
|
||||
option.thermalexpansion.energyhandler=Zobrazit úložištì RF
|
||||
option.thermalexpansion.energycell=Zobrazit ECell VSTUP/VÝSTUP
|
||||
option.ic2.inputeumach=Maximální pøíjem EU [Stroje]
|
||||
option.ic2.inputeuother=Maximální pøíjem EU [Ostatní]
|
||||
option.ic2.inputeu=Maximální pøijem EU
|
||||
option.ic2.outputeu=Maximální výstup EU
|
||||
option.ic2.storage=Uloženo energie
|
||||
option.ic2.consump=Zobrazit spotøebu
|
||||
option.ic2.tradeomat=Zobrazit Trade-O-Mat požadavek
|
||||
option.thaumcraft.storedvis=Úložištì kondenzátoru
|
||||
option.thermalexpansion.energyhandler=Zobrazit úložištì RF
|
||||
option.thermalexpansion.energycell=Zobrazit ECell VSTUP/VÝSTUP
|
||||
option.thermalexpansion.fluidtype=Zobrazit typ tekutiny
|
||||
option.thermalexpansion.fluidamount=Zobrazit množství tekutiny
|
||||
option.thermalexpansion.tankmode=Zobrazit mód nádrže
|
||||
option.thermalexpansion.fluidamount=Zobrazit množství tekutiny
|
||||
option.thermalexpansion.tankmode=Zobrazit mód nádrže
|
||||
option.thermalexpansion.tesssendrecv=Tesseract mode
|
||||
option.thermalexpansion.tessfreq=Frekvence Teseraktu
|
||||
option.thermalexpansion.owner=Zobrazit majitele
|
||||
option.thermalexpansion.conditemmode=Zobrazit mód Itemduktu
|
||||
option.thermalexpansion.conditemmode=Zobrazit mód Itemduktu
|
||||
option.vanilla.spawntype=Typ spawneru
|
||||
option.vanilla.growthvalue=Hodnota rùstu
|
||||
option.vanilla.leverstate=Stav páky
|
||||
option.vanilla.repeater=Prodleva opakovaèe
|
||||
option.vanilla.comparator=Mód porovnávaèe
|
||||
option.vanilla.redstone=Ruditová energie
|
||||
option.vanilla.jukebox=Jukeboxový disk
|
||||
option.vanilla.silverfish=Skrýt rybenku
|
||||
option.vanilla.growthvalue=Hodnota rùstu
|
||||
option.vanilla.leverstate=Stav páky
|
||||
option.vanilla.repeater=Prodleva opakovaèe
|
||||
option.vanilla.comparator=Mód porovnávaèe
|
||||
option.vanilla.redstone=Ruditová energie
|
||||
option.vanilla.jukebox=Jukeboxový disk
|
||||
option.vanilla.silverfish=Skrýt rybenku
|
||||
option.etb.displaydata=Zobrazit data slotu
|
||||
option.enderio.inout=Zobrazit vstup/výstup
|
||||
option.enderio.storage=Zobrazit uskladnìné MJ
|
||||
option.enderio.inout=Zobrazit vstup/výstup
|
||||
option.enderio.storage=Zobrazit uskladnìné MJ
|
||||
option.enderio.owner=Zobrazit majitele bloku
|
||||
option.enderio.channel=Zobrazit kanál nadkrychle
|
||||
option.bcapi.storage=Zobrazit uskladnìné MJ
|
||||
option.bcapi.consump=Zobrazit maximální energii
|
||||
option.bcapi.trigger=Zobrazit spouštìjící se energii
|
||||
option.pr.showio=Zobrazit IO brány
|
||||
option.enderio.channel=Zobrazit kanál nadkrychle
|
||||
option.bcapi.storage=Zobrazit uskladnìné MJ
|
||||
option.bcapi.consump=Zobrazit maximální energii
|
||||
option.bcapi.trigger=Zobrazit spouštìjící se energii
|
||||
option.pr.showio=Zobrazit IO brány
|
||||
option.pr.showdata=Zobrazit data bran
|
||||
option.extrautilities.fluidamount=Zobrazit množství tekutin
|
||||
option.openblocks.fluidamount=Zobrazit množství tekutin
|
||||
option.railcraft.fluidamount=Zobrazit množství tekutin
|
||||
option.secretrooms.hide=Skrýt camo bloky
|
||||
option.carpenters.hide=Skrýt camo bloky
|
||||
option.extrautilities.fluidamount=Zobrazit množství tekutin
|
||||
option.openblocks.fluidamount=Zobrazit množství tekutin
|
||||
option.railcraft.fluidamount=Zobrazit množství tekutin
|
||||
option.secretrooms.hide=Skrýt camo bloky
|
||||
option.carpenters.hide=Skrýt camo bloky
|
||||
option.stevescarts.showall=Zobrazit data
|
||||
option.stevescarts.colorblind=Barevný mód
|
||||
option.stevescarts.shifttoggle=Shift pro pøepnutí
|
||||
option.general.showhp=Zobrazit zdraví entit
|
||||
option.general.showcrop=Zobrazit rùst plodin
|
||||
option.stevescarts.colorblind=Barevný mód
|
||||
option.stevescarts.shifttoggle=Shift pro pøepnutí
|
||||
option.general.showhp=Zobrazit zdraví entit
|
||||
option.general.showcrop=Zobrazit rùst plodin
|
||||
option.thaumcraft.aspects=Zobrazit aspekty
|
||||
@@ -20,6 +20,7 @@ choice.toggledmaintained=Toggled/Maintained
|
||||
choice.showliquids=Liquids
|
||||
choice.shifttoggledblock=Sneak toggle blocks
|
||||
choice.shifttoggledents=Sneak toggle entities
|
||||
choice.showicon=Show/Hide Icon
|
||||
screen.button.configureaspect=Configure aspect...
|
||||
|
||||
enchant.title.name=Name
|
||||
|
||||
Reference in new issue
Block a user