Compare commits

..
267 Commits
Author SHA1 Message Date
Thomas Guimbretiere 198d0c7079 Removed some logging
Reflection is now done with FML utilities
Fixes issue #17
Version bump
2014-02-12 18:20:11 +01:00
Thomas Guimbretiere 03f4bed4fe Added missing registrar methods for entities. 2014-02-11 21:10:46 +01:00
Thomas Guimbretiere 1bfcc07e1f Fixed getSide()
Fix for issue #21
2014-02-11 20:38:33 +01:00
Thomas Guimbretiere ef9a1bedfc Basic IWailaEntityProvider registration process implemented.
Removed duplicated stackProviders & decoratorProviders methods based on IDs
Deprecated ID based registration (in plan for 1.7)
2014-02-11 20:09:12 +01:00
Thomas Guimbretiere 4121e689fd Readded missing config call for ID:Meta display 2014-02-04 13:59:42 +01:00
Thomas Guimbretiere 0b1911b711 Added tag 1.4.5 for changeset 7ff010d0fad8 2014-02-04 13:59:22 +01:00
Thomas Guimbretiere ac73b6b537 Enable the rendering of the UI only is the UI is visible.
Might fix issue #11
2014-02-03 22:31:34 +01:00
Thomas Guimbretiere 4188ec37b2 Added override for redstone wires.
Fixes Issue #12
2014-02-03 22:24:54 +01:00
Thomas Guimbretiere 6cefb32520 Added safeguard if the NBT len > 32k to prevent client side crash.
Fixes Issue #9
2014-02-03 21:59:59 +01:00
Thomas Guimbretiere 7ba3a2b7e8 Removed depricated annotation. 2014-01-25 04:57:30 +01:00
Thomas Guimbretiere 3d7c3f0726 Update for 965 2014-01-25 04:45:56 +01:00
Thomas Guimbretiere 74cdb0fa1e New branch for forge_965 2014-01-12 14:56:22 +01:00
Thomas Guimbretiere dc07947ccf Merge with current 2014-01-12 14:53:07 +01:00
Thomas Guimbretiere 3b1f35e7a8 Updated default to 1.4.4b 2014-01-12 14:52:40 +01:00
Thomas Guimbretiere dbd06b2552 Removed MJ wrong handling of some internals. 2014-01-12 14:49:28 +01:00
Thomas Guimbretiere 9c121fb5c8 Added color constants. 2013-12-24 19:33:56 +01:00
Thomas Guimbretiere 28d19ef015 Clean up
Added setters for the IAccessor.
2013-12-24 18:28:01 +01:00
Thomas Guimbretiere 3843fd9815 Refactoring 2013-12-24 18:17:00 +01:00
Thomas Guimbretiere 2777e0ea80 Custom identifiers are now considered properly in the Tick handler 2013-12-24 15:45:25 +01:00
Thomas Guimbretiere e62f26a0ee The whole tooltip is now produced completly in Waila.
No more dependencies on NEI API for that.
2013-12-24 08:03:08 +01:00
Thomas Guimbretiere 403e2aad57 Tooltip rendering is not dependent on NEI API no more. 2013-12-24 07:48:36 +01:00
Thomas Guimbretiere c171d33e8c Some cleanup & added support for Footer. 2013-12-24 00:20:52 +01:00
Thomas Guimbretiere b1f7f2f2df Moved string gather to CLIENT tick for caching. 2013-12-24 00:01:18 +01:00
Thomas Guimbretiere a49d359656 Reworked the raytracing to make it cleaner and leaner. 2013-12-23 22:42:09 +01:00
Thomas Guimbretiere 03ec8ac17b Added code to call upon HUDHandlerExternal in the tick handler (commented)
TickHandler is now a singleton
2013-12-23 21:23:15 +01:00
Thomas Guimbretiere 75f3618424 Raytracing is now done in the CLIENT tick 2013-12-23 21:02:15 +01:00
Thomas Guimbretiere e400edb92f New Branch 2013-12-23 20:53:28 +01:00
Thomas Guimbretiere 42170ca050 Fixed wrong msgs on empty and microblocks. 2013-12-23 13:40:21 +01:00
Thomas Guimbretiere f9868afde1 Added support for Railcraft tanks. 2013-12-21 00:09:53 +01:00
Thomas Guimbretiere 4e79797cd1 Added support for OpenBlocks tanks. 2013-12-20 23:16:11 +01:00
Thomas Guimbretiere 921b245273 Added support for ExtraUtilities drums 2013-12-20 22:31:09 +01:00
Thomas Guimbretiere 2cbaeca169 Fixed Thermal Expansion conduits. 2013-12-20 21:52:53 +01:00
Thomas Guimbretiere bc344cab41 Added tag 1.4.3 for changeset 1c391d52f3d9 2013-12-17 18:59:24 +01:00
Thomas Guimbretiere 7a2fd4363c Mute the discovery errors from IC2.
Moved the module registration to very late events.
2013-12-17 18:40:55 +01:00
Thomas Guimbretiere 11d0f86320 Updated RU translation
Removed fluked file.
2013-12-12 16:26:28 +01:00
Thomas Guimbretiere d83fb8fe76 Added side getter to the accessor.
Version bump.
2013-12-09 14:08:18 +01:00
Thomas Guimbretiere a36013c28c Fixed a derp with air blocks... 2013-12-09 14:01:52 +01:00
Thomas Guimbretiere 1934171e5a Merge 2013-12-07 01:34:18 +01:00
Thomas Guimbretiere 4b2e873261 Merged in Vexatos/waila-1/Vexatos/de_delang-edited-online-with-bitbucket-1386187266977 (pull request #5)
de_DE.lang edited online with Bitbucket
2013-12-07 01:38:27 +01:00
Thomas Guimbretiere 6319cbd425 Localization 2013-12-07 01:33:57 +01:00
Vexatos 72ae5eccb3 de_DE.lang edited online with Bitbucket 2013-12-04 20:01:17 +00:00
Thomas Guimbretiere 5d1c7d532f Added tag 1.4.1 for changeset f9daea609042 2013-11-26 16:29:14 +01:00
Thomas Guimbretiere afb9549da9 Done with options & localization. 2013-11-26 16:28:54 +01:00
Thomas Guimbretiere 0d749d80ae [IC2] Added trade-o-mat display. 2013-11-26 01:57:29 +01:00
Thomas Guimbretiere 050fd992c6 [IC2] Fixed display for geothermal & semifluid generators. 2013-11-26 01:35:12 +01:00
Thomas Guimbretiere 3694992eb5 Working revisited IC2 module. 2013-11-26 00:37:40 +01:00
Thomas Guimbretiere 6f0301667d Check for MOP diff in the NBT sync packet sending block. 2013-11-23 19:45:28 +01:00
Thomas Guimbretiere d2606bfc25 Fixed ETB module (early lookup).
Removed IC2 module for now (pending rewrite).
Caching providers lookup data for optimization.
2013-11-23 19:38:54 +01:00
Thomas Guimbretiere 299ef5307e Added tag v1.4.0 for changeset e8b1906c3f51 2013-11-23 15:40:38 +01:00
Thomas Guimbretiere a750f76a5d Merge 2013-11-22 18:42:00 +01:00
Thomas Guimbretiere cd587ee8ca Fixed orientation prbs & IC2 2013-11-22 18:41:00 +01:00
Thomas Guimbretiere 987254caca Readded Repeater
Fixed mod identification by jar for Forge.
2013-11-22 16:43:42 +01:00
Thomas Guimbretiere ef5ff0c6ed Small orientation bugfix 2013-11-22 16:30:55 +01:00
Thomas Guimbretiere e9947e3960 Merged in Vexatos/waila-2/Vexatos/updated-de_delang-1385130888171 (pull request #4)
Fixed Itemduct typo
2013-11-22 15:41:37 +01:00
Vexatos 95bf99a24a fr_FR.lang edited online with Bitbucket 2013-11-22 14:38:28 +00:00
Vexatos be530da970 en_US.lang edited online with Bitbucket 2013-11-22 14:37:08 +00:00
Vexatos 5d82ebf0d5 Updated de_DE.lang 2013-11-22 14:34:53 +00:00
Thomas Guimbretiere 165cb1003c Merged in Vexatos/waila-1/Vexatos/updated-de_delang-with-project-red-stuff-1385130448150 (pull request #3)
Updated de_DE.lang with Project: Red stuff
2013-11-22 15:28:50 +01:00
Vexatos 5388d1bea0 Updated de_DE.lang with Project: Red stuff 2013-11-22 14:27:33 +00:00
Thomas Guimbretiere c40c032531 Added tag Nightly_131121a for changeset c7e3d16cb236 2013-11-21 01:50:26 +01:00
Thomas Guimbretiere bf0bb6e0c7 Added config options. 2013-11-21 01:50:05 +01:00
Thomas Guimbretiere 42c35d2b69 Added full support for P:R
Updated a few lang files
Added conduits to TE3
2013-11-21 00:40:46 +01:00
Thomas Guimbretiere e9b440616e FR_fr localization 2013-11-20 19:01:16 +01:00
Thomas Guimbretiere d1b354f05e Class name fix for TE3
Exception now shows the first line containing a Waila reference.
2013-11-20 18:50:44 +01:00
Thomas Guimbretiere 0742ef2422 Working proto of P:R module.
Added stacktrace to ExceptionHandler
2013-11-20 18:24:57 +01:00
Thomas Guimbretiere 8e45cb8064 Added billboard helper, floating text help
Accessor contains a bit more information (like the partial frame)
Added a project red module with basic block highlight.
2013-11-19 14:13:09 +01:00
Thomas Guimbretiere 6896998934 Added test decorator on Vanilla crop (desactivated) 2013-11-19 02:13:31 +01:00
Thomas Guimbretiere 74a2805844 IWailaBlockDecorators are now called in the event, with proper safeguards. 2013-11-19 01:37:57 +01:00
Thomas Guimbretiere c95daee0e2 Moved client side stuff to client package.
Added a client event handler for renderLast events.
Basic coordinate gathering in the renderLast event.
Added API to register block decorators.
2013-11-19 00:54:20 +01:00
Thomas Guimbretiere bb5cd6cbfa Added tag Nightly_131118 for changeset d2ec5e84d19f 2013-11-19 00:53:06 +01:00
Thomas Guimbretiere 3dde25b1a4 Added tag Nightly_13111 for changeset 9280666656c7 2013-11-19 00:52:32 +01:00
Thomas Guimbretiere 66649fa9dd Small fixes in the localization engine. 2013-11-18 17:56:01 +01:00
Vexatos a87c29bb2f Created de_DE.lang 2013-11-18 17:26:49 +01:00
Thomas Guimbretiere 3a057e4aba Moved IPowerReceptor to BCAPI module (new module)
Cleaned up all the broken BC parts.
Smaller textures for the test pics.
EnderIO tesseracts are now showing chans/owner
Localization all over the place & a couple new strings.
2013-11-18 14:57:12 +01:00
Thomas Guimbretiere b50df6af26 Added BC power receptor API hooks. 2013-11-18 03:57:21 +01:00
Thomas Guimbretiere 8e8fd7f2bd Basic support for EnderIO capacitors
Added options to ETB
2013-11-18 02:50:33 +01:00
Thomas Guimbretiere d9f209a1d4 Added support for Engineer Toolbox. 2013-11-18 01:11:51 +01:00
Thomas Guimbretiere 5e6ccc5ff8 Done implementing the localization 2013-11-17 20:44:45 +01:00
Thomas Guimbretiere bbfcc3b3ad My bad 2013-11-17 20:33:47 +01:00
Thomas Guimbretiere d4a7b62644 Partial localization 2013-11-17 20:31:39 +01:00
Thomas Guimbretiere 417a75a896 Localized everything up to ConfigKeys. 2013-11-17 19:03:55 +01:00
Thomas Guimbretiere b551d54e5c Attempt at getting TTF font support (failed). 2013-11-17 17:47:15 +01:00
Thomas Guimbretiere 16ca8f2917 Added Minecraftia as default font & loaded it. 2013-11-17 17:26:20 +01:00
Thomas Guimbretiere e7f2cab192 Added TrueTyper 2013-11-17 17:14:55 +01:00
Thomas Guimbretiere 40063f3799 Vanilla Cocoa & Netherwarts are now handled properly (growth) 2013-11-17 17:05:30 +01:00
Thomas Guimbretiere 326d2b519b Removed RF energy display for IEnergyHandler if the NBT data is not there.
Fixed EnderStorage tanks color display.
2013-11-17 15:03:28 +01:00
Thomas Guimbretiere a7668e321c Fixed tooltip size error.
Added a exception throwing getField (so you can test multiple combinaisons => obf vs srg)
2013-11-17 14:33:44 +01:00
Thomas Guimbretiere 79af54e8cf Added tag Nightly_131116 for changeset 246642120b36 2013-11-17 14:09:09 +01:00
Thomas Guimbretiere 09f8bbe33e Full TE3 support 2013-11-17 14:08:54 +01:00
Thomas Guimbretiere 1908f39995 Added support for TE
Added some stuff to the reflection helper.
2013-11-16 15:14:30 +01:00
Thomas Guimbretiere 748fc3fffa Added License 2013-11-12 23:53:20 +01:00
Thomas Guimbretiere 250dc6ac2a Added try/catch around getPickBlock in the raytracing. Was crashing on some circunstances. 2013-10-26 13:53:39 +02:00
Thomas Guimbretiere b81d2d3709 Added tag Nightly_131025 for changeset bc4937f3a7d4 2013-10-26 13:53:05 +02:00
Thomas Guimbretiere a873131d2f Removed some wrong imports. 2013-10-26 12:54:37 +02:00
Thomas Guimbretiere b5689428e8 Added assets folder 2013-10-26 12:48:13 +02:00
Thomas Guimbretiere d6285e2932 Fixed enchant table rendering out of screen. 2013-10-25 14:57:41 +02:00
Thomas Guimbretiere eb348d10fc Fixed string discovery for keybind config screen.
Adding tag is controlled by a config option.
2013-10-25 14:22:29 +02:00
Thomas Guimbretiere 7eb3ddb50c Added an helper for reflection.
Moved all mod identification to a static class.
Dump of KeyHandler string + mod on startup.
2013-10-25 13:35:01 +02:00
Thomas Guimbretiere fde934363c Cleanup 2013-10-24 21:54:33 +02:00
Thomas Guimbretiere dce9809205 Cleanup 2013-10-24 21:51:32 +02:00
Thomas Guimbretiere 15bee287f3 Added tag Nightly_131024 for changeset 02ebbb4aeebe 2013-10-24 18:39:41 +02:00
Thomas Guimbretiere f28ed4c274 Added coloring for enchanted items. 2013-10-24 18:38:57 +02:00
Thomas Guimbretiere fc3606b71c When adding a widget, it is now possible to specify a render priority (LOW, MEDIUM, HIGH).
Widgets will be rendered in the order of insert in each category (allows to have forground widgets which are not mouse stealing).
Fixed again the Config HUD screen using that.
2013-10-24 17:38:35 +02:00
Thomas Guimbretiere aeff9c1039 Might have fixed IAmOmicron bug.
Fixed HUD config screen.
2013-10-24 17:22:17 +02:00
Thomas Guimbretiere 9fd13c9ca1 Fixed enchant mod detection.
Changed default key from RSHIFT to I
2013-10-24 17:12:42 +02:00
Thomas Guimbretiere ac1cc77258 Item enchantments done. 2013-10-24 16:31:39 +02:00
Thomas Guimbretiere e6005e55af First shot at partial enchant screen. 2013-10-24 15:48:44 +02:00
Thomas Guimbretiere 62ec48ba21 Added a ViewTable widget to display data in a table shape 2013-10-24 15:25:23 +02:00
Thomas Guimbretiere 7ab8981dde All layouts depend on LayoutBase.
LayoutBase now allows for a background gradient. (setBackgroundColors)
To handle multilayers, widget rendering is done from the start of the list to
the end (in the order of insert), but widget lookup is done in revert order (
last inserted widget will be returned first).
Added utility class for reverse lookup (ReverseIterator).
2013-10-24 11:39:35 +02:00
Thomas Guimbretiere f8202e8fa8 Fixed cropping layout. 2013-10-24 03:22:41 +02:00
Thomas Guimbretiere b18fb9df61 Fixed dragging on the HUD. 2013-10-24 02:20:29 +02:00
Thomas Guimbretiere b4ca299115 Better handling of dragging when leaving the widget (moved some dragging identification to canvas). 2013-10-24 02:08:56 +02:00
Thomas Guimbretiere b0104482bb More adjustement on dragging. 2013-10-24 01:58:37 +02:00
Thomas Guimbretiere ef9ee6441d Fixed some mouse handling (keeping the drag going when on the main widget, stopping the drag on leaving, etc). 2013-10-24 01:52:02 +02:00
Thomas Guimbretiere 4ad3e92fae Mouse handling of the escalator. 2013-10-24 01:42:54 +02:00
Thomas Guimbretiere 098c88676e Corrected order of msg sending for GEOM_CHANGED (post change)
Cursor is now working properly.
2013-10-24 01:12:10 +02:00
Thomas Guimbretiere 4b05b017f7 Moved setPos / setSize to IWidget.
Modifying the geometry now triggers a GEOM_CHANGED event.
2013-10-23 22:19:19 +02:00
Thomas Guimbretiere a92a5dde3c ViewportScrollable is now its own class. 2013-10-23 21:21:34 +02:00
Thomas Guimbretiere a6890c5824 Test widget is bounded on mousewheel.
Added a possibility of setting up the steping (in px).
2013-10-23 20:51:26 +02:00
Thomas Guimbretiere e87d08a789 Reverse lookup for mouse move & drag. 2013-10-23 20:39:31 +02:00
Thomas Guimbretiere 65d8ef8c63 Fixed a couple of button bugs. 2013-10-23 20:33:56 +02:00
Thomas Guimbretiere 878a00b16b Reverse lookup on click/release. 2013-10-23 20:28:37 +02:00
Thomas Guimbretiere 984b26c7fd Reverse lookup for MouseEnter/MouseLeave 2013-10-23 20:16:42 +02:00
Thomas Guimbretiere b2cc1e02d7 Added inverted lookup for MouseWheel.
getWidgetAtPosition does return the deepest widget, so mouse events should check the parent for implementation, not the childrens !
2013-10-23 20:09:27 +02:00
Thomas Guimbretiere 83c7ef6aa9 Corrected a position bug in ItemStackDisplay
Added LayoutCropping (cropping layout using scissors).
2013-10-22 12:05:49 +02:00
Thomas Guimbretiere 6fca3468e2 Cleanup 2013-10-22 11:25:51 +02:00
Thomas Guimbretiere d134aba573 Added scalable ItemStack display. 2013-10-22 11:02:41 +02:00
Thomas Guimbretiere 8f32c0c770 Cleanup 2013-10-22 00:32:56 +02:00
Thomas Guimbretiere e0a5da865f Linked the HUD config screen to the Waila config screen. 2013-10-21 22:56:55 +02:00
Thomas Guimbretiere 69a62e6edf And finally, the scale. Can be adjusted between 0.1 and 2.0. 2013-10-21 22:42:26 +02:00
Thomas Guimbretiere a6da4adc08 Alpha is now configurable too.
Colors can be changed from the config file.
2013-10-21 22:09:43 +02:00
Thomas Guimbretiere 2d3768423f Widgets are now stored in a LinkedHashMap (for proper sorting).
Better Save/Load of GL State (includes colors).
Restored all the buttons on the config screen.
Config is now saved properly and used.
Possibility to reset to defaults.
2013-10-21 20:03:24 +02:00
Thomas Guimbretiere cb2491f3f3 Fixed dragging when other widgets are present. 2013-10-21 18:31:45 +02:00
Thomas Guimbretiere 9248b75a0c Draggable picture in the position config screen is now using relative positions.
Should be behaving like you would expect.
2013-10-21 18:08:16 +02:00
Thomas Guimbretiere fc46634fcc Shorter enum names
Mouse pos is now a double for finer control (?)
2013-10-21 02:54:59 +02:00
Thomas Guimbretiere 9df8f252c0 Changed the position/size type to an enum to make it clearer 2013-10-21 02:28:34 +02:00
Thomas Guimbretiere a844fb4815 Added default configs.
Killed the config screen (again)
2013-10-21 01:49:45 +02:00
Thomas Guimbretiere 58266d3cd1 More advance in the hud config screen. 2013-10-20 17:35:48 +02:00
Thomas Guimbretiere 94a22bf6ca Reworked the event system. Now events are pushed upward to the first widget which can treat them.
No more slots. Best practice is to create a LayoutBase derived class, and handle the events in there.
2013-10-20 17:08:08 +02:00
Thomas Guimbretiere 32a50e112b Singals and slots are now enums.
Added a few widgets to the config screen.
2013-10-20 16:34:32 +02:00
Thomas Guimbretiere 6dbcf366bd Added basic inter-widget signal passing.
LabelFixedFont now has a setText slot (to change text to first signal argument).
PictureMovable will emit onDragX/onDragY events when dragged.
WidgetBase now has slots to move the widget around (setPosX, setPosY).
WidgetGeometry allows to change the position of the widget without having to recreate the geom
Added a CounterInteger widget to store integer data. Slots to change the value and signals to advertise the change.
2013-10-20 12:14:48 +02:00
Thomas Guimbretiere 24efba751d Added a PictureMovable widget, that you can drag and drop around. Area of action is constrainted by the parent.
Added getTop() getBottom() to IWidget interface (shortcuts for getPos().getY() and getPos().getY() + getSize().getY() )
2013-10-19 15:38:51 +02:00
Thomas Guimbretiere e681b98231 Fix alignment for Module choice 2013-10-18 20:20:46 +02:00
Thomas Guimbretiere 30d88b4c45 Readded support for remote config keys.
Moved keyboard handling out of the old UI package.
2013-10-18 12:18:51 +02:00
Thomas Guimbretiere 9a13ff7898 Fixed derp in calling wrong recipe method. 2013-10-18 11:59:11 +02:00
Thomas Guimbretiere 91ac3a9e32 Fixed recipe lookup for blocks with metadata. If not recipe is found with meta, we lookup recipes without meta. 2013-10-18 11:56:32 +02:00
Thomas Guimbretiere 1036c7c0c0 Added the final missing config screens. Config keybind now popups up the new screens.
Still need to remake the server bound config buttons.
2013-10-18 11:51:16 +02:00
Thomas Guimbretiere c03d9183a8 Added main config screen.
Added clicky sound on buttons.
2013-10-18 02:25:47 +02:00
Thomas Guimbretiere 5da91bea2d Fixed MouseEnter/MouseLeave and getWidgetAtPosition logic.
Buttons labels now have the proper color.
Fixed ID:Metadata HEADER bug.
2013-10-18 02:05:19 +02:00
Thomas Guimbretiere c2ceb365d9 Derp 2013-10-18 00:58:23 +02:00
Thomas Guimbretiere 4488c37149 Added a ButtonContainer with label handling.
Created the basic Waila config screen.
2013-10-18 00:58:03 +02:00
Thomas Guimbretiere 3c3fcad888 Screen change button
More test classes in gui.testing
2013-10-17 22:17:13 +02:00
Thomas Guimbretiere 391cfe8290 Added buttons linked to config options (specific to Waila). 2013-10-17 21:47:56 +02:00
Thomas Guimbretiere 8c2ff2b56f Vertical spacing of buttons is now absolute 2013-10-17 21:21:38 +02:00
Thomas Guimbretiere d9a16ba7fa Added per-coordinate abs/frac capabilities for pos & size in WidgetGeometry 2013-10-17 21:16:50 +02:00
Thomas Guimbretiere 3b906f4de8 Moved buttons to their own package. 2013-10-17 21:03:49 +02:00
Thomas Guimbretiere 0496543d70 Added a button container for easy grid-layout buttons 2013-10-17 21:01:12 +02:00
Thomas Guimbretiere e9cc68d2b1 Added 2 types of buttons (boolean & integer) to the widgets. 2013-10-17 20:10:16 +02:00
Thomas Guimbretiere 8a5dc45240 Added a PictureSwitch widget, switching between 2 pictures on mouse over. 2013-10-11 22:03:36 +02:00
Thomas Guimbretiere d23855b263 Added show,hide to widgets.
Renamed Label to LabelFixedFont
2013-10-11 21:54:44 +02:00
Thomas Guimbretiere 5601fcdf7b Added Label widget.
Reworked WidgetGeometry to allow for separate pos/size computation method.
2013-10-11 21:43:58 +02:00
Thomas Guimbretiere a87d3b9de7 Nothing is absolute anymore. Everything is relative to the parent, in full or fractional value 2013-10-11 15:24:01 +02:00
Thomas Guimbretiere 67775bad84 Added ENTER and LEAVE events. 2013-10-11 15:19:24 +02:00
Thomas Guimbretiere 3d004700fb Mouse event handling. 2013-10-11 14:50:07 +02:00
Thomas Guimbretiere b3b2024ce7 Generic structure of new widgets is up.
Test screen with a test texture is done.
2013-10-09 22:58:39 +02:00
Thomas Guimbretiere c1cfb94a0d Setup basic testing framework for the new UI system. 2013-10-09 15:52:26 +02:00
Thomas Guimbretiere 029d141872 Bumped version
May have fixed a light prb when looking at ents.
2013-10-04 20:33:58 +02:00
Thomas Guimbretiere ed93c68fb9 Added registration methods for tail changes along with proper calls to the registrated classes. 2013-10-04 20:02:27 +02:00
Thomas Guimbretiere 4b8acb517e Added "getWailaTail" to the API 2013-10-04 19:55:26 +02:00
Thomas Guimbretiere 419308e2ac Rearranged inworld recipe check to prevent crash on NEI cache loading. 2013-10-04 19:48:55 +02:00
Thomas Guimbretiere 8dc890421d More adjusting and desactivation of NEI overlay. 2013-10-04 18:55:19 +02:00
Thomas Guimbretiere fe90900b55 Adjusted the block discovery system a bit. 2013-10-04 16:30:55 +02:00
Thomas Guimbretiere 1d9807e6d6 Added in-world recipe/usage lookup. 2013-10-04 16:02:21 +02:00
Thomas Guimbretiere 58931febc4 Fixed the proxy raytracing. 2013-10-04 15:04:59 +02:00
Thomas Guimbretiere d72dfa5775 Added support for entities.
Added missing files.
2013-10-04 14:55:01 +02:00
Thomas Guimbretiere dbf49534da Added liquid raytracing 2013-10-04 13:33:59 +02:00
Thomas Guimbretiere aad38c1eac Added a new block recovery test by using a fresh block if the block do not have a TE. 2013-10-04 13:07:08 +02:00
Thomas Guimbretiere c0727b2157 Moved overlay renderer from NEI to Waila for easier handling. 2013-10-02 18:00:53 +02:00
Thomas Guimbretiere 3085f7442a Added tag 1.3.9_1.6.2 for changeset 1e7cde94ccce 2013-09-04 00:12:37 +02:00
Thomas Guimbretiere 25cfff7354 Fixed dimension lookup (I guess).
Version bump
2013-09-04 00:12:19 +02:00
Thomas Guimbretiere 13f49db4b7 Renamed Handlers 2013-09-03 17:31:51 +02:00
Thomas Guimbretiere 117808a326 Added try/catch statement for packet 0x01 to prevent a rare case of crash when the server do not know the dimension. 2013-09-03 17:09:18 +02:00
Thomas Guimbretiere 31ee058c87 Added versionBounds statement to @NetworkMod. Should solve the version mismatch prb between client & server. 2013-09-03 16:58:06 +02:00
Thomas Guimbretiere 4d8087fb4c Added tag 1.3.8_1.6.2 for changeset 45e01e7ee1a8 2013-09-02 17:53:37 +02:00
Thomas Guimbretiere cef91a3ef4 Bump version number 2013-09-02 17:53:19 +02:00
Thomas Guimbretiere 9da2402851 Fixed BC module. Removed pipe info for now. 2013-09-02 17:33:16 +02:00
Thomas Guimbretiere 3eaffb5812 Set default NEI key for tooltip handling to None on loading. 2013-09-02 16:35:11 +02:00
Thomas Guimbretiere 643d1bfad2 Updated config string to match new NEI config option. 2013-09-02 15:02:11 +02:00
Thomas Guimbretiere ad6fd7290a Untested 1.6.2 port. 2013-09-02 14:49:08 +02:00
Thomas Guimbretiere 7e012ff6c6 New branch for 1.6.2 dev 2013-09-02 14:18:43 +02:00
Thomas Guimbretiere b547b7ece6 Moved most of the config strings to a constant class.
Added a Reflect class for easy reflection.
2013-09-02 14:07:32 +02:00
Thomas Guimbretiere 022d792d01 [AppEng] Added handling of a null monitor object 2013-09-02 01:46:16 +02:00
Thomas Guimbretiere c4f6b40ea5 Added support for AE 2013-09-02 01:40:24 +02:00
Thomas Guimbretiere 709f750a2a Muted BB module. It is now in BB itself. 2013-09-02 00:25:47 +02:00
Thomas Guimbretiere 281a8f26dd Reworked BB module to match the API
Added a gravestone module to override the normal detection
Added a TwilightForest module to override the normal (and buggy) detection.
2013-08-17 19:59:12 +02:00
Thomas Guimbretiere 03b8097ccb Added stack overlay.
Added support for NEI recipes.
2013-07-09 02:35:17 +02:00
Thomas Guimbretiere 6a2c137bce First nearly working version of the tech tree. 2013-07-08 21:11:30 +02:00
Thomas Guimbretiere e9c43a71fa Added skeleton files for the new screen & widget 2013-07-04 11:51:55 +02:00
Thomas Guimbretiere f7e0e24548 Source cleanup 2013-07-04 11:51:29 +02:00
Thomas Guimbretiere 73c5383d59 Now use name:meta as key.
Wildcards possible in name & meta.
2013-07-04 11:04:39 +02:00
Thomas Guimbretiere 4cbe727b81 Added default block summary.
Added csv reader.
2013-07-03 21:11:50 +02:00
Thomas Guimbretiere 00ea3d77cc New API for left side of description screen
Too much stuff, forgot...
2013-07-03 19:35:25 +02:00
Thomas Guimbretiere bc424e1d01 First shoot at wiki display.
Added registration of files to modules, handler, etc.
2013-07-02 11:55:13 +02:00
Thomas Guimbretiere 3c048e9795 Renamed GuiEnchantScreen (case correction) 2013-07-01 19:53:26 +02:00
Thomas Guimbretiere eeb3c7f48a Added WikiText widget (first version)
Added WikiScreen
Added WikiHandler
Some minor changes
2013-07-01 19:52:47 +02:00
Thomas Guimbretiere ee1118ee4b Added tag 1.3.4 for changeset 2f6144f8e55c 2013-07-01 15:04:44 +02:00
Thomas Guimbretiere 636ae4203e Added focus handling, more passthought and mouse dragging for VBar. 2013-06-29 22:32:02 +02:00
Thomas Guimbretiere 005cc66115 Merge with dev 2013-06-29 15:22:48 +02:00
Thomas Guimbretiere 5360475686 [IC2] Capped max input display
[Vanilla] Added disk display for jukeboxes
2013-06-29 15:16:50 +02:00
Thomas Guimbretiere 15f89627c6 [EnderStorage] Module added. Shows chest colors. 2013-06-29 14:52:03 +02:00
Thomas Guimbretiere e42914c721 [Thaumcraft] Added capacitor storage display 2013-06-29 13:25:05 +02:00
Thomas Guimbretiere 394d9cd564 [Thaumcraft] Added CustomPlants stack handler to return proper values 2013-06-29 12:38:07 +02:00
Thomas Guimbretiere f648c41890 Added Thaumcraft module to correct leaves bug. 2013-06-29 12:27:41 +02:00
Thomas Guimbretiere 37498dc0b1 Added a registerStackProvider taking in a class instead of a block ID
Added a StackProvider to IC2 to correct reinforced door wrong stack.
2013-06-29 11:58:05 +02:00
Thomas Guimbretiere ed1a4d010d Move exception handling to its own class.
Try/catch writeToNBT server side ("You don't know your age ?" bug)
2013-06-29 11:22:42 +02:00
Thomas Guimbretiere 83ee66d8a6 Table viewport now move depending on the value of the scrollbar itself.
Clicking above & below the button will move the viewport by 1 step.
2013-06-24 01:09:43 +02:00
Thomas Guimbretiere c4dcdd926a VScrollBar is now a real widget (accept clicks passthrought). 2013-06-24 00:39:42 +02:00
Thomas Guimbretiere 3048dfe09a Added cascading widget handling.
Moved all the old buttons to widget_old until they are turned into proper widgets
2013-06-23 23:58:10 +02:00
Thomas Guimbretiere 6acfa28ef7 Clarified how height is handled in all the class. 2013-06-23 22:43:48 +02:00
Thomas Guimbretiere bac71d0894 First working scroll bar 2013-06-23 22:36:30 +02:00
Thomas Guimbretiere b2dabe7bed Mouse event propagation done. 2013-06-23 18:00:39 +02:00
Thomas Guimbretiere 78a8f92b2f Rework of the GUI part.
First shoot at custom mouse capturing.
2013-06-23 17:25:15 +02:00
Thomas Guimbretiere 137db44e23 Nearly finished version of the enchantment screen. 2013-06-22 20:06:16 +02:00
Thomas Guimbretiere d744bdf25b Readded missing file. 2013-06-21 11:15:04 +02:00
Thomas Guimbretiere 1eb67afea6 Some refactoring.
RShift shows the empty enchant screen.
2013-06-20 13:16:55 +02:00
Thomas Guimbretiere 396dbd734a Merge with default 2013-06-20 11:24:22 +02:00
Thomas Guimbretiere fb00790fdc Merge 2013-06-20 11:10:56 +02:00
Thomas Guimbretiere 39124f153f Added tag 1.3.3 for changeset 8ee781ebab6c 2013-06-19 23:24:02 +02:00
Thomas Guimbretiere acda2b4a85 "Crashes" should show a <ERROR> when looking at a defunc block
Readded array out of bound protection.
2013-06-19 23:06:59 +02:00
Thomas Guimbretiere 5a82bb2a5c Added tag 1.3.2 for changeset 4a92f4e3296c 2013-06-19 22:37:47 +02:00
Thomas Guimbretiere 987d5556ef Added big time protection on API calls. 2013-06-19 22:37:29 +02:00
Thomas Guimbretiere f754ab5fbe Typo fixes 2013-06-19 22:02:07 +02:00
Thomas Guimbretiere 4ebbd2b3e9 Merge with default 2013-06-19 16:54:13 +02:00
Thomas Guimbretiere 6598e693f9 Underped the proxy 2013-06-19 16:52:24 +02:00
Thomas Guimbretiere 4970a268f4 Merge with default 2013-06-19 16:41:29 +02:00
Thomas Guimbretiere a984e2e8bd Added tag v1.3.1 for changeset 38f148ebeb8f 2013-06-19 15:29:17 +02:00
Thomas Guimbretiere 71aba4006b Fix for the nbt casting prb. 2013-06-19 15:28:55 +02:00
Thomas Guimbretiere da64a0a019 First UI screen for enchants. 2013-06-19 14:43:12 +02:00
Thomas Guimbretiere d687bb5383 Included EPlus tooltip request to EnchantmentHandler
EnchantementHandler is now called EnchantmentHandler (for proper english)
2013-06-19 13:34:44 +02:00
Thomas Guimbretiere 37d07ab99f Merged in odininon/waila/default (pull request #1)
Added Enchanting Plus' enchantment description. eplus will nto be required to build as it is impelmented via reflection. :)
2013-06-19 13:29:30 +02:00
Thomas Guimbretiere 172e8ca659 Creating Dev branch 2013-06-19 13:24:25 +02:00
Thomas Guimbretiere 243ca7db20 Added tag v1.3.0 for changeset 137f02853afb 2013-06-19 13:22:10 +02:00
Thomas Guimbretiere 39a979ef62 Complete rework of BC module.
Bugfixes
Code cleanup.
2013-06-19 13:21:59 +02:00
Freyja 73cf134212 Added Enchanting Plus' enchantment description. eplus will nto be required to build as it is impelmented via reflection. :) 2013-06-18 22:39:08 -04:00
Thomas Guimbretiere ae641e642d New handler for power pipes. 2013-06-17 19:03:54 +02:00
Thomas Guimbretiere 58feff48f9 Missing changes. 2013-06-17 18:07:10 +02:00
Thomas Guimbretiere c77306ae4f Refactored IC2 module. Included proper handling of transformers
Refactored BC module to match API.
Fixed TE dumper.
2013-06-17 18:06:57 +02:00
Thomas Guimbretiere 0ce1661a7f Added NBT server data dumper for testing purpose. 2013-06-17 14:30:41 +02:00
Thomas Guimbretiere 95adb69f55 Update limiter is in. It is set to 250ms between updates. 2013-06-17 14:05:26 +02:00
Thomas Guimbretiere b52b110852 Added a new config type : ConfigRemote.
Can be added by IWailaRegistrar.addConfigRemote.
Use as the same as other configs, but will return false if server do not have
waila module & will be desactivated in the config menu.
2013-06-17 11:35:41 +02:00
Thomas Guimbretiere 7f1cb7d710 Finished server nbt data request.
Reworked IC2 module to handle the next type of interface and remote data sync.
Now has 3 modules, for the 3 main interfaces.
2013-06-17 02:20:04 +02:00
Thomas Guimbretiere 94d0f4d681 Added packet handling.
Added server ping on connection (identify if server side is present)
2013-06-16 18:51:23 +02:00
Thomas Guimbretiere 5f168bb1bc Fixed registration by class. 2013-06-16 16:03:30 +02:00
Thomas Guimbretiere d29ecd09ce Added tag v1.2.0 for changeset 28ccc9a07b54 2013-06-16 15:42:49 +02:00
Thomas Guimbretiere 1fd33e8d7c Added registration based on class as well as registration based on IDs 2013-06-16 15:42:26 +02:00
Thomas Guimbretiere f43bfad3d8 Changed the signature of IWailaBlock.
Now the methods are taking in a IWailaDataAccessor instead of 10 arguments.
The IWailaDataAccessor gives access to all the required values for the block
(world, player, Block, id, metadata, entity, etc)
2013-06-16 13:44:32 +02:00
Thomas Guimbretiere 953e255189 Changed API signature to include Block & TileEntity for optimization 2013-06-15 18:17:39 +02:00
Thomas Guimbretiere e953471d3e Added Vanilla module.
Added ID:Metadata display (optional)
2013-06-15 18:09:22 +02:00
Thomas Guimbretiere 78c8c9a2ad Smaller buttons. 2013-06-15 16:57:30 +02:00
Thomas Guimbretiere db75285bc5 Import cleanup
Eclipse source cleanup is NOT RECURSIVE !
2013-06-15 16:50:14 +02:00
Thomas Guimbretiere cbd8b81f90 Added an external module API.
Some refactoring.
2013-06-15 13:03:03 +02:00
Thomas Guimbretiere f7d397211f Added helper method for config registration.
Some interface renaming.
2013-06-14 18:33:52 +02:00
Thomas Guimbretiere 0eb9f813f7 Added API, menus, keybinds and more. 2013-06-14 18:10:05 +02:00
Thomas Guimbretiere 8387373850 Added IC2 integration (In/out voltages) 2013-06-13 00:29:27 +02:00
Thomas Guimbretiere fa6218a526 Updated to match current NEI version.
Should be compatible with NEI 1.5.2.28
2013-06-12 12:13:32 +02:00
Thomas Guimbretiere 5dd15fd727 Removed old versions of modules. 2013-06-09 17:12:29 +02:00
Thomas Guimbretiere 5206ab683e First public push. Internal version 0.0.3 2013-06-09 16:58:28 +02:00
241 changed files with 3270 additions and 6882 deletions

No files matched your search

-4
View File
@@ -1,4 +0,0 @@
Waila-1.7.10
============
A port of Prof. Mobius' Minecraft mod, Waila, to Minecraft 1.7.10. Unofficial.
@@ -1,148 +1,137 @@
screen.button.waila=Waila
screen.button.modules=Module
screen.label.scale=Maße
screen.label.dragtuto=Verschiebe das HUD, um seine Position zu ändern.
screen.button.default=Standard
screen.button.cancel=Abbrechen
screen.button.ok=Ok
screen.button.yes=Ja
screen.button.no=Nein
screen.button.back=Zurück
screen.button.hidden=Versteckt
screen.button.visible=Sichtbar
screen.button.maintained=Gewartet
screen.button.toggled=Geschaltet
choice.showhidewaila=Zeige/Verstecke Waila
choice.showhideidmeta=Zeige ID:Metadata
choice.toggledmaintained=Geschaltet/Gewartet
choice.showliquids=Flüssigkeiten
choice.shifttoggledblock=Blöcke schleichend umschalten
choice.shifttoggledents=Lebewesen schleichend umschalten
screen.button.configureaspect=Konfiguriere Aspekt...
enchant.title.name=Name
enchant.title.minlvl=Min lvl
enchant.title.maxlvl=Max lvl
enchant.title.weight=Gewicht
enchant.label.enchantability=Verzauberbarkeit
waila.keybind.wailaconfig=[Waila] Config-Bildschirm
waila.keybind.wailadisplay=[Waila] Zeigen/Verstecken
waila.keybind.liquid=[Waila] Zeige Flüssigkeiten
waila.keybind.recipe=[Waila] Zeige Rezept
waila.keybind.usage=[Waila] Zeige Nutzung
waila.keybind.testing=[Waila] Testen
client.msg.norecipe=Kein Rezept gefunden.
client.msg.nousage=Keine Nutzung gefunden.
hud.msg.none=<Nichts>
hud.msg.empty=<Leer>
hud.msg.output=Output
hud.msg.input=Input
hud.msg.out=Out
hud.msg.in=In
hud.msg.power=Energie
hud.msg.storage=Speicher
hud.msg.stored=Gespeichert
hud.msg.any=Jegliches
hud.msg.mode=Modus
hud.msg.maxpower=Max Energie
hud.msg.trigger=Trigger
hud.msg.maxio=Max IO
hud.msg.send=Senden
hud.msg.recv=Empfangen
hud.msg.item=Item
hud.msg.fluid=Flüssigk.
hud.msg.energ=Energie
hud.msg.frequency=Frequenz
hud.msg.owner=Besitzer
hud.msg.public=Öffentlich
hud.msg.restricted=Eingeschränkt
hud.msg.private=Privat
hud.msg.white=Weiß
hud.msg.orange=Orange
hud.msg.magenta=Magenta
hud.msg.lblue=HBlau
hud.msg.yellow=Gelb
hud.msg.lime=HGrün
hud.msg.pink=Pink
hud.msg.gray=Grau
hud.msg.lgray=HGrau
hud.msg.cyan=Türkis
hud.msg.purple=Violett
hud.msg.blue=Blau
hud.msg.brown=Braun
hud.msg.green=Grün
hud.msg.red=Rot
hud.msg.black=Schwarz
hud.msg.growth=Wachstum
hud.msg.mature=Erwachsen
hud.msg.off=Aus
hud.msg.on=An
hud.msg.state=Status
hud.msg.delay=Verzögerung
hud.msg.comparator=Komparator
hud.msg.substractor=Substraktor
hud.msg.record=Platte
hud.msg.offers=Angebote
hud.msg.demands=Bedarf
option.appeng.monitorcontent=Monitorinhalt
option.bb.content=Fassinhalt
option.bc.tankamount=Flüssigk.-Menge
option.bc.tanktype=Flüssigk.-Typ
option.enderstorage.colors=Farben
option.ic2.inputeumach=Max EU-Input [Maschinen]
option.ic2.inputeuother=Max EU-Input [Anderes]
option.ic2.inputeu=Max EU-Input
option.ic2.outputeu=Max EU-Output
option.ic2.storage=Energie gespeichert
option.ic2.consump=Zeige Verbrauch
option.ic2.tradeomat=Zeige Tauschautomaten-Forderung
option.thaumcraft.storedvis=Kondensatorspeicher
option.thermalexpansion.energyhandler=Zeige RO-Speicher
option.thermalexpansion.energycell=Zeige EZellen IN/OUT
option.thermalexpansion.fluidtype=Zeige Flüssigk.-Typ
option.thermalexpansion.fluidamount=Zeige Flüssigk.-Menge
option.thermalexpansion.tankmode=Zeige Tankmodus
option.thermalexpansion.tesssendrecv=Tesseraktmodus
option.thermalexpansion.tessfreq=Tesseraktfrequenz
option.thermalexpansion.owner=Zeige Besitzer
option.thermalexpansion.conditemmode=Zeige Itemduktmodus
option.vanilla.spawntype=Spawner-Typ
option.vanilla.growthvalue=Wachstumswert
option.vanilla.leverstate=Hebelstatus
option.vanilla.repeater=Repeater-Verzögerung
option.vanilla.comparator=Komparatormodus
option.vanilla.redstone=Redstone-Stärke
option.vanilla.jukebox=Musikbox-Platte
option.vanilla.silverfish=Silberfisch verdecken
option.etb.displaydata=Zeige Sockeldaten
option.enderio.inout=Zeige Input/Output
option.enderio.storage=Zeige gespeicherte MJ
option.enderio.owner=Zeige Block-Besitzer
option.enderio.channel=Zeige Hypercube-Kanal
option.bcapi.storage=Zeige gespeicherte MJ
option.bcapi.consump=Zeige maximale Energie
option.bcapi.trigger=Zeige Startenergie
option.pr.showio=Zeige Gatter IO
option.pr.showdata=Zeige Gatterdaten
option.extrautilities.fluidamount=Zeige Flüssigk.-Menge
option.openblocks.fluidamount=Zeige Flüssigk.-Menge
option.railcraft.fluidamount=Zeige Flüssigk.-Menge
option.secretrooms.hide=Getarnte Blöcke verdecken
option.carpenters.hide=Getarnte Blöcke verdecken
option.stevescarts.showall=Zeige Daten
option.stevescarts.colorblind=Farbenblind-Modus
option.stevescarts.shifttoggle=Schleichend Umschalten
option.general.showhp=Zeige Gesundheit von Lebewesen
option.general.showcrop=Zeige Pflanzenwachstum
option.thaumcraft.aspects=Zeige Aspekte
screen.button.waila=Waila
screen.button.modules=Module
screen.label.scale=Maße
screen.label.dragtuto=Verschiebe das HUD, um seine Position zu ändern.
screen.button.default=Standard
screen.button.cancel=Abbrechen
screen.button.ok=Ok
screen.button.yes=Ja
screen.button.no=Nein
screen.button.back=Zurück
screen.button.hidden=Versteckt
screen.button.visible=Sichtbar
screen.button.maintained=Gewartet
screen.button.toggled=Geschaltet
choice.showhidewaila=Zeige/Verstecke Waila
choice.showhideidmeta=Zeige ID:Metadata
choice.toggledmaintained=Geschaltet/Gewartet
choice.showliquids=Flüssigkeiten
screen.button.configureaspect=Konfiguriere Aspekt...
enchant.title.name=Name
enchant.title.minlvl=Min lvl
enchant.title.maxlvl=Max lvl
enchant.title.weight=Gewicht
enchant.label.enchantability=Verzauberbarkeit
waila.keybind.wailaconfig=[Waila] Config-Bildschirm
waila.keybind.wailadisplay=[Waila] Zeigen/Verstecken
waila.keybind.liquid=[Waila] Zeige Flüssigkeiten
waila.keybind.recipe=[Waila] Zeige Rezept
waila.keybind.usage=[Waila] Zeige Nutzung
waila.keybind.testing=[Waila] Testen
client.msg.norecipe=Kein Rezept gefunden.
client.msg.nousage=Keine Nutzung gefunden.
hud.msg.none=<Nichts>
hud.msg.empty=<Leer>
hud.msg.output=Output
hud.msg.input=Input
hud.msg.out=Out
hud.msg.in=In
hud.msg.power=Energie
hud.msg.storage=Speicher
hud.msg.stored=Gespeichert
hud.msg.any=Jegliches
hud.msg.mode=Modus
hud.msg.maxpower=Max Energie
hud.msg.trigger=Trigger
hud.msg.maxio=Max IO
hud.msg.send=Senden
hud.msg.recv=Empfangen
hud.msg.item=Item
hud.msg.fluid=Flüssigk.
hud.msg.energ=Energie
hud.msg.frequency=Frequenz
hud.msg.owner=Besitzer
hud.msg.public=Öffentlich
hud.msg.restricted=Eingeschränkt
hud.msg.private=Privat
hud.msg.white=Weiß
hud.msg.orange=Orange
hud.msg.magenta=Magenta
hud.msg.lblue=HBlau
hud.msg.yellow=Gelb
hud.msg.lime=HGrün
hud.msg.pink=Pink
hud.msg.gray=Grau
hud.msg.lgray=HGrau
hud.msg.cyan=Türkis
hud.msg.purple=Violett
hud.msg.blue=Blau
hud.msg.brown=Braun
hud.msg.green=Grün
hud.msg.red=Rot
hud.msg.black=Schwarz
hud.msg.growth=Wachstum
hud.msg.mature=Erwachsen
hud.msg.off=Aus
hud.msg.on=An
hud.msg.state=Status
hud.msg.delay=Verzögerung
hud.msg.comparator=Komparator
hud.msg.substractor=Substraktor
hud.msg.record=Platte
hud.msg.offers=Angebote
hud.msg.demands=Bedarf
option.appeng.monitorcontent=Monitorinhalt
option.bb.content=Fassinhalt
option.bc.tankamount=Flüssigk.-Menge
option.bc.tanktype=Flüssigk.-Typ
option.enderstorage.colors=Farben
option.ic2.inputeumach=Max EU-Input [Maschinen]
option.ic2.inputeuother=Max EU-Input [Anderes]
option.ic2.inputeu=Max EU-Input
option.ic2.outputeu=Max EU-Output
option.ic2.storage=Energie gespeichert
option.ic2.consump=Zeige Verbrauch
option.ic2.tradeomat=Zeige Tauschautomaten-Forderung
option.thaumcraft.storedvis=Kondensatorspeicher
option.thermalexpansion.energyhandler=Zeige RO-Speicher
option.thermalexpansion.energycell=Zeige EZellen IN/OUT
option.thermalexpansion.fluidtype=Zeige Flüssigk.-Typ
option.thermalexpansion.fluidamount=Zeige Flüssigk.-Menge
option.thermalexpansion.tankmode=Zeige Tankmodus
option.thermalexpansion.tesssendrecv=Tesseraktmodus
option.thermalexpansion.tessfreq=Tesseraktfrequenz
option.thermalexpansion.owner=Zeige Besitzer
option.thermalexpansion.conditemmode=Zeige Itemduktmodus
option.vanilla.spawntype=Spawner-Typ
option.vanilla.growthvalue=Wachstumswert
option.vanilla.leverstate=Hebelstatus
option.vanilla.repeater=Repeater-Verzögerung
option.vanilla.comparator=Komparatormodus
option.vanilla.redstone=Redstone-Stärke
option.vanilla.jukebox=Musikbox-Platte
option.etb.displaydata=Zeige Sockeldaten
option.enderio.inout=Zeige Input/Output
option.enderio.storage=Zeige gespeicherte MJ
option.enderio.owner=Zeige Block-Besitzer
option.enderio.channel=Zeige Hypercube-Kanal
option.bcapi.storage=Zeige gespeicherte MJ
option.bcapi.consump=Zeige maximale Energie
option.bcapi.trigger=Zeige Startenergie
option.pr.showio=Zeige Gatter IO
option.pr.showdata=Zeige Gatterdaten
option.extrautilities.fluidamount=Zeige Flüssigk.-Menge
option.openblocks.fluidamount=Zeige Flüssigk.-Menge
option.railcraft.fluidamount=Zeige Flüssigk.-Menge
@@ -18,8 +18,6 @@ choice.showhidewaila=Show/Hide Waila
choice.showhideidmeta=Show ID:Metadata
choice.toggledmaintained=Toggled/Maintained
choice.showliquids=Liquids
choice.shifttoggledblock=Sneak toggle blocks
choice.shifttoggledents=Sneak toggle entities
screen.button.configureaspect=Configure aspect...
enchant.title.name=Name
@@ -124,7 +122,6 @@ option.vanilla.repeater=Repeater delay
option.vanilla.comparator=Comparator mode
option.vanilla.redstone=Redstone power
option.vanilla.jukebox=Jukebox disk
option.vanilla.silverfish=Hide silverfish
option.etb.displaydata=Show socket data
option.enderio.inout=Show input/output
option.enderio.storage=Show stored MJ
@@ -137,12 +134,4 @@ option.pr.showio=Show gates IO
option.pr.showdata=Show gates data
option.extrautilities.fluidamount=Show fluid amount
option.openblocks.fluidamount=Show fluid amount
option.railcraft.fluidamount=Show fluid amount
option.secretrooms.hide=Hide camo blocks
option.carpenters.hide=Hide camo blocks
option.stevescarts.showall=Show data
option.stevescarts.colorblind=Colorblind mode
option.stevescarts.shifttoggle=Shift toggle
option.general.showhp=Show entities health
option.general.showcrop=Show crop growth
option.thaumcraft.aspects=Show aspects
option.railcraft.fluidamount=Show fluid amount
@@ -1,117 +1,117 @@
screen.button.waila=Waila
screen.button.modules=Modules
screen.label.scale=Schaal
screen.label.dragtuto=Sleep de HUD om zijn positie in te stellen.
screen.button.default=Standaard
screen.button.cancel=Annuleren
screen.button.ok=Ok
screen.button.yes=Ja
screen.button.no=Nee
screen.button.back=Terug
screen.button.hidden=Verborgen
screen.button.visible=Zichtbaar
screen.button.maintained=Gehandhaafd
screen.button.toggled=Omgeschakeld
choice.showhidewaila=Toon/Verberg Waila
choice.showhideidmeta=Toon ID:Metadata
choice.toggledmaintained=Omgeschakeld/Gehandhaafd
choice.showliquids=Vloeistoffen
screen.button.configureaspect=Configureer aspect...
enchant.title.name=Naam
enchant.title.minlvl=Min lvl
enchant.title.maxlvl=Max lvl
enchant.title.weight=Gewicht
enchant.label.enchantability=Enchantbaarheid
keybind.configscreen=[Waila] Configuratiescherm
keybind.showhide=[Waila] Toon/Verberg
keybind.showliquid=[Waila] Toon vloeistoffen
keybind.showrecipe=[Waila] Toon recepten
keybind.showusage=[Waila] Toon gebruik
keybind.testing=[Waila] Testen
client.msg.norecipe=Geen recept gevonden.
client.msg.nousage=Geen gebruik gevonden.
hud.msg.none=<Geen>
hud.msg.empty=<Leeg>
hud.msg.output=Uitvoer
hud.msg.input=Invoer
hud.msg.out=Uit
hud.msg.in=In
hud.msg.power=Vermogen
hud.msg.storage=Opslag
hud.msg.any=Om het even welke
hud.msg.mode=Modus
hud.msg.send=Zend
hud.msg.recv=Ontv
hud.msg.item=Item
hud.msg.fluid=Vloeistof
hud.msg.energ=Energie
hud.msg.frequency=Frequentie
hud.msg.owner=Eigenaar
hud.msg.public=Publiek
hud.msg.restricted=Begrensd
hud.msg.private=Privé
hud.msg.white=Wit
hud.msg.orange=Oranje
hud.msg.magenta=Magenta
hud.msg.lblue=LBlauw
hud.msg.yellow=Geel
hud.msg.lime=Limoen
hud.msg.pink=Roze
hud.msg.gray=Grijs
hud.msg.lgray=LGrijs
hud.msg.cyan=Cyaan
hud.msg.purple=Paars
hud.msg.blue=Blauw
hud.msg.brown=Bruin
hud.msg.green=Groen
hud.msg.red=Rood
hud.msg.black=Zwart
hud.msg.growth=Groei
hud.msg.mature=Volwassen
hud.msg.off=Af
hud.msg.on=Aan
hud.msg.state=Status
hud.msg.delay=Vertraging
hud.msg.comparator=Vergelijker
hud.msg.substractor=Aftrekker
hud.msg.record=Neem op
option.appeng.monitorcontent=Scherm inhoud
option.bb.content=Ton inhoud
option.bc.tankamount=Vloeistofhoeveelheid
option.bc.tanktype=Vloeistoftype
option.enderstorage.colors=Kleuren
option.ic2.inputeumach=Max EU invoer [Machines]
option.ic2.inputeuother=Max EU invoer [Andere]
option.ic2.inputeu=Max EU invoer
option.ic2.outputeu=Max EU uitvoer
option.ic2.storage=Opgeslagen energie
option.thaumcraft.storedvis=Condensator opslag
option.thermalexpansion.energyhandler=Toon RF opslag
option.thermalexpansion.energycell=Toon ECell IN/UIT
option.thermalexpansion.fluidtype=Toon vloeistoftype
option.thermalexpansion.fluidamount=Toon vloeistofhoeveelheid
option.thermalexpansion.tankmode=Toon tank modus
option.thermalexpansion.tesssendrecv=Tesseract modus
option.thermalexpansion.tessfreq=Tesseract frequentie
option.thermalexpansion.owner=Toon eigenaar
option.vanilla.spawntype=Spawner type
option.vanilla.growthvalue=Groei hoeveelheid
option.vanilla.leverstate=Hendel status
option.vanilla.repeater=Herhaler vertraging
option.vanilla.comparator=Vergelijker modus
option.vanilla.redstone=Redstone vermogen
option.vanilla.jukebox=Jukebox schijf
option.extrautilities.fluidamount=Toon vloeistofhoeveelheid
option.openblocks.fluidamount=Toon vloeistofhoeveelheid
screen.button.waila=Waila
screen.button.modules=Modules
screen.label.scale=Schaal
screen.label.dragtuto=Sleep de HUD om zijn positie in te stellen.
screen.button.default=Standaard
screen.button.cancel=Annuleren
screen.button.ok=Ok
screen.button.yes=Ja
screen.button.no=Nee
screen.button.back=Terug
screen.button.hidden=Verborgen
screen.button.visible=Zichtbaar
screen.button.maintained=Gehandhaafd
screen.button.toggled=Omgeschakeld
choice.showhidewaila=Toon/Verberg Waila
choice.showhideidmeta=Toon ID:Metadata
choice.toggledmaintained=Omgeschakeld/Gehandhaafd
choice.showliquids=Vloeistoffen
screen.button.configureaspect=Configureer aspect...
enchant.title.name=Naam
enchant.title.minlvl=Min lvl
enchant.title.maxlvl=Max lvl
enchant.title.weight=Gewicht
enchant.label.enchantability=Enchantbaarheid
keybind.configscreen=[Waila] Configuratiescherm
keybind.showhide=[Waila] Toon/Verberg
keybind.showliquid=[Waila] Toon vloeistoffen
keybind.showrecipe=[Waila] Toon recepten
keybind.showusage=[Waila] Toon gebruik
keybind.testing=[Waila] Testen
client.msg.norecipe=Geen recept gevonden.
client.msg.nousage=Geen gebruik gevonden.
hud.msg.none=<Geen>
hud.msg.empty=<Leeg>
hud.msg.output=Uitvoer
hud.msg.input=Invoer
hud.msg.out=Uit
hud.msg.in=In
hud.msg.power=Vermogen
hud.msg.storage=Opslag
hud.msg.any=Om het even welke
hud.msg.mode=Modus
hud.msg.send=Zend
hud.msg.recv=Ontv
hud.msg.item=Item
hud.msg.fluid=Vloeistof
hud.msg.energ=Energie
hud.msg.frequency=Frequentie
hud.msg.owner=Eigenaar
hud.msg.public=Publiek
hud.msg.restricted=Begrensd
hud.msg.private=Privé
hud.msg.white=Wit
hud.msg.orange=Oranje
hud.msg.magenta=Magenta
hud.msg.lblue=LBlauw
hud.msg.yellow=Geel
hud.msg.lime=Limoen
hud.msg.pink=Roze
hud.msg.gray=Grijs
hud.msg.lgray=LGrijs
hud.msg.cyan=Cyaan
hud.msg.purple=Paars
hud.msg.blue=Blauw
hud.msg.brown=Bruin
hud.msg.green=Groen
hud.msg.red=Rood
hud.msg.black=Zwart
hud.msg.growth=Groei
hud.msg.mature=Volwassen
hud.msg.off=Af
hud.msg.on=Aan
hud.msg.state=Status
hud.msg.delay=Vertraging
hud.msg.comparator=Vergelijker
hud.msg.substractor=Aftrekker
hud.msg.record=Neem op
option.appeng.monitorcontent=Scherm inhoud
option.bb.content=Ton inhoud
option.bc.tankamount=Vloeistofhoeveelheid
option.bc.tanktype=Vloeistoftype
option.enderstorage.colors=Kleuren
option.ic2.inputeumach=Max EU invoer [Machines]
option.ic2.inputeuother=Max EU invoer [Andere]
option.ic2.inputeu=Max EU invoer
option.ic2.outputeu=Max EU uitvoer
option.ic2.storage=Opgeslagen energie
option.thaumcraft.storedvis=Condensator opslag
option.thermalexpansion.energyhandler=Toon RF opslag
option.thermalexpansion.energycell=Toon ECell IN/UIT
option.thermalexpansion.fluidtype=Toon vloeistoftype
option.thermalexpansion.fluidamount=Toon vloeistofhoeveelheid
option.thermalexpansion.tankmode=Toon tank modus
option.thermalexpansion.tesssendrecv=Tesseract modus
option.thermalexpansion.tessfreq=Tesseract frequentie
option.thermalexpansion.owner=Toon eigenaar
option.vanilla.spawntype=Spawner type
option.vanilla.growthvalue=Groei hoeveelheid
option.vanilla.leverstate=Hendel status
option.vanilla.repeater=Herhaler vertraging
option.vanilla.comparator=Vergelijker modus
option.vanilla.redstone=Redstone vermogen
option.vanilla.jukebox=Jukebox schijf
option.extrautilities.fluidamount=Toon vloeistofhoeveelheid
option.openblocks.fluidamount=Toon vloeistofhoeveelheid
option.railcraft.fluidamount=Toon vloeistofhoeveelheid
@@ -1,131 +1,131 @@
screen.button.waila=Waila
screen.button.modules=Модули
screen.label.scale=Размер
screen.label.dragtuto=Перетащите интерфейс, чтобы изменить позицию.
screen.button.default=По умолчанию
screen.button.cancel=Отмена
screen.button.ok=Ок
screen.button.yes=Да
screen.button.no=Нет
screen.button.back=Назад
screen.button.hidden=Скрывать
screen.button.visible=Показывать
screen.button.maintained=При нажатой клавише
screen.button.toggled=Вкл./Выкл. гор. клавишей
choice.showhidewaila=Показать/Скрыть Waila
choice.showhideidmeta=Показать ID:Метаданные
choice.toggledmaintained=Переключ./Нажатая клав.
choice.showliquids=Жидкости
screen.button.configureaspect=Настроить индикатор...
enchant.title.name=Название
enchant.title.minlvl=Мин. уровень
enchant.title.maxlvl=Макс. уровень
enchant.title.weight=Вес
enchant.label.enchantability=Зачарование
waila.keybind.wailaconfig=[Waila] Меню настроек
waila.keybind.wailadisplay=[Waila] Показать/Скрыть
waila.keybind.liquid=[Waila] Показать жидкости
waila.keybind.recipe=[Waila] Показать рецепт
waila.keybind.usage=[Waila] Показать применение
waila.keybind.testing=[Waila] Тестировать
client.msg.norecipe=Рецептов не найдено.
client.msg.nousage=Применений не найдено.
hud.msg.none=<Ничего>
hud.msg.empty=<Пусто>
hud.msg.output=Вывод
hud.msg.input=Ввод
hud.msg.out=Из
hud.msg.in=В
hud.msg.power=Энергия
hud.msg.storage=Хранилище
hud.msg.any=Всё
hud.msg.mode=Режим
hud.msg.maxpower=Макс. энергия
hud.msg.trigger=Триггер
hud.msg.maxio=Макс. ввод/вывод
hud.msg.send=Передача
hud.msg.recv=Приём
hud.msg.item=Предмет
hud.msg.fluid=Жидкость
hud.msg.energ=Энергия
hud.msg.frequency=Частота
hud.msg.owner=Владелец
hud.msg.public=Публичный
hud.msg.restricted=Ограниченный
hud.msg.private=Приватный
hud.msg.white=Белый
hud.msg.orange=Оранжевый
hud.msg.magenta=Сиреневый
hud.msg.lblue=Светло-синий
hud.msg.yellow=Жёлтый
hud.msg.lime=Светло-зелёный
hud.msg.pink=Розовый
hud.msg.gray=Серый
hud.msg.lgray=Светло-серый
hud.msg.cyan=Бирюзовый
hud.msg.purple=Фиолетовый
hud.msg.blue=Синий
hud.msg.brown=Коричневый
hud.msg.green=Зелёный
hud.msg.red=Красный
hud.msg.black=Чёрный
hud.msg.growth=Рост
hud.msg.mature=Вырос
hud.msg.off=Выкл.
hud.msg.on=Вкл.
hud.msg.state=Статус
hud.msg.delay=Задержка
hud.msg.comparator=Компаратор
hud.msg.substractor=Вычитатель
hud.msg.record=Пластинка
option.appeng.monitorcontent=Содержимое монитора
option.bb.content=Содержимое бочки
option.bc.tankamount=Кол-во жидкости
option.bc.tanktype=Тип жидкости
option.enderstorage.colors=Цвета
option.ic2.inputeumach=Макс. ввод еЭ [Машины]
option.ic2.inputeuother=Макс. ввод еЭ [Другое]
option.ic2.inputeu=Макс. ввод еЭ
option.ic2.outputeu=Макс. вывод еЭ
option.ic2.storage=Заряд энергии
option.thaumcraft.storedvis=Заряд конденсатора
option.thermalexpansion.energyhandler=Показывать заряд заряжателя
option.thermalexpansion.energycell=Показывать Ввод/Вывод Р.батареи
option.thermalexpansion.fluidtype=Показывать тип жидкости
option.thermalexpansion.fluidamount=Показывать кол-во жидкости
option.thermalexpansion.tankmode=Режим цистерны
option.thermalexpansion.tesssendrecv=Режим тессеракта
option.thermalexpansion.tessfreq=Частота тессеракта
option.thermalexpansion.owner=Показывать владельца
option.thermalexpansion.conditemmode=Показывать режим труб
option.vanilla.spawntype=Тип спаунера
option.vanilla.growthvalue=Стадия роста
option.vanilla.leverstate=Положение рычага
option.vanilla.repeater=Задержка повторителя
option.vanilla.comparator=Режим компаратора
option.vanilla.redstone=Сила красного камня
option.vanilla.jukebox=Пластинка в проигрывателе
option.etb.displaydata=Показывать инф. о сокетах
option.enderio.inout=Показывать ввод/вывод
option.enderio.storage=Показывать заряд MJ
option.enderio.owner=Показывать владельца блока
option.enderio.channel=Показывать канал гиперкуба
option.bcapi.storage=Показывать заряд MJ
option.bcapi.consump=Показывать макс. энергию
option.bcapi.trigger=Показывать энергию активации
option.pr.showio=Показывать ввод/вывод схем
option.pr.showdata=Показывать инф. о схемах
option.extrautilities.fluidamount=Показывать кол-во жидкости
option.openblocks.fluidamount=Показывать кол-во жидкости
screen.button.waila=Waila
screen.button.modules=Модули
screen.label.scale=Размер
screen.label.dragtuto=Перетащите интерфейс, чтобы изменить позицию.
screen.button.default=По умолчанию
screen.button.cancel=Отмена
screen.button.ok=Ок
screen.button.yes=Да
screen.button.no=Нет
screen.button.back=Назад
screen.button.hidden=Скрывать
screen.button.visible=Показывать
screen.button.maintained=При нажатой клавише
screen.button.toggled=Вкл./Выкл. гор. клавишей
choice.showhidewaila=Показать/Скрыть Waila
choice.showhideidmeta=Показать ID:Метаданные
choice.toggledmaintained=Переключ./Нажатая клав.
choice.showliquids=Жидкости
screen.button.configureaspect=Настроить индикатор...
enchant.title.name=Название
enchant.title.minlvl=Мин. уровень
enchant.title.maxlvl=Макс. уровень
enchant.title.weight=Вес
enchant.label.enchantability=Зачарование
waila.keybind.wailaconfig=[Waila] Меню настроек
waila.keybind.wailadisplay=[Waila] Показать/Скрыть
waila.keybind.liquid=[Waila] Показать жидкости
waila.keybind.recipe=[Waila] Показать рецепт
waila.keybind.usage=[Waila] Показать применение
waila.keybind.testing=[Waila] Тестировать
client.msg.norecipe=Рецептов не найдено.
client.msg.nousage=Применений не найдено.
hud.msg.none=<Ничего>
hud.msg.empty=<Пусто>
hud.msg.output=Вывод
hud.msg.input=Ввод
hud.msg.out=Из
hud.msg.in=В
hud.msg.power=Энергия
hud.msg.storage=Хранилище
hud.msg.any=Всё
hud.msg.mode=Режим
hud.msg.maxpower=Макс. энергия
hud.msg.trigger=Триггер
hud.msg.maxio=Макс. ввод/вывод
hud.msg.send=Передача
hud.msg.recv=Приём
hud.msg.item=Предмет
hud.msg.fluid=Жидкость
hud.msg.energ=Энергия
hud.msg.frequency=Частота
hud.msg.owner=Владелец
hud.msg.public=Публичный
hud.msg.restricted=Ограниченный
hud.msg.private=Приватный
hud.msg.white=Белый
hud.msg.orange=Оранжевый
hud.msg.magenta=Сиреневый
hud.msg.lblue=Светло-синий
hud.msg.yellow=Жёлтый
hud.msg.lime=Светло-зелёный
hud.msg.pink=Розовый
hud.msg.gray=Серый
hud.msg.lgray=Светло-серый
hud.msg.cyan=Бирюзовый
hud.msg.purple=Фиолетовый
hud.msg.blue=Синий
hud.msg.brown=Коричневый
hud.msg.green=Зелёный
hud.msg.red=Красный
hud.msg.black=Чёрный
hud.msg.growth=Рост
hud.msg.mature=Вырос
hud.msg.off=Выкл.
hud.msg.on=Вкл.
hud.msg.state=Статус
hud.msg.delay=Задержка
hud.msg.comparator=Компаратор
hud.msg.substractor=Вычитатель
hud.msg.record=Пластинка
option.appeng.monitorcontent=Содержимое монитора
option.bb.content=Содержимое бочки
option.bc.tankamount=Кол-во жидкости
option.bc.tanktype=Тип жидкости
option.enderstorage.colors=Цвета
option.ic2.inputeumach=Макс. ввод еЭ [Машины]
option.ic2.inputeuother=Макс. ввод еЭ [Другое]
option.ic2.inputeu=Макс. ввод еЭ
option.ic2.outputeu=Макс. вывод еЭ
option.ic2.storage=Заряд энергии
option.thaumcraft.storedvis=Заряд конденсатора
option.thermalexpansion.energyhandler=Показывать заряд заряжателя
option.thermalexpansion.energycell=Показывать Ввод/Вывод Р.батареи
option.thermalexpansion.fluidtype=Показывать тип жидкости
option.thermalexpansion.fluidamount=Показывать кол-во жидкости
option.thermalexpansion.tankmode=Режим цистерны
option.thermalexpansion.tesssendrecv=Режим тессеракта
option.thermalexpansion.tessfreq=Частота тессеракта
option.thermalexpansion.owner=Показывать владельца
option.thermalexpansion.conditemmode=Показывать режим труб
option.vanilla.spawntype=Тип спаунера
option.vanilla.growthvalue=Стадия роста
option.vanilla.leverstate=Положение рычага
option.vanilla.repeater=Задержка повторителя
option.vanilla.comparator=Режим компаратора
option.vanilla.redstone=Сила красного камня
option.vanilla.jukebox=Пластинка в проигрывателе
option.etb.displaydata=Показывать инф. о сокетах
option.enderio.inout=Показывать ввод/вывод
option.enderio.storage=Показывать заряд MJ
option.enderio.owner=Показывать владельца блока
option.enderio.channel=Показывать канал гиперкуба
option.bcapi.storage=Показывать заряд MJ
option.bcapi.consump=Показывать макс. энергию
option.bcapi.trigger=Показывать энергию активации
option.pr.showio=Показывать ввод/вывод схем
option.pr.showdata=Показывать инф. о схемах
option.extrautilities.fluidamount=Показывать кол-во жидкости
option.openblocks.fluidamount=Показывать кол-во жидкости
option.railcraft.fluidamount=Показывать кол-во жидкости
File renamed without changes.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

@@ -1,323 +1,323 @@
package au.com.bytecode.opencsv;
/**
Copyright 2005 Bytecode Pty Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* A very simple CSV parser released under a commercial-friendly license.
* This just implements splitting a single line into fields.
*
* @author Glen Smith
* @author Rainer Pruy
*/
public class CSVParser {
private final char separator;
private final char quotechar;
private final char escape;
private final boolean strictQuotes;
private String pending;
private boolean inField = false;
private final boolean ignoreLeadingWhiteSpace;
/**
* The default separator to use if none is supplied to the constructor.
*/
public static final char DEFAULT_SEPARATOR = ',';
public static final int INITIAL_READ_SIZE = 128;
/**
* The default quote character to use if none is supplied to the
* constructor.
*/
public static final char DEFAULT_QUOTE_CHARACTER = '"';
/**
* The default escape character to use if none is supplied to the
* constructor.
*/
public static final char DEFAULT_ESCAPE_CHARACTER = '\\';
/**
* The default strict quote behavior to use if none is supplied to the
* constructor
*/
public static final boolean DEFAULT_STRICT_QUOTES = false;
/**
* The default leading whitespace behavior to use if none is supplied to the
* constructor
*/
public static final boolean DEFAULT_IGNORE_LEADING_WHITESPACE = true;
/**
* This is the "null" character - if a value is set to this then it is ignored.
* I.E. if the quote character is set to null then there is no quote character.
*/
public static final char NULL_CHARACTER = '\0';
/**
* Constructs CSVParser using a comma for the separator.
*/
public CSVParser() {
this(DEFAULT_SEPARATOR, DEFAULT_QUOTE_CHARACTER, DEFAULT_ESCAPE_CHARACTER);
}
/**
* Constructs CSVParser with supplied separator.
*
* @param separator the delimiter to use for separating entries.
*/
public CSVParser(char separator) {
this(separator, DEFAULT_QUOTE_CHARACTER, DEFAULT_ESCAPE_CHARACTER);
}
/**
* Constructs CSVParser with supplied separator and quote char.
*
* @param separator the delimiter to use for separating entries
* @param quotechar the character to use for quoted elements
*/
public CSVParser(char separator, char quotechar) {
this(separator, quotechar, DEFAULT_ESCAPE_CHARACTER);
}
/**
* Constructs CSVReader with supplied separator and quote char.
*
* @param separator the delimiter to use for separating entries
* @param quotechar the character to use for quoted elements
* @param escape the character to use for escaping a separator or quote
*/
public CSVParser(char separator, char quotechar, char escape) {
this(separator, quotechar, escape, DEFAULT_STRICT_QUOTES);
}
/**
* Constructs CSVReader with supplied separator and quote char.
* Allows setting the "strict quotes" flag
*
* @param separator the delimiter to use for separating entries
* @param quotechar the character to use for quoted elements
* @param escape the character to use for escaping a separator or quote
* @param strictQuotes if true, characters outside the quotes are ignored
*/
public CSVParser(char separator, char quotechar, char escape, boolean strictQuotes) {
this(separator, quotechar, escape, strictQuotes, DEFAULT_IGNORE_LEADING_WHITESPACE);
}
/**
* Constructs CSVReader with supplied separator and quote char.
* Allows setting the "strict quotes" and "ignore leading whitespace" flags
*
* @param separator the delimiter to use for separating entries
* @param quotechar the character to use for quoted elements
* @param escape the character to use for escaping a separator or quote
* @param strictQuotes if true, characters outside the quotes are ignored
* @param ignoreLeadingWhiteSpace if true, white space in front of a quote in a field is ignored
*/
public CSVParser(char separator, char quotechar, char escape, boolean strictQuotes, boolean ignoreLeadingWhiteSpace) {
if (anyCharactersAreTheSame(separator, quotechar, escape)) {
throw new UnsupportedOperationException("The separator, quote, and escape characters must be different!");
}
if (separator == NULL_CHARACTER) {
throw new UnsupportedOperationException("The separator character must be defined!");
}
this.separator = separator;
this.quotechar = quotechar;
this.escape = escape;
this.strictQuotes = strictQuotes;
this.ignoreLeadingWhiteSpace = ignoreLeadingWhiteSpace;
}
private boolean anyCharactersAreTheSame(char separator, char quotechar, char escape) {
return isSameCharacter(separator, quotechar) || isSameCharacter(separator, escape) || isSameCharacter(quotechar, escape);
}
private boolean isSameCharacter(char c1, char c2) {
return c1 != NULL_CHARACTER && c1 == c2;
}
/**
* @return true if something was left over from last call(s)
*/
public boolean isPending() {
return pending != null;
}
public String[] parseLineMulti(String nextLine) throws IOException {
return parseLine(nextLine, true);
}
public String[] parseLine(String nextLine) throws IOException {
return parseLine(nextLine, false);
}
/**
* Parses an incoming String and returns an array of elements.
*
* @param nextLine the string to parse
* @param multi
* @return the comma-tokenized list of elements, or null if nextLine is null
* @throws IOException if bad things happen during the read
*/
private String[] parseLine(String nextLine, boolean multi) throws IOException {
if (!multi && pending != null) {
pending = null;
}
if (nextLine == null) {
if (pending != null) {
String s = pending;
pending = null;
return new String[]{s};
} else {
return null;
}
}
List<String> tokensOnThisLine = new ArrayList<String>();
StringBuilder sb = new StringBuilder(INITIAL_READ_SIZE);
boolean inQuotes = false;
if (pending != null) {
sb.append(pending);
pending = null;
inQuotes = true;
}
for (int i = 0; i < nextLine.length(); i++) {
char c = nextLine.charAt(i);
if (c == this.escape) {
if (isNextCharacterEscapable(nextLine, inQuotes || inField, i)) {
sb.append(nextLine.charAt(i + 1));
i++;
}
} else if (c == quotechar) {
if (isNextCharacterEscapedQuote(nextLine, inQuotes || inField, i)) {
sb.append(nextLine.charAt(i + 1));
i++;
} else {
//inQuotes = !inQuotes;
// the tricky case of an embedded quote in the middle: a,bc"d"ef,g
if (!strictQuotes) {
if (i > 2 //not on the beginning of the line
&& nextLine.charAt(i - 1) != this.separator //not at the beginning of an escape sequence
&& nextLine.length() > (i + 1) &&
nextLine.charAt(i + 1) != this.separator //not at the end of an escape sequence
) {
if (ignoreLeadingWhiteSpace && sb.length() > 0 && isAllWhiteSpace(sb)) {
sb.setLength(0); //discard white space leading up to quote
} else {
sb.append(c);
//continue;
}
}
}
inQuotes = !inQuotes;
}
inField = !inField;
} else if (c == separator && !inQuotes) {
tokensOnThisLine.add(sb.toString());
sb.setLength(0); // start work on next token
inField = false;
} else {
if (!strictQuotes || inQuotes) {
sb.append(c);
inField = true;
}
}
}
// line is done - check status
if (inQuotes) {
if (multi) {
// continuing a quoted section, re-append newline
sb.append("\n");
pending = sb.toString();
sb = null; // this partial content is not to be added to field list yet
} else {
throw new IOException("Un-terminated quoted field at end of CSV line");
}
}
if (sb != null) {
tokensOnThisLine.add(sb.toString());
}
return tokensOnThisLine.toArray(new String[tokensOnThisLine.size()]);
}
/**
* precondition: the current character is a quote or an escape
*
* @param nextLine the current line
* @param inQuotes true if the current context is quoted
* @param i current index in line
* @return true if the following character is a quote
*/
private boolean isNextCharacterEscapedQuote(String nextLine, boolean inQuotes, int i) {
return inQuotes // we are in quotes, therefore there can be escaped quotes in here.
&& nextLine.length() > (i + 1) // there is indeed another character to check.
&& nextLine.charAt(i + 1) == quotechar;
}
/**
* precondition: the current character is an escape
*
* @param nextLine the current line
* @param inQuotes true if the current context is quoted
* @param i current index in line
* @return true if the following character is a quote
*/
protected boolean isNextCharacterEscapable(String nextLine, boolean inQuotes, int i) {
return inQuotes // we are in quotes, therefore there can be escaped quotes in here.
&& nextLine.length() > (i + 1) // there is indeed another character to check.
&& (nextLine.charAt(i + 1) == quotechar || nextLine.charAt(i + 1) == this.escape);
}
/**
* precondition: sb.length() > 0
*
* @param sb A sequence of characters to examine
* @return true if every character in the sequence is whitespace
*/
protected boolean isAllWhiteSpace(CharSequence sb) {
boolean result = true;
for (int i = 0; i < sb.length(); i++) {
char c = sb.charAt(i);
if (!Character.isWhitespace(c)) {
return false;
}
}
return result;
}
}
package au.com.bytecode.opencsv;
/**
Copyright 2005 Bytecode Pty Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* A very simple CSV parser released under a commercial-friendly license.
* This just implements splitting a single line into fields.
*
* @author Glen Smith
* @author Rainer Pruy
*/
public class CSVParser {
private final char separator;
private final char quotechar;
private final char escape;
private final boolean strictQuotes;
private String pending;
private boolean inField = false;
private final boolean ignoreLeadingWhiteSpace;
/**
* The default separator to use if none is supplied to the constructor.
*/
public static final char DEFAULT_SEPARATOR = ',';
public static final int INITIAL_READ_SIZE = 128;
/**
* The default quote character to use if none is supplied to the
* constructor.
*/
public static final char DEFAULT_QUOTE_CHARACTER = '"';
/**
* The default escape character to use if none is supplied to the
* constructor.
*/
public static final char DEFAULT_ESCAPE_CHARACTER = '\\';
/**
* The default strict quote behavior to use if none is supplied to the
* constructor
*/
public static final boolean DEFAULT_STRICT_QUOTES = false;
/**
* The default leading whitespace behavior to use if none is supplied to the
* constructor
*/
public static final boolean DEFAULT_IGNORE_LEADING_WHITESPACE = true;
/**
* This is the "null" character - if a value is set to this then it is ignored.
* I.E. if the quote character is set to null then there is no quote character.
*/
public static final char NULL_CHARACTER = '\0';
/**
* Constructs CSVParser using a comma for the separator.
*/
public CSVParser() {
this(DEFAULT_SEPARATOR, DEFAULT_QUOTE_CHARACTER, DEFAULT_ESCAPE_CHARACTER);
}
/**
* Constructs CSVParser with supplied separator.
*
* @param separator the delimiter to use for separating entries.
*/
public CSVParser(char separator) {
this(separator, DEFAULT_QUOTE_CHARACTER, DEFAULT_ESCAPE_CHARACTER);
}
/**
* Constructs CSVParser with supplied separator and quote char.
*
* @param separator the delimiter to use for separating entries
* @param quotechar the character to use for quoted elements
*/
public CSVParser(char separator, char quotechar) {
this(separator, quotechar, DEFAULT_ESCAPE_CHARACTER);
}
/**
* Constructs CSVReader with supplied separator and quote char.
*
* @param separator the delimiter to use for separating entries
* @param quotechar the character to use for quoted elements
* @param escape the character to use for escaping a separator or quote
*/
public CSVParser(char separator, char quotechar, char escape) {
this(separator, quotechar, escape, DEFAULT_STRICT_QUOTES);
}
/**
* Constructs CSVReader with supplied separator and quote char.
* Allows setting the "strict quotes" flag
*
* @param separator the delimiter to use for separating entries
* @param quotechar the character to use for quoted elements
* @param escape the character to use for escaping a separator or quote
* @param strictQuotes if true, characters outside the quotes are ignored
*/
public CSVParser(char separator, char quotechar, char escape, boolean strictQuotes) {
this(separator, quotechar, escape, strictQuotes, DEFAULT_IGNORE_LEADING_WHITESPACE);
}
/**
* Constructs CSVReader with supplied separator and quote char.
* Allows setting the "strict quotes" and "ignore leading whitespace" flags
*
* @param separator the delimiter to use for separating entries
* @param quotechar the character to use for quoted elements
* @param escape the character to use for escaping a separator or quote
* @param strictQuotes if true, characters outside the quotes are ignored
* @param ignoreLeadingWhiteSpace if true, white space in front of a quote in a field is ignored
*/
public CSVParser(char separator, char quotechar, char escape, boolean strictQuotes, boolean ignoreLeadingWhiteSpace) {
if (anyCharactersAreTheSame(separator, quotechar, escape)) {
throw new UnsupportedOperationException("The separator, quote, and escape characters must be different!");
}
if (separator == NULL_CHARACTER) {
throw new UnsupportedOperationException("The separator character must be defined!");
}
this.separator = separator;
this.quotechar = quotechar;
this.escape = escape;
this.strictQuotes = strictQuotes;
this.ignoreLeadingWhiteSpace = ignoreLeadingWhiteSpace;
}
private boolean anyCharactersAreTheSame(char separator, char quotechar, char escape) {
return isSameCharacter(separator, quotechar) || isSameCharacter(separator, escape) || isSameCharacter(quotechar, escape);
}
private boolean isSameCharacter(char c1, char c2) {
return c1 != NULL_CHARACTER && c1 == c2;
}
/**
* @return true if something was left over from last call(s)
*/
public boolean isPending() {
return pending != null;
}
public String[] parseLineMulti(String nextLine) throws IOException {
return parseLine(nextLine, true);
}
public String[] parseLine(String nextLine) throws IOException {
return parseLine(nextLine, false);
}
/**
* Parses an incoming String and returns an array of elements.
*
* @param nextLine the string to parse
* @param multi
* @return the comma-tokenized list of elements, or null if nextLine is null
* @throws IOException if bad things happen during the read
*/
private String[] parseLine(String nextLine, boolean multi) throws IOException {
if (!multi && pending != null) {
pending = null;
}
if (nextLine == null) {
if (pending != null) {
String s = pending;
pending = null;
return new String[]{s};
} else {
return null;
}
}
List<String> tokensOnThisLine = new ArrayList<String>();
StringBuilder sb = new StringBuilder(INITIAL_READ_SIZE);
boolean inQuotes = false;
if (pending != null) {
sb.append(pending);
pending = null;
inQuotes = true;
}
for (int i = 0; i < nextLine.length(); i++) {
char c = nextLine.charAt(i);
if (c == this.escape) {
if (isNextCharacterEscapable(nextLine, inQuotes || inField, i)) {
sb.append(nextLine.charAt(i + 1));
i++;
}
} else if (c == quotechar) {
if (isNextCharacterEscapedQuote(nextLine, inQuotes || inField, i)) {
sb.append(nextLine.charAt(i + 1));
i++;
} else {
//inQuotes = !inQuotes;
// the tricky case of an embedded quote in the middle: a,bc"d"ef,g
if (!strictQuotes) {
if (i > 2 //not on the beginning of the line
&& nextLine.charAt(i - 1) != this.separator //not at the beginning of an escape sequence
&& nextLine.length() > (i + 1) &&
nextLine.charAt(i + 1) != this.separator //not at the end of an escape sequence
) {
if (ignoreLeadingWhiteSpace && sb.length() > 0 && isAllWhiteSpace(sb)) {
sb.setLength(0); //discard white space leading up to quote
} else {
sb.append(c);
//continue;
}
}
}
inQuotes = !inQuotes;
}
inField = !inField;
} else if (c == separator && !inQuotes) {
tokensOnThisLine.add(sb.toString());
sb.setLength(0); // start work on next token
inField = false;
} else {
if (!strictQuotes || inQuotes) {
sb.append(c);
inField = true;
}
}
}
// line is done - check status
if (inQuotes) {
if (multi) {
// continuing a quoted section, re-append newline
sb.append("\n");
pending = sb.toString();
sb = null; // this partial content is not to be added to field list yet
} else {
throw new IOException("Un-terminated quoted field at end of CSV line");
}
}
if (sb != null) {
tokensOnThisLine.add(sb.toString());
}
return tokensOnThisLine.toArray(new String[tokensOnThisLine.size()]);
}
/**
* precondition: the current character is a quote or an escape
*
* @param nextLine the current line
* @param inQuotes true if the current context is quoted
* @param i current index in line
* @return true if the following character is a quote
*/
private boolean isNextCharacterEscapedQuote(String nextLine, boolean inQuotes, int i) {
return inQuotes // we are in quotes, therefore there can be escaped quotes in here.
&& nextLine.length() > (i + 1) // there is indeed another character to check.
&& nextLine.charAt(i + 1) == quotechar;
}
/**
* precondition: the current character is an escape
*
* @param nextLine the current line
* @param inQuotes true if the current context is quoted
* @param i current index in line
* @return true if the following character is a quote
*/
protected boolean isNextCharacterEscapable(String nextLine, boolean inQuotes, int i) {
return inQuotes // we are in quotes, therefore there can be escaped quotes in here.
&& nextLine.length() > (i + 1) // there is indeed another character to check.
&& (nextLine.charAt(i + 1) == quotechar || nextLine.charAt(i + 1) == this.escape);
}
/**
* precondition: sb.length() > 0
*
* @param sb A sequence of characters to examine
* @return true if every character in the sequence is whitespace
*/
protected boolean isAllWhiteSpace(CharSequence sb) {
boolean result = true;
for (int i = 0; i < sb.length(); i++) {
char c = sb.charAt(i);
if (!Character.isWhitespace(c)) {
return false;
}
}
return result;
}
}
@@ -1,282 +1,282 @@
package au.com.bytecode.opencsv;
/**
Copyright 2005 Bytecode Pty Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.Reader;
import java.util.ArrayList;
import java.util.List;
/**
* A very simple CSV reader released under a commercial-friendly license.
*
* @author Glen Smith
*
*/
public class CSVReader implements Closeable {
private BufferedReader br;
private boolean hasNext = true;
private CSVParser parser;
private int skipLines;
private boolean linesSkiped;
/**
* The default line to start reading.
*/
public static final int DEFAULT_SKIP_LINES = 0;
/**
* Constructs CSVReader using a comma for the separator.
*
* @param reader
* the reader to an underlying CSV source.
*/
public CSVReader(Reader reader) {
this(reader, CSVParser.DEFAULT_SEPARATOR, CSVParser.DEFAULT_QUOTE_CHARACTER, CSVParser.DEFAULT_ESCAPE_CHARACTER);
}
/**
* Constructs CSVReader with supplied separator.
*
* @param reader
* the reader to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries.
*/
public CSVReader(Reader reader, char separator) {
this(reader, separator, CSVParser.DEFAULT_QUOTE_CHARACTER, CSVParser.DEFAULT_ESCAPE_CHARACTER);
}
/**
* Constructs CSVReader with supplied separator and quote char.
*
* @param reader
* the reader to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
*/
public CSVReader(Reader reader, char separator, char quotechar) {
this(reader, separator, quotechar, CSVParser.DEFAULT_ESCAPE_CHARACTER, DEFAULT_SKIP_LINES, CSVParser.DEFAULT_STRICT_QUOTES);
}
/**
* Constructs CSVReader with supplied separator, quote char and quote handling
* behavior.
*
* @param reader
* the reader to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
* @param strictQuotes
* sets if characters outside the quotes are ignored
*/
public CSVReader(Reader reader, char separator, char quotechar, boolean strictQuotes) {
this(reader, separator, quotechar, CSVParser.DEFAULT_ESCAPE_CHARACTER, DEFAULT_SKIP_LINES, strictQuotes);
}
/**
* Constructs CSVReader with supplied separator and quote char.
*
* @param reader
* the reader to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
* @param escape
* the character to use for escaping a separator or quote
*/
public CSVReader(Reader reader, char separator,
char quotechar, char escape) {
this(reader, separator, quotechar, escape, DEFAULT_SKIP_LINES, CSVParser.DEFAULT_STRICT_QUOTES);
}
/**
* Constructs CSVReader with supplied separator and quote char.
*
* @param reader
* the reader to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
* @param line
* the line number to skip for start reading
*/
public CSVReader(Reader reader, char separator, char quotechar, int line) {
this(reader, separator, quotechar, CSVParser.DEFAULT_ESCAPE_CHARACTER, line, CSVParser.DEFAULT_STRICT_QUOTES);
}
/**
* Constructs CSVReader with supplied separator and quote char.
*
* @param reader
* the reader to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
* @param escape
* the character to use for escaping a separator or quote
* @param line
* the line number to skip for start reading
*/
public CSVReader(Reader reader, char separator, char quotechar, char escape, int line) {
this(reader, separator, quotechar, escape, line, CSVParser.DEFAULT_STRICT_QUOTES);
}
/**
* Constructs CSVReader with supplied separator and quote char.
*
* @param reader
* the reader to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
* @param escape
* the character to use for escaping a separator or quote
* @param line
* the line number to skip for start reading
* @param strictQuotes
* sets if characters outside the quotes are ignored
*/
public CSVReader(Reader reader, char separator, char quotechar, char escape, int line, boolean strictQuotes) {
this(reader, separator, quotechar, escape, line, strictQuotes, CSVParser.DEFAULT_IGNORE_LEADING_WHITESPACE);
}
/**
* Constructs CSVReader with supplied separator and quote char.
*
* @param reader
* the reader to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
* @param escape
* the character to use for escaping a separator or quote
* @param line
* the line number to skip for start reading
* @param strictQuotes
* sets if characters outside the quotes are ignored
* @param ignoreLeadingWhiteSpace
* it true, parser should ignore white space before a quote in a field
*/
public CSVReader(Reader reader, char separator, char quotechar, char escape, int line, boolean strictQuotes, boolean ignoreLeadingWhiteSpace) {
this.br = new BufferedReader(reader);
this.parser = new CSVParser(separator, quotechar, escape, strictQuotes, ignoreLeadingWhiteSpace);
this.skipLines = line;
}
/**
* Reads the entire file into a List with each element being a String[] of
* tokens.
*
* @return a List of String[], with each String[] representing a line of the
* file.
*
* @throws IOException
* if bad things happen during the read
*/
public List<String[]> readAll() throws IOException {
List<String[]> allElements = new ArrayList<String[]>();
while (hasNext) {
String[] nextLineAsTokens = readNext();
if (nextLineAsTokens != null)
allElements.add(nextLineAsTokens);
}
return allElements;
}
/**
* Reads the next line from the buffer and converts to a string array.
*
* @return a string array with each comma-separated element as a separate
* entry.
*
* @throws IOException
* if bad things happen during the read
*/
public String[] readNext() throws IOException {
String[] result = null;
do {
String nextLine = getNextLine();
if (!hasNext) {
return result; // should throw if still pending?
}
String[] r = parser.parseLineMulti(nextLine);
if (r.length > 0) {
if (result == null) {
result = r;
} else {
String[] t = new String[result.length+r.length];
System.arraycopy(result, 0, t, 0, result.length);
System.arraycopy(r, 0, t, result.length, r.length);
result = t;
}
}
} while (parser.isPending());
return result;
}
/**
* Reads the next line from the file.
*
* @return the next line from the file without trailing newline
* @throws IOException
* if bad things happen during the read
*/
private String getNextLine() throws IOException {
if (!this.linesSkiped) {
for (int i = 0; i < skipLines; i++) {
br.readLine();
}
this.linesSkiped = true;
}
String nextLine = br.readLine();
if (nextLine == null) {
hasNext = false;
}
return hasNext ? nextLine : null;
}
/**
* Closes the underlying reader.
*
* @throws IOException if the close fails
*/
public void close() throws IOException{
br.close();
}
}
package au.com.bytecode.opencsv;
/**
Copyright 2005 Bytecode Pty Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.Reader;
import java.util.ArrayList;
import java.util.List;
/**
* A very simple CSV reader released under a commercial-friendly license.
*
* @author Glen Smith
*
*/
public class CSVReader implements Closeable {
private BufferedReader br;
private boolean hasNext = true;
private CSVParser parser;
private int skipLines;
private boolean linesSkiped;
/**
* The default line to start reading.
*/
public static final int DEFAULT_SKIP_LINES = 0;
/**
* Constructs CSVReader using a comma for the separator.
*
* @param reader
* the reader to an underlying CSV source.
*/
public CSVReader(Reader reader) {
this(reader, CSVParser.DEFAULT_SEPARATOR, CSVParser.DEFAULT_QUOTE_CHARACTER, CSVParser.DEFAULT_ESCAPE_CHARACTER);
}
/**
* Constructs CSVReader with supplied separator.
*
* @param reader
* the reader to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries.
*/
public CSVReader(Reader reader, char separator) {
this(reader, separator, CSVParser.DEFAULT_QUOTE_CHARACTER, CSVParser.DEFAULT_ESCAPE_CHARACTER);
}
/**
* Constructs CSVReader with supplied separator and quote char.
*
* @param reader
* the reader to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
*/
public CSVReader(Reader reader, char separator, char quotechar) {
this(reader, separator, quotechar, CSVParser.DEFAULT_ESCAPE_CHARACTER, DEFAULT_SKIP_LINES, CSVParser.DEFAULT_STRICT_QUOTES);
}
/**
* Constructs CSVReader with supplied separator, quote char and quote handling
* behavior.
*
* @param reader
* the reader to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
* @param strictQuotes
* sets if characters outside the quotes are ignored
*/
public CSVReader(Reader reader, char separator, char quotechar, boolean strictQuotes) {
this(reader, separator, quotechar, CSVParser.DEFAULT_ESCAPE_CHARACTER, DEFAULT_SKIP_LINES, strictQuotes);
}
/**
* Constructs CSVReader with supplied separator and quote char.
*
* @param reader
* the reader to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
* @param escape
* the character to use for escaping a separator or quote
*/
public CSVReader(Reader reader, char separator,
char quotechar, char escape) {
this(reader, separator, quotechar, escape, DEFAULT_SKIP_LINES, CSVParser.DEFAULT_STRICT_QUOTES);
}
/**
* Constructs CSVReader with supplied separator and quote char.
*
* @param reader
* the reader to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
* @param line
* the line number to skip for start reading
*/
public CSVReader(Reader reader, char separator, char quotechar, int line) {
this(reader, separator, quotechar, CSVParser.DEFAULT_ESCAPE_CHARACTER, line, CSVParser.DEFAULT_STRICT_QUOTES);
}
/**
* Constructs CSVReader with supplied separator and quote char.
*
* @param reader
* the reader to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
* @param escape
* the character to use for escaping a separator or quote
* @param line
* the line number to skip for start reading
*/
public CSVReader(Reader reader, char separator, char quotechar, char escape, int line) {
this(reader, separator, quotechar, escape, line, CSVParser.DEFAULT_STRICT_QUOTES);
}
/**
* Constructs CSVReader with supplied separator and quote char.
*
* @param reader
* the reader to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
* @param escape
* the character to use for escaping a separator or quote
* @param line
* the line number to skip for start reading
* @param strictQuotes
* sets if characters outside the quotes are ignored
*/
public CSVReader(Reader reader, char separator, char quotechar, char escape, int line, boolean strictQuotes) {
this(reader, separator, quotechar, escape, line, strictQuotes, CSVParser.DEFAULT_IGNORE_LEADING_WHITESPACE);
}
/**
* Constructs CSVReader with supplied separator and quote char.
*
* @param reader
* the reader to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
* @param escape
* the character to use for escaping a separator or quote
* @param line
* the line number to skip for start reading
* @param strictQuotes
* sets if characters outside the quotes are ignored
* @param ignoreLeadingWhiteSpace
* it true, parser should ignore white space before a quote in a field
*/
public CSVReader(Reader reader, char separator, char quotechar, char escape, int line, boolean strictQuotes, boolean ignoreLeadingWhiteSpace) {
this.br = new BufferedReader(reader);
this.parser = new CSVParser(separator, quotechar, escape, strictQuotes, ignoreLeadingWhiteSpace);
this.skipLines = line;
}
/**
* Reads the entire file into a List with each element being a String[] of
* tokens.
*
* @return a List of String[], with each String[] representing a line of the
* file.
*
* @throws IOException
* if bad things happen during the read
*/
public List<String[]> readAll() throws IOException {
List<String[]> allElements = new ArrayList<String[]>();
while (hasNext) {
String[] nextLineAsTokens = readNext();
if (nextLineAsTokens != null)
allElements.add(nextLineAsTokens);
}
return allElements;
}
/**
* Reads the next line from the buffer and converts to a string array.
*
* @return a string array with each comma-separated element as a separate
* entry.
*
* @throws IOException
* if bad things happen during the read
*/
public String[] readNext() throws IOException {
String[] result = null;
do {
String nextLine = getNextLine();
if (!hasNext) {
return result; // should throw if still pending?
}
String[] r = parser.parseLineMulti(nextLine);
if (r.length > 0) {
if (result == null) {
result = r;
} else {
String[] t = new String[result.length+r.length];
System.arraycopy(result, 0, t, 0, result.length);
System.arraycopy(r, 0, t, result.length, r.length);
result = t;
}
}
} while (parser.isPending());
return result;
}
/**
* Reads the next line from the file.
*
* @return the next line from the file without trailing newline
* @throws IOException
* if bad things happen during the read
*/
private String getNextLine() throws IOException {
if (!this.linesSkiped) {
for (int i = 0; i < skipLines; i++) {
br.readLine();
}
this.linesSkiped = true;
}
String nextLine = br.readLine();
if (nextLine == null) {
hasNext = false;
}
return hasNext ? nextLine : null;
}
/**
* Closes the underlying reader.
*
* @throws IOException if the close fails
*/
public void close() throws IOException{
br.close();
}
}
@@ -1,302 +1,302 @@
package au.com.bytecode.opencsv;
/**
Copyright 2005 Bytecode Pty Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import java.io.Closeable;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Writer;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
/**
* A very simple CSV writer released under a commercial-friendly license.
*
* @author Glen Smith
*
*/
public class CSVWriter implements Closeable {
public static final int INITIAL_STRING_SIZE = 128;
private Writer rawWriter;
private PrintWriter pw;
private char separator;
private char quotechar;
private char escapechar;
private String lineEnd;
/** The character used for escaping quotes. */
public static final char DEFAULT_ESCAPE_CHARACTER = '"';
/** The default separator to use if none is supplied to the constructor. */
public static final char DEFAULT_SEPARATOR = ',';
/**
* The default quote character to use if none is supplied to the
* constructor.
*/
public static final char DEFAULT_QUOTE_CHARACTER = '"';
/** The quote constant to use when you wish to suppress all quoting. */
public static final char NO_QUOTE_CHARACTER = '\u0000';
/** The escape constant to use when you wish to suppress all escaping. */
public static final char NO_ESCAPE_CHARACTER = '\u0000';
/** Default line terminator uses platform encoding. */
public static final String DEFAULT_LINE_END = "\n";
private ResultSetHelper resultService = new ResultSetHelperService();
/**
* Constructs CSVWriter using a comma for the separator.
*
* @param writer
* the writer to an underlying CSV source.
*/
public CSVWriter(Writer writer) {
this(writer, DEFAULT_SEPARATOR);
}
/**
* Constructs CSVWriter with supplied separator.
*
* @param writer
* the writer to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries.
*/
public CSVWriter(Writer writer, char separator) {
this(writer, separator, DEFAULT_QUOTE_CHARACTER);
}
/**
* Constructs CSVWriter with supplied separator and quote char.
*
* @param writer
* the writer to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
*/
public CSVWriter(Writer writer, char separator, char quotechar) {
this(writer, separator, quotechar, DEFAULT_ESCAPE_CHARACTER);
}
/**
* Constructs CSVWriter with supplied separator and quote char.
*
* @param writer
* the writer to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
* @param escapechar
* the character to use for escaping quotechars or escapechars
*/
public CSVWriter(Writer writer, char separator, char quotechar, char escapechar) {
this(writer, separator, quotechar, escapechar, DEFAULT_LINE_END);
}
/**
* Constructs CSVWriter with supplied separator and quote char.
*
* @param writer
* the writer to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
* @param lineEnd
* the line feed terminator to use
*/
public CSVWriter(Writer writer, char separator, char quotechar, String lineEnd) {
this(writer, separator, quotechar, DEFAULT_ESCAPE_CHARACTER, lineEnd);
}
/**
* Constructs CSVWriter with supplied separator, quote char, escape char and line ending.
*
* @param writer
* the writer to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
* @param escapechar
* the character to use for escaping quotechars or escapechars
* @param lineEnd
* the line feed terminator to use
*/
public CSVWriter(Writer writer, char separator, char quotechar, char escapechar, String lineEnd) {
this.rawWriter = writer;
this.pw = new PrintWriter(writer);
this.separator = separator;
this.quotechar = quotechar;
this.escapechar = escapechar;
this.lineEnd = lineEnd;
}
/**
* Writes the entire list to a CSV file. The list is assumed to be a
* String[]
*
* @param allLines
* a List of String[], with each String[] representing a line of
* the file.
*/
public void writeAll(List<String[]> allLines) {
for (String[] line : allLines) {
writeNext(line);
}
}
protected void writeColumnNames(ResultSet rs)
throws SQLException {
writeNext(resultService.getColumnNames(rs));
}
/**
* Writes the entire ResultSet to a CSV file.
*
* The caller is responsible for closing the ResultSet.
*
* @param rs the recordset to write
* @param includeColumnNames true if you want column names in the output, false otherwise
*
* @throws java.io.IOException thrown by getColumnValue
* @throws java.sql.SQLException thrown by getColumnValue
*/
public void writeAll(java.sql.ResultSet rs, boolean includeColumnNames) throws SQLException, IOException {
if (includeColumnNames) {
writeColumnNames(rs);
}
while (rs.next())
{
writeNext(resultService.getColumnValues(rs));
}
}
/**
* Writes the next line to the file.
*
* @param nextLine
* a string array with each comma-separated element as a separate
* entry.
*/
public void writeNext(String[] nextLine) {
if (nextLine == null)
return;
StringBuilder sb = new StringBuilder(INITIAL_STRING_SIZE);
for (int i = 0; i < nextLine.length; i++) {
if (i != 0) {
sb.append(separator);
}
String nextElement = nextLine[i];
if (nextElement == null)
continue;
if (quotechar != NO_QUOTE_CHARACTER)
sb.append(quotechar);
sb.append(stringContainsSpecialCharacters(nextElement) ? processLine(nextElement) : nextElement);
if (quotechar != NO_QUOTE_CHARACTER)
sb.append(quotechar);
}
sb.append(lineEnd);
pw.write(sb.toString());
}
private boolean stringContainsSpecialCharacters(String line) {
return line.indexOf(quotechar) != -1 || line.indexOf(escapechar) != -1;
}
protected StringBuilder processLine(String nextElement)
{
StringBuilder sb = new StringBuilder(INITIAL_STRING_SIZE);
for (int j = 0; j < nextElement.length(); j++) {
char nextChar = nextElement.charAt(j);
if (escapechar != NO_ESCAPE_CHARACTER && nextChar == quotechar) {
sb.append(escapechar).append(nextChar);
} else if (escapechar != NO_ESCAPE_CHARACTER && nextChar == escapechar) {
sb.append(escapechar).append(nextChar);
} else {
sb.append(nextChar);
}
}
return sb;
}
/**
* Flush underlying stream to writer.
*
* @throws IOException if bad things happen
*/
public void flush() throws IOException {
pw.flush();
}
/**
* Close the underlying stream writer flushing any buffered content.
*
* @throws IOException if bad things happen
*
*/
public void close() throws IOException {
flush();
pw.close();
rawWriter.close();
}
/**
* Checks to see if the there has been an error in the printstream.
*/
public boolean checkError() {
return pw.checkError();
}
public void setResultService(ResultSetHelper resultService) {
this.resultService = resultService;
}
}
package au.com.bytecode.opencsv;
/**
Copyright 2005 Bytecode Pty Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import java.io.Closeable;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Writer;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
/**
* A very simple CSV writer released under a commercial-friendly license.
*
* @author Glen Smith
*
*/
public class CSVWriter implements Closeable {
public static final int INITIAL_STRING_SIZE = 128;
private Writer rawWriter;
private PrintWriter pw;
private char separator;
private char quotechar;
private char escapechar;
private String lineEnd;
/** The character used for escaping quotes. */
public static final char DEFAULT_ESCAPE_CHARACTER = '"';
/** The default separator to use if none is supplied to the constructor. */
public static final char DEFAULT_SEPARATOR = ',';
/**
* The default quote character to use if none is supplied to the
* constructor.
*/
public static final char DEFAULT_QUOTE_CHARACTER = '"';
/** The quote constant to use when you wish to suppress all quoting. */
public static final char NO_QUOTE_CHARACTER = '\u0000';
/** The escape constant to use when you wish to suppress all escaping. */
public static final char NO_ESCAPE_CHARACTER = '\u0000';
/** Default line terminator uses platform encoding. */
public static final String DEFAULT_LINE_END = "\n";
private ResultSetHelper resultService = new ResultSetHelperService();
/**
* Constructs CSVWriter using a comma for the separator.
*
* @param writer
* the writer to an underlying CSV source.
*/
public CSVWriter(Writer writer) {
this(writer, DEFAULT_SEPARATOR);
}
/**
* Constructs CSVWriter with supplied separator.
*
* @param writer
* the writer to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries.
*/
public CSVWriter(Writer writer, char separator) {
this(writer, separator, DEFAULT_QUOTE_CHARACTER);
}
/**
* Constructs CSVWriter with supplied separator and quote char.
*
* @param writer
* the writer to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
*/
public CSVWriter(Writer writer, char separator, char quotechar) {
this(writer, separator, quotechar, DEFAULT_ESCAPE_CHARACTER);
}
/**
* Constructs CSVWriter with supplied separator and quote char.
*
* @param writer
* the writer to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
* @param escapechar
* the character to use for escaping quotechars or escapechars
*/
public CSVWriter(Writer writer, char separator, char quotechar, char escapechar) {
this(writer, separator, quotechar, escapechar, DEFAULT_LINE_END);
}
/**
* Constructs CSVWriter with supplied separator and quote char.
*
* @param writer
* the writer to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
* @param lineEnd
* the line feed terminator to use
*/
public CSVWriter(Writer writer, char separator, char quotechar, String lineEnd) {
this(writer, separator, quotechar, DEFAULT_ESCAPE_CHARACTER, lineEnd);
}
/**
* Constructs CSVWriter with supplied separator, quote char, escape char and line ending.
*
* @param writer
* the writer to an underlying CSV source.
* @param separator
* the delimiter to use for separating entries
* @param quotechar
* the character to use for quoted elements
* @param escapechar
* the character to use for escaping quotechars or escapechars
* @param lineEnd
* the line feed terminator to use
*/
public CSVWriter(Writer writer, char separator, char quotechar, char escapechar, String lineEnd) {
this.rawWriter = writer;
this.pw = new PrintWriter(writer);
this.separator = separator;
this.quotechar = quotechar;
this.escapechar = escapechar;
this.lineEnd = lineEnd;
}
/**
* Writes the entire list to a CSV file. The list is assumed to be a
* String[]
*
* @param allLines
* a List of String[], with each String[] representing a line of
* the file.
*/
public void writeAll(List<String[]> allLines) {
for (String[] line : allLines) {
writeNext(line);
}
}
protected void writeColumnNames(ResultSet rs)
throws SQLException {
writeNext(resultService.getColumnNames(rs));
}
/**
* Writes the entire ResultSet to a CSV file.
*
* The caller is responsible for closing the ResultSet.
*
* @param rs the recordset to write
* @param includeColumnNames true if you want column names in the output, false otherwise
*
* @throws java.io.IOException thrown by getColumnValue
* @throws java.sql.SQLException thrown by getColumnValue
*/
public void writeAll(java.sql.ResultSet rs, boolean includeColumnNames) throws SQLException, IOException {
if (includeColumnNames) {
writeColumnNames(rs);
}
while (rs.next())
{
writeNext(resultService.getColumnValues(rs));
}
}
/**
* Writes the next line to the file.
*
* @param nextLine
* a string array with each comma-separated element as a separate
* entry.
*/
public void writeNext(String[] nextLine) {
if (nextLine == null)
return;
StringBuilder sb = new StringBuilder(INITIAL_STRING_SIZE);
for (int i = 0; i < nextLine.length; i++) {
if (i != 0) {
sb.append(separator);
}
String nextElement = nextLine[i];
if (nextElement == null)
continue;
if (quotechar != NO_QUOTE_CHARACTER)
sb.append(quotechar);
sb.append(stringContainsSpecialCharacters(nextElement) ? processLine(nextElement) : nextElement);
if (quotechar != NO_QUOTE_CHARACTER)
sb.append(quotechar);
}
sb.append(lineEnd);
pw.write(sb.toString());
}
private boolean stringContainsSpecialCharacters(String line) {
return line.indexOf(quotechar) != -1 || line.indexOf(escapechar) != -1;
}
protected StringBuilder processLine(String nextElement)
{
StringBuilder sb = new StringBuilder(INITIAL_STRING_SIZE);
for (int j = 0; j < nextElement.length(); j++) {
char nextChar = nextElement.charAt(j);
if (escapechar != NO_ESCAPE_CHARACTER && nextChar == quotechar) {
sb.append(escapechar).append(nextChar);
} else if (escapechar != NO_ESCAPE_CHARACTER && nextChar == escapechar) {
sb.append(escapechar).append(nextChar);
} else {
sb.append(nextChar);
}
}
return sb;
}
/**
* Flush underlying stream to writer.
*
* @throws IOException if bad things happen
*/
public void flush() throws IOException {
pw.flush();
}
/**
* Close the underlying stream writer flushing any buffered content.
*
* @throws IOException if bad things happen
*
*/
public void close() throws IOException {
flush();
pw.close();
rawWriter.close();
}
/**
* Checks to see if the there has been an error in the printstream.
*/
public boolean checkError() {
return pw.checkError();
}
public void setResultService(ResultSetHelper resultService) {
this.resultService = resultService;
}
}
@@ -1,12 +1,12 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
</head>
<body bgcolor="white">
<p>
A simple bean binding interface for use with opencsv.
</p>
<br>
<a href="http://opencsv.sourceforge.net/">opencsv.sourceforge.net</a>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
</head>
<body bgcolor="white">
<p>
A simple bean binding interface for use with opencsv.
</p>
<br>
<a href="http://opencsv.sourceforge.net/">opencsv.sourceforge.net</a>
</body>
</html>
@@ -1,12 +1,12 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
</head>
<body bgcolor="white">
<p>
A very simple CSV parser for Java released under a commercial-friendly license.
</p>
<br>
<a href="http://opencsv.sourceforge.net/">opencsv.sourceforge.net</a>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
</head>
<body bgcolor="white">
<p>
A very simple CSV parser for Java released under a commercial-friendly license.
</p>
<br>
<a href="http://opencsv.sourceforge.net/">opencsv.sourceforge.net</a>
</body>
</html>
-135
View File
@@ -1,135 +0,0 @@
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
}
}
configurations {
deployerJars
}
//add dependency repositories
repositories {
mavenLocal()
mavenCentral()
maven {
name = "chickenbones"
url = "http://chickenbones.net/maven/"
}
}
apply plugin: 'java'
apply plugin: 'forge'
apply plugin: 'maven'
version = "1.5.2a"
group= "mcp.mobius.waila" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Waila"
// Define properties file
ext.configFile = file "build.properties"
configFile.withReader {
// Load config. It shall from now be referenced as simply config or project.config
def prop = new Properties()
prop.load(it)
project.ext.config = new ConfigSlurper().parse prop
}
dependencies {
compile "codechicken:CodeChickenLib:${config.mc_version}-${config.ccl_version}:dev"
compile "codechicken:CodeChickenCore:${config.mc_version}-${config.ccc_version}:dev"
compile "codechicken:NotEnoughItems:${config.mc_version}-${config.nei_version}:dev"
deployerJars "org.apache.maven.wagon:wagon-ssh:2.2"
}
minecraft {
version = "1.7.10-10.13.0.1160"
assetDir = "eclipse/assets"
}
def root = project.projectDir.parentFile
sourceSets {
main {
java {
srcDir new File(root, "src")
}
resources {
srcDir new File(root, "resources")
}
}
}
processResources
{
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
jar {
exclude "**/client/gui/inventory/GuiContainer.class"
exclude "**/client/gui/inventory/GuiContainer.java"
}
task sourceJar(type: Jar) {
from sourceSets.main.java
from new File(root, "dev")
classifier = 'sources'
}
task devJar(type: Jar) {
from sourceSets.main.output
classifier = 'dev'
}
artifacts {
archives sourceJar, devJar
}
uploadArchives {
dependsOn 'reobf'
repositories.mavenDeployer {
configuration = configurations.deployerJars
repository(url: "scp://mobiusstrip.eu/home/mobius/web/maven"){
authentication(userName: "mobius")
}
pom {
groupId = project.group
version = project.version
artifactId = project.archivesBaseName
project {
name project.archivesBaseName
packaging 'jar'
description 'Waila '
url 'http://mobiusstrip.eu'
}
}
}
}
-7
View File
@@ -1,7 +0,0 @@
mc_version=1.7.10
forge_version=10.13.0.1160
ccl_version=1.1.1.93
ccc_version=1.0.1.8
nei_version=1.0.2.15
mod_version=1.0
waila_version=1.5.2a
Executable
+3
View File
@@ -0,0 +1,3 @@
#gource --file-idle-time 0 --camera-mode overview --title "Minecraft Coder Pack" -s 2 --hide-filenames --stop-at-end --disable-progress --output-ppm-stream - | ffmpeg -y -r 60 -b 6000K -f image2pipe -vcodec ppm -i - -vcodec libtheora out.ogg
gource --file-idle-time 0 --camera-mode overview --title "Waila" -s 2 --hide-filenames --stop-at-end --disable-progress --output-ppm-stream - | ffmpeg -y -f image2pipe -vcodec ppm -i - -vpre libx264-medium -vcodec libx264 out_small.mkv
Binary file not shown.
-6
View File
@@ -1,6 +0,0 @@
#Tue May 06 21:57:37 CEST 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-1.12-bin.zip
Vendored
-164
View File
@@ -1,164 +0,0 @@
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
Vendored
-90
View File
@@ -1,90 +0,0 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@@ -1,4 +1,4 @@
package mcp.mobius.waila.utils;
package mcp.mobius.waila;
public final class Constants {
public static String BIND_SCREEN_WIKI = "showwiki";
@@ -22,11 +22,8 @@ public final class Constants {
public static String CFG_WAILA_KEYBIND = "waila.cfg.keybind";
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";
public static String CFG_WAILA_SHIFTBLOCK = "waila.cfg.shiftblock";
public static String CFG_WAILA_SHIFTENTS = "waila.cfg.shiftents";
public static String CFG_WAILA_NHEARTS = "waila.cfg.heartsperline";
public static String CFG_WAILA_MAXHP = "waila.cfg.maxhpbeforetext";
public static String CFG_WAILA_SCALE = "waila.cfg.scale";
public static String CFG_WAILA_ALPHA = "waila.cfg.alpha";
public static String CFG_WAILA_BGCOLOR = "waila.cfg.bgcolor";
@@ -34,9 +31,5 @@ public final class Constants {
public static String CFG_WAILA_GRADIENT2 = "waila.cfg.gradient2";
public static String CFG_WAILA_FONTCOLOR = "waila.cfg.fontcolor";
public static String CATEGORY_MODULES = "modules";
public static String CATEGORY_SERVER = "server_forcing";
public static boolean SERVER_FREE = false;
public static boolean SERVER_FORCED = true;
}
@@ -1,4 +1,4 @@
package mcp.mobius.waila.api;
package mcp.mobius.waila;
public class SpecialChars {
@@ -28,13 +28,6 @@ public class SpecialChars {
public static String ITALIC = MCStyle + "o";
public static String RESET = MCStyle + "r";
public static String WailaStyle = "\u00A4";
public static String WailaIcon = "\u00A5";
public static String TAB = WailaStyle + WailaStyle +"a";
public static String ALIGNRIGHT = WailaStyle + WailaStyle +"b";
public static String ALIGNCENTER = WailaStyle + WailaStyle +"c";
public static String HEART = WailaStyle + WailaIcon +"a";
public static String HHEART = WailaStyle + WailaIcon +"b";
public static String EHEART = WailaStyle + WailaIcon +"c";
public static String WailaStyle = "\u00A4";
}
@@ -1,11 +1,9 @@
package mcp.mobius.waila.utils;
package mcp.mobius.waila;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import mcp.mobius.waila.Waila;
public class WailaExceptionHandler {
public WailaExceptionHandler() {}
@@ -17,11 +15,11 @@ public class WailaExceptionHandler {
errs.add(className);
for (StackTraceElement elem : e.getStackTrace()){
Waila.log.log(Level.WARNING, String.format("%s.%s:%s",elem.getClassName(), elem.getMethodName(), elem.getLineNumber()));
mod_Waila.log.log(Level.WARNING, String.format("%s.%s:%s",elem.getClassName(), elem.getMethodName(), elem.getLineNumber()));
if (elem.getClassName().contains("waila")) break;
}
Waila.log.log(Level.WARNING, String.format("Catched unhandled exception : [%s] %s",className,e));
mod_Waila.log.log(Level.WARNING, String.format("Catched unhandled exception : [%s] %s",className,e));
}
if (currenttip != null)
currenttip.add("<ERROR>");
@@ -4,7 +4,9 @@ import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.logging.Level;
import mcp.mobius.waila.Waila;
import codechicken.lib.lang.LangUtil;
import net.minecraftforge.common.ForgeDirection;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
public class AppEngModule {
@@ -24,19 +26,18 @@ public class AppEngModule {
IAEItemStack_getItemStack = IAEItemStack.getMethod("getItemStack");
} catch (ClassNotFoundException e){
Waila.log.log(Level.WARNING, "[AppEng] Class not found. " + e);
mod_Waila.log.log(Level.WARNING, "[AppEng] Class not found. " + e);
return;
} catch (SecurityException e) {
Waila.log.log(Level.WARNING, "[AppEng] Security Exception. " + e);
mod_Waila.log.log(Level.WARNING, "[AppEng] Security Exception. " + e);
return;
} catch (NoSuchMethodException e) {
Waila.log.log(Level.WARNING, "[AppEng] Method not found. " + e);
mod_Waila.log.log(Level.WARNING, "[AppEng] Method not found. " + e);
return;
}
Waila.log.log(Level.INFO, "AppEng mod found.");
mod_Waila.log.log(Level.INFO, "AppEng mod found.");
ModuleRegistrar.instance().addConfig("Applied Energetic", "appeng.monitorcontent");
ModuleRegistrar.instance().registerBodyProvider(new HUDAppEngMonitor(), TileStorageMonitor);
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileStorageMonitor);
ModuleRegistrar.instance().registerBodyProvider(new HUDAppEngMonitor(), TileStorageMonitor);
}
}
@@ -3,12 +3,12 @@ package mcp.mobius.waila.addons.appeng;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import codechicken.lib.lang.LangUtil;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.cbcore.LangUtil;
public class HUDAppEngMonitor implements IWailaDataProvider {
@@ -4,8 +4,9 @@ import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.logging.Level;
import mcp.mobius.waila.Waila;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
import codechicken.lib.lang.LangUtil;
import codechicken.nei.api.API;
import codechicken.nei.api.ItemInfo;
@@ -23,15 +24,15 @@ public class BetterBarrelsModule {
IBarrelStorage_getItem = IBarrelStorage.getMethod("getItem");
} catch (ClassNotFoundException e){
Waila.log.log(Level.WARNING, "[BB] BetterBarrel classes not found.");
mod_Waila.log.log(Level.WARNING, "[BB] BetterBarrel classes not found.");
} catch (NoSuchFieldException e){
Waila.log.log(Level.WARNING, "[BB] Storage field not found.");
mod_Waila.log.log(Level.WARNING, "[BB] Storage field not found.");
} catch (NoSuchMethodException e){
Waila.log.log(Level.WARNING, "[BB] getItem() not found.");
mod_Waila.log.log(Level.WARNING, "[BB] getItem() not found.");
}
if (IBarrelStorage_getItem != null){
Waila.log.log(Level.INFO, "Waila module BetterBarrel succefully hooked.");
mod_Waila.log.log(Level.INFO, "Waila module BetterBarrel succefully hooked.");
ModuleRegistrar.instance().addConfig("BetterBarrels", "bb.content");
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerBBContent(), TileEntityBarrel);
}
@@ -5,7 +5,7 @@ import java.lang.reflect.Method;
import java.util.List;
import java.util.logging.Level;
import mcp.mobius.waila.Waila;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
@@ -15,7 +15,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import mcp.mobius.waila.cbcore.LangUtil;
import codechicken.lib.lang.LangUtil;
import codechicken.nei.api.API;
import codechicken.nei.api.ItemInfo;
import codechicken.nei.api.ItemInfo.Layout;
@@ -43,7 +43,7 @@ public class HUDHandlerBBContent implements IWailaDataProvider {
try {
stack = (ItemStack) BetterBarrelsModule.IBarrelStorage_getItem.invoke(BetterBarrelsModule.TileEntityBarrel_Storage.get(entity));
} catch (Exception e){
Waila.log.log(Level.SEVERE, "[BB] Unhandled exception trying to access a barrel storage for display !.\n" + String.valueOf(e));
mod_Waila.log.log(Level.SEVERE, "[BB] Unhandled exception trying to access a barrel storage for display !.\n" + String.valueOf(e));
currenttip.add("<ERROR!>");
return currenttip;
}
@@ -3,9 +3,9 @@ package mcp.mobius.waila.addons.buildcraft;
import java.lang.reflect.Method;
import java.util.logging.Level;
import net.minecraftforge.common.util.ForgeDirection;
import mcp.mobius.waila.Waila;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
import net.minecraftforge.common.ForgeDirection;
public class BCModule {
@@ -20,9 +20,9 @@ public class BCModule {
public static void register(){
try {
Class ModBuildcraftFactory = Class.forName("buildcraft.BuildCraftFactory");
Waila.log.log(Level.INFO, "Buildcraft|Factory mod found.");
mod_Waila.log.log(Level.INFO, "Buildcraft|Factory mod found.");
} catch (ClassNotFoundException e){
Waila.log.log(Level.INFO, "Buildcraft|Factory mod not found. Skipping.");
mod_Waila.log.log(Level.INFO, "Buildcraft|Factory mod not found. Skipping.");
return;
}
@@ -31,10 +31,10 @@ public class BCModule {
TileTank_getTankInfo = TileTank.getMethod("getTankInfo", ForgeDirection.class);
} catch (ClassNotFoundException e){
Waila.log.log(Level.WARNING, "[BC] Class not found. " + e);
mod_Waila.log.log(Level.WARNING, "[BC] Class not found. " + e);
return;
} catch (NoSuchMethodException e){
Waila.log.log(Level.WARNING, "[BC] Method not found." + e);
mod_Waila.log.log(Level.WARNING, "[BC] Method not found." + e);
return;
}
@@ -42,7 +42,6 @@ public class BCModule {
ModuleRegistrar.instance().addConfig("Buildcraft", "bc.tanktype");
ModuleRegistrar.instance().registerHeadProvider(new HUDHandlerBCTanks(), TileTank);
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerBCTanks(), TileTank);
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileTank);
}
}
@@ -4,8 +4,8 @@ import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.logging.Level;
import net.minecraftforge.common.util.ForgeDirection;
import mcp.mobius.waila.Waila;
import net.minecraftforge.common.ForgeDirection;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
public class BCPowerAPIModule {
@@ -30,9 +30,9 @@ public class BCPowerAPIModule {
public static void register(){
try{
Class ModClass = Class.forName("buildcraft.api.power.IPowerReceptor");
Waila.log.log(Level.INFO, "Buildcraft Power API found.");
mod_Waila.log.log(Level.INFO, "Buildcraft Power API found.");
} catch (ClassNotFoundException e){
Waila.log.log(Level.INFO, "[Buildcraft Power API] Buildcraft Power API mod not found.");
mod_Waila.log.log(Level.INFO, "[Buildcraft Power API] Buildcraft Power API mod not found.");
return;
}
@@ -56,24 +56,23 @@ public class BCPowerAPIModule {
} catch (ClassNotFoundException e){
Waila.log.log(Level.WARNING, "[EnderStorage] Class not found. " + e);
mod_Waila.log.log(Level.WARNING, "[EnderStorage] Class not found. " + e);
return;
} catch (NoSuchMethodException e){
Waila.log.log(Level.WARNING, "[EnderStorage] Method not found." + e);
mod_Waila.log.log(Level.WARNING, "[EnderStorage] Method not found." + e);
return;
// } catch (NoSuchFieldException e){
// mod_Waila.log.log(Level.WARNING, "[EnderStorage] Field not found." + e);
// return;
} catch (Exception e){
Waila.log.log(Level.WARNING, "[EnderStorage] Unhandled exception." + e);
mod_Waila.log.log(Level.WARNING, "[EnderStorage] Unhandled exception." + e);
return;
}
ModuleRegistrar.instance().addConfigRemote("BuildcraftAPI", "bcapi.storage");
ModuleRegistrar.instance().addConfig("BuildcraftAPI", "bcapi.consump");
ModuleRegistrar.instance().addConfig("BuildcraftAPI", "bcapi.trigger");
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerIPowerReceptor(), IPowerReceptor);
ModuleRegistrar.instance().registerSyncedNBTKey("*", IPowerReceptor);
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerIPowerReceptor(), IPowerReceptor);
}
@@ -5,17 +5,25 @@ import java.util.logging.Level;
//import buildcraft.factory.TileTank;
import mcp.mobius.waila.Waila;
import codechicken.lib.lang.LangUtil;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.api.impl.ConfigHandler;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
import mcp.mobius.waila.cbcore.LangUtil;
import net.minecraftforge.liquids.ILiquidTank;
import net.minecraftforge.liquids.LiquidStack;
public class HUDHandlerBCTanks implements IWailaDataProvider {
@@ -62,7 +70,7 @@ public class HUDHandlerBCTanks implements IWailaDataProvider {
try{
tank = ((FluidTankInfo[])BCModule.TileTank_getTankInfo.invoke(BCModule.TileTank.cast(accessor.getTileEntity()), ForgeDirection.UNKNOWN))[0];
} catch (Exception e){
Waila.log.log(Level.SEVERE, "[BC] Unhandled exception trying to access a tank for display !.\n" + String.valueOf(e));
mod_Waila.log.log(Level.SEVERE, "[BC] Unhandled exception trying to access a tank for display !.\n" + String.valueOf(e));
return null;
}
return tank;
@@ -2,13 +2,13 @@ package mcp.mobius.waila.addons.buildcraft;
import java.util.List;
import codechicken.lib.lang.LangUtil;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.common.ForgeDirection;
import mcp.mobius.waila.WailaExceptionHandler;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.cbcore.LangUtil;
import mcp.mobius.waila.utils.WailaExceptionHandler;
public class HUDHandlerIPowerReceptor implements IWailaDataProvider {
@@ -4,7 +4,8 @@ import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.logging.Level;
import mcp.mobius.waila.Waila;
import net.minecraftforge.common.ForgeDirection;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
public class EnderIOModule {
@@ -21,9 +22,9 @@ public class EnderIOModule {
public static void register(){
try{
Class ModClass = Class.forName("crazypants.enderio.EnderIO");
Waila.log.log(Level.INFO, "EnderIO mod found.");
mod_Waila.log.log(Level.INFO, "EnderIO mod found.");
} catch (ClassNotFoundException e){
Waila.log.log(Level.INFO, "[EnderIO] EnderIO mod not found.");
mod_Waila.log.log(Level.INFO, "[EnderIO] EnderIO mod not found.");
return;
}
@@ -39,16 +40,16 @@ public class EnderIOModule {
TileTesseract = Class.forName("crazypants.enderio.machine.hypercube.TileHyperCube");
} catch (ClassNotFoundException e){
Waila.log.log(Level.WARNING, "[EnderStorage] Class not found. " + e);
mod_Waila.log.log(Level.WARNING, "[EnderStorage] Class not found. " + e);
return;
} catch (NoSuchMethodException e){
Waila.log.log(Level.WARNING, "[EnderStorage] Method not found." + e);
mod_Waila.log.log(Level.WARNING, "[EnderStorage] Method not found." + e);
return;
// } catch (NoSuchFieldException e){
// mod_Waila.log.log(Level.WARNING, "[EnderStorage] Field not found." + e);
// return;
} catch (Exception e){
Waila.log.log(Level.WARNING, "[EnderStorage] Unhandled exception." + e);
mod_Waila.log.log(Level.WARNING, "[EnderStorage] Unhandled exception." + e);
return;
}
@@ -58,8 +59,6 @@ public class EnderIOModule {
ModuleRegistrar.instance().addConfig("EnderIO", "enderio.channel");
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerCapacitor(), TileCapacitorBank);
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerTesseract(), TileTesseract);
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileCapacitorBank);
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileTesseract);
}
}
@@ -2,12 +2,12 @@ package mcp.mobius.waila.addons.enderio;
import java.util.List;
import mcp.mobius.waila.cbcore.LangUtil;
import codechicken.lib.lang.LangUtil;
import net.minecraft.item.ItemStack;
import mcp.mobius.waila.WailaExceptionHandler;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.utils.WailaExceptionHandler;
public class HUDHandlerCapacitor implements IWailaDataProvider{
@@ -2,7 +2,7 @@ package mcp.mobius.waila.addons.enderio;
import java.util.List;
import mcp.mobius.waila.cbcore.LangUtil;
import codechicken.lib.lang.LangUtil;
import net.minecraft.item.ItemStack;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
@@ -4,7 +4,7 @@ import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.logging.Level;
import mcp.mobius.waila.Waila;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
public class EnderStorageModule {
@@ -20,9 +20,9 @@ public class EnderStorageModule {
public static void register(){
try{
Class EnderStorage = Class.forName("codechicken.enderstorage.EnderStorage");
Waila.log.log(Level.INFO, "EnderStorage mod found.");
mod_Waila.log.log(Level.INFO, "EnderStorage mod found.");
} catch (ClassNotFoundException e){
Waila.log.log(Level.INFO, "[EnderStorage] EnderStorage mod not found.");
mod_Waila.log.log(Level.INFO, "[EnderStorage] EnderStorage mod not found.");
return;
}
@@ -37,21 +37,20 @@ public class EnderStorageModule {
TileEnderTank = Class.forName("codechicken.enderstorage.storage.liquid.TileEnderTank");
} catch (ClassNotFoundException e){
Waila.log.log(Level.WARNING, "[EnderStorage] Class not found. " + e);
mod_Waila.log.log(Level.WARNING, "[EnderStorage] Class not found. " + e);
return;
} catch (NoSuchMethodException e){
Waila.log.log(Level.WARNING, "[EnderStorage] Method not found." + e);
mod_Waila.log.log(Level.WARNING, "[EnderStorage] Method not found." + e);
return;
} catch (NoSuchFieldException e){
Waila.log.log(Level.WARNING, "[EnderStorage] Field not found." + e);
mod_Waila.log.log(Level.WARNING, "[EnderStorage] Field not found." + e);
return;
} catch (Exception e){
Waila.log.log(Level.WARNING, "[EnderStorage] Unhandled exception." + e);
mod_Waila.log.log(Level.WARNING, "[EnderStorage] Unhandled exception." + e);
return;
}
ModuleRegistrar.instance().addConfig("EnderStorage", "enderstorage.colors");
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerStorage(), TileFrequencyOwner);
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileFrequencyOwner);
}
}
@@ -2,12 +2,12 @@ package mcp.mobius.waila.addons.enderstorage;
import java.util.List;
import mcp.mobius.waila.cbcore.LangUtil;
import codechicken.lib.lang.LangUtil;
import net.minecraft.item.ItemStack;
import mcp.mobius.waila.WailaExceptionHandler;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.utils.WailaExceptionHandler;
public class HUDHandlerStorage implements IWailaDataProvider {
@@ -4,7 +4,7 @@ import java.lang.reflect.Field;
import java.util.logging.Level;
import net.minecraft.item.Item;
import mcp.mobius.waila.Waila;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
public class ETBModule {
@@ -29,9 +29,9 @@ public class ETBModule {
public static void register(){
try{
Class ModClass = Class.forName("emasher.sockets.TileSocket");
Waila.log.log(Level.INFO, "Engineer Toolbox mod found.");
mod_Waila.log.log(Level.INFO, "Engineer Toolbox mod found.");
} catch (ClassNotFoundException e){
Waila.log.log(Level.INFO, "[Engineer Toolbox] Engineer Toolbox mod not found.");
mod_Waila.log.log(Level.INFO, "[Engineer Toolbox] Engineer Toolbox mod not found.");
return;
}
@@ -63,21 +63,21 @@ public class ETBModule {
} catch (ClassNotFoundException e){
Waila.log.log(Level.WARNING, "[Engineer Toolbox] Class not found. " + e);
mod_Waila.log.log(Level.WARNING, "[Engineer Toolbox] Class not found. " + e);
return;
// } catch (NoSuchMethodException e){
// mod_Waila.log.log(Level.WARNING, "[Engineer Toolbox] Method not found." + e);
// return;
} catch (NoSuchFieldException e){
Waila.log.log(Level.WARNING, "[Engineer Toolbox] Field not found." + e);
mod_Waila.log.log(Level.WARNING, "[Engineer Toolbox] Field not found." + e);
return;
} catch (Exception e){
Waila.log.log(Level.WARNING, "[Engineer Toolbox] Unhandled exception." + e);
mod_Waila.log.log(Level.WARNING, "[Engineer Toolbox] Unhandled exception." + e);
return;
}
ModuleRegistrar.instance().addConfig("Engineer Toolbox", "etb.displaydata");
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerSocket(), TileSocket);
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileSocket);
}
}
@@ -5,11 +5,11 @@ import java.util.List;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.common.ForgeDirection;
import mcp.mobius.waila.WailaExceptionHandler;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.utils.WailaExceptionHandler;
public class HUDHandlerSocket implements IWailaDataProvider {
@@ -2,7 +2,7 @@ package mcp.mobius.waila.addons.exu;
import java.util.logging.Level;
import mcp.mobius.waila.Waila;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
public class ExtraUtilitiesModule {
@@ -15,21 +15,20 @@ public class ExtraUtilitiesModule {
try{
Class ModExtraUtilities = Class.forName("extrautils.ExtraUtils");
Waila.log.log(Level.INFO, "ExtraUtilities mod found.");
mod_Waila.log.log(Level.INFO, "ExtraUtilities mod found.");
} catch (ClassNotFoundException e){
Waila.log.log(Level.INFO, "[ExtraUtilities] ExtraUtilities mod not found.");
mod_Waila.log.log(Level.INFO, "[ExtraUtilities] ExtraUtilities mod not found.");
return;
}
try{
TileEntityDrum = Class.forName("extrautils.tileentity.TileEntityDrum");
} catch (ClassNotFoundException e){
Waila.log.log(Level.WARNING, "[ExtraUtilities] Class not found. " + e);
mod_Waila.log.log(Level.WARNING, "[ExtraUtilities] Class not found. " + e);
return;
}
ModuleRegistrar.instance().addConfigRemote("ExtraUtilities", "extrautilities.fluidamount");
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerDrum(), TileEntityDrum);
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntityDrum);
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerDrum(), TileEntityDrum);
}
}
@@ -4,7 +4,7 @@ import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
import mcp.mobius.waila.api.IWailaConfigHandler;
@@ -2,7 +2,7 @@ package mcp.mobius.waila.addons.gravestone;
import java.util.logging.Level;
import mcp.mobius.waila.Waila;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
public class GravestoneModule {
@@ -13,21 +13,20 @@ public class GravestoneModule {
try{
Class ModGravestone = Class.forName("GraveStone.ModGraveStone");
Waila.log.log(Level.INFO, "GraveStone mod found.");
mod_Waila.log.log(Level.INFO, "GraveStone mod found.");
} catch (ClassNotFoundException e){
Waila.log.log(Level.INFO, "[GraveStone] GraveStone mod not found.");
mod_Waila.log.log(Level.INFO, "[GraveStone] GraveStone mod not found.");
return;
}
try {
BlockGraveStone = Class.forName("GraveStone.block.BlockGSGraveStone");
} catch (ClassNotFoundException e) {
Waila.log.log(Level.WARNING, "[GraveStone] Class not found. " + e);
mod_Waila.log.log(Level.WARNING, "[GraveStone] Class not found. " + e);
}
ModuleRegistrar.instance().registerStackProvider(new HUDHandlerGravestone(), BlockGraveStone);
ModuleRegistrar.instance().registerSyncedNBTKey("*", BlockGraveStone);
ModuleRegistrar.instance().registerStackProvider(new HUDHandlerGravestone(), BlockGraveStone);
}
}
@@ -2,14 +2,13 @@ package mcp.mobius.waila.addons.ic2;
import java.util.List;
import mcp.mobius.waila.cbcore.LangUtil;
import codechicken.lib.lang.LangUtil;
import net.minecraft.item.ItemStack;
import mcp.mobius.waila.WailaExceptionHandler;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.api.impl.ConfigHandler;
import mcp.mobius.waila.utils.WailaExceptionHandler;
import static mcp.mobius.waila.api.SpecialChars.*;
public class HUDHandlerTEBaseGenerator implements IWailaDataProvider {
@@ -51,7 +50,7 @@ public class HUDHandlerTEBaseGenerator implements IWailaDataProvider {
double stored = IC2Module.getStoredEnergy(accessor);
if ( stored >= 0.0 && storage > 0)
currenttip.add(String.format("%s%s\u00a7f%d\u00a7r / \u00a7f%d\u00a7r EU", storedStr, TAB + ALIGNRIGHT, Math.round(Math.min(stored,storage)), storage));
currenttip.add(String.format("%s : \u00a7f%d\u00a7r / \u00a7f%d\u00a7r EU", storedStr, Math.round(Math.min(stored,storage)), storage));
//else if (stored >= 0.0)
// currenttip.add(String.format("Stored : %d EU", stored));
@@ -59,7 +58,7 @@ public class HUDHandlerTEBaseGenerator implements IWailaDataProvider {
if (ConfigHandler.instance().getConfig("ic2.outputeu")){
if ( production > 0)
currenttip.add(String.format("%s%s\u00a7f%d\u00a7r EU/t", outputStr, TAB + ALIGNRIGHT, production));
currenttip.add(String.format("%s : \u00a7f%d\u00a7r EU/t", outputStr, production));
}
} catch (Exception e){
@@ -2,14 +2,13 @@ package mcp.mobius.waila.addons.ic2;
import java.util.List;
import mcp.mobius.waila.cbcore.LangUtil;
import codechicken.lib.lang.LangUtil;
import net.minecraft.item.ItemStack;
import mcp.mobius.waila.WailaExceptionHandler;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.api.impl.ConfigHandler;
import mcp.mobius.waila.utils.WailaExceptionHandler;
import static mcp.mobius.waila.api.SpecialChars.*;
public class HUDHandlerTEElectricBlock implements IWailaDataProvider {
@@ -38,13 +37,13 @@ public class HUDHandlerTEElectricBlock implements IWailaDataProvider {
int storage = IC2Module.TEEB_MaxStorage.getInt(accessor.getTileEntity());
if ( stored >= 0.0 )
currenttip.add(String.format("%s%s\u00a7f%d\u00a7r / \u00a7f%d\u00a7r EU", storedStr, TAB + ALIGNRIGHT, Math.round(Math.min(stored,storage)), storage));
currenttip.add(String.format("%s : \u00a7f%d\u00a7r / \u00a7f%d\u00a7r EU", storedStr, Math.round(Math.min(stored,storage)), storage));
}
if (ConfigHandler.instance().getConfig("ic2.outputeu")){
int production = IC2Module.TEEB_Output.getInt(accessor.getTileEntity());
if ( production > 0)
currenttip.add(String.format("%s%s\u00a7f%d\u00a7r EU/t", outputStr, TAB + ALIGNRIGHT, production));
currenttip.add(String.format("%s : \u00a7f%d\u00a7r EU/t", outputStr, production));
}
} catch (Exception e){
@@ -2,14 +2,13 @@ package mcp.mobius.waila.addons.ic2;
import java.util.List;
import mcp.mobius.waila.cbcore.LangUtil;
import codechicken.lib.lang.LangUtil;
import net.minecraft.item.ItemStack;
import mcp.mobius.waila.WailaExceptionHandler;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.api.impl.ConfigHandler;
import mcp.mobius.waila.utils.WailaExceptionHandler;
import static mcp.mobius.waila.api.SpecialChars.*;
public class HUDHandlerTEStandardMachine implements IWailaDataProvider {
@@ -54,17 +53,17 @@ public class HUDHandlerTEStandardMachine implements IWailaDataProvider {
/* EU Storage */
if (ConfigHandler.instance().getConfig("ic2.storage")){
if ( stored >= 0.0 )
currenttip.add(String.format("%s%s\u00a7f%d\u00a7r / \u00a7f%d\u00a7r EU", storedStr, TAB + ALIGNRIGHT, Math.round(Math.min(stored,storage)), storage));
currenttip.add(String.format("%s : \u00a7f%d\u00a7r / \u00a7f%d\u00a7r EU", storedStr, Math.round(Math.min(stored,storage)), storage));
}
if (ConfigHandler.instance().getConfig("ic2.consump")){
if ( consumption > 0)
currenttip.add(String.format("%s%s\u00a7f%d\u00a7r EU/t", powerStr, TAB + ALIGNRIGHT, consumption ));
currenttip.add(String.format("%s : \u00a7f%d\u00a7r EU/t", powerStr, consumption ));
}
if (ConfigHandler.instance().getConfig("ic2.inputeu")){
if ( maxinput > 0)
currenttip.add(String.format("%s%s\u00a7f%d\u00a7r EU/t", maxPowerStr, TAB + ALIGNRIGHT, maxinput ));
currenttip.add(String.format("%s : \u00a7f%d\u00a7r EU/t", maxPowerStr, maxinput ));
}
} catch (Exception e){
@@ -2,7 +2,7 @@ package mcp.mobius.waila.addons.ic2;
import java.util.List;
import mcp.mobius.waila.cbcore.LangUtil;
import codechicken.lib.lang.LangUtil;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
@@ -10,7 +10,6 @@ import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.api.impl.ConfigHandler;
import static mcp.mobius.waila.api.SpecialChars.*;
public class HUDHandlerTETradeOMat implements IWailaDataProvider {
@@ -26,7 +25,7 @@ public class HUDHandlerTETradeOMat implements IWailaDataProvider {
@Override
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
/*
if (!ConfigHandler.instance().getConfig("ic2.tradeomat")) return currenttip;
NBTTagCompound slots = accessor.getNBTData().getCompoundTag("InvSlots");
@@ -39,15 +38,15 @@ public class HUDHandlerTETradeOMat implements IWailaDataProvider {
if (offer.tagCount() == 1){
NBTTagCompound subtag = (NBTTagCompound)offer.tagAt(0);
ItemStack is = new ItemStack(subtag.getShort("id"), subtag.getByte("Count"), subtag.getShort("Damage"));
currenttip.add(String.format("%s%s\u00a7f%d\u00a7r x \u00a7f%s\u00a7r", offersStr, TAB + ALIGNRIGHT, is.stackSize, is.getDisplayName()));
currenttip.add(String.format("%s : \u00a7f%d\u00a7r x \u00a7f%s\u00a7r", offersStr, is.stackSize, is.getDisplayName()));
}
if (demand.tagCount() == 1){
NBTTagCompound subtag = (NBTTagCompound)demand.tagAt(0);
ItemStack is = new ItemStack(subtag.getShort("id"), subtag.getByte("Count"), subtag.getShort("Damage"));
currenttip.add(String.format("%s%s\u00a7f%d\u00a7r x \u00a7f%s\u00a7r", demandsStr, TAB + ALIGNRIGHT, is.stackSize, is.getDisplayName()));
currenttip.add(String.format("%s : \u00a7f%d\u00a7r x \u00a7f%s\u00a7r", demandsStr, is.stackSize, is.getDisplayName()));
}
*/
return currenttip;
}
@@ -9,11 +9,11 @@ import cpw.mods.fml.common.ObfuscationReflectionHelper;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import mcp.mobius.waila.Waila;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.impl.ConfigHandler;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
import mcp.mobius.waila.utils.AccessHelper;
import mcp.mobius.waila.tools.AccessHelper;
public class IC2Module {
@@ -54,7 +54,7 @@ public class IC2Module {
public static ItemStack OverclockerUpgradeStack = null;
public static void register(){
/*
try{
TileEntityStandardMachine = Class.forName("ic2.core.block.machine.tileentity.TileEntityStandardMachine");
@@ -97,19 +97,19 @@ public class IC2Module {
} catch (ClassNotFoundException e){
//e.printStackTrace();
Waila.log.log(Level.WARNING, "[IC2] Class not found. " + e);
mod_Waila.log.log(Level.WARNING, "[IC2] Class not found. " + e);
return;
} catch (NoSuchMethodException e){
//e.printStackTrace();
Waila.log.log(Level.WARNING, "[IC2] Method not found." + e);
mod_Waila.log.log(Level.WARNING, "[IC2] Method not found." + e);
return;
} catch (NoSuchFieldException e){
//e.printStackTrace();
Waila.log.log(Level.WARNING, "[IC2] Field not found." + e);
mod_Waila.log.log(Level.WARNING, "[IC2] Field not found." + e);
return;
} catch (Exception e){
//e.printStackTrace();
Waila.log.log(Level.WARNING, "[IC2] Unhandled exception." + e);
mod_Waila.log.log(Level.WARNING, "[IC2] Unhandled exception." + e);
return;
}
@@ -125,27 +125,17 @@ public class IC2Module {
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerTEBaseGenerator(), TileEntitySemifluidGenerator);
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerTEBaseGenerator(), TileEntityGeoGenerator);
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerTEElectricBlock(), TileEntityElectricBlock);
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerTETradeOMat(), TileEntityTradeOMat);
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntityStandardMachine);
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntityBaseGenerator);
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntitySemifluidGenerator);
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntityGeoGenerator);
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntityElectricBlock);
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntityTradeOMat);
*/
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerTETradeOMat(), TileEntityTradeOMat);
}
/* Retuns the current stored energy if available in the nbt and config is true */
public static double getStoredEnergy(IWailaDataAccessor accessor){
/*
if (ConfigHandler.instance().getConfig("ic2.storage")){
if (accessor.getNBTData().hasKey("energy"))
return accessor.getNBTData().getDouble("energy");
else if (accessor.getNBTData().hasKey("storage"))
return accessor.getNBTData().getDouble("storage");
}
*/
return -1.0;
}
@@ -153,8 +143,7 @@ public class IC2Module {
NBTTagCompound nbt = accessor.getNBTData();
IC2Upgrades upgrades = new IC2Upgrades();
/*
if (!nbt.hasKey("InvSlots")) return null;
NBTTagCompound inventory = nbt.getCompoundTag("InvSlots");
@@ -179,7 +168,7 @@ public class IC2Module {
if (OverclockerUpgradeStack.getItemDamage() == meta && OverclockerUpgradeStack.itemID == id)
upgrades.overclocker += count;
}
*/
return upgrades;
}
@@ -2,15 +2,15 @@ package mcp.mobius.waila.addons.openblocks;
import java.util.List;
import codechicken.lib.lang.LangUtil;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.cbcore.LangUtil;
public class HUDHandlerTank implements IWailaDataProvider {
@@ -2,7 +2,7 @@ package mcp.mobius.waila.addons.openblocks;
import java.util.logging.Level;
import mcp.mobius.waila.Waila;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
public class OpenBlocksModule {
@@ -13,22 +13,21 @@ public class OpenBlocksModule {
public static void register(){
try{
Class ModOpenBlocks = Class.forName("openblocks.OpenBlocks");
Waila.log.log(Level.INFO, "OpenBlocks mod found.");
mod_Waila.log.log(Level.INFO, "OpenBlocks mod found.");
} catch (ClassNotFoundException e){
Waila.log.log(Level.INFO, "[OpenBlocks] OpenBlocks mod not found.");
mod_Waila.log.log(Level.INFO, "[OpenBlocks] OpenBlocks mod not found.");
return;
}
try{
TileEntityTank = Class.forName("openblocks.common.tileentity.TileEntityTank");
} catch (ClassNotFoundException e){
Waila.log.log(Level.WARNING, "[OpenBlocks] Class not found. " + e);
mod_Waila.log.log(Level.WARNING, "[OpenBlocks] Class not found. " + e);
return;
}
ModuleRegistrar.instance().addConfigRemote("OpenBlocks", "openblocks.fluidamount");
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerTank(), TileEntityTank);
ModuleRegistrar.instance().registerHeadProvider(new HUDHandlerTank(), TileEntityTank);
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntityTank);
}
}
@@ -4,16 +4,13 @@ import net.minecraft.client.renderer.Tessellator;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.common.ForgeDirection;
import mcp.mobius.waila.api.IWailaBlockDecorator;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaFMPAccessor;
import mcp.mobius.waila.api.IWailaFMPDecorator;
import mcp.mobius.waila.gui.helpers.UIHelper;
import mcp.mobius.waila.utils.NBTUtil;
public class HUDDecoratorRsGateLogic implements IWailaFMPDecorator {
public class HUDDecoratorRsGateLogic implements IWailaBlockDecorator {
static byte[][] IOARRAY={
{1,1,2,1} /* OR */, {1,1,2,1} /* NOR */, {1,2,2,2} /* NOT */, {1,1,2,1} /* AND */,
@@ -25,28 +22,36 @@ public class HUDDecoratorRsGateLogic implements IWailaFMPDecorator {
{11,12,11,12} /* Inver */, {11,12,11,12} /* Buff */, {1,9,2,8} /* Cmp */, {1,12,2,12} /* And */,
};
static byte[][] IOARRAYALTER={
{1,8,2,9} /* Cmp 1*/, {1,6,2,2} /* State 1*/, {2,8,2,9} /* Count 1*/, {6,2,2,1} /* Transp 1*/,
{2,1,2,1} /* Latch 1*/, {2,1,2,1} /* Latch 2*/, {2,1,2,1} /* Latch 3*/
};
static String[] IONAMES={ "", "IN", "OUT", "SWAP", "IN_A", "IN_B", "LOCK", "IO", "POS", "NEG", "BUS", "A", "B"};
@Override
public void decorateBlock(ItemStack itemStack, IWailaFMPAccessor accessor, IWailaConfigHandler config) {
public void decorateBlock(ItemStack itemStack, IWailaDataAccessor accessor, IWailaConfigHandler config) {
if (!config.getConfig("pr.showio")) return;
int orient = 0;
int subID = 0;
int shape = 0;
boolean found = false;
orient = NBTUtil.getNBTInteger(accessor.getNBTData(), "orient");
subID = NBTUtil.getNBTInteger(accessor.getNBTData(), "subID");
shape = NBTUtil.getNBTInteger(accessor.getNBTData(), "shape");
if (!accessor.getNBTData().hasKey("parts")) return;
NBTTagList parts = accessor.getNBTData().getTagList("parts");
for (int i = 0; i < parts.tagCount(); i++){
NBTTagCompound subtag = (NBTTagCompound)parts.tagAt(i);
String id = subtag.getString("id");
if (id.equals("pr_sgate") || id.equals("pr_igate") ||
id.equals("pr_tgate") || id.equals("pr_bgate") ||
id.equals("pr_agate") || id.equals("pr_rgate")){
orient = accessor.getNBTInteger(subtag, "orient");
subID = accessor.getNBTInteger(subtag, "subID");
shape = accessor.getNBTInteger(subtag, "shape");
found = true;
}
}
if (!found) return;
//orient = orient - ((orient & 0x10) + (orient & 0x8) + (orient & 0x4));
int hOrient = orient & 0x3;
ForgeDirection vOrient = ForgeDirection.getOrientation((orient - (orient & 0x3)) >> 2);
@@ -63,27 +68,8 @@ public class HUDDecoratorRsGateLogic implements IWailaFMPDecorator {
hOrient = 3;
String[] IOStr = new String[4];
if (shape != 0){
int altIndex = -1;
if (subID == 26 && shape == 1) altIndex = 0;
if (subID == 20 && shape == 1) altIndex = 1;
if (subID == 19 && shape == 1) altIndex = 2;
if (subID == 14 && shape == 1) altIndex = 3;
if (subID == 12 && shape == 1) altIndex = 4;
if (subID == 12 && shape == 2) altIndex = 5;
if (subID == 12 && shape == 3) altIndex = 6;
if (altIndex == -1)
for (int i = 0; i < 4; i++)
IOStr[i] = IONAMES[IOARRAY[subID][i]];
else
for (int i = 0; i < 4; i++)
IOStr[i] = IONAMES[IOARRAYALTER[altIndex][i]];
} else {
for (int i = 0; i < 4; i++)
IOStr[i] = IONAMES[IOARRAY[subID][i]];
}
for (int i = 0; i < 4; i++)
IOStr[i] = IONAMES[IOARRAY[subID][i]];
String[] IOStrRot = new String[4];
@@ -132,6 +118,7 @@ public class HUDDecoratorRsGateLogic implements IWailaFMPDecorator {
break;
default:
break;
}
double x = accessor.getRenderingPosition().xCoord;
@@ -0,0 +1,105 @@
package mcp.mobius.waila.addons.projectred;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
public class HUDHandlerRsGateLogic implements IWailaDataProvider {
@Override
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
return null;
}
@Override
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
return currenttip;
}
@Override
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
if (!config.getConfig("pr.showdata")) return currenttip;
int orient = 0;
int subID = 0;
int shape = 0;
int pmax = 0;
int val = 0;
int max = 0;
int dec = 0;
int inc = 0;
boolean found = false;
if (!accessor.getNBTData().hasKey("parts")) return currenttip;
NBTTagList parts = accessor.getNBTData().getTagList("parts");
for (int i = 0; i < parts.tagCount(); i++){
NBTTagCompound subtag = (NBTTagCompound)parts.tagAt(i);
String id = subtag.getString("id");
if (id.equals("pr_sgate") || id.equals("pr_igate") ||
id.equals("pr_tgate") || id.equals("pr_bgate") ||
id.equals("pr_agate") || id.equals("pr_rgate")){
orient = accessor.getNBTInteger(subtag, "orient");
subID = accessor.getNBTInteger(subtag, "subID");
shape = accessor.getNBTInteger(subtag, "shape");
if (subID == 17)
pmax = accessor.getNBTInteger(subtag, "pmax");
if (subID == 19){
val = accessor.getNBTInteger(subtag, "val");
max = accessor.getNBTInteger(subtag, "max");
dec = accessor.getNBTInteger(subtag, "dec");
inc = accessor.getNBTInteger(subtag, "inc");
}
found = true;
}
}
if (!found) return currenttip;
switch(subID){
case 10:
currenttip.add(String.format("Delay : \u00a7f%d ticks", (int)Math.pow(2, shape)));
break;
case 15:
if (shape == 0)
currenttip.add("Shape : \u00a7fOpen");
if (shape == 1)
currenttip.add("Shape : \u00a7fHalf closed");
if (shape == 2)
currenttip.add("Shape : \u00a7fclosed");
break;
case 17:
currenttip.add(String.format("Timer : \u00a7f%d \u00a7rms", (pmax + 2) * 50));
break;
case 19:
currenttip.add(String.format("Value : \u00a7f%d \u00a7r/ \u00a7f%d", val, max));
currenttip.add(String.format("Step : \u00a7f-%d \u00a7r/ \u00a7f+%d", dec, inc));
default:
break;
}
return currenttip;
}
@Override
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
return currenttip;
}
}
@@ -0,0 +1,51 @@
package mcp.mobius.waila.addons.projectred;
import java.io.File;
import java.util.logging.Level;
import net.minecraft.block.Block;
import net.minecraftforge.common.Configuration;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
public class ProjectRedModule {
public static Class BlockMultipart = null;
public static void register(){
try{
Class ModClass = Class.forName("mrtjp.projectred.ProjectRedIntegration");
mod_Waila.log.log(Level.INFO, "ProjectRed|Integration mod found.");
} catch (ClassNotFoundException e){
mod_Waila.log.log(Level.INFO, "[ProjectRed] ProjectRed|Integration mod not found.");
return;
}
try{
//InstancedRsGateLogic = Class.forName("mrtjp.projectred.integration.InstancedRsGateLogic");
BlockMultipart = Class.forName("codechicken.multipart.BlockMultipart");
} catch (ClassNotFoundException e){
mod_Waila.log.log(Level.WARNING, "[EnderStorage] Class not found. " + e);
return;
// } catch (NoSuchMethodException e){
// mod_Waila.log.log(Level.WARNING, "[EnderStorage] Method not found." + e);
// return;
// } catch (NoSuchFieldException e){
// mod_Waila.log.log(Level.WARNING, "[EnderStorage] Field not found." + e);
// return;
} catch (Exception e){
mod_Waila.log.log(Level.WARNING, "[EnderStorage] Unhandled exception." + e);
return;
}
ModuleRegistrar.instance().addConfigRemote("Project:Red", "pr.showio");
ModuleRegistrar.instance().addConfigRemote("Project:Red", "pr.showdata");
ModuleRegistrar.instance().registerBlockDecorator(new HUDDecoratorRsGateLogic(), BlockMultipart);
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerRsGateLogic(), BlockMultipart);
}
}
@@ -3,14 +3,14 @@ package mcp.mobius.waila.addons.railcraft;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import mcp.mobius.waila.cbcore.LangUtil;
import codechicken.lib.lang.LangUtil;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidTank;
import mcp.mobius.waila.WailaExceptionHandler;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.utils.WailaExceptionHandler;
public class HUDHandlerTank implements IWailaDataProvider {
@@ -3,7 +3,7 @@ package mcp.mobius.waila.addons.railcraft;
import java.lang.reflect.Method;
import java.util.logging.Level;
import mcp.mobius.waila.Waila;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
public class RailcraftModule {
@@ -15,9 +15,9 @@ public class RailcraftModule {
public static void register(){
try{
Class ModRailcraft = Class.forName("mods.railcraft.common.core.Railcraft");
Waila.log.log(Level.INFO, "Railcraft mod found.");
mod_Waila.log.log(Level.INFO, "Railcraft mod found.");
} catch (ClassNotFoundException e){
Waila.log.log(Level.INFO, "[Railcraft] Railcraft mod not found.");
mod_Waila.log.log(Level.INFO, "[Railcraft] Railcraft mod not found.");
return;
}
@@ -28,16 +28,15 @@ public class RailcraftModule {
//StandardTank = Class.forName("mods.railcraft.common.fluids.tanks.StandardTank");
} catch (ClassNotFoundException e){
Waila.log.log(Level.WARNING, "[Railcraft] Class not found. " + e);
mod_Waila.log.log(Level.WARNING, "[Railcraft] Class not found. " + e);
return;
} catch (NoSuchMethodException e){
Waila.log.log(Level.WARNING, "[Railcraft] Method not found." + e);
mod_Waila.log.log(Level.WARNING, "[Railcraft] Method not found." + e);
return;
}
ModuleRegistrar.instance().addConfigRemote("Railcraft", "railcraft.fluidamount");
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerTank(), TileTankBase);
ModuleRegistrar.instance().registerHeadProvider(new HUDHandlerTank(), TileTankBase);
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileTankBase);
}
}
@@ -1,15 +1,14 @@
package mcp.mobius.waila.addons.harvestcraft;
package mcp.mobius.waila.addons.thaumcraft;
import java.util.List;
import mcp.mobius.waila.cbcore.LangUtil;
import net.minecraft.item.ItemStack;
import mcp.mobius.waila.WailaExceptionHandler;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.utils.NBTUtil;
import net.minecraft.item.ItemStack;
public class HUDHandlerPamCrop implements IWailaDataProvider {
public class HUDHandlerCapacitor implements IWailaDataProvider {
@Override
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
@@ -23,22 +22,22 @@ public class HUDHandlerPamCrop implements IWailaDataProvider {
@Override
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
if (!config.getConfig("general.showcrop")) return currenttip;
if (config.getConfig("thaumcraft.storedvis")){
try{
short storedVis = ThaumcraftModule.TileCrystalCapacitor_StoredVis.getShort(accessor.getTileEntity());
short maxVis = ThaumcraftModule.TileCrystalCapacitor_MaxVis.getShort(accessor.getTileEntity());
int growthStage = NBTUtil.getNBTInteger(accessor.getNBTData(), "growthStage");
float growthValue = (growthStage / 2.0F) * 100.0F;
if (growthValue < 100.0)
currenttip.add(String.format("%s : %.0f %%", LangUtil.translateG("hud.msg.growth"), growthValue));
else
currenttip.add(String.format("%s : %s", LangUtil.translateG("hud.msg.growth"), LangUtil.translateG("hud.msg.mature")));
currenttip.add(String.format("%s/%s vis", storedVis, maxVis));
}catch (Exception e){
currenttip = WailaExceptionHandler.handleErr(e, accessor.getClass().getName(), currenttip);
}
}
return currenttip;
}
@Override
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
return currenttip;
}
}
}
@@ -1,18 +1,17 @@
package mcp.mobius.waila.addons.magicalcrops;
package mcp.mobius.waila.addons.thaumcraft;
import java.util.List;
import mcp.mobius.waila.cbcore.LangUtil;
import net.minecraft.item.ItemStack;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
public class HUDHandlerMagicalCrops implements IWailaDataProvider {
public class HUDHandlerLeaves implements IWailaDataProvider {
@Override
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
return null;
return new ItemStack(accessor.getBlock(), 0, accessor.getMetadata());
}
@Override
@@ -22,21 +21,11 @@ public class HUDHandlerMagicalCrops implements IWailaDataProvider {
@Override
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
if (!config.getConfig("general.showcrop")) return currenttip;
int growthStage = accessor.getMetadata();
float growthValue = (growthStage / 7.0F) * 100.0F;
if (growthValue < 100.0)
currenttip.add(String.format("%s : %.0f %%", LangUtil.translateG("hud.msg.growth"), growthValue));
else
currenttip.add(String.format("%s : %s", LangUtil.translateG("hud.msg.growth"), LangUtil.translateG("hud.msg.mature")));
return currenttip;
}
@Override
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
return currenttip;
}
}
}
@@ -1,42 +1,30 @@
package mcp.mobius.waila.addons.agriculture;
package mcp.mobius.waila.addons.thaumcraft;
import java.util.List;
import mcp.mobius.waila.cbcore.LangUtil;
import net.minecraft.item.ItemStack;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
public class HUDHandlerCrop implements IWailaDataProvider {
public class HUDHandlerPlants implements IWailaDataProvider {
@Override
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
return null;
return new ItemStack(accessor.getBlock(), 0, accessor.getMetadata());
}
@Override
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
return currenttip;
return currenttip;
}
@Override
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
if (!config.getConfig("general.showcrop")) return currenttip;
int growthStage = accessor.getMetadata();
float growthValue = (growthStage / 6.0F) * 100.0F;
if (growthValue < 100.0)
currenttip.add(String.format("%s : %.0f %%", LangUtil.translateG("hud.msg.growth"), growthValue));
else
currenttip.add(String.format("%s : %s", LangUtil.translateG("hud.msg.growth"), LangUtil.translateG("hud.msg.mature")));
return currenttip;
}
@Override
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
return currenttip;
}
}
}
@@ -0,0 +1,57 @@
package mcp.mobius.waila.addons.thaumcraft;
import java.lang.reflect.Field;
import java.util.logging.Level;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
public class ThaumcraftModule {
public static Class BlockMagicalLeaves = null;
public static Class BlockCustomPlant = null;
public static Class TileCrystalCapacitor = null;
public static Field TileCrystalCapacitor_StoredVis = null;
public static Field TileCrystalCapacitor_MaxVis = null;
public static void register(){
try{
Class ModThaumcraft = Class.forName("thaumcraft.common.Thaumcraft");
mod_Waila.log.log(Level.INFO, "Thaumcraft mod found.");
} catch (ClassNotFoundException e){
mod_Waila.log.log(Level.INFO, "[Thaumcraft] Thaumcraft mod not found.");
return;
}
try{
BlockMagicalLeaves = Class.forName("thaumcraft.common.world.BlockMagicalLeaves");
BlockCustomPlant = Class.forName("thaumcraft.common.world.BlockCustomPlant");
TileCrystalCapacitor = Class.forName("thaumcraft.common.tiles.TileCrystalCapacitor");
TileCrystalCapacitor_StoredVis = TileCrystalCapacitor.getField("storedVis");
TileCrystalCapacitor_MaxVis = TileCrystalCapacitor.getField("maxVis");
} catch (ClassNotFoundException e){
mod_Waila.log.log(Level.WARNING, "[Thaumcraft] Class not found. " + e);
return;
// } catch (NoSuchMethodException e){
// mod_Waila.log.log(Level.WARNING, "[Thaumcraft] Method not found." + e);
// return;
} catch (NoSuchFieldException e){
mod_Waila.log.log(Level.WARNING, "[Thaumcraft] Field not found." + e);
return;
// } catch (Exception e){
// mod_Waila.log.log(Level.WARNING, "[Thaumcraft] Unhandled exception." + e);
// return;
}
ModuleRegistrar.instance().addConfig("Thaumcraft", "thaumcraft.storedvis");
ModuleRegistrar.instance().registerStackProvider(new HUDHandlerLeaves(), BlockMagicalLeaves);
ModuleRegistrar.instance().registerStackProvider(new HUDHandlerPlants(), BlockCustomPlant);
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerCapacitor(), TileCrystalCapacitor);
}
}
@@ -2,15 +2,15 @@ package mcp.mobius.waila.addons.thermalexpansion;
import java.util.List;
import mcp.mobius.waila.cbcore.LangUtil;
import codechicken.lib.lang.LangUtil;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraftforge.fluids.FluidStack;
import mcp.mobius.waila.WailaExceptionHandler;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.utils.WailaExceptionHandler;
public class HUDHandlerConduitFluid implements IWailaDataProvider {
@@ -26,7 +26,7 @@ public class HUDHandlerConduitFluid implements IWailaDataProvider {
@Override
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
/*
if (!config.getConfig("thermalexpansion.fluidtype")) return currenttip;
boolean found = false;
@@ -51,7 +51,7 @@ public class HUDHandlerConduitFluid implements IWailaDataProvider {
currenttip.add(fluid.getFluid().getLocalizedName());
else
currenttip.add(LangUtil.translateG("hud.msg.empty"));
*/
return currenttip;
}
@@ -23,7 +23,7 @@ public class HUDHandlerConduitItem implements IWailaDataProvider {
@Override
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
/*
if (!config.getConfig("thermalexpansion.conditemmode")) return currenttip;
boolean found = false;
@@ -52,7 +52,7 @@ public class HUDHandlerConduitItem implements IWailaDataProvider {
currenttip.add("Mode : \u00a7fRound-Robin");
else
currenttip.add("Mode : <UNKNOWN>");
*/
return currenttip;
}
@@ -2,12 +2,12 @@ package mcp.mobius.waila.addons.thermalexpansion;
import java.util.List;
import mcp.mobius.waila.cbcore.LangUtil;
import codechicken.lib.lang.LangUtil;
import net.minecraft.item.ItemStack;
import mcp.mobius.waila.WailaExceptionHandler;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.utils.WailaExceptionHandler;
public class HUDHandlerEnergyCell implements IWailaDataProvider {
@@ -4,11 +4,11 @@ import java.lang.reflect.InvocationTargetException;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.common.ForgeDirection;
import mcp.mobius.waila.WailaExceptionHandler;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.utils.WailaExceptionHandler;
public class HUDHandlerIEnergyHandler implements IWailaDataProvider {
@@ -2,7 +2,7 @@ package mcp.mobius.waila.addons.thermalexpansion;
import java.util.List;
import mcp.mobius.waila.cbcore.LangUtil;
import codechicken.lib.lang.LangUtil;
import net.minecraft.item.ItemStack;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
@@ -3,13 +3,13 @@ package mcp.mobius.waila.addons.thermalexpansion;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import mcp.mobius.waila.cbcore.LangUtil;
import codechicken.lib.lang.LangUtil;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import mcp.mobius.waila.WailaExceptionHandler;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.utils.WailaExceptionHandler;
public class HUDHandlerTank implements IWailaDataProvider {
@@ -2,7 +2,7 @@ package mcp.mobius.waila.addons.thermalexpansion;
import java.util.List;
import mcp.mobius.waila.cbcore.LangUtil;
import codechicken.lib.lang.LangUtil;
import net.minecraft.item.ItemStack;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
@@ -4,8 +4,8 @@ import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.logging.Level;
import net.minecraftforge.common.util.ForgeDirection;
import mcp.mobius.waila.Waila;
import net.minecraftforge.common.ForgeDirection;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
public class ThermalExpansionModule {
@@ -42,12 +42,12 @@ public class ThermalExpansionModule {
//public static Field TileConduitBase_isOutput = null;
public static void register(){
/*
try{
Class ModThermalExpansion = Class.forName("thermalexpansion.ThermalExpansion");
Waila.log.log(Level.INFO, "Thermal Expansion mod found.");
mod_Waila.log.log(Level.INFO, "Thermal Expansion mod found.");
} catch (ClassNotFoundException e){
Waila.log.log(Level.INFO, "[Thermal Expansion] ThermalExpansion mod not found.");
mod_Waila.log.log(Level.INFO, "[Thermal Expansion] ThermalExpansion mod not found.");
return;
}
@@ -84,13 +84,13 @@ public class ThermalExpansionModule {
//TileEnergyCell_energySend = TileEnergyCell.getField("energySend");
} catch (ClassNotFoundException e){
Waila.log.log(Level.WARNING, "[Thermal Expansion] Class not found. " + e);
mod_Waila.log.log(Level.WARNING, "[Thermal Expansion] Class not found. " + e);
return;
} catch (NoSuchMethodException e){
Waila.log.log(Level.WARNING, "[Thermal Expansion] Method not found." + e);
mod_Waila.log.log(Level.WARNING, "[Thermal Expansion] Method not found." + e);
return;
} catch (NoSuchFieldException e){
Waila.log.log(Level.WARNING, "[Thermal Expansion] Field not found." + e);
mod_Waila.log.log(Level.WARNING, "[Thermal Expansion] Field not found." + e);
return;
// } catch (Exception e){
// mod_Waila.log.log(Level.WARNING, "[Thermal Expansion] Unhandled exception." + e);
@@ -119,13 +119,7 @@ public class ThermalExpansionModule {
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerConduitFluid(), BlockMultipart);
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerConduitItem(), BlockMultipart);
ModuleRegistrar.instance().registerSyncedNBTKey("*", IEnergyHandler);
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEnergyCell);
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileTank);
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileTesseract);
ModuleRegistrar.instance().registerSyncedNBTKey("*", ISecureTile);
ModuleRegistrar.instance().registerSyncedNBTKey("*", BlockMultipart);
*/
}
@@ -2,7 +2,7 @@ package mcp.mobius.waila.addons.twilightforest;
import java.util.logging.Level;
import mcp.mobius.waila.Waila;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
public class TwilightForestModule {
@@ -15,9 +15,9 @@ public class TwilightForestModule {
try{
Class TwilightForestMod = Class.forName("twilightforest.TwilightForestMod");
Waila.log.log(Level.INFO, "TwilightForestMod mod found.");
mod_Waila.log.log(Level.INFO, "TwilightForestMod mod found.");
} catch (ClassNotFoundException e){
Waila.log.log(Level.INFO, "[TwilightForestMod] TwilightForestMod mod not found.");
mod_Waila.log.log(Level.INFO, "[TwilightForestMod] TwilightForestMod mod not found.");
return;
}
@@ -26,16 +26,13 @@ public class TwilightForestModule {
BlockTFPlant = Class.forName("twilightforest.block.BlockTFPlant");
BlockTFSapling = Class.forName("twilightforest.block.BlockTFSapling");
} catch (ClassNotFoundException e) {
Waila.log.log(Level.WARNING, "[TwilightForestMod] Class not found. " + e);
mod_Waila.log.log(Level.WARNING, "[TwilightForestMod] Class not found. " + e);
}
ModuleRegistrar.instance().registerStackProvider(new TwilightForestGenericOverride(), BlockTFRoots);
ModuleRegistrar.instance().registerStackProvider(new TwilightForestGenericOverride(), BlockTFPlant);
//ExternalModulesHandler.instance().registerStackProvider(new TwilightForestGenericOverride(), BlockTFSapling);
ModuleRegistrar.instance().registerSyncedNBTKey("*", BlockTFRoots);
ModuleRegistrar.instance().registerSyncedNBTKey("*", BlockTFPlant);
//ExternalModulesHandler.instance().registerStackProvider(new TwilightForestGenericOverride(), BlockTFSapling);
}
}
@@ -2,10 +2,9 @@ package mcp.mobius.waila.addons.vanillamc;
import java.util.List;
import codechicken.lib.lang.LangUtil;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSilverfish;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemRecord;
import net.minecraft.item.ItemStack;
@@ -15,47 +14,46 @@ import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
import mcp.mobius.waila.cbcore.LangUtil;
public class HUDHandlerVanilla implements IWailaDataProvider {
static Block mobSpawner = Blocks.mob_spawner;
static Block crops = Blocks.wheat;
static Block melonStem = Blocks.melon_stem;
static Block pumpkinStem = Blocks.pumpkin_stem;
static Block carrot = Blocks.carrots;
static Block potato = Blocks.potatoes;
static Block lever = Blocks.lever;
static Block repeaterIdle = Blocks.unpowered_repeater;
static Block repeaterActv = Blocks.powered_repeater;
static Block comparatorIdl = Blocks.unpowered_comparator;
static Block comparatorAct = Blocks.powered_comparator;
static Block redstone = Blocks.redstone_wire;
static Block jukebox = Blocks.jukebox;
static Block cocoa = Blocks.cocoa;
static Block netherwart = Blocks.nether_wart;
static Block silverfish = Blocks.monster_egg;
static int mobSpawnerID = Block.mobSpawner.blockID;
static int cropsID = Block.crops.blockID;
static int melonStemID = Block.melonStem.blockID;
static int pumpkinStemID = Block.pumpkinStem.blockID;
static int carrotID = Block.carrot.blockID;
static int potatoID = Block.potato.blockID;
static int leverID = Block.lever.blockID;
static int repeaterIdle = Block.redstoneRepeaterIdle.blockID;
static int repeaterActv = Block.redstoneRepeaterActive.blockID;
static int comparatorIdl = Block.redstoneComparatorIdle.blockID;
static int comparatorAct = Block.redstoneComparatorActive.blockID;
static int redstone = Block.redstoneWire.blockID;
static int jukebox = Block.jukebox.blockID;
static int cocoa = Block.cocoaPlant.blockID;
static int netherwart = Block.netherStalk.blockID;
static int silverfish = Block.silverfish.blockID;
@Override
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
Block block = accessor.getBlock();
int blockID = accessor.getBlockID();
if (block == silverfish && config.getConfig("vanilla.silverfish")){
if (blockID == silverfish){
int metadata = accessor.getMetadata();
switch(metadata){
case 0:
return new ItemStack(Blocks.stone);
return new ItemStack(Block.stone);
case 1:
return new ItemStack(Blocks.cobblestone);
return new ItemStack(Block.cobblestone);
case 2:
return new ItemStack(Blocks.brick_block);
return new ItemStack(Block.stoneBrick);
default:
return null;
}
}
if (block == redstone){
return new ItemStack(Items.redstone);
if (blockID == redstone){
return new ItemStack(Item.redstone);
}
return null;
@@ -64,16 +62,16 @@ public class HUDHandlerVanilla implements IWailaDataProvider {
@Override
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
Block block = accessor.getBlock();
int blockID = accessor.getBlockID();
/* Mob spawner handler */
if (block == mobSpawner && accessor.getTileEntity() instanceof TileEntityMobSpawner && config.getConfig("vanilla.spawntype")){
if (blockID == mobSpawnerID && accessor.getTileEntity() instanceof TileEntityMobSpawner && config.getConfig("vanilla.spawntype")){
String name = currenttip.get(0);
String mobname = ((TileEntityMobSpawner)accessor.getTileEntity()).func_145881_a().getEntityNameToSpawn();
String mobname = ((TileEntityMobSpawner)accessor.getTileEntity()).getSpawnerLogic().getEntityNameToSpawn();
currenttip.set(0, String.format("%s (%s)", name, mobname));
}
if (block == redstone){
if (blockID == redstone){
String name = currenttip.get(0).replaceFirst(String.format(" %s", accessor.getMetadata()), "");
currenttip.set(0, name);
}
@@ -83,11 +81,10 @@ public class HUDHandlerVanilla implements IWailaDataProvider {
@Override
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
Block block = accessor.getBlock();
int blockID = accessor.getBlockID();
/* Crops */
boolean iscrop = crops.getClass().isInstance(block); //Done to cover all inheriting mods
if (config.getConfig("general.showcrop"))
if (iscrop || block == melonStem || block == pumpkinStem || block == carrot || block == potato){
if (config.getConfig("vanilla.growthvalue"))
if (blockID == cropsID || blockID == melonStemID || blockID == pumpkinStemID || blockID == carrotID || blockID == potatoID){
float growthValue = (accessor.getMetadata() / 7.0F) * 100.0F;
if (growthValue < 100.0)
currenttip.add(String.format("%s : %.0f %%", LangUtil.translateG("hud.msg.growth"), growthValue));
@@ -96,7 +93,7 @@ public class HUDHandlerVanilla implements IWailaDataProvider {
return currenttip;
}
if (block == cocoa && config.getConfig("general.showcrop")){
if (blockID == cocoa){
float growthValue = ((accessor.getMetadata() >> 2) / 2.0F) * 100.0F;
if (growthValue < 100.0)
@@ -106,7 +103,7 @@ public class HUDHandlerVanilla implements IWailaDataProvider {
return currenttip;
}
if (block == netherwart && config.getConfig("general.showcrop")){
if (blockID == netherwart){
float growthValue = (accessor.getMetadata() / 3.0F) * 100.0F;
if (growthValue < 100.0)
currenttip.add(String.format("%s : %.0f %%", LangUtil.translateG("hud.msg.growth"), growthValue));
@@ -116,14 +113,14 @@ public class HUDHandlerVanilla implements IWailaDataProvider {
}
if (config.getConfig("vanilla.leverstate"))
if (block == lever){
if (blockID == leverID){
String redstoneOn = (accessor.getMetadata() & 8) == 0 ? LangUtil.translateG("hud.msg.off") : LangUtil.translateG("hud.msg.on");
currenttip.add(String.format("%s : %s", LangUtil.translateG("hud.msg.state"), redstoneOn));
return currenttip;
}
if (config.getConfig("vanilla.repeater"))
if ((block == repeaterIdle) ||(block == repeaterActv)){
if ((blockID == repeaterIdle) ||(blockID == repeaterActv)){
int tick = (accessor.getMetadata() >> 2) + 1 ;
if (tick == 1)
currenttip.add(String.format("%s : %s tick", LangUtil.translateG("hud.msg.delay"), tick));
@@ -133,7 +130,7 @@ public class HUDHandlerVanilla implements IWailaDataProvider {
}
if (config.getConfig("vanilla.comparator"))
if ((block == comparatorIdl) ||(block == comparatorAct)){
if ((blockID == comparatorIdl) ||(blockID == comparatorAct)){
String mode = ((accessor.getMetadata() >> 2) & 1) == 0 ? LangUtil.translateG("hud.msg.comparator") : LangUtil.translateG("hud.msg.substractor");
//int outputSignal = ((TileEntityComparator)entity).func_96100_a();
currenttip.add("Mode : " + mode);
@@ -142,14 +139,13 @@ public class HUDHandlerVanilla implements IWailaDataProvider {
}
if (config.getConfig("vanilla.redstone"))
if (block == redstone){
if (blockID == redstone){
currenttip.add(String.format("%s : %s" , LangUtil.translateG("hud.msg.power"), accessor.getMetadata()));
return currenttip;
}
/*
if (config.getConfig("vanilla.jukebox"))
if (block == jukebox){
if (blockID == jukebox){
NBTTagCompound tag = accessor.getNBTData();
Item record = null;
if (tag.hasKey("Record")){
@@ -159,7 +155,6 @@ public class HUDHandlerVanilla implements IWailaDataProvider {
currenttip.add(LangUtil.translateG("hud.msg.empty"));
}
}
*/
return currenttip;
}
@@ -171,52 +166,35 @@ public class HUDHandlerVanilla implements IWailaDataProvider {
public static void register(){
ModuleRegistrar.instance().addConfig("VanillaMC", "vanilla.spawntype");
ModuleRegistrar.instance().addConfig("VanillaMC", "vanilla.growthvalue");
ModuleRegistrar.instance().addConfig("VanillaMC", "vanilla.leverstate");
ModuleRegistrar.instance().addConfig("VanillaMC", "vanilla.repeater");
ModuleRegistrar.instance().addConfig("VanillaMC", "vanilla.comparator");
ModuleRegistrar.instance().addConfig("VanillaMC", "vanilla.redstone");
ModuleRegistrar.instance().addConfig("VanillaMC", "vanilla.silverfish");
ModuleRegistrar.instance().addConfigRemote("VanillaMC", "vanilla.jukebox");
IWailaDataProvider provider = new HUDHandlerVanilla();
ModuleRegistrar.instance().registerStackProvider(provider, silverfish.getClass());
ModuleRegistrar.instance().registerStackProvider(provider, redstone.getClass());
ModuleRegistrar.instance().registerHeadProvider(provider, mobSpawner.getClass());
ModuleRegistrar.instance().registerBodyProvider(provider, crops.getClass());
ModuleRegistrar.instance().registerBodyProvider(provider, melonStem.getClass());
ModuleRegistrar.instance().registerBodyProvider(provider, pumpkinStem.getClass());
//ModuleRegistrar.instance().registerBodyProvider(provider, carrot.getClass());
//ModuleRegistrar.instance().registerBodyProvider(provider, potato.getClass());
ModuleRegistrar.instance().registerBodyProvider(provider, lever.getClass());
ModuleRegistrar.instance().registerBodyProvider(provider, repeaterIdle.getClass());
ModuleRegistrar.instance().registerBodyProvider(provider, repeaterActv.getClass());
ModuleRegistrar.instance().registerBodyProvider(provider, comparatorIdl.getClass());
ModuleRegistrar.instance().registerBodyProvider(provider, comparatorAct.getClass());
ModuleRegistrar.instance().registerHeadProvider(provider, redstone.getClass());
ModuleRegistrar.instance().registerBodyProvider(provider, redstone.getClass());
ModuleRegistrar.instance().registerBodyProvider(provider, jukebox.getClass());
ModuleRegistrar.instance().registerBodyProvider(provider, cocoa.getClass());
ModuleRegistrar.instance().registerBodyProvider(provider, netherwart.getClass());
ModuleRegistrar.instance().registerStackProvider(provider, silverfish);
ModuleRegistrar.instance().registerStackProvider(provider, redstone);
ModuleRegistrar.instance().registerHeadProvider(provider, mobSpawnerID);
ModuleRegistrar.instance().registerBodyProvider(provider, cropsID);
ModuleRegistrar.instance().registerBodyProvider(provider, melonStemID);
ModuleRegistrar.instance().registerBodyProvider(provider, pumpkinStemID);
ModuleRegistrar.instance().registerBodyProvider(provider, carrotID);
ModuleRegistrar.instance().registerBodyProvider(provider, potatoID);
ModuleRegistrar.instance().registerBodyProvider(provider, leverID);
ModuleRegistrar.instance().registerBodyProvider(provider, repeaterIdle);
ModuleRegistrar.instance().registerBodyProvider(provider, repeaterActv);
ModuleRegistrar.instance().registerBodyProvider(provider, comparatorIdl);
ModuleRegistrar.instance().registerBodyProvider(provider, comparatorAct);
ModuleRegistrar.instance().registerHeadProvider(provider, redstone);
ModuleRegistrar.instance().registerBodyProvider(provider, redstone);
ModuleRegistrar.instance().registerBodyProvider(provider, jukebox);
ModuleRegistrar.instance().registerBodyProvider(provider, cocoa);
ModuleRegistrar.instance().registerBodyProvider(provider, netherwart);
ModuleRegistrar.instance().registerSyncedNBTKey("*", mobSpawner.getClass());
ModuleRegistrar.instance().registerSyncedNBTKey("*", crops.getClass());
ModuleRegistrar.instance().registerSyncedNBTKey("*", melonStem.getClass());
ModuleRegistrar.instance().registerSyncedNBTKey("*", pumpkinStem.getClass());
ModuleRegistrar.instance().registerSyncedNBTKey("*", carrot.getClass());
ModuleRegistrar.instance().registerSyncedNBTKey("*", potato.getClass());
ModuleRegistrar.instance().registerSyncedNBTKey("*", lever.getClass());
ModuleRegistrar.instance().registerSyncedNBTKey("*", repeaterIdle.getClass());
ModuleRegistrar.instance().registerSyncedNBTKey("*", repeaterActv.getClass());
ModuleRegistrar.instance().registerSyncedNBTKey("*", comparatorIdl.getClass());
ModuleRegistrar.instance().registerSyncedNBTKey("*", comparatorAct.getClass());
ModuleRegistrar.instance().registerSyncedNBTKey("*", redstone.getClass());
ModuleRegistrar.instance().registerSyncedNBTKey("*", jukebox.getClass());
ModuleRegistrar.instance().registerSyncedNBTKey("*", cocoa.getClass());
ModuleRegistrar.instance().registerSyncedNBTKey("*", netherwart.getClass());
ModuleRegistrar.instance().registerSyncedNBTKey("*", silverfish.getClass());
//ModuleRegistrar.instance().registerDocTextFile("/mcp/mobius/waila/addons/vanillamc/WikiData.csv");
ModuleRegistrar.instance().registerDocTextFile("/mcp/mobius/waila/addons/vanillamc/WikiData.csv");
//ExternalModulesHandler.instance().registerBlockDecorator(new HUDDecoratorVanilla(), repeaterIdle);
}
@@ -4,7 +4,6 @@ import java.util.List;
import net.minecraft.item.ItemStack;
@Deprecated
public interface IWailaBlock {
/*
* Use this method to return an item stack in case the default lookup system fails.
@@ -1,5 +1,7 @@
package mcp.mobius.waila.api;
import java.util.List;
import net.minecraft.item.ItemStack;
public interface IWailaBlockDecorator {
@@ -24,5 +24,5 @@ public interface IWailaConfigHandler {
/* Returns the current value of an option (true/false) with a default value true if not set*/
public boolean getConfig(String key);
//public void setConfig(String key, boolean value);
public void setConfig(String key, boolean value);
}
@@ -2,21 +2,14 @@ package mcp.mobius.waila.api;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
/* The Accessor is used to get some basic data out of the game without having to request
* direct access to the game engine.
* It will also return things that are unmodified by the overriding systems (like getWailaStack).
*/
import net.minecraftforge.common.ForgeDirection;
public interface IWailaDataAccessor {
World getWorld();
EntityPlayer getPlayer();
Block getBlock();
@@ -29,5 +22,4 @@ public interface IWailaDataAccessor {
int getNBTInteger(NBTTagCompound tag, String keyname);
double getPartialFrame();
ForgeDirection getSide();
ItemStack getStack();
}
@@ -0,0 +1,4 @@
package mcp.mobius.waila.api;
public interface IWailaDataProvider extends IWailaBlock{
}
@@ -7,11 +7,6 @@ import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
/* The Accessor is used to get some basic data out of the game without having to request
* direct access to the game engine.
* It will also return things that are unmodified by the overriding systems (like getWailaStack).
*/
public interface IWailaEntityAccessor {
World getWorld();
EntityPlayer getPlayer();
@@ -3,8 +3,11 @@ package mcp.mobius.waila.api;
import java.util.List;
import net.minecraft.entity.Entity;
import net.minecraft.util.Icon;
public interface IWailaEntityProvider {
/* This is the icon that will be added on the side of the tooltip. Returning null means no icon at all */
Icon getWailaIcon(IWailaEntityAccessor accessor, IWailaConfigHandler config);
/* A way to get an override on the entity returned by the raytracing */
Entity getWailaOverride(IWailaEntityAccessor accessor, IWailaConfigHandler config);
+44
View File
@@ -0,0 +1,44 @@
package mcp.mobius.waila.api;
public interface IWailaRegistrar {
/* Add a config option in the section modname with displayed text configtext and access key keyname */
public void addConfig(String modname, String keyname, String configtext);
public void addConfigRemote(String modname, String keyname, String configtext);
public void addConfig(String modname, String keyname);
public void addConfigRemote(String modname, String keyname);
/* Register a IWailaDataProvider for the given blockID, either for the Head section or the Body section */
@Deprecated
public void registerHeadProvider (IWailaDataProvider dataProvider, int blockID);
@Deprecated
public void registerBodyProvider (IWailaDataProvider dataProvider, int blockID);
@Deprecated
public void registerTailProvider (IWailaDataProvider dataProvider, int blockID);
/* Register a stack overrider for the given blockID */
@Deprecated
public void registerStackProvider(IWailaDataProvider dataProvider, int blockID);
public void registerStackProvider(IWailaDataProvider dataProvider, Class block);
/* Same thing, but works on a class hierarchy instead */
public void registerHeadProvider (IWailaDataProvider dataProvider, Class block);
public void registerBodyProvider (IWailaDataProvider dataProvider, Class block);
public void registerTailProvider (IWailaDataProvider dataProvider, Class block);
/* Entity text registration methods */
public void registerHeadProvider (IWailaEntityProvider dataProvider, Class block);
public void registerBodyProvider (IWailaEntityProvider dataProvider, Class block);
public void registerTailProvider (IWailaEntityProvider dataProvider, Class block);
/* The block decorators */
@Deprecated
public void registerBlockDecorator (IWailaBlockDecorator decorator, int blockID);
public void registerBlockDecorator (IWailaBlockDecorator decorator, Class block);
public void registerDocTextFile (String filename);
public void registerShortDataProvider (IWailaSummaryProvider dataProvider, Class item);
/* Entity registration methods */
}
@@ -0,0 +1,103 @@
package mcp.mobius.waila.api.impl;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Set;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.IWailaConfigHandler;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.Property;
public class ConfigHandler implements IWailaConfigHandler {
private static ConfigHandler instance = null;
private LinkedHashMap<String, ConfigModule> modules = new LinkedHashMap<String, ConfigModule>();
private ArrayList<String> serverconfigs = new ArrayList<String>();
private ConfigHandler() {
instance = this;
}
public static ConfigHandler instance(){
if (ConfigHandler.instance == null)
ConfigHandler.instance = new ConfigHandler();
return ConfigHandler.instance;
}
public void addModule(String modName, HashMap<String, String> options){
this.addModule(modName, new ConfigModule(modName, options));
}
public void addModule(String modName, ConfigModule options){
this.modules.put(modName, options);
}
@Override
public Set<String> getModuleNames(){
return this.modules.keySet();
}
@Override
public HashMap<String, String> getConfigKeys(String modName){
if (this.modules.containsKey(modName))
return this.modules.get(modName).options;
else
return null;
}
public void addConfig(String modName, String key, String name){
if (!this.modules.containsKey(modName))
this.modules.put(modName, new ConfigModule(modName));
this.modules.get(modName).addOption(key, name);
}
public void addConfigServer(String modName, String key, String name){
if (!this.modules.containsKey(modName))
this.modules.put(modName, new ConfigModule(modName));
this.modules.get(modName).addOption(key, name);
this.serverconfigs.add(key);
}
@Override
public boolean getConfig(String key, boolean defvalue){
mod_Waila.instance.config.load();
if (this.serverconfigs.contains(key) && !mod_Waila.instance.serverPresent)
return false;
Property prop = mod_Waila.instance.config.get(Configuration.CATEGORY_GENERAL, key, defvalue);
return prop.getBoolean(defvalue);
}
public boolean isServerRequired(String key){
return this.serverconfigs.contains(key);
}
@Override
public boolean getConfig(String key){
return this.getConfig(key, true);
}
public int getConfigInt(String key){
mod_Waila.instance.config.load();
Property prop = mod_Waila.instance.config.get(Configuration.CATEGORY_GENERAL, key, 0);
return prop.getInt();
}
@Override
public void setConfig(String key, boolean value){
mod_Waila.instance.config.load();
mod_Waila.instance.config.get(Configuration.CATEGORY_GENERAL, key, true).set(value);;
mod_Waila.instance.config.save();
}
public void setConfigInt(String key, int value){
mod_Waila.instance.config.load();
mod_Waila.instance.config.get(Configuration.CATEGORY_GENERAL, key, 0).set(value);;
mod_Waila.instance.config.save();
}
}
@@ -3,7 +3,6 @@ package mcp.mobius.waila.api.impl;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagByte;
import net.minecraft.nbt.NBTTagCompound;
@@ -13,11 +12,10 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.common.ForgeDirection;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.utils.NBTUtil;
public class DataAccessorBlock implements IWailaDataAccessor {
public class DataAccessor implements IWailaDataAccessor {
public World world;
public EntityPlayer player;
@@ -30,9 +28,8 @@ public class DataAccessorBlock implements IWailaDataAccessor {
public NBTTagCompound remoteNbt = null;
public long timeLastUpdate = System.currentTimeMillis();
public double partialFrame;
public ItemStack stack;
public static DataAccessorBlock instance = new DataAccessorBlock();
public static DataAccessor instance = new DataAccessor();
public void set(World _world, EntityPlayer _player, MovingObjectPosition _mop) {
this.set(_world, _player, _mop, null, 0.0);
@@ -42,13 +39,10 @@ public class DataAccessorBlock implements IWailaDataAccessor {
this.world = _world;
this.player = _player;
this.mop = _mop;
//this.blockID = world.getBlockId(_mop.blockX, _mop.blockY, _mop.blockZ);
//this.block = Block.blocksList[this.blockID];
this.block = world.getBlock(_mop.blockX, _mop.blockY, _mop.blockZ);
this.blockID = world.getBlockId(_mop.blockX, _mop.blockY, _mop.blockZ);
this.block = Block.blocksList[this.blockID];
this.metadata = world.getBlockMetadata(_mop.blockX, _mop.blockY, _mop.blockZ);
this.entity = world.getTileEntity(_mop.blockX, _mop.blockY, _mop.blockZ);
try{ this.stack = new ItemStack(this.block, 1, this.metadata); } catch (Exception e) {}
this.entity = world.getBlockTileEntity(_mop.blockX, _mop.blockY, _mop.blockZ);
if (viewEntity != null){
double px = viewEntity.lastTickPosX + (viewEntity.posX - viewEntity.lastTickPosX) * partialTicks;
@@ -120,7 +114,15 @@ public class DataAccessorBlock implements IWailaDataAccessor {
@Override
public int getNBTInteger(NBTTagCompound tag, String keyname){
return NBTUtil.getNBTInteger(tag, keyname);
NBTBase subtag = tag.getTag(keyname);
if (subtag instanceof NBTTagInt)
return tag.getInteger(keyname);
if (subtag instanceof NBTTagShort)
return tag.getShort(keyname);
if (subtag instanceof NBTTagByte)
return tag.getByte(keyname);
return 0;
}
private boolean isTagCorrect(NBTTagCompound tag){
@@ -156,17 +158,4 @@ public class DataAccessorBlock implements IWailaDataAccessor {
return ForgeDirection.getOrientation(this.getPosition().sideHit);
}
public boolean isTimeElapsed(long time){
return System.currentTimeMillis() - this.timeLastUpdate >= time;
}
public void resetTimer(){
this.timeLastUpdate = System.currentTimeMillis();
}
@Override
public ItemStack getStack() {
return this.stack;
}
}
@@ -0,0 +1,139 @@
package mcp.mobius.waila.api.impl;
import java.util.ArrayList;
import java.util.List;
import mcp.mobius.waila.WailaExceptionHandler;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.IWailaBlock;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.network.Packet0x01TERequest;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import codechicken.nei.api.ItemInfo.Layout;
import cpw.mods.fml.common.network.PacketDispatcher;
public class MetaDataProvider{
private ArrayList<IWailaDataProvider> headProviders = new ArrayList<IWailaDataProvider>();
private ArrayList<IWailaDataProvider> bodyProviders = new ArrayList<IWailaDataProvider>();
private ArrayList<IWailaDataProvider> tailProviders = new ArrayList<IWailaDataProvider>();
private Class prevBlock = null;
private Class prevTile = null;
public ItemStack identifyHighlight(World world, EntityPlayer player, MovingObjectPosition mop, DataAccessor accessor) {
Block block = accessor.getBlock();
int blockID = accessor.getBlockID();
if (IWailaBlock.class.isInstance(block)){
try{
return ((IWailaBlock)block).getWailaStack(accessor, ConfigHandler.instance());
}catch (Throwable e){
WailaExceptionHandler.handleErr(e, block.getClass().toString(), null);
}
}
if(ModuleRegistrar.instance().hasStackProviders(block)){
for (IWailaDataProvider dataProvider : ModuleRegistrar.instance().getStackProviders(block)){
try{
ItemStack retval = dataProvider.getWailaStack(accessor, ConfigHandler.instance());
if (retval != null)
return retval;
}catch (Throwable e){
WailaExceptionHandler.handleErr(e, dataProvider.getClass().toString(), null);
}
}
}
return null;
}
public List<String> handleTextData(ItemStack itemStack, World world, EntityPlayer player, MovingObjectPosition mop, DataAccessor accessor, List<String> currenttip, Layout layout) {
Block block = accessor.getBlock();
int blockID = accessor.getBlockID();
if (accessor.getTileEntity() != null && mod_Waila.instance.serverPresent &&
((System.currentTimeMillis() - accessor.timeLastUpdate >= 250))){
accessor.timeLastUpdate = System.currentTimeMillis();
PacketDispatcher.sendPacketToServer(Packet0x01TERequest.create(world, mop));
}
/* Interface IWailaBlock */
if (IWailaBlock.class.isInstance(block)){
TileEntity entity = world.getBlockTileEntity(mop.blockX, mop.blockY, mop.blockZ);
if (layout == Layout.HEADER)
try{
return ((IWailaBlock)block).getWailaHead(itemStack, currenttip, accessor, ConfigHandler.instance());
} catch (Throwable e){
return WailaExceptionHandler.handleErr(e, block.getClass().toString(), currenttip);
}
else if (layout == Layout.BODY)
try{
return ((IWailaBlock)block).getWailaBody(itemStack, currenttip, accessor, ConfigHandler.instance());
} catch (Throwable e){
return WailaExceptionHandler.handleErr(e, block.getClass().toString(), currenttip);
}
else if (layout == Layout.FOOTER)
try{
return ((IWailaBlock)block).getWailaTail(itemStack, currenttip, accessor, ConfigHandler.instance());
} catch (Throwable e){
return WailaExceptionHandler.handleErr(e, block.getClass().toString(), currenttip);
}
}
headProviders.clear();
bodyProviders.clear();
tailProviders.clear();
/* Lookup by class (for blocks)*/
if (layout == Layout.HEADER && ModuleRegistrar.instance().hasHeadProviders(block))
headProviders.addAll(ModuleRegistrar.instance().getHeadProviders(block));
else if (layout == Layout.BODY && ModuleRegistrar.instance().hasBodyProviders(block))
bodyProviders.addAll(ModuleRegistrar.instance().getBodyProviders(block));
else if (layout == Layout.FOOTER && ModuleRegistrar.instance().hasTailProviders(block))
tailProviders.addAll(ModuleRegistrar.instance().getTailProviders(block));
/* Lookup by class (for tileentities)*/
if (layout == Layout.HEADER && ModuleRegistrar.instance().hasHeadProviders(accessor.getTileEntity()))
headProviders.addAll(ModuleRegistrar.instance().getHeadProviders(accessor.getTileEntity()));
else if (layout == Layout.BODY && ModuleRegistrar.instance().hasBodyProviders(accessor.getTileEntity()))
bodyProviders.addAll(ModuleRegistrar.instance().getBodyProviders(accessor.getTileEntity()));
else if (layout == Layout.FOOTER && ModuleRegistrar.instance().hasTailProviders(accessor.getTileEntity()))
tailProviders.addAll(ModuleRegistrar.instance().getTailProviders(accessor.getTileEntity()));
/* Apply all collected providers */
if (layout == Layout.HEADER)
for (IWailaDataProvider dataProvider : headProviders)
try{
currenttip = dataProvider.getWailaHead(itemStack, currenttip, accessor, ConfigHandler.instance());
} catch (Throwable e){
currenttip = WailaExceptionHandler.handleErr(e, dataProvider.getClass().toString(), currenttip);
}
if (layout == Layout.BODY)
for (IWailaDataProvider dataProvider : bodyProviders)
try{
currenttip = dataProvider.getWailaBody(itemStack, currenttip, accessor, ConfigHandler.instance());
} catch (Throwable e){
currenttip = WailaExceptionHandler.handleErr(e, dataProvider.getClass().toString(), currenttip);
}
if (layout == Layout.FOOTER)
for (IWailaDataProvider dataProvider : tailProviders)
try{
currenttip = dataProvider.getWailaTail(itemStack, currenttip, accessor, ConfigHandler.instance());
} catch (Throwable e){
currenttip = WailaExceptionHandler.handleErr(e, dataProvider.getClass().toString(), currenttip);
}
return currenttip;
}
}
@@ -5,7 +5,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Set;
@@ -13,15 +12,13 @@ import java.util.logging.Level;
import au.com.bytecode.opencsv.CSVReader;
import net.minecraft.block.Block;
import mcp.mobius.waila.Waila;
import codechicken.lib.lang.LangUtil;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.api.IWailaBlockDecorator;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.api.IWailaEntityProvider;
import mcp.mobius.waila.api.IWailaFMPDecorator;
import mcp.mobius.waila.api.IWailaFMPProvider;
import mcp.mobius.waila.api.IWailaRegistrar;
import mcp.mobius.waila.api.IWailaSummaryProvider;
import mcp.mobius.waila.cbcore.LangUtil;
public class ModuleRegistrar implements IWailaRegistrar {
@@ -32,22 +29,14 @@ public class ModuleRegistrar implements IWailaRegistrar {
public LinkedHashMap<Class, ArrayList<IWailaDataProvider>> tailBlockProviders = new LinkedHashMap<Class, ArrayList<IWailaDataProvider>>();
public LinkedHashMap<Class, ArrayList<IWailaDataProvider>> stackBlockProviders = new LinkedHashMap<Class, ArrayList<IWailaDataProvider>>();
public LinkedHashMap<Class, ArrayList<IWailaBlockDecorator>> blockClassDecorators = new LinkedHashMap<Class, ArrayList<IWailaBlockDecorator>>();
public LinkedHashMap<Class, ArrayList<IWailaEntityProvider>> headEntityProviders = new LinkedHashMap<Class, ArrayList<IWailaEntityProvider>>();
public LinkedHashMap<Class, ArrayList<IWailaEntityProvider>> bodyEntityProviders = new LinkedHashMap<Class, ArrayList<IWailaEntityProvider>>();
public LinkedHashMap<Class, ArrayList<IWailaEntityProvider>> tailEntityProviders = new LinkedHashMap<Class, ArrayList<IWailaEntityProvider>>();
public LinkedHashMap<Class, ArrayList<IWailaEntityProvider>> headEntityProviders = new LinkedHashMap<Class, ArrayList<IWailaEntityProvider>>();
public LinkedHashMap<Class, ArrayList<IWailaEntityProvider>> bodyEntityProviders = new LinkedHashMap<Class, ArrayList<IWailaEntityProvider>>();
public LinkedHashMap<Class, ArrayList<IWailaEntityProvider>> tailEntityProviders = new LinkedHashMap<Class, ArrayList<IWailaEntityProvider>>();
public LinkedHashMap<Class, ArrayList<IWailaEntityProvider>> overrideEntityProviders = new LinkedHashMap<Class, ArrayList<IWailaEntityProvider>>();
public LinkedHashMap<String, ArrayList<IWailaFMPProvider>> headFMPProviders = new LinkedHashMap<String, ArrayList<IWailaFMPProvider>>();
public LinkedHashMap<String, ArrayList<IWailaFMPProvider>> bodyFMPProviders = new LinkedHashMap<String, ArrayList<IWailaFMPProvider>>();
public LinkedHashMap<String, ArrayList<IWailaFMPProvider>> tailFMPProviders = new LinkedHashMap<String, ArrayList<IWailaFMPProvider>>();
public LinkedHashMap<String, ArrayList<IWailaFMPDecorator>> FMPClassDecorators = new LinkedHashMap<String, ArrayList<IWailaFMPDecorator>>();
public LinkedHashMap<Class, HashSet<String>> syncedNBTKeys = new LinkedHashMap<Class, HashSet<String>>();
public LinkedHashMap<Class, ArrayList<IWailaBlockDecorator>> blockClassDecorators = new LinkedHashMap<Class, ArrayList<IWailaBlockDecorator>>();
public LinkedHashMap<String, LinkedHashMap <String, LinkedHashMap <String, String>>> wikiDescriptions = new LinkedHashMap<String, LinkedHashMap <String, LinkedHashMap <String, String>>>();
public LinkedHashMap<Class, ArrayList<IWailaSummaryProvider>> summaryProviders = new LinkedHashMap<Class, ArrayList<IWailaSummaryProvider>>();
private ModuleRegistrar() {
@@ -83,251 +72,273 @@ public class ModuleRegistrar implements IWailaRegistrar {
/* REGISTRATION METHODS */
@Override
@Deprecated
public void registerHeadProvider(IWailaDataProvider dataProvider, int blockID) {
this.registerHeadProvider(dataProvider, Block.blocksList[blockID].getClass());
}
@Override
public void registerHeadProvider(IWailaDataProvider dataProvider, Class block) {
this.registerProvider(dataProvider, block, this.headBlockProviders);
if (!this.headBlockProviders.containsKey(block))
this.headBlockProviders.put(block, new ArrayList<IWailaDataProvider>());
ArrayList<IWailaDataProvider> providers = this.headBlockProviders.get(block);
if (providers.contains(dataProvider)) return;
this.headBlockProviders.get(block).add(dataProvider);
}
@Override
@Deprecated
public void registerBodyProvider(IWailaDataProvider dataProvider, int blockID) {
this.registerBodyProvider(dataProvider, Block.blocksList[blockID].getClass());
}
@Override
public void registerBodyProvider(IWailaDataProvider dataProvider, Class block) {
this.registerProvider(dataProvider, block, this.bodyBlockProviders);
if (!this.bodyBlockProviders.containsKey(block))
this.bodyBlockProviders.put(block, new ArrayList<IWailaDataProvider>());
ArrayList<IWailaDataProvider> providers = this.bodyBlockProviders.get(block);
if (providers.contains(dataProvider)) return;
this.bodyBlockProviders.get(block).add(dataProvider);
}
@Override
@Deprecated
public void registerTailProvider(IWailaDataProvider dataProvider, int blockID) {
this.registerTailProvider(dataProvider, Block.blocksList[blockID].getClass());
}
@Override
public void registerTailProvider(IWailaDataProvider dataProvider, Class block) {
this.registerProvider(dataProvider, block, this.tailBlockProviders);
if (!this.tailBlockProviders.containsKey(block))
this.tailBlockProviders.put(block, new ArrayList<IWailaDataProvider>());
ArrayList<IWailaDataProvider> providers = this.tailBlockProviders.get(block);
if (providers.contains(dataProvider)) return;
this.tailBlockProviders.get(block).add(dataProvider);
}
@Override
@Deprecated
public void registerStackProvider(IWailaDataProvider dataProvider, int blockID) {
this.registerStackProvider(dataProvider, Block.blocksList[blockID].getClass());
}
@Override
public void registerStackProvider(IWailaDataProvider dataProvider, Class block) {
this.registerProvider(dataProvider, block, this.stackBlockProviders);
if (!this.stackBlockProviders.containsKey(block))
this.stackBlockProviders.put(block, new ArrayList<IWailaDataProvider>());
ArrayList<IWailaDataProvider> providers = this.stackBlockProviders.get(block);
if (providers.contains(dataProvider)) return;
this.stackBlockProviders.get(block).add(dataProvider);
}
@Override
public void registerShortDataProvider(IWailaSummaryProvider dataProvider, Class item) {
if (!this.summaryProviders.containsKey(item))
this.summaryProviders.put(item, new ArrayList<IWailaSummaryProvider>());
this.summaryProviders.get(item).add(dataProvider);
}
@Override
@Deprecated
public void registerBlockDecorator(IWailaBlockDecorator decorator, int blockID) {
this.registerBlockDecorator(decorator, Block.blocksList[blockID].getClass());
}
@Override
public void registerBlockDecorator(IWailaBlockDecorator decorator, Class block) {
if (!this.blockClassDecorators.containsKey(block))
this.blockClassDecorators.put(block, new ArrayList<IWailaBlockDecorator>());
this.blockClassDecorators.get(block).add(decorator);
}
@Override
public void registerHeadProvider(IWailaEntityProvider dataProvider, Class entity) {
this.registerProvider(dataProvider, entity, this.headEntityProviders);
if (!this.headEntityProviders.containsKey(entity))
this.headEntityProviders.put(entity, new ArrayList<IWailaEntityProvider>());
ArrayList<IWailaEntityProvider> providers = this.headEntityProviders.get(entity);
if (providers.contains(dataProvider)) return;
this.headEntityProviders.get(entity).add(dataProvider);
}
@Override
public void registerBodyProvider(IWailaEntityProvider dataProvider, Class entity) {
this.registerProvider(dataProvider, entity, this.bodyEntityProviders);
if (!this.bodyEntityProviders.containsKey(entity))
this.bodyEntityProviders.put(entity, new ArrayList<IWailaEntityProvider>());
ArrayList<IWailaEntityProvider> providers = this.bodyEntityProviders.get(entity);
if (providers.contains(dataProvider)) return;
this.bodyEntityProviders.get(entity).add(dataProvider);
}
@Override
public void registerTailProvider(IWailaEntityProvider dataProvider, Class entity) {
this.registerProvider(dataProvider, entity, this.tailEntityProviders);
}
@Override
public void registerHeadProvider(IWailaFMPProvider dataProvider, String name) {
this.registerProvider(dataProvider, name, this.headFMPProviders);
}
@Override
public void registerBodyProvider(IWailaFMPProvider dataProvider, String name) {
this.registerProvider(dataProvider, name, this.bodyFMPProviders);
}
@Override
public void registerTailProvider(IWailaFMPProvider dataProvider, String name) {
this.registerProvider(dataProvider, name, this.tailFMPProviders);
}
@Override
public void registerOverrideEntityProvider (IWailaEntityProvider dataProvider, Class entity){
this.registerProvider(dataProvider, entity, this.overrideEntityProviders);
}
@Override
public void registerShortDataProvider(IWailaSummaryProvider dataProvider, Class item) {
this.registerProvider(dataProvider, item, this.summaryProviders);
}
@Override
public void registerDecorator(IWailaBlockDecorator decorator, Class block) {
this.registerProvider(decorator, block, this.blockClassDecorators);
}
@Override
public void registerDecorator(IWailaFMPDecorator decorator, String name) {
this.registerProvider(decorator, name, this.FMPClassDecorators);
}
private <T, V> void registerProvider(T dataProvider, V clazz, LinkedHashMap<V, ArrayList<T>> target) {
if (!target.containsKey(clazz))
target.put(clazz, new ArrayList<T>());
if (!this.tailEntityProviders.containsKey(entity))
this.tailEntityProviders.put(entity, new ArrayList<IWailaEntityProvider>());
ArrayList<T> providers =target.get(clazz);
ArrayList<IWailaEntityProvider> providers = this.tailEntityProviders.get(entity);
if (providers.contains(dataProvider)) return;
target.get(clazz).add(dataProvider);
this.tailEntityProviders.get(entity).add(dataProvider);
}
@Override
public void registerSyncedNBTKey(String key, Class target){
if (!this.syncedNBTKeys.containsKey(target))
this.syncedNBTKeys.put(target, new HashSet<String>());
this.syncedNBTKeys.get(target).add(key);
}
/* PROVIDER GETTERS */
public ArrayList<IWailaDataProvider> getHeadProviders(Object block) {
return getProviders(block, this.headBlockProviders);
ArrayList<IWailaDataProvider> returnList = new ArrayList<IWailaDataProvider>();
for (Class clazz : this.headBlockProviders.keySet())
if (clazz.isInstance(block))
returnList.addAll(this.headBlockProviders.get(clazz));
return returnList;
}
public ArrayList<IWailaDataProvider> getBodyProviders(Object block) {
return getProviders(block, this.bodyBlockProviders);
ArrayList<IWailaDataProvider> returnList = new ArrayList<IWailaDataProvider>();
for (Class clazz : this.bodyBlockProviders.keySet())
if (clazz.isInstance(block))
returnList.addAll(this.bodyBlockProviders.get(clazz));
return returnList;
}
public ArrayList<IWailaDataProvider> getTailProviders(Object block) {
return getProviders(block, this.tailBlockProviders);
ArrayList<IWailaDataProvider> returnList = new ArrayList<IWailaDataProvider>();
for (Class clazz : this.tailBlockProviders.keySet())
if (clazz.isInstance(block))
returnList.addAll(this.tailBlockProviders.get(clazz));
return returnList;
}
public ArrayList<IWailaDataProvider> getStackProviders(Object block) {
return getProviders(block, this.stackBlockProviders);
}
public ArrayList<IWailaEntityProvider> getHeadEntityProviders(Object entity) {
return getProviders(entity, this.headEntityProviders);
}
public ArrayList<IWailaEntityProvider> getBodyEntityProviders(Object entity) {
return getProviders(entity, this.bodyEntityProviders);
}
public ArrayList<IWailaEntityProvider> getTailEntityProviders(Object entity) {
return getProviders(entity, this.tailEntityProviders);
}
public ArrayList<IWailaEntityProvider> getOverrideEntityProviders(Object entity) {
return getProviders(entity, this.overrideEntityProviders);
}
public ArrayList<IWailaFMPProvider> getHeadFMPProviders(String name) {
return getProviders(name, this.headFMPProviders);
}
public ArrayList<IWailaFMPProvider> getBodyFMPProviders(String name) {
return getProviders(name, this.bodyFMPProviders);
}
public ArrayList<IWailaFMPProvider> getTailFMPProviders(String name) {
return getProviders(name, this.tailFMPProviders);
ArrayList<IWailaDataProvider> returnList = new ArrayList<IWailaDataProvider>();
for (Class clazz : this.stackBlockProviders.keySet())
if (clazz.isInstance(block))
returnList.addAll(this.stackBlockProviders.get(clazz));
return returnList;
}
public ArrayList<IWailaSummaryProvider> getSummaryProvider(Object item){
return getProviders(item, this.summaryProviders);
ArrayList<IWailaSummaryProvider> returnList = new ArrayList<IWailaSummaryProvider>();
for (Class clazz : this.summaryProviders.keySet())
if (clazz.isInstance(item))
returnList.addAll(this.summaryProviders.get(clazz));
return returnList;
}
public ArrayList<IWailaBlockDecorator> getBlockDecorators(Object block){
return getProviders(block, this.blockClassDecorators);
}
public ArrayList<IWailaFMPDecorator> getFMPDecorators(String name){
return getProviders(name, this.FMPClassDecorators);
}
private <T> ArrayList<T> getProviders(Object obj, LinkedHashMap<Class, ArrayList<T>> target){
ArrayList<T> returnList = new ArrayList<T>();
for (Class clazz : target.keySet())
if (clazz.isInstance(obj))
returnList.addAll(target.get(clazz));
ArrayList<IWailaBlockDecorator> returnList = new ArrayList<IWailaBlockDecorator>();
for (Class clazz : this.blockClassDecorators.keySet())
if (clazz.isInstance(block))
returnList.addAll(this.blockClassDecorators.get(clazz));
return returnList;
}
private <T> ArrayList<T> getProviders(String name, LinkedHashMap<String, ArrayList<T>> target){
return target.get(name);
}
public HashSet<String> getSyncedNBTKeys(Object target){
HashSet<String> returnList = new HashSet<String>();
for (Class clazz : this.syncedNBTKeys.keySet())
if (clazz.isInstance(target))
returnList.addAll(this.syncedNBTKeys.get(clazz));
public ArrayList<IWailaEntityProvider> getHeadEntityProviders(Object entity) {
ArrayList<IWailaEntityProvider> returnList = new ArrayList<IWailaEntityProvider>();
for (Class clazz : this.headEntityProviders.keySet())
if (clazz.isInstance(entity))
returnList.addAll(this.headEntityProviders.get(clazz));
return returnList;
return returnList;
}
public ArrayList<IWailaEntityProvider> getBodyEntityProviders(Object entity) {
ArrayList<IWailaEntityProvider> returnList = new ArrayList<IWailaEntityProvider>();
for (Class clazz : this.bodyEntityProviders.keySet())
if (clazz.isInstance(entity))
returnList.addAll(this.bodyEntityProviders.get(clazz));
return returnList;
}
public ArrayList<IWailaEntityProvider> getTailEntityProviders(Object entity) {
ArrayList<IWailaEntityProvider> returnList = new ArrayList<IWailaEntityProvider>();
for (Class clazz : this.tailEntityProviders.keySet())
if (clazz.isInstance(entity))
returnList.addAll(this.tailEntityProviders.get(clazz));
return returnList;
}
/* HAS METHODS */
public boolean hasStackProviders(Object block){
return hasProviders(block, this.stackBlockProviders);
for (Class clazz : this.stackBlockProviders.keySet())
if (clazz.isInstance(block))
return true;
return false;
}
public boolean hasHeadProviders(Object block){
return hasProviders(block, this.headBlockProviders);
for (Class clazz : this.headBlockProviders.keySet())
if (clazz.isInstance(block))
return true;
return false;
}
public boolean hasBodyProviders(Object block){
return hasProviders(block, this.bodyBlockProviders);
for (Class clazz : this.bodyBlockProviders.keySet())
if (clazz.isInstance(block))
return true;
return false;
}
public boolean hasTailProviders(Object block){
return hasProviders(block, this.tailBlockProviders);
}
public boolean hasHeadEntityProviders(Object entity){
return hasProviders(entity, this.headEntityProviders);
}
public boolean hasBodyEntityProviders(Object entity){
return hasProviders(entity, this.bodyEntityProviders);
}
public boolean hasTailEntityProviders(Object entity){
return hasProviders(entity, this.tailEntityProviders);
}
public boolean hasOverrideEntityProviders(Object entity){
return hasProviders(entity, this.overrideEntityProviders);
}
public boolean hasHeadFMPProviders(String name){
return hasProviders(name, this.headFMPProviders);
}
public boolean hasBodyFMPProviders(String name){
return hasProviders(name, this.bodyFMPProviders);
}
public boolean hasTailFMPProviders(String name){
return hasProviders(name, this.tailFMPProviders);
}
public boolean hasBlockDecorator(Object block){
return hasProviders(block, this.blockClassDecorators);
}
public boolean hasFMPDecorator(String name){
return hasProviders(name, this.FMPClassDecorators);
}
private <T> boolean hasProviders(Object obj, LinkedHashMap<Class, ArrayList<T>> target){
for (Class clazz : target.keySet())
if (clazz.isInstance(obj))
for (Class clazz : this.tailBlockProviders.keySet())
if (clazz.isInstance(block))
return true;
return false;
}
private <T> boolean hasProviders(String name, LinkedHashMap<String, ArrayList<T>> target){
return target.containsKey(name);
}
return false;
}
public boolean hasSummaryProvider(Class item){
return this.summaryProviders.containsKey(item);
}
public boolean hasSyncedNBTKeys(Object target){
for (Class clazz : this.syncedNBTKeys.keySet())
if (clazz.isInstance(target))
public boolean hasBlockDecorator(Object block){
for (Class clazz : this.blockClassDecorators.keySet())
if (clazz.isInstance(block))
return true;
return false;
}
}
public boolean hasHeadEntityProviders(Object entity){
for (Class clazz : this.headEntityProviders.keySet())
if (clazz.isInstance(entity))
return true;
return false;
}
public boolean hasBodyEntityProviders(Object entity){
for (Class clazz : this.bodyEntityProviders.keySet())
if (clazz.isInstance(entity))
return true;
return false;
}
public boolean hasTailEntityProviders(Object entity){
for (Class clazz : this.tailEntityProviders.keySet())
if (clazz.isInstance(entity))
return true;
return false;
}
/* ----------------- */
@Override
@@ -339,7 +350,7 @@ public class ModuleRegistrar implements IWailaRegistrar {
try{
docData = this.readFileAsString(filename);
} catch (IOException e){
Waila.log.log(Level.WARNING, String.format("Error while accessing file %s : %s", filename, e));
mod_Waila.log.log(Level.WARNING, String.format("Error while accessing file %s : %s", filename, e));
return;
}
@@ -378,7 +389,7 @@ public class ModuleRegistrar implements IWailaRegistrar {
}
}
*/
Waila.log.log(Level.INFO, String.format("Registered %s entries from %s", nentries, filename));
mod_Waila.log.log(Level.INFO, String.format("Registered %s entries from %s", nentries, filename));
}
public boolean hasDocTextModID(String modid){
@@ -0,0 +1,166 @@
package mcp.mobius.waila.client;
import java.util.EnumSet;
import java.util.List;
import mcp.mobius.waila.Constants;
import mcp.mobius.waila.api.impl.ConfigHandler;
import mcp.mobius.waila.gui.screens.config.ScreenConfig;
import mcp.mobius.waila.gui.screens.info.ScreenEnchants;
import mcp.mobius.waila.handlers.nei.HandlerEnchants;
import mcp.mobius.waila.overlay.RayTracing;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.inventory.GuiInventory;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumMovingObjectType;
import org.lwjgl.input.Keyboard;
import codechicken.lib.lang.LangUtil;
import codechicken.nei.api.API;
import codechicken.nei.forge.GuiContainerManager;
import codechicken.nei.recipe.GuiCraftingRecipe;
import codechicken.nei.recipe.GuiUsageRecipe;
import cpw.mods.fml.client.registry.KeyBindingRegistry.KeyHandler;
import cpw.mods.fml.common.TickType;
import cpw.mods.fml.common.registry.LanguageRegistry;
public class ConfigKeyHandler extends KeyHandler {
static boolean firstInventory = true;
public ConfigKeyHandler()
{
super(new KeyBinding[]{
new KeyBinding(Constants.BIND_WAILA_CFG, Keyboard.KEY_NUMPAD0),
new KeyBinding(Constants.BIND_WAILA_SHOW, Keyboard.KEY_NUMPAD1),
new KeyBinding(Constants.BIND_WAILA_LIQUID, Keyboard.KEY_NUMPAD2),
new KeyBinding(Constants.BIND_WAILA_RECIPE, Keyboard.KEY_NUMPAD3),
new KeyBinding(Constants.BIND_WAILA_USAGE, Keyboard.KEY_NUMPAD4),
//new KeyBinding(Constants.BIND_WAILA_TESTING, Keyboard.KEY_NUMPAD9),
}, new boolean[]{
false,
false,
false,
false,
false,
//false
});
/*
LanguageRegistry.instance().addStringLocalization(Constants.BIND_WAILA_CFG, LangUtil.translateG("keybind.configscreen"));
LanguageRegistry.instance().addStringLocalization(Constants.BIND_WAILA_SHOW, LangUtil.translateG("keybind.showhide"));
LanguageRegistry.instance().addStringLocalization(Constants.BIND_WAILA_LIQUID, LangUtil.translateG("keybind.showliquid"));
LanguageRegistry.instance().addStringLocalization(Constants.BIND_WAILA_RECIPE, LangUtil.translateG("keybind.showrecipe"));
LanguageRegistry.instance().addStringLocalization(Constants.BIND_WAILA_USAGE, LangUtil.translateG("keybind.showusage"));
LanguageRegistry.instance().addStringLocalization(Constants.BIND_WAILA_TESTING, LangUtil.translateG("keybind.testing"));
*/
//LanguageRegistry.instance().addStringLocalization(Constants.BIND_SCREEN_ENCH, "[Waila] Show enchant screen");
//LanguageRegistry.instance().addStringLocalization("key.wailatedump", "[Waila] Dump server TE");
GuiContainerManager.addInputHandler(new HandlerEnchants());
API.addKeyBind(Constants.BIND_SCREEN_ENCH, Keyboard.KEY_I);
}
@Override
public void keyDown(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd, boolean isRepeat) {
if (!tickEnd) return;
Minecraft mc = Minecraft.getMinecraft();
if (kb.keyDescription == Constants.BIND_WAILA_CFG){
if(mc.currentScreen == null)
mc.displayGuiScreen(new ScreenConfig(mc.currentScreen));
}
if (kb.keyDescription == Constants.BIND_WAILA_TESTING){
if(mc.currentScreen == null)
mc.displayGuiScreen(new ScreenEnchants(mc.currentScreen));
}
if (mc.currentScreen != null)
return;
if (kb.keyDescription == Constants.BIND_WAILA_SHOW && ConfigHandler.instance().getConfig(Constants.CFG_WAILA_MODE)){
boolean status = ConfigHandler.instance().getConfig(Constants.CFG_WAILA_SHOW);
ConfigHandler.instance().setConfig(Constants.CFG_WAILA_SHOW, !status);
}
else if (kb.keyDescription == Constants.BIND_WAILA_SHOW && !ConfigHandler.instance().getConfig(Constants.CFG_WAILA_MODE)){
ConfigHandler.instance().setConfig(Constants.CFG_WAILA_SHOW, true);
}
else if (kb.keyDescription == Constants.BIND_WAILA_LIQUID){
boolean status = ConfigHandler.instance().getConfig(Constants.CFG_WAILA_LIQUID);
ConfigHandler.instance().setConfig(Constants.CFG_WAILA_LIQUID, !status);
}
else if (kb.keyDescription == Constants.BIND_WAILA_RECIPE){
this.openRecipeGUI(true);
}
else if (kb.keyDescription == Constants.BIND_WAILA_USAGE){
this.openRecipeGUI(false);
}
}
public void openRecipeGUI(boolean recipe){
Minecraft mc = Minecraft.getMinecraft();
boolean uiResult;
String msg;
if ((RayTracing.instance().getTarget() != null) && (RayTracing.instance().getTarget().typeOfHit == EnumMovingObjectType.TILE)){
List<ItemStack> stacks = RayTracing.instance().getIdentifierItems();
if (stacks.size() > 0){
mc.displayGuiScreen(new GuiInventory(mc.thePlayer));
if (firstInventory){
try {Thread.sleep(1000);} catch (Exception e){};
firstInventory = false;
}
if(recipe)
if(!GuiCraftingRecipe.openRecipeGui("item", stacks.get(0).copy())){
ItemStack target = stacks.get(0).copy();
target.setItemDamage(0);
if(!GuiCraftingRecipe.openRecipeGui("item", target)){
mc.thePlayer.addChatMessage("\u00a7f\u00a7o" + LangUtil.translateG("client.msg.norecipe"));
mc.displayGuiScreen((GuiScreen)null);
mc.setIngameFocus();
}
}
if(!recipe)
if(!GuiUsageRecipe.openRecipeGui("item", stacks.get(0).copy())){
ItemStack target = stacks.get(0).copy();
target.setItemDamage(0);
if(!GuiUsageRecipe.openRecipeGui("item", target)){
mc.thePlayer.addChatMessage("\u00a7f\u00a7o" + LangUtil.translateG("client.msg.nousage"));
mc.displayGuiScreen((GuiScreen)null);
mc.setIngameFocus();
}
}
}
}
}
@Override
public void keyUp(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd) {
if (!tickEnd) return;
if (kb.keyDescription == Constants.BIND_WAILA_SHOW && !ConfigHandler.instance().getConfig(Constants.CFG_WAILA_MODE)){
ConfigHandler.instance().setConfig(Constants.CFG_WAILA_SHOW, false);
}
}
@Override
public EnumSet<TickType> ticks() {
return EnumSet.of(TickType.CLIENT);
}
@Override
public String getLabel() {
return "Waila Config Screen Keybind";
}
}
@@ -1,53 +1,45 @@
package mcp.mobius.waila.client;
import mcp.mobius.waila.addons.agriculture.AgricultureModule;
import mcp.mobius.waila.Constants;
import mcp.mobius.waila.mod_Waila;
import mcp.mobius.waila.addons.appeng.AppEngModule;
import mcp.mobius.waila.addons.buildcraft.BCModule;
import mcp.mobius.waila.addons.buildcraft.BCPowerAPIModule;
import mcp.mobius.waila.addons.carpenters.CarpentersModule;
import mcp.mobius.waila.addons.enderio.EnderIOModule;
import mcp.mobius.waila.addons.enderstorage.EnderStorageModule;
import mcp.mobius.waila.addons.etb.ETBModule;
import mcp.mobius.waila.addons.exu.ExtraUtilitiesModule;
import mcp.mobius.waila.addons.gravestone.GravestoneModule;
import mcp.mobius.waila.addons.harvestcraft.HarvestcraftModule;
import mcp.mobius.waila.addons.ic2.IC2Module;
import mcp.mobius.waila.addons.magicalcrops.MagicalCropsModule;
import mcp.mobius.waila.addons.openblocks.OpenBlocksModule;
import mcp.mobius.waila.addons.projectred.ProjectRedModule;
import mcp.mobius.waila.addons.railcraft.RailcraftModule;
import mcp.mobius.waila.addons.secretrooms.SecretRoomsModule;
import mcp.mobius.waila.addons.statues.StatuesModule;
import mcp.mobius.waila.addons.stevescarts.StevesCartsModule;
import mcp.mobius.waila.addons.thaumcraft.ThaumcraftModule;
import mcp.mobius.waila.addons.thermalexpansion.ThermalExpansionModule;
import mcp.mobius.waila.addons.twilightforest.TwilightForestModule;
import mcp.mobius.waila.addons.vanillamc.HUDHandlerVanilla;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.api.impl.MetaDataProvider;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
import mcp.mobius.waila.gui.truetyper.FontLoader;
import mcp.mobius.waila.gui.truetyper.TrueTypeFont;
import mcp.mobius.waila.handlers.DecoratorFMP;
import mcp.mobius.waila.handlers.HUDHandlerBlocks;
import mcp.mobius.waila.handlers.HUDHandlerEntities;
import mcp.mobius.waila.handlers.HUDHandlerFMP;
//import mcp.mobius.waila.handlers.SummaryProviderDefault;
import mcp.mobius.waila.handlers.HUDHandlerWaila;
import mcp.mobius.waila.handlers.SummaryProviderDefault;
import mcp.mobius.waila.handlers.nei.TooltipHandlerWaila;
import mcp.mobius.waila.overlay.WailaTickHandler;
import mcp.mobius.waila.server.ProxyServer;
import mcp.mobius.waila.utils.Constants;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.input.Keyboard;
import codechicken.lib.lang.LangUtil;
import codechicken.nei.NEIClientConfig;
import codechicken.nei.guihook.GuiContainerManager;
import mcp.mobius.waila.cbcore.LangUtil;
import cpw.mods.fml.common.Loader;
import codechicken.nei.api.API;
import codechicken.nei.api.ItemInfo;
import codechicken.nei.forge.GuiContainerManager;
import cpw.mods.fml.client.registry.KeyBindingRegistry;
import cpw.mods.fml.common.registry.TickRegistry;
import cpw.mods.fml.relauncher.Side;
public class ProxyClient extends ProxyServer {
@@ -62,16 +54,21 @@ public class ProxyClient extends ProxyServer {
@Override
public void registerHandlers(){
LangUtil.loadLangDir("waila");
LangUtil.instance.loadLangDir("waila");
minecraftiaFont = FontLoader.createFont(new ResourceLocation("waila", "fonts/Minecraftia.ttf"), 14, true);
//TickRegistry.registerTickHandler(WailaTickHandler.instance(), Side.CLIENT);
TickRegistry.registerTickHandler(WailaTickHandler.instance(), Side.CLIENT);
//GuiContainerManager.addTooltipHandler(new TooltipHandlerWaila());
GuiContainerManager.addTooltipHandler(new TooltipHandlerWaila());
//KeyBindingRegistry.registerKeyBinding(new ConfigKeyHandler());
//API.registerHighlightHandler(new HUDHandlerExternal(), ItemInfo.Layout.HEADER);
//API.registerHighlightHandler(new HUDHandlerExternal(), ItemInfo.Layout.BODY);
//API.registerHighlightHandler(new HUDHandlerExternal(), ItemInfo.Layout.FOOTER);
//API.registerHighlightHandler(new HUDHandlerWaila(), ItemInfo.Layout.FOOTER);
//API.registerHighlightHandler(new HUDHandlerWaila(), ItemInfo.Layout.HEADER);
KeyBindingRegistry.registerKeyBinding(new ConfigKeyHandler());
// We mute the default keybind for displaying the tooltip
NEIClientConfig.getSetting(Constants.BIND_NEI_SHOW).setIntValue(Keyboard.KEY_NONE);
@@ -80,17 +77,9 @@ public class ProxyClient extends ProxyServer {
//API.addKeyBind(Constants.BIND_WIKI, "Display wiki", Keyboard.KEY_RSHIFT);
//API.addKeyBind(Constants.BIND_TECH, "Display techtree", Keyboard.KEY_RSHIFT);
ModuleRegistrar.instance().registerHeadProvider(new HUDHandlerBlocks(), Block.class);
ModuleRegistrar.instance().registerTailProvider(new HUDHandlerBlocks(), Block.class);
ModuleRegistrar.instance().registerHeadProvider(new HUDHandlerEntities(), Entity.class);
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerEntities(), Entity.class);
ModuleRegistrar.instance().registerTailProvider(new HUDHandlerEntities(), Entity.class);
//ModuleRegistrar.instance().registerShortDataProvider(new SummaryProviderDefault(), Item.class);
ModuleRegistrar.instance().addConfig("General", "general.showhp");
ModuleRegistrar.instance().addConfig("General", "general.showcrop");
ModuleRegistrar.instance().registerHeadProvider(new HUDHandlerWaila(), Block.class);
ModuleRegistrar.instance().registerTailProvider(new HUDHandlerWaila(), Block.class);
ModuleRegistrar.instance().registerShortDataProvider(new SummaryProviderDefault(), Item.class);
}
@Override
@@ -120,7 +109,7 @@ public class ProxyClient extends ProxyServer {
TwilightForestModule.register();
/* Applied Energetics */
//AppEngModule.register();
AppEngModule.register();
/* Thermal Expansion */
ThermalExpansionModule.register();
@@ -144,36 +133,7 @@ public class ProxyClient extends ProxyServer {
OpenBlocksModule.register();
/* Railcraft */
RailcraftModule.register();
/* Steve's Carts */
StevesCartsModule.register();
/* Secret Rooms */
//SecretRoomsModule.register();
/* Carpenter's Blocks */
CarpentersModule.register();
/* Pam's HarvestCraft */
HarvestcraftModule.register();
/* Magical crops */
MagicalCropsModule.register();
/* Statues */
StatuesModule.register();
/* Agriculture */
AgricultureModule.register();
if(Loader.isModLoaded("ForgeMultipart")){
HUDHandlerFMP.register();
DecoratorFMP.register();
}
//ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerBlocks(), Block.class);
//ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerBlocks(), TileEntity.class);
RailcraftModule.register();
}
@Override
Loaded 100 of 241 files, more files were not shown because too many files have changed in this diff. Show more