This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
austinv11's profile picture

Turtle upgrade not using the correct icon

Started by austinv11, 31 October 2014 - 11:08 PM
austinv11 #1
Posted 01 November 2014 - 12:08 AM
I have been trying to take the icon from one of my items and use it in the getIcon() method, however it doesn't display this. Instead, it displays this: http://puu.sh/cyeRU/54d322217b.png when it should be displaying this: https://github.com/austinv11/PeripheralsPlusPlus/blob/master/src%2Fmain%2Fresources%2Fassets%2Fperipheralsplusplus%2Ftextures%2Fitems%2FupgradeCompass.png

Relevant Code:
Upgrade Item-
https://github.com/austinv11/PeripheralsPlusPlus/blob/master/src/main/java/com/austinv11/peripheralsplusplus/items/UpgradeCompass.java
Actual turtle upgrade-
https://github.com/austinv11/PeripheralsPlusPlus/blob/master/src%2Fmain%2Fjava%2Fcom%2Faustinv11%2Fperipheralsplusplus%2Fturtles%2FTurtleCompass.java

Thanks!
theoriginalbit #2
Posted 01 November 2014 - 12:17 AM
You're probably better off using Forge Event's to load textures instead of creating an item for that purpose. An example can be seen in my mod MoarPeripherals with my Compass upgrade and Solar Upgrade. With upgrades being registered to my Icon object, which receives the Forge Event and then in turn invokes the texture loader for each upgrade that requires it.
Edited on 31 October 2014 - 11:18 PM
austinv11 #3
Posted 01 November 2014 - 01:26 AM
Thanks!