asaskevich / smartcursor Goto Github PK
View Code? Open in Web Editor NEW[Java] Useful Minecraft mod with cursor utilities
Home Page: https://mods.io/mods/1089-smartcursor
License: MIT License
[Java] Useful Minecraft mod with cursor utilities
Home Page: https://mods.io/mods/1089-smartcursor
License: MIT License
It would be great if you could make the tooltips for hovering over items disableable.
Most people put it under F3+H and have options to enable/disable them incase multiple mods add tooltips.
com.asaskevich.smartcursor.RenderHandler:renderGameOverlay:242: java.lang.NullPointerException
java.lang.NullPointerException
at com.asaskevich.smartcursor.modules.player.PlayerEquipmentModule.process(PlayerEquipmentModule.java:19)
at com.asaskevich.smartcursor.render.RenderPlayer.render(RenderPlayer.java:42)
at com.asaskevich.smartcursor.RenderHandler.renderGameOverlay(RenderHandler.java:153)
at cpw.mods.fml.common.eventhandler.ASMEventHandler_13_RenderHandler_renderGameOverlay_RenderGameOverlayEvent.invoke(.dynamic)
at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
at net.minecraftforge.client.GuiIngameForge.renderHUDText(GuiIngameForge.java:699)
at net.minecraftforge.client.GuiIngameForge.func_73830_a(GuiIngameForge.java:155)
at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1038)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:990)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:887)
at net.minecraft.client.main.Main.main(SourceFile:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at magic.launcher.Launcher.main(SourceFile:214)
public void process(List<String> list, EntityPlayer player) {
/*17*/ ItemStack[] items = player.getLastActiveItems();
/*18*/ boolean h = player.getHeldItem() != null;
/*19*/ for (ItemStack item : items)
/*20*/ if (item != null) h = true;
/*21*/ if (h) {
/*22*/ list.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("smartcursor.player.equipment"));
list is never initialized with something like
list = new ArrayList<String>();
Adding
manifest {
attributes 'ModSide': 'CLIENT'
}
to jar in your build.gradle file will mark the mod as client side and will prevent it from loading on server and thus crashing them.
In the thing at the top left corner, the names display as tile.[insert block's unlocalized name here].name. Some blocks that I have observed having this issue are:
Sand
Top part of Double Grass
Thermal Expansion Ores
Don't know what I was looking at, grass most likely.
[20:56:56] [Client thread/INFO] [STDERR]: [com.asaskevich.smartcursor.RenderHandler:renderGameOverlay:242]: java.lang.NullPointerException
[20:56:56] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: java.lang.NullPointerException
[20:56:56] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.item.ItemStack.func_77964_b(ItemStack.java:222)
[20:56:56] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at com.asaskevich.smartcursor.RenderHandler.renderGameOverlay(RenderHandler.java:128)
[20:56:56] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at cpw.mods.fml.common.eventhandler.ASMEventHandler_304_RenderHandler_renderGameOverlay_RenderGameOverlayEvent.invoke(.dynamic)
[20:56:56] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
[20:56:56] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
[20:56:56] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraftforge.client.GuiIngameForge.renderHUDText(GuiIngameForge.java:699)
[20:56:56] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraftforge.client.GuiIngameForge.func_73830_a(GuiIngameForge.java:155)
[20:56:56] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1038)
[20:56:56] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:989)
[20:56:56] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:887)
[20:56:56] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.client.main.Main.main(SourceFile:148)
[20:56:56] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[20:56:56] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[20:56:56] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[20:56:56] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at java.lang.reflect.Method.invoke(Method.java:483)
[20:56:56] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
[20:56:56] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
Issues:
Looking at a natura crop throws http://pastebin.com/ALCa2NLC
Farmland shows up as dirt. (Could add if its wet or not)
Ideas:
Redstone information. (Power level, Repeater state, On/Off, Enabled/Disabled ETC)
Crop growth level.
Display block attributes (Shearable, farmable,ETC) the same way as mobs display armor/weapons.
Burnable block attribute. (Like wood)
These aren't super important. I also do enjoy how nice everything looks!
You should make this mod have a Config GUI where we can enable/disable the features of the mod.(see http://minalien.com/minecraft-forge-feature-spotlight-config-guis/ , it is simple to make one)
Also, you should make it so people can disable the mod with the Disable button.(All it takes is adding canBeDeactivated = true to the @ Mod)
The idea is instead of having mod support people can make their own scripts to support visualizing mod contents using NBT data.
See here for ex https://mods.curse.com/mc-mods/minecraft/224417-waila-nbt
The script would be something like that mod does it
When you have the specific item in your inventory "divinationSigil then you can see Current Essence as "Amount" NBT tag value and "Capacity" as "capactity" NBT tag value on any block called containerAltar. EZ
{
"AWWayofTime:divinationSigil": {
"containerAltar": {
"Amount": "Current Essence",
"capacity": "Capacity"
}
}
}
If you literarily copy /pasta WailaNBT json system then you can use all their scripts which support most of the major mods already.
Not only that but anyone can make advanced stuff like % growth of crops or how much liquid is in a cauldron or light level of a block and so forth. And would work for ANYTHING and best of all you won't have to manually keep updating your mod to stay compatible with other mods.
I don't know how hard that would be to implement but it would save you a lot of trouble in the long run making this mod way more versatile than WAILA since that WailaNBT only works for 1.7.10 version.
In short people can make their own scripts for whatever they need to visualize in the tooltips.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.