mirror of
https://github.com/GTNewHorizons/waila.git
synced 2026-11-15 17:44:46 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
198d0c7079 | ||
|
|
03f4bed4fe | ||
|
|
1bfcc07e1f | ||
|
|
ef9a1bedfc | ||
|
|
4121e689fd | ||
|
|
0b1911b711 | ||
|
|
ac73b6b537 | ||
|
|
4188ec37b2 | ||
|
|
6cefb32520 | ||
|
|
7ba3a2b7e8 | ||
|
|
3d7c3f0726 | ||
|
|
74cdb0fa1e | ||
|
|
dc07947ccf | ||
|
|
3b1f35e7a8 | ||
|
|
dbd06b2552 | ||
|
|
9c121fb5c8 | ||
|
|
28d19ef015 | ||
|
|
3843fd9815 | ||
|
|
2777e0ea80 | ||
|
|
e62f26a0ee | ||
|
|
403e2aad57 | ||
|
|
c171d33e8c | ||
|
|
b1f7f2f2df | ||
|
|
a49d359656 | ||
|
|
03ec8ac17b | ||
|
|
75f3618424 | ||
|
|
e400edb92f | ||
|
|
42170ca050 | ||
|
|
f9868afde1 | ||
|
|
4e79797cd1 | ||
|
|
921b245273 | ||
|
|
2cbaeca169 | ||
|
|
bc344cab41 | ||
|
|
7a2fd4363c | ||
|
|
11d0f86320 | ||
|
|
d83fb8fe76 | ||
|
|
a36013c28c | ||
|
|
1934171e5a | ||
|
|
4b2e873261 | ||
|
|
6319cbd425 | ||
|
|
72ae5eccb3 | ||
|
|
5d1c7d532f | ||
|
|
afb9549da9 | ||
|
|
0d749d80ae | ||
|
|
050fd992c6 | ||
|
|
3694992eb5 | ||
|
|
6f0301667d | ||
|
|
d2606bfc25 | ||
|
|
299ef5307e | ||
|
|
a750f76a5d | ||
|
|
cd587ee8ca | ||
|
|
987254caca | ||
|
|
ef5ff0c6ed | ||
|
|
e9947e3960 | ||
|
|
95bf99a24a | ||
|
|
be530da970 | ||
|
|
5d82ebf0d5 | ||
|
|
165cb1003c | ||
|
|
5388d1bea0 | ||
|
|
c40c032531 | ||
|
|
bf0bb6e0c7 | ||
|
|
42c35d2b69 | ||
|
|
e9b440616e | ||
|
|
d1b354f05e | ||
|
|
0742ef2422 | ||
|
|
8e45cb8064 | ||
|
|
6896998934 | ||
|
|
74a2805844 | ||
|
|
c95daee0e2 | ||
|
|
bb5cd6cbfa | ||
|
|
3dde25b1a4 | ||
|
|
66649fa9dd | ||
|
|
a87c29bb2f | ||
|
|
3a057e4aba | ||
|
|
b50df6af26 | ||
|
|
8e8fd7f2bd | ||
|
|
d9f209a1d4 | ||
|
|
5e6ccc5ff8 | ||
|
|
bbfcc3b3ad | ||
|
|
d4a7b62644 | ||
|
|
417a75a896 | ||
|
|
b551d54e5c | ||
|
|
16ca8f2917 | ||
|
|
e7f2cab192 | ||
|
|
40063f3799 | ||
|
|
326d2b519b | ||
|
|
a7668e321c | ||
|
|
79af54e8cf | ||
|
|
09f8bbe33e | ||
|
|
1908f39995 | ||
|
|
748fc3fffa | ||
|
|
250dc6ac2a | ||
|
|
b81d2d3709 | ||
|
|
a873131d2f | ||
|
|
b5689428e8 | ||
|
|
d6285e2932 | ||
|
|
eb348d10fc | ||
|
|
7eb3ddb50c | ||
|
|
fde934363c | ||
|
|
dce9809205 | ||
|
|
15bee287f3 | ||
|
|
f28ed4c274 | ||
|
|
fc3606b71c | ||
|
|
aeff9c1039 | ||
|
|
9fd13c9ca1 | ||
|
|
ac1cc77258 | ||
|
|
e6005e55af | ||
|
|
62ec48ba21 | ||
|
|
7ab8981dde | ||
|
|
f8202e8fa8 | ||
|
|
b18fb9df61 | ||
|
|
b4ca299115 | ||
|
|
b0104482bb | ||
|
|
ef9ee6441d | ||
|
|
4ad3e92fae | ||
|
|
098c88676e | ||
|
|
4b05b017f7 | ||
|
|
a92a5dde3c | ||
|
|
a6890c5824 | ||
|
|
e87d08a789 | ||
|
|
65d8ef8c63 | ||
|
|
878a00b16b | ||
|
|
984b26c7fd | ||
|
|
b2cc1e02d7 | ||
|
|
83c7ef6aa9 | ||
|
|
6fca3468e2 | ||
|
|
d134aba573 | ||
|
|
8f32c0c770 | ||
|
|
e0a5da865f | ||
|
|
69a62e6edf | ||
|
|
a6da4adc08 | ||
|
|
2d3768423f | ||
|
|
cb2491f3f3 | ||
|
|
9248b75a0c | ||
|
|
fc46634fcc | ||
|
|
9df8f252c0 | ||
|
|
a844fb4815 | ||
|
|
58266d3cd1 | ||
|
|
94a22bf6ca | ||
|
|
32a50e112b | ||
|
|
6dbcf366bd | ||
|
|
24efba751d | ||
|
|
e681b98231 | ||
|
|
30d88b4c45 | ||
|
|
9a13ff7898 | ||
|
|
91ac3a9e32 | ||
|
|
1036c7c0c0 | ||
|
|
c03d9183a8 | ||
|
|
5da91bea2d | ||
|
|
c2ceb365d9 | ||
|
|
4488c37149 | ||
|
|
3c3fcad888 | ||
|
|
391cfe8290 | ||
|
|
8c2ff2b56f | ||
|
|
d9a16ba7fa | ||
|
|
3b906f4de8 | ||
|
|
0496543d70 | ||
|
|
e9cc68d2b1 | ||
|
|
8a5dc45240 | ||
|
|
d23855b263 | ||
|
|
5601fcdf7b | ||
|
|
a87d3b9de7 | ||
|
|
67775bad84 | ||
|
|
3d004700fb | ||
|
|
b3b2024ce7 | ||
|
|
c1cfb94a0d | ||
|
|
029d141872 | ||
|
|
ed93c68fb9 | ||
|
|
4b8acb517e | ||
|
|
419308e2ac | ||
|
|
8dc890421d | ||
|
|
fe90900b55 | ||
|
|
1d9807e6d6 | ||
|
|
58931febc4 | ||
|
|
d72dfa5775 | ||
|
|
dbf49534da | ||
|
|
aad38c1eac | ||
|
|
c0727b2157 | ||
|
|
3085f7442a | ||
|
|
25cfff7354 | ||
|
|
13f49db4b7 | ||
|
|
117808a326 | ||
|
|
31ee058c87 | ||
|
|
4d8087fb4c | ||
|
|
cef91a3ef4 | ||
|
|
9da2402851 | ||
|
|
3eaffb5812 | ||
|
|
643d1bfad2 | ||
|
|
ad6fd7290a | ||
|
|
7e012ff6c6 | ||
|
|
b547b7ece6 | ||
|
|
022d792d01 | ||
|
|
c4f6b40ea5 | ||
|
|
709f750a2a | ||
|
|
281a8f26dd | ||
|
|
03b8097ccb | ||
|
|
6a2c137bce | ||
|
|
e9c43a71fa | ||
|
|
f7e0e24548 | ||
|
|
73c5383d59 | ||
|
|
4cbe727b81 | ||
|
|
00ea3d77cc | ||
|
|
bc424e1d01 | ||
|
|
3c048e9795 | ||
|
|
eeb3c7f48a | ||
|
|
ee1118ee4b | ||
|
|
636ae4203e | ||
|
|
005cc66115 | ||
|
|
5360475686 | ||
|
|
15f89627c6 | ||
|
|
e42914c721 | ||
|
|
394d9cd564 | ||
|
|
f648c41890 | ||
|
|
37498dc0b1 | ||
|
|
ed1a4d010d | ||
|
|
83ee66d8a6 | ||
|
|
c4dcdd926a | ||
|
|
3048dfe09a | ||
|
|
6acfa28ef7 | ||
|
|
bac71d0894 | ||
|
|
b2dabe7bed | ||
|
|
78a8f92b2f | ||
|
|
137db44e23 | ||
|
|
d744bdf25b | ||
|
|
1eb67afea6 | ||
|
|
396dbd734a | ||
|
|
fb00790fdc | ||
|
|
39124f153f | ||
|
|
acda2b4a85 | ||
|
|
5a82bb2a5c | ||
|
|
987d5556ef | ||
|
|
f754ab5fbe | ||
|
|
4ebbd2b3e9 | ||
|
|
6598e693f9 | ||
|
|
4970a268f4 | ||
|
|
a984e2e8bd | ||
|
|
71aba4006b | ||
|
|
da64a0a019 | ||
|
|
d687bb5383 | ||
|
|
37d07ab99f | ||
|
|
172e8ca659 | ||
|
|
243ca7db20 | ||
|
|
39a979ef62 | ||
|
|
73cf134212 | ||
|
|
ae641e642d | ||
|
|
58feff48f9 | ||
|
|
c77306ae4f | ||
|
|
0ce1661a7f | ||
|
|
95adb69f55 | ||
|
|
b52b110852 | ||
|
|
7f1cb7d710 | ||
|
|
94d0f4d681 | ||
|
|
5f168bb1bc | ||
|
|
d29ecd09ce | ||
|
|
1fd33e8d7c | ||
|
|
f43bfad3d8 | ||
|
|
953e255189 | ||
|
|
e953471d3e | ||
|
|
78c8c9a2ad | ||
|
|
db75285bc5 | ||
|
|
cbd8b81f90 | ||
|
|
f7d397211f | ||
|
|
0eb9f813f7 | ||
|
|
8387373850 | ||
|
|
fa6218a526 | ||
|
|
5dd15fd727 | ||
|
|
5206ab683e |
No files matched your search
@@ -1,4 +0,0 @@
|
||||
Waila-1.7.10
|
||||
============
|
||||
|
||||
A port of Prof. Mobius' Minecraft mod, Waila, to Minecraft 1.7.10. Unofficial.
|
||||
File renamed without changes.
@@ -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
|
||||
File renamed without changes.
@@ -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 |
+323
-323
@@ -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;
|
||||
}
|
||||
}
|
||||
+282
-282
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
+302
-302
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+12
-12
@@ -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>
|
||||
+12
-12
@@ -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
@@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
Vendored
BIN
Binary file not shown.
-6
@@ -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
|
||||
@@ -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
@@ -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
|
||||
+3
-10
@@ -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;
|
||||
|
||||
}
|
||||
+2
-9
@@ -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";
|
||||
|
||||
}
|
||||
+3
-5
@@ -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>");
|
||||
+8
-7
@@ -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);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -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 {
|
||||
|
||||
+6
-5
@@ -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);
|
||||
}
|
||||
+3
-3
@@ -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;
|
||||
}
|
||||
+6
-7
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
+8
-9
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
+12
-4
@@ -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;
|
||||
+3
-3
@@ -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 {
|
||||
|
||||
File renamed without changes.
+7
-8
@@ -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
-2
@@ -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{
|
||||
|
||||
+1
-1
@@ -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;
|
||||
+7
-8
@@ -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
-2
@@ -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 {
|
||||
|
||||
+7
-7
@@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -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 {
|
||||
|
||||
+5
-6
@@ -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);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -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;
|
||||
+5
-6
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
File renamed without changes.
+4
-5
@@ -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){
|
||||
+4
-5
@@ -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){
|
||||
+5
-6
@@ -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){
|
||||
+5
-6
@@ -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;
|
||||
}
|
||||
|
||||
+10
-21
@@ -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;
|
||||
}
|
||||
|
||||
File renamed without changes.
+2
-2
@@ -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 {
|
||||
|
||||
+4
-5
@@ -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);
|
||||
}
|
||||
}
|
||||
+24
-37
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
+2
-2
@@ -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 {
|
||||
|
||||
+5
-6
@@ -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);
|
||||
}
|
||||
}
|
||||
+15
-16
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+4
-15
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+5
-17
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+4
-4
@@ -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;
|
||||
}
|
||||
|
||||
+2
-2
@@ -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
-2
@@ -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 {
|
||||
|
||||
+2
-2
@@ -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 {
|
||||
|
||||
+1
-1
@@ -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;
|
||||
+2
-2
@@ -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 {
|
||||
|
||||
+1
-1
@@ -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;
|
||||
+9
-15
@@ -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);
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
File renamed without changes.
+5
-8
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
File renamed without changes.
+58
-80
@@ -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);
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
-1
@@ -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.
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
package mcp.mobius.waila.api;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IWailaBlockDecorator {
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
+1
-9
@@ -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{
|
||||
}
|
||||
-5
@@ -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
@@ -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);
|
||||
@@ -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 */
|
||||
}
|
||||
File renamed without changes.
@@ -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();
|
||||
}
|
||||
}
|
||||
File renamed without changes.
+15
-26
@@ -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;
|
||||
}
|
||||
}
|
||||
+200
-189
@@ -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";
|
||||
}
|
||||
|
||||
}
|
||||
+25
-65
@@ -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
Reference in new issue
Block a user