summaryrefslogtreecommitdiff
path: root/eclipse/.metadata/.plugins/org.eclipse.core.resources
diff options
context:
space:
mode:
Diffstat (limited to 'eclipse/.metadata/.plugins/org.eclipse.core.resources')
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/3055e5d192ea001411cee0f8f86532a430
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/60c4594705e50014174fe663e69b842261
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/207a58e4fde40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/f023f9b6fce40014174fe663e69b842266
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/10e3134797e3001412c4c4819c88e86b75
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/80418fb197e3001412c4c4819c88e86b75
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/b00b4ecf96ea001411cee0f8f86532a4116
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/c082155f86ea001411cee0f8f86532a462
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/208b7b02fce40014174fe663e69b842264
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/c07337da02e50014174fe663e69b842257
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/e021f963b1ea001411cee0f8f86532a4265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/40a0b31607e50014174fe663e69b842296
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/e018e6ed84ea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/45/e0b9d3d674e70014115de2bb951f0adf)15
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/00cc33c5afea001411cee0f8f86532a412
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/00e7eba687ea001411cee0f8f86532a460
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/a0d5c5c83ce700141e05cdbaeb682437122
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/00f6e805aeea001411cee0f8f86532a4197
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/302024c987ea001411cee0f8f86532a438
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/0027527092e3001417b2e384bf7c370227
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/00a2b6defce40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/30dc53adb2ea001411cee0f8f86532a432
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/7045c0d592ea001411cee0f8f86532a431
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/80383f3671e300141084bb8bfb075c0872
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/19/507e2e4e84ea001411cee0f8f86532a415
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1a/706949a171e300141084bb8bfb075c0875
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1a/80c6fbebafea001411cee0f8f86532a440
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1c/a0cc56d4fbe40014174fe663e69b842268
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1c/c0982a0792e3001417b2e384bf7c370226
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1d/3003c407fee40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1e/0090818687ea001411cee0f8f86532a425
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1e/c00f4e1196ea001411cee0f8f86532a4113
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1e/f08e283892e3001417b2e384bf7c370226
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2/700a88ac90e3001417b2e384bf7c370254
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/20/000ed0d640e700141e05cdbaeb682437126
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/20/703581a771e300141084bb8bfb075c0856
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/20/80bb60f196ea001411cee0f8f86532a4116
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/20/a0dafd1785ea001411cee0f8f86532a4101
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/00c64cbd86ea001411cee0f8f86532a4129
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/503aaee588ea001411cee0f8f86532a467
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/705c8cde88ea001411cee0f8f86532a4128
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/80feb574b2ea001411cee0f8f86532a4117
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/d09736c947e700141e05cdbaeb682437128
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/22/b06623eb95ea001411cee0f8f86532a4113
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/23/90e61b1372e300141084bb8bfb075c0837
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/24/609d74fbfde40014174fe663e69b842246
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/25/00d1f1fcafea001411cee0f8f86532a439
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/25/5021877296ea001411cee0f8f86532a4113
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/26/00cf95bfafea001411cee0f8f86532a479
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/26/803e9d8d04e50014174fe663e69b842261
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/27/00520c9504e50014174fe663e69b842261
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/28/809e116607e50014174fe663e69b842263
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/28/a04b7a8e91e3001417b2e384bf7c370225
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/29/4028feb585ea001411cee0f8f86532a4100
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/29/60372ebb47e700141e05cdbaeb682437128
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/29/707801098ee3001417b2e384bf7c370224
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/29/e0f462ef84ea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/d00cc0cf74e70014115de2bb951f0adf)15
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2a/a080c22b73e70014115de2bb951f0adf48
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2a/e0efd1ff96ea001411cee0f8f86532a4116
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2b/0026ada605e50014174fe663e69b842260
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2b/c0710fb874e70014115de2bb951f0adf62
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2c/702bef2597ea001411cee0f8f86532a4116
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2d/c06ef67e91e3001417b2e384bf7c370225
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2e/e03f878f72e300141084bb8bfb075c0854
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2f/10f36a6990e3001417b2e384bf7c370236
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2f/4004ffac98ea001411cee0f8f86532a4140
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2f/c07570fc8de3001417b2e384bf7c370224
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3/e0e45da796ea001411cee0f8f86532a4115
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/31/c0b15c7987ea001411cee0f8f86532a465
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/32/206828078de3001417b2e384bf7c370237
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/32/30ca78699ae3001412c4c4819c88e86b86
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/32/50aa567f09e50014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/32/c03a5cf1aeea001411cee0f8f86532a418
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/33/f001bde393e3001412c4c4819c88e86b54
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/35/5069282604e50014174fe663e69b842258
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/36/f05b927173e70014115de2bb951f0adf54
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/00d07f6a97ea001411cee0f8f86532a466
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/303670b098ea001411cee0f8f86532a4140
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/600d023b95e3001412c4c4819c88e86b74
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/8062bf2107e50014174fe663e69b842296
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/b01358c6fce40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/38/000d9ccf88ea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e1/508b21c574e70014115de2bb951f0adf)28
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3a/90d0928795ea001411cee0f8f86532a4113
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3a/c05f454b92ea001411cee0f8f86532a4280
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3b/10b462f7fce40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3c/e03ea8c592ea001411cee0f8f86532a430
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3d/90f34aec91ea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1c/50eda2a547e700141e05cdbaeb682437)67
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3d/a08b206401e50014174fe663e69b842255
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3d/c0fca79b92ea001411cee0f8f86532a4184
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3d/e023756e88ea001411cee0f8f86532a4128
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3f/f026c032fde40014174fe663e69b842246
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/40/a03afdd19ae3001412c4c4819c88e86b86
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/41/900c963102e50014174fe663e69b842255
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/42/5070783bb0ea001411cee0f8f86532a450
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/42/6046f61185ea001411cee0f8f86532a421
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/42/f061f27170e300141084bb8bfb075c0812
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/42/f0bc215473e70014115de2bb951f0adf53
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/44/40f706d787ea001411cee0f8f86532a438
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/44/c043415c99e3001412c4c4819c88e86b27
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/44/f08a8a6398ea001411cee0f8f86532a4113
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/45/6018c4e6fce40014174fe663e69b842247
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/45/d0f8a1e295ea001411cee0f8f86532a4112
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/46/10ad6cb191e3001417b2e384bf7c370225
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/46/d01a6b619ce3001412c4c4819c88e86b33
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/47/5092922099ea001411cee0f8f86532a4141
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/48/c01e000872e300141084bb8bfb075c0885
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/49/10b8eac006e50014174fe663e69b842263
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/49/900ffa92b1ea001411cee0f8f86532a4263
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/49/d0668676b4ea001411cee0f8f86532a431
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4a/608194048ee3001417b2e384bf7c370224
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4a/80a948a2fce40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4a/f0ef41723ee700141e05cdbaeb682437123
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4b/009902e3fbe40014174fe663e69b842264
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4b/7061ab089aea001411cee0f8f86532a4113
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4c/204c56b7afea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/55/2016e2c66be70014115de2bb951f0adf)0
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4c/5014ba759ce3001412c4c4819c88e86b33
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4e/7067fef3afea001411cee0f8f86532a4175
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4f/10edfebd88ea001411cee0f8f86532a463
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4f/a0532f0bfce40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4f/b06750e295e3001412c4c4819c88e86b81
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5/2064f33d99e3001412c4c4819c88e86b28
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5/e02aac7c87ea001411cee0f8f86532a425
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/52/5089f60bfee40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/53/20b73ad899ea001411cee0f8f86532a4140
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/53/500f4e3704e50014174fe663e69b842261
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/53/707860379ce3001412c4c4819c88e86b33
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/54/10afc221b3ea001411cee0f8f86532a432
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/54/d08a12f794e3001412c4c4819c88e86b74
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/55/20f4f59697ea001411cee0f8f86532a466
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/55/b019924ab0ea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6f/70d2e64cfae40014174fe663e69b8422)0
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/55/b076e5188ee3001417b2e384bf7c370224
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/55/f055598098e3001412c4c4819c88e86b37
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/56/00dd512eb3ea001411cee0f8f86532a432
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/57/e0bfffad9ce3001412c4c4819c88e86b33
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/58/50838a4199ea001411cee0f8f86532a4141
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/20ea69c702e50014174fe663e69b842257
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/3020e4818ee3001417b2e384bf7c370282
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/5060e6c998e3001412c4c4819c88e86b27
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/70bca93e97ea001411cee0f8f86532a463
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/a07b1864afea001411cee0f8f86532a476
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5a/c0ff301ab0ea001411cee0f8f86532a4167
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5b/800cb89f9ce3001412c4c4819c88e86b33
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5c/40f3d19e91e3001417b2e384bf7c370225
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5c/70816d6f94e3001412c4c4819c88e86b65
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5d/7052eb2f97ea001411cee0f8f86532a4116
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5d/90359fe194e3001412c4c4819c88e86b74
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5e/100ab1a1b2ea001411cee0f8f86532a431
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5e/50be335402e50014174fe663e69b842256
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5e/e0583b6884ea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/31/30675ea024e60014127dc373d78c1666)3
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5e/f0632658c0e50014122af9ad4a56023655
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5f/50bf67fb93ea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/e05898fa47e700141e05cdbaeb682437)68
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5f/6043e0b5aeea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7e/50e1e03570e300141084bb8bfb075c08)0
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6/0065cfc101e50014174fe663e69b842253
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/60/101c12cdafea001411cee0f8f86532a417
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/60/702c893e73e70014115de2bb951f0adf53
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/60/f045b1c8fce40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/63/d06f8207b0ea001411cee0f8f86532a4171
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/65/90112c4074e70014115de2bb951f0adf54
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/65/c09cf2a692ea001411cee0f8f86532a430
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/65/d0ebb9bd98e3001412c4c4819c88e86b27
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/66/1063c37f8ee3001417b2e384bf7c370283
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/66/70c19d3a73e70014115de2bb951f0adf52
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/10be20cb88ea001411cee0f8f86532a463
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/502eece29ce3001412c4c4819c88e86b95
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/8018e58904e50014174fe663e69b842261
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/c0bee05e02e50014174fe663e69b842256
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/f076514d01e50014174fe663e69b842255
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/68/40551ae474e300141084bb8bfb075c0837
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/68/6011626f87ea001411cee0f8f86532a462
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/68/a011af0c03e50014174fe663e69b842257
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/68/a0a1c6429ae3001412c4c4819c88e86b86
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/69/10a8e852ffe40014174fe663e69b842251
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6a/d0fc55a084ea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/39/305de0c774e70014115de2bb951f0adf)12
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6b/700e006d95e3001412c4c4819c88e86b74
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6b/8040daa897e3001412c4c4819c88e86b75
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6b/c02cc87d88ea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/50f2d7ca74e70014115de2bb951f0adf)25
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6c/1001cf0b72e300141084bb8bfb075c0836
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6c/70f1d8b985ea001411cee0f8f86532a492
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6c/809dbb21fde40014174fe663e69b842264
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6c/c0551c9a47e700141e05cdbaeb682437127
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6d/60e10dae86ea001411cee0f8f86532a498
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6d/f044cd31afea001411cee0f8f86532a4180
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6e/00835d83fde40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6e/a0449c8093e3001412c4c4819c88e86b84
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6f/504fd1d374e70014115de2bb951f0adf63
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7/10543334ffe40014174fe663e69b842251
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7/a00c8e49afea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c2/b0c9916cfde40014174fe663e69b8422)0
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7/b0a6aed396ea001411cee0f8f86532a4116
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/70/b0cef28997ea001411cee0f8f86532a466
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/71/60061e9571e300141084bb8bfb075c0872
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/71/c0574f9791e3001417b2e384bf7c370225
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/72/1087a1e902e50014174fe663e69b842257
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/72/c0e5f1d298e3001412c4c4819c88e86b27
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/72/d04b715902e50014174fe663e69b842256
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/73/902cfdee91e3001417b2e384bf7c370226
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/73/9073412cb3ea001411cee0f8f86532a432
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/75/20e44257d6ea00141eeebc0fa9e0653a204
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/75/60834d1d9ce3001412c4c4819c88e86b26
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/76/304649cf95ea001411cee0f8f86532a4111
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/76/40fb0f9585ea001411cee0f8f86532a422
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/78/90636f1ffde40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/79/e054ac7884ea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/79/70b22b2507e50014174fe663e69b8422)14
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7a/30bcf87f94e3001412c4c4819c88e86b71
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7a/402c65f927e500141c50bd6848c69dc657
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7a/8029efd19de3001412c4c4819c88e86b77
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7a/f072972997ea001411cee0f8f86532a4116
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7b/504da4b747e700141e05cdbaeb682437128
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7b/70dd987a96ea001411cee0f8f86532a4114
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7c/206da33e92ea001411cee0f8f86532a4184
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7c/f0a9cd9e96ea001411cee0f8f86532a4116
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7d/b0ad63acfde40014174fe663e69b842246
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7d/e0f61197b3ea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3e/70b5b24de0e50014109ec019d2f6c0dc)7
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7e/6079eceaafea001411cee0f8f86532a426
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7e/70e0fae86be70014115de2bb951f0adf12
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7e/80d136b994e3001412c4c4819c88e86b72
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7f/1085f39501e50014174fe663e69b842253
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7f/10e9952ffde40014174fe663e69b842246
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/80/100f40e4aeea001411cee0f8f86532a412
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/80/c002ba7395e3001412c4c4819c88e86b74
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/80/e068543a93ea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/902f83c06ae70014115de2bb951f0adf)60
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/81/703d9e3297ea001411cee0f8f86532a4115
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/82/9020848ffce40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/84/6009ab0a97ea001411cee0f8f86532a4116
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/84/60fb889a96ea001411cee0f8f86532a4114
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/84/c0cd51bc92ea001411cee0f8f86532a429
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/85/b0cdcc6786ea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/87/003f191173e70014115de2bb951f0adf)15
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/86/b024f95597ea001411cee0f8f86532a465
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/87/307f88d486ea001411cee0f8f86532a494
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/88/20688e9587ea001411cee0f8f86532a422
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/88/6046ea82b1ea001411cee0f8f86532a4263
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/88/e0c7328592ea001411cee0f8f86532a4280
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/403c226486ea001411cee0f8f86532a494
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/8044082ffce40014174fe663e69b842237
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/b0b1a2f395ea001411cee0f8f86532a4113
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/f01e505a95e3001412c4c4819c88e86b74
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/f02ac1bf92ea001411cee0f8f86532a4280
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8a/90fa117a8de3001417b2e384bf7c370235
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8a/e058c2a396e3001412c4c4819c88e86b36
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8b/907ae04292ea001411cee0f8f86532a4280
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8e/3038bcc698ea001411cee0f8f86532a4140
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8f/c0af41a774e70014115de2bb951f0adf61
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8f/e0ba42a391e3001417b2e384bf7c370225
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/90/402cdd4674e70014115de2bb951f0adf62
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/90/e0c2b692fce40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/91/90b5ab67fee40014174fe663e69b8422759
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/91/c02252cb92ea001411cee0f8f86532a430
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/93/1066a4a395e3001412c4c4819c88e86b74
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/94/00e861e202e50014174fe663e69b842257
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/94/9018c447fde40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/95/1062bc07fee40014174fe663e69b842248
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/95/108f49d2afea001411cee0f8f86532a4179
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/96/009ea381fde40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/97/20872ad186ea001411cee0f8f86532a462
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/97/20ee800597e3001412c4c4819c88e86b75
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/97/a0b6bcf374e300141084bb8bfb075c0837
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/98/403c0a6287ea001411cee0f8f86532a497
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9a/50f79109fce40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9b/b01a029f86ea001411cee0f8f86532a4137
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9c/009ded5190e3001417b2e384bf7c370282
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9c/6077fb309be3001412c4c4819c88e86b96
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9d/00cb774c9ce3001412c4c4819c88e86b33
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9d/50ed421e04e50014174fe663e69b842257
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9d/60c0b9e2b2ea001411cee0f8f86532a4121
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9d/80673fdbfae40014174fe663e69b842262
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9e/30028abb98ea001411cee0f8f86532a4140
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9e/30320ac0fde40014174fe663e69b8422161
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9e/403b2d4afbe40014174fe663e69b842261
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9e/70481ab2b3ea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ae/d0d0f67107e50014174fe663e69b8422)14
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9e/904d6c6392e3001417b2e384bf7c370227
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9f/10132f5697e3001412c4c4819c88e86b75
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9f/d0d7417947e700141e05cdbaeb682437126
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a/8044e5d790e3001417b2e384bf7c370282
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a0/40594fd502e50014174fe663e69b842257
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a0/a088aa6692e3001417b2e384bf7c370227
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a2/50ed3e1bb0ea001411cee0f8f86532a4160
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a2/e04fcd7287ea001411cee0f8f86532a494
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a4/3011827398ea001411cee0f8f86532a4139
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a4/3073a9c599ea001411cee0f8f86532a4132
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a4/502b9fa69ce3001412c4c4819c88e86b33
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a5/80728a19fde40014174fe663e69b842250
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a7/b09d7740fce40014174fe663e69b842267
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a8/00bcf92d8ee3001417b2e384bf7c370225
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a8/20e62f5486ea001411cee0f8f86532a438
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a8/f0c56a6887ea001411cee0f8f86532a460
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a9/30408fedfbe40014174fe663e69b842264
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a9/906a5c63fce40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/aa/2006adf198e3001412c4c4819c88e86b27
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ac/00104ff947e700141e05cdbaeb682437127
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ac/a0a9345b87ea001411cee0f8f86532a4128
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/004937966be70014115de2bb951f0adf123
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/4031063499e3001412c4c4819c88e86b27
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/705d0e479ae3001412c4c4819c88e86b87
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/9087c735b0ea001411cee0f8f86532a4131
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/a067720cb2ea001411cee0f8f86532a431
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ae/204f8c71adea001411cee0f8f86532a421
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ae/60b40fee99ea001411cee0f8f86532a4132
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/af/e06aaecd74e70014115de2bb951f0adf63
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/000c08e404e50014174fe663e69b842256
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/80218fae95ea001411cee0f8f86532a4113
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/90e8344505e50014174fe663e69b842261
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/90ee5d8397ea001411cee0f8f86532a466
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/d0e487bc85ea001411cee0f8f86532a422
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b0/305eddda88ea001411cee0f8f86532a463
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b0/40ae81ce86ea001411cee0f8f86532a438
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b0/c0347e0403e50014174fe663e69b842258
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b1/e0e1250efde40014174fe663e69b842246
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b2/20cba1de86ea001411cee0f8f86532a430
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b2/a0f5943b87ea001411cee0f8f86532a422
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b3/80253a9b9ce3001412c4c4819c88e86b33
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b3/d00f578784ea001411cee0f8f86532a420
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b3/d0ac8fe598e3001412c4c4819c88e86b27
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b4/106c1b7185ea001411cee0f8f86532a4100
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b4/c067553a97e3001412c4c4819c88e86b75
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b4/c0d7994c88ea001411cee0f8f86532a462
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b5/20d8e0a4b0ea001411cee0f8f86532a476
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b5/a02d9af974e300141084bb8bfb075c0837
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b6/50e569a4aeea001411cee0f8f86532a424
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b6/602b567104e50014174fe663e69b842261
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b7/701f73bd96ea001411cee0f8f86532a4115
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b7/70fcef5db0ea001411cee0f8f86532a412
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b7/e0b972a8fce40014174fe663e69b842267
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b8/e0ea3a7199ea001411cee0f8f86532a4128
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b9/003e90f5fce40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b9/20cdd23d86ea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/43/30263c9474e70014115de2bb951f0adf)22
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b9/4057874afde40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b9/60396614fde40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b9/706877bc92e3001417b2e384bf7c370227
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bb/10dd91b3fce40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bb/a064cf8efee40014174fe663e69b842248
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bc/30816beb3de700141e05cdbaeb682437122
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bc/8027385d97ea001411cee0f8f86532a466
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bc/a042836db0ea001411cee0f8f86532a427
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bf/208d91aafae40014174fe663e69b842212
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c/70125005fde40014174fe663e69b842246
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c/e08d97b398ea001411cee0f8f86532a4140
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c0/804ee2aa87ea001411cee0f8f86532a462
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c0/902e10a698e3001412c4c4819c88e86b26
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c0/a02202f990e3001417b2e384bf7c370225
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c1/000e0f74fde40014174fe663e69b842279
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c1/f04127e586ea001411cee0f8f86532a425
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c2/a0107643fce40014174fe663e69b842267
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c3/30c6932ffde40014174fe663e69b842246
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c4/10491e1095e3001412c4c4819c88e86b74
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c4/40aec02197e3001412c4c4819c88e86b75
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c4/701ec417b0ea001411cee0f8f86532a452
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c4/d0a333fafbe40014174fe663e69b842264
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c6/90bc489493e3001412c4c4819c88e86b81
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c8/40c3ebde71e300141084bb8bfb075c0838
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/0091fdd79ce3001412c4c4819c88e86b96
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/1032154385ea001411cee0f8f86532a4100
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/80e3852ffde40014174fe663e69b842246
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/a03c4cbb97e3001412c4c4819c88e86b75
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/c09e66a3b1ea001411cee0f8f86532a4263
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/cb/c0a19fa1aeea001411cee0f8f86532a4197
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/cc/90bd5dcb47e700141e05cdbaeb682437127
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/cd/a066fa7271e300141084bb8bfb075c0836
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ce/20b26b8f84ea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/dc/d063631307e50014174fe663e69b8422)19
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ce/405365adb0ea001411cee0f8f86532a464
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ce/909313c197e3001412c4c4819c88e86b75
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/cf/500511a5afea001411cee0f8f86532a4178
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d/0050b8c588ea001411cee0f8f86532a463
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d/501c43e4aeea001411cee0f8f86532a418
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d/70703c0a94ea001411cee0f8f86532a4113
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/102ad27afde40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/10b8e31685ea001411cee0f8f86532a4101
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/203f4a6a07e50014174fe663e69b842261
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/90c5727dfde40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/a0f6c7b4fde40014174fe663e69b842243
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d1/d0592b5d92e3001417b2e384bf7c370227
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d2/d0f0ec8488ea001411cee0f8f86532a466
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d3/10f60dd394e3001412c4c4819c88e86b74
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d3/2075207185ea001411cee0f8f86532a422
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d4/601541c896ea001411cee0f8f86532a4116
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/504bd33404e50014174fe663e69b842258
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/70d86f778de3001417b2e384bf7c370238
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/90909424afea001411cee0f8f86532a4181
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/b00062e0ffe40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/d026faa2cbe6001411c8f2d2b3d6593524
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d6/f004df7701e50014174fe663e69b842251
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d7/e01fa45502e60014127dc373d78c166677
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d8/6023bb4999e3001412c4c4819c88e86b27
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d9/b0614a4248e700141e05cdbaeb682437127
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d9/e0c5a699fde40014174fe663e69b8422164
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/da/a0ebd00b3de700141e05cdbaeb682437122
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/db/50cc9fe591ea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/605b1c3449e700141e05cdbaeb682437)65
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/db/60d6c516b2ea001411cee0f8f86532a431
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/dc/00dead5b97ea001411cee0f8f86532a466
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/dc/50108b1b96ea001411cee0f8f86532a4113
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/dc/d03b0e77b1ea001411cee0f8f86532a4266
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/dc/f0768b8386ea001411cee0f8f86532a498
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/de/8070a46bb0ea001411cee0f8f86532a4130
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/20a9f8c891e3001417b2e384bf7c370225
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/30c6f47f87ea001411cee0f8f86532a430
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/706fd6f390e3001417b2e384bf7c370225
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/90e9856afce40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/f0dbfc7597e3001412c4c4819c88e86b75
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e0/1021610993ea001411cee0f8f86532a431
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e0/8018db0c86ea001411cee0f8f86532a4128
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e1/90df506301e50014174fe663e69b842255
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e3/308fca16fde40014174fe663e69b842266
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e3/5045c01799ea001411cee0f8f86532a4141
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e4/60b445e4aeea001411cee0f8f86532a418
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e6/00004ede9ae3001412c4c4819c88e86b95
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e6/50d52b2996ea001411cee0f8f86532a4113
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e7/909b303c96ea001411cee0f8f86532a4113
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e7/b0d35f77b0ea001411cee0f8f86532a4118
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e7/c04057b047e700141e05cdbaeb682437128
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e8/00dc62a998e3001412c4c4819c88e86b27
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e8/606bf5d786ea001411cee0f8f86532a465
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ea/705e53cd96e3001412c4c4819c88e86b26
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ea/80100efb96e3001412c4c4819c88e86b72
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ea/a053aefe94e3001412c4c4819c88e86b74
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/001088b1b2ea001411cee0f8f86532a432
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/4003450d99ea001411cee0f8f86532a4140
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/506ecaee98ea001411cee0f8f86532a4140
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/90c9eff2fce40014174fe663e69b842246
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/e0c7efa692e3001417b2e384bf7c370227
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ec/304cb8c386ea001411cee0f8f86532a460
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ee/101c29e799e3001412c4c4819c88e86b72
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ee/60f0442899ea001411cee0f8f86532a4141
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ef/10d23bbdb2ea001411cee0f8f86532a432
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ef/70093e68afea001411cee0f8f86532a4180
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ef/b02994c8fce50014127dc373d78c166694
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ef/e0b44d1186ea001411cee0f8f86532a4134
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f/10c9048a91e3001417b2e384bf7c370225
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f1/60bb815703e50014174fe663e69b842257
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/00f951d59ce3001412c4c4819c88e86b96
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/308b24a298ea001411cee0f8f86532a4140
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/a0e185aeb4ea001411cee0f8f86532a432
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/b0a9941f9be3001412c4c4819c88e86b95
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/b0d474f9aeea001411cee0f8f86532a4190
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f3/2044223785ea001411cee0f8f86532a4 (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5/c0c8f29707e50014174fe663e69b8422)20
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f3/f03670018ee3001417b2e384bf7c370224
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f4/a015049497e3001412c4c4819c88e86b75
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f4/b08f72dafce40014174fe663e69b842246
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f5/40205b7887ea001411cee0f8f86532a465
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f5/4093e81d8ee3001417b2e384bf7c370225
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f5/602433bf74e70014115de2bb951f0adf63
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f5/c0204a4dfde40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f6/40e2247284ea001411cee0f8f86532a419
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f7/80a33c36fde40014174fe663e69b842265
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f8/007cb0a590e3001417b2e384bf7c370285
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f8/00dc645002e50014174fe663e69b842256
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f8/60e51a8387ea001411cee0f8f86532a423
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f8/802b95f798e3001412c4c4819c88e86b27
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f9/100285e848e700141e05cdbaeb682437770
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f9/201cfc0598e3001412c4c4819c88e86b75
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fa/00a6fb0785ea001411cee0f8f86532a4102
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fa/40f248b698ea001411cee0f8f86532a4140
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fa/d0acf8ff27e500141c50bd6848c69dc657
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fa/e0cd16ca92e3001417b2e384bf7c370227
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fc/10e7546d07e50014174fe663e69b842261
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fc/303da9d874e70014115de2bb951f0adf63
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fc/30be15db86ea001411cee0f8f86532a425
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fd/40224cbcafea001411cee0f8f86532a425
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fd/900f624402e50014174fe663e69b842254
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fd/e07ed5e186ea001411cee0f8f86532a423
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fe/c010f86d9ae3001412c4c4819c88e86b86
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fe/d0474cdb91e3001417b2e384bf7c370226
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ff/b02f1331fce40014174fe663e69b842248
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.jdt.core.external.folders/.markers.snapbin0 -> 464 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.jdt.core.external.folders/.syncinfo.snapbin0 -> 464 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/13/6a/history.indexbin1275 -> 1781 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/13/history.indexbin3313 -> 538 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/2/history.indexbin188 -> 442 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/29/history.indexbin96 -> 240 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/2e/history.indexbin826 -> 919 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/3f/history.indexbin0 -> 359 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/5e/ac/history.indexbin0 -> 156 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/6e/history.indexbin382 -> 358 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/8d/history.indexbin1570 -> 490 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/df/history.indexbin3794 -> 4372 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/e7/history.indexbin2165 -> 3381 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/ef/9d/history.indexbin1298 -> 217 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/ef/history.indexbin372 -> 0 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/history.indexbin140 -> 500 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.markers.snapbin0 -> 464 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.syncinfo.snapbin0 -> 464 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/org.eclipse.jdt.core/state.datbin118526 -> 0 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snapbin0 -> 464 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/68.tree (renamed from eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/66.tree)bin973103 -> 1032683 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resourcesbin1035 -> 14459 bytes
-rw-r--r--eclipse/.metadata/.plugins/org.eclipse.core.resources/68.snapbin0 -> 44552 bytes
482 files changed, 17409 insertions, 17104 deletions
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/3055e5d192ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/3055e5d192ea001411cee0f8f86532a4
new file mode 100644
index 0000000..5d8b630
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/3055e5d192ea001411cee0f8f86532a4
@@ -0,0 +1,30 @@
+package darkknight.jewelrycraft.item.render;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BraceletRender extends TileEntitySpecialRenderer
+{
+ public ModelBracelet bracelet = new ModelBracelet();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Bracelet.png");
+
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ }
+
+ public void doRender(Entity entity, double x, double y, double z, float f, float g)
+ {
+ GL11.glPushMatrix();
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+ bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ GL11.glPopMatrix();
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/60c4594705e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/60c4594705e50014174fe663e69b8422
deleted file mode 100644
index dc43646..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/0/60c4594705e50014174fe663e69b8422
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- System.out.println(Block.getBlockFromItem(item.getItem()) + " " + item.getIconIndex());
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIcon(JewelryNBT.item(stack), pass);
- else{
-// System.out.println(Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1));
- return Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1);
- }
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/207a58e4fde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/207a58e4fde40014174fe663e69b8422
deleted file mode 100644
index d17def9..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1/207a58e4fde40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- public static Item goldifiedObject;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldObject().setUnlocalizedName(Variables.MODID + ".goldObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/f023f9b6fce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/f023f9b6fce40014174fe663e69b8422
deleted file mode 100644
index 391f21e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/f023f9b6fce40014174fe663e69b8422
+++ /dev/null
@@ -1,66 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-import darkknight.jewelrycraft.item.ItemGoldifiedObject;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static ItemGoldifiedObject goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = (ItemGoldifiedObject)new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/10e3134797e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/10e3134797e3001412c4c4819c88e86b
deleted file mode 100644
index d52a637..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/10e3134797e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,75 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target.width);
- this.setBlockBounds(0F, 0F, 0F, 1F, ((TileEntityMidasTouch)tile).target.height, 1F);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/80418fb197e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/80418fb197e3001412c4c4819c88e86b
deleted file mode 100644
index 2c330f3..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/80418fb197e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,75 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target.width);
- this.setBlockBounds(1f - ((TileEntityMidasTouch)tile).target.width/2, 0F, 1f -((TileEntityMidasTouch)tile).target.width/2, 1f -((TileEntityMidasTouch)tile).target.width/2, ((TileEntityMidasTouch)tile).target.height, 1f -((TileEntityMidasTouch)tile).target.width/2);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/b00b4ecf96ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/b00b4ecf96ea001411cee0f8f86532a4
new file mode 100644
index 0000000..ffc2592
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/b00b4ecf96ea001411cee0f8f86532a4
@@ -0,0 +1,116 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ GL11.glEnable(GL11.GL_BLEND);
+// GL11.glColor3f(0F, 1F, 1F);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_DST_COLOR);
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/c082155f86ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/c082155f86ea001411cee0f8f86532a4
new file mode 100644
index 0000000..0e831c2
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/c082155f86ea001411cee0f8f86532a4
@@ -0,0 +1,62 @@
+/**
+ *
+ */
+package darkknight.jewelrycraft.curses;
+
+import java.util.ArrayList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.item.EntityXPOrb;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class CurseRabbitsPaw extends Curse
+{
+ public CurseRabbitsPaw(int id, String name, int text)
+ {
+ super(id, name, text);
+ }
+
+ @Override
+ public void entityDropItems(EntityPlayer player, Entity target, ArrayList<EntityItem> drops)
+ {
+ for(EntityItem item: drops){
+ ItemStack drop = item.getEntityItem().copy();
+ drop.stackSize = this.rand.nextInt(4);
+ if (drop.stackSize > 0) target.entityDropItem(drop, 0.5F);
+ }
+ }
+
+ public void entityDeathAction(World world, EntityLivingBase target, EntityPlayer player)
+ {
+ String[] types = {"Red", "Blue", "White", "Black"};
+ String type = types[rand.nextInt(4)];
+ if (rand.nextInt(3) == 0){
+ if (type == "White"){
+ EntityHeart h = new EntityHalfHeart(world);
+ h.setType(type);
+ h.setLocationAndAngles(target.posX, target.posY, target.posZ, MathHelper.wrapAngleTo180_float(rand.nextFloat() * 360.0F), 0.0F);
+ world.spawnEntityInWorld(h);
+ }else{
+ for(int i = 1; i <= 1 + rand.nextInt(1 + (int)(target.getMaxHealth() / 20)); i++){
+ EntityHeart[] hearts = {new EntityHeart(world), new EntityHalfHeart(world)};
+ EntityHeart h = hearts[rand.nextInt(2)];
+ h.setType(type);
+ h.setLocationAndAngles(target.posX, target.posY, target.posZ, MathHelper.wrapAngleTo180_float(rand.nextFloat() * 360.0F), 0.0F);
+ world.spawnEntityInWorld(h);
+ }
+ }
+ }
+ if (rand.nextInt(3) == 0) world.spawnEntityInWorld(new EntityXPOrb(world, target.posX, target.posY, target.posZ, 1 + rand.nextInt(40)));
+ }
+
+ public String getDescription()
+ {
+ return "The Dark One is giving you a gift. Don't lose it.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/208b7b02fce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/208b7b02fce40014174fe663e69b8422
deleted file mode 100644
index d970f43..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/208b7b02fce40014174fe663e69b8422
+++ /dev/null
@@ -1,64 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.*;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static Item goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/c07337da02e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/c07337da02e50014174fe663e69b8422
deleted file mode 100644
index 4928cdf..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/c07337da02e50014174fe663e69b8422
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else return Block.getBlockFromItem(item.getItem()).getIcon(6, 0);
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/e021f963b1ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/e021f963b1ea001411cee0f8f86532a4
new file mode 100644
index 0000000..26e8214
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/e021f963b1ea001411cee0f8f86532a4
@@ -0,0 +1,265 @@
+package darkknight.jewelrycraft.tileentity.renders;
+
+import java.awt.Color;
+import java.util.HashMap;
+import java.util.List;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.client.renderer.RenderHelper;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.entity.RenderManager;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelDisplayer;
+import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
+import darkknight.jewelrycraft.util.Variables;
+
+public class TileEntityDisplayerRender extends TileEntitySpecialRenderer
+{
+ ModelDisplayer displayer = new ModelDisplayer();
+ String texture = "textures/tileentities/Displayer.png";
+ HashMap<EnumChatFormatting, Integer> colors = new HashMap<EnumChatFormatting, Integer>(){
+ {
+ put(EnumChatFormatting.AQUA, 5636095);
+ put(EnumChatFormatting.BLACK, 0);
+ put(EnumChatFormatting.BLUE, 5592575);
+ put(EnumChatFormatting.DARK_AQUA, 43690);
+ put(EnumChatFormatting.DARK_BLUE, 170);
+ put(EnumChatFormatting.DARK_GRAY, 5592405);
+ put(EnumChatFormatting.DARK_GREEN, 43520);
+ put(EnumChatFormatting.DARK_PURPLE, 11141290);
+ put(EnumChatFormatting.DARK_RED, 11141120);
+ put(EnumChatFormatting.GOLD, 16755200);
+ put(EnumChatFormatting.GRAY, 11184810);
+ put(EnumChatFormatting.GREEN, 5635925);
+ put(EnumChatFormatting.LIGHT_PURPLE, 16733695);
+ put(EnumChatFormatting.RED, 16733525);
+ put(EnumChatFormatting.WHITE, 16777215);
+ put(EnumChatFormatting.YELLOW, 16777045);
+ }
+ };
+
+ /**
+ * @param te
+ * @param x
+ * @param y
+ * @param z
+ * @param scale
+ */
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ GL11.glPushMatrix();
+ GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
+ TileEntityDisplayer disp = (TileEntityDisplayer)te;
+ ResourceLocation blockTexture = new ResourceLocation(Variables.MODID, texture);
+ Minecraft.getMinecraft().renderEngine.bindTexture(blockTexture);
+ GL11.glPushMatrix();
+ GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
+ displayer.render((Entity)null, disp.ringTranslation1, disp.ringTranslation2, disp.ringTranslation3, 0.0F, 0.0F, 0.0625F);
+ try{
+ int block = disp.getBlockMetadata();
+ if (disp != null && disp.hasObject && disp.object != null && disp.object.getItem() != null && disp.object != new ItemStack(Item.getItemById(0), 0, 0)){
+ RenderHelper.enableStandardItemLighting();
+ int ind = -3;
+ GL11.glPushMatrix();
+ EntityItem entityitem = new EntityItem(te.getWorldObj(), 0.0D, 0.0D, 0.0D, disp.object);
+ entityitem.hoverStart = 0.0F;
+ disp.object.stackSize = 1;
+ GL11.glRotatef(180F, 1F, 0F, 0F);
+ GL11.glTranslatef(0.0F, -0.6F + disp.ringTranslation1 / 5, 0F);
+ GL11.glRotatef(disp.rotAngle, 0F, 1F, 0F);
+ if (RenderManager.instance.options.fancyGraphics) RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
+ else{
+ GL11.glRotatef(180F, 0F, 1F, 0F);
+ RenderManager.instance.options.fancyGraphics = true;
+ int i = 15728880;
+ int j = i % 65536;
+ int k = i / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, j / 1.0F, k / 1.0F);
+ RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
+ RenderManager.instance.options.fancyGraphics = false;
+ }
+ EntityPlayer player = te.getWorldObj().getClosestPlayer(te.xCoord, te.yCoord, te.zCoord, 5D);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ if (player != null) renderLabel(disp.object.getDisplayName(), 0F, -0.171F * ind, 0F, block, disp, colors.get(disp.object.getRarity().rarityColor));
+ GL11.glPopMatrix();
+ ind++;
+ if (player != null && disp.quantity > 1){
+ GL11.glPushMatrix();
+ renderLabel("x" + Integer.toString(disp.quantity), 0F, -0.171F * ind, 0F, block, disp, Color.GRAY.getRGB());
+ GL11.glPopMatrix();
+ ind++;
+ }
+ if (disp.object.getItem() != Items.map && player != null && disp.object.getTooltip(player, true) != null){
+ List tooltips = disp.object.getTooltip(player, true);
+ if (disp.infoIndex + 5 > tooltips.size()) disp.infoIndex = 1;
+ if (tooltips.size() < 5) for(int i = 1; i < tooltips.size(); i++){
+ String tooltip = tooltips.get(i).toString();
+ RenderManager.instance.getFontRenderer();
+ if (tooltip != ""){
+ GL11.glPushMatrix();
+ renderLabel(tooltip, 0F, -0.171F * ind, 0F, block, disp, Color.GRAY.getRGB());
+ GL11.glPopMatrix();
+ ind++;
+ }
+ }
+ else for(int i = disp.infoIndex; i < disp.infoIndex + 5; i++){
+ String tooltip = tooltips.get(i).toString();
+ RenderManager.instance.getFontRenderer();
+ if (tooltip != ""){
+ GL11.glPushMatrix();
+ renderLabel(tooltip, 0F, -0.171F * ind, 0F, block, disp, Color.GRAY.getRGB());
+ GL11.glPopMatrix();
+ ind++;
+ }
+ }
+ }
+ }
+ }
+ catch(Exception e){}
+ GL11.glPopMatrix();
+ GL11.glPopMatrix();
+ }
+
+ /**
+ * @param par2Str
+ * @param x
+ * @param y
+ * @param z
+ * @param metadata
+ * @param te
+ * @param color
+ */
+ protected void renderLabel(String par2Str, double x, double y, double z, int metadata, TileEntity te, int color)
+ {
+ FontRenderer fontrenderer = RenderManager.instance.getFontRenderer();
+ float var14 = 0.01266667F * 1.5F;
+ float var17 = 0.015F;
+ GL11.glRotatef(180F, 0F, 0F, 1F);
+ if (metadata == 0) GL11.glRotatef(0F, 0F, 1F, 0F);
+ else if (metadata == 1) GL11.glRotatef(270F, 0F, 1F, 0F);
+ else if (metadata == 2) GL11.glRotatef(180F, 0F, 1F, 0F);
+ else if (metadata == 3) GL11.glRotatef(90F, 0F, 1F, 0F);
+ GL11.glTranslatef((float)x, (float)y, (float)z + 0.45F);
+ GL11.glScalef(-0.015F, -var14, 0.015F);
+ GL11.glPushMatrix();
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ Tessellator tessellator = Tessellator.instance;
+ GL11.glDisable(GL11.GL_TEXTURE_2D);
+ int j = fontrenderer.getStringWidth(par2Str) / 2;
+ tessellator.startDrawingQuads();
+ tessellator.setColorRGBA_F(0.0F, 0.2F, 0.2F, 0.9F);
+ tessellator.addVertex(-33.333 - 0, 0D, 0.1D);
+ tessellator.addVertex(-33.333 - 0, 9D, 0.1D);
+ tessellator.addVertex(33.333 + 0, 9D, 0.1D);
+ tessellator.addVertex(33.333 + 0, 0D, 0.1D);
+ tessellator.draw();
+ if (fontrenderer.getStringWidth(par2Str) / 2 > 20) var17 = 0.9F / fontrenderer.getStringWidth(par2Str);
+ else var17 = var14;
+ int red = color >> 16 & 0xFF;
+ int green = color >> 8 & 0xFF;
+ int blue = color & 0xFF;
+ GL11.glTranslatef((float)x + 1f, (float)y + 1f, (float)z);
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_TEXTURE_2D);
+ GL11.glScalef(var17 * 70F, 1F, 0F);
+ int i = 15728880;
+ int t = i % 65536;
+ int k = i / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, t / 1.0F, k / 1.0F);
+ fontrenderer.drawString(par2Str.replaceFirst("§0", "§r").replaceFirst("§1", "§r").replaceFirst("§2", "§r").replaceFirst("§3", "§r").replaceFirst("§4", "§r").replaceFirst("§5", "§r").replaceFirst("§6", "§r").replaceFirst("§7", "§r").replaceFirst("§8", "§r").replaceFirst("§9", "§r").replaceFirst("§a", "§r").replaceFirst("§b", "§r").replaceFirst("§c", "§r").replaceFirst("§d", "§r").replaceFirst("§e", "§r").replaceFirst("§f", "§r"), -j, 0, 65536 * (red > 170 ? red - 170 : 0) + 256 * (green > 170 ? green - 170 : 0) + (blue > 170 ? blue - 170 : 0));
+ GL11.glPopMatrix();
+ GL11.glTranslatef((float)x - 1f, (float)y - 1f, (float)z - 1F);
+ GL11.glScalef(var17 * 70F, 1F, 0F);
+ fontrenderer.drawString(par2Str, -j, 0, color);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glPopMatrix();
+ }
+
+ /**
+ * @param str
+ * @param color
+ */
+ public void replaceEnumEnchValues(String str, int color)
+ {
+ if (str.contains("§0")){
+ color = Color.BLACK.getRGB();
+ str.replace("§0", "");
+ }
+ if (str.contains("§1")){
+ color = 85;
+ str.replace("§1", "");
+ }
+ if (str.contains("§2")){
+ color = 17920;
+ str.replace("§2", "");
+ }
+ if (str.contains("§3")){
+ color = 1336183;
+ str.replace("§3", "");
+ }
+ if (str.contains("§4")){
+ color = 4587520;
+ str.replace("§4", "");
+ }
+ if (str.contains("§5")){
+ color = 5701759;
+ str.replace("§5", "");
+ }
+ if (str.contains("§6")){
+ color = 16762880;
+ str.replace("§6", "");
+ }
+ if (str.contains("§7")){
+ color = Color.GRAY.getRGB();
+ str.replace("§7", "");
+ }
+ if (str.contains("§8")){
+ color = Color.DARK_GRAY.getRGB();
+ str.replace("§8", "");
+ }
+ if (str.contains("§9")){
+ color = Color.BLUE.getRGB();
+ str.replace("§9", "");
+ }
+ if (str.contains("§a")){
+ color = Color.GREEN.getRGB();
+ str.replace("§a", "");
+ }
+ if (str.contains("§b")){
+ color = Color.CYAN.getRGB();
+ str.replace("§b", "");
+ }
+ if (str.contains("§c")){
+ color = Color.RED.getRGB();
+ str.replace("§c", "");
+ }
+ if (str.contains("§d")){
+ color = 11665663;
+ str.replace("§d", "");
+ }
+ if (str.contains("§e")){
+ color = Color.YELLOW.getRGB();
+ str.replace("§e", "");
+ }
+ if (str.contains("§f")){
+ color = Color.WHITE.getRGB();
+ str.replace("§f", "");
+ }
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/40a0b31607e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/40a0b31607e50014174fe663e69b8422
deleted file mode 100644
index 9453d1e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/40a0b31607e50014174fe663e69b8422
+++ /dev/null
@@ -1,96 +0,0 @@
-package darkknight.jewelrycraft.proxy;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.item.Item;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.MinecraftForgeClient;
-import net.minecraftforge.common.MinecraftForge;
-import cpw.mods.fml.client.registry.ClientRegistry;
-import cpw.mods.fml.client.registry.RenderingRegistry;
-import cpw.mods.fml.common.registry.VillagerRegistry;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.client.InventoryTabVanilla;
-import darkknight.jewelrycraft.client.TabJewelry;
-import darkknight.jewelrycraft.client.TabRegistry;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.entities.renders.HeartRender;
-import darkknight.jewelrycraft.events.PlayerRenderHandler;
-import darkknight.jewelrycraft.events.ScreenHandler;
-import darkknight.jewelrycraft.item.ItemList;
-import darkknight.jewelrycraft.item.render.ItemRender;
-import darkknight.jewelrycraft.model.ModelDisplayer;
-import darkknight.jewelrycraft.model.ModelHalfHeart;
-import darkknight.jewelrycraft.model.ModelHandPedestal;
-import darkknight.jewelrycraft.model.ModelHeart;
-import darkknight.jewelrycraft.model.ModelJewlersCraftingBench;
-import darkknight.jewelrycraft.model.ModelMolder;
-import darkknight.jewelrycraft.model.ModelShadowEye;
-import darkknight.jewelrycraft.model.ModelShadowHand;
-import darkknight.jewelrycraft.model.ModelSmelter;
-import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
-import darkknight.jewelrycraft.tileentity.TileEntityHandPedestal;
-import darkknight.jewelrycraft.tileentity.TileEntityJewelrsCraftingTable;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-import darkknight.jewelrycraft.tileentity.TileEntityMolder;
-import darkknight.jewelrycraft.tileentity.TileEntityShadowEye;
-import darkknight.jewelrycraft.tileentity.TileEntityShadowHand;
-import darkknight.jewelrycraft.tileentity.TileEntitySmelter;
-import darkknight.jewelrycraft.tileentity.renders.TileEntityDisplayerRender;
-import darkknight.jewelrycraft.tileentity.renders.TileEntityHandPedestalRender;
-import darkknight.jewelrycraft.tileentity.renders.TileEntityJewelrsCraftingTableRender;
-import darkknight.jewelrycraft.tileentity.renders.TileEntityMidasTouchRender;
-import darkknight.jewelrycraft.tileentity.renders.TileEntityMolderRender;
-import darkknight.jewelrycraft.tileentity.renders.TileEntityShadowEyeRender;
-import darkknight.jewelrycraft.tileentity.renders.TileEntityShadowHandRender;
-import darkknight.jewelrycraft.tileentity.renders.TileEntitySmelterRender;
-import darkknight.jewelrycraft.util.JewelrycraftUtil;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ClientProxy extends CommonProxy
-{
- @Override
- public void preInit()
- {
- ResourceLocation pedestalResourceLocation = new ResourceLocation(Variables.MODID, "textures/tileentities/BricksPedestal.png");
- TileEntityHandPedestalRender pedestalRender = new TileEntityHandPedestalRender(new ModelHandPedestal(pedestalResourceLocation), pedestalResourceLocation);
- ResourceLocation shadowResourceLocation = new ResourceLocation(Variables.MODID, "textures/tileentities/ShadowHand.png");
- TileEntityShadowHandRender shadowHandRender = new TileEntityShadowHandRender(new ModelShadowHand(shadowResourceLocation), shadowResourceLocation);
-
- ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmelter.class, new TileEntitySmelterRender());
- ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMolder.class, new TileEntityMolderRender());
- ClientRegistry.bindTileEntitySpecialRenderer(TileEntityJewelrsCraftingTable.class, new TileEntityJewelrsCraftingTableRender());
- ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDisplayer.class, new TileEntityDisplayerRender());
- ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShadowEye.class, new TileEntityShadowEyeRender());
- ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMidasTouch.class, new TileEntityMidasTouchRender());
- ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHandPedestal.class, pedestalRender);
- ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShadowHand.class, shadowHandRender);
-
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.displayer), new ItemRender(new TileEntityDisplayerRender(), new TileEntityDisplayer(), new ModelDisplayer()));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.jewelCraftingTable), new ItemRender(new TileEntityJewelrsCraftingTableRender(), new TileEntityJewelrsCraftingTable(), new ModelJewlersCraftingBench()));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.smelter), new ItemRender(new TileEntitySmelterRender(), new TileEntitySmelter(), new ModelSmelter()));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.molder), new ItemRender(new TileEntityMolderRender(), new TileEntityMolder(), new ModelMolder()));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.shadowEye), new ItemRender(new TileEntityShadowEyeRender(), new TileEntityShadowEye(), new ModelShadowEye()));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.handPedestal), new ItemRender(pedestalRender, new TileEntityHandPedestal(), new ModelHandPedestal(pedestalResourceLocation)));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.shadowHand), new ItemRender(shadowHandRender, new TileEntityShadowHand(), new ModelShadowHand(shadowResourceLocation)));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ItemList.goldObj), new ItemRender();
-
- VillagerRegistry.instance().registerVillagerSkin(3000, new ResourceLocation(Variables.MODID, "textures/entities/jeweler.png"));
-
- RenderingRegistry.registerEntityRenderingHandler(EntityHeart.class, new HeartRender(new ModelHeart(), 0.25F));
- RenderingRegistry.registerEntityRenderingHandler(EntityHalfHeart.class, new HeartRender(new ModelHalfHeart(), 0.25F));
-
- TabRegistry.registerTab(new InventoryTabVanilla());
- TabRegistry.registerTab(new TabJewelry());
- MinecraftForge.EVENT_BUS.register(new TabRegistry());
- MinecraftForge.EVENT_BUS.register(new PlayerRenderHandler());
- ResourceLocation jeweleryTexture = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
- MinecraftForge.EVENT_BUS.register(new ScreenHandler(Minecraft.getMinecraft(), jeweleryTexture));
- }
-
- @Override
- public void postInit()
- {
- JewelrycraftUtil.addStuff();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/45/e0b9d3d674e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/e018e6ed84ea001411cee0f8f86532a4
index f4fa38d..fca2a8d 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/45/e0b9d3d674e70014115de2bb951f0adf
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/13/e018e6ed84ea001411cee0f8f86532a4
@@ -18,7 +18,8 @@ import darkknight.jewelrycraft.util.Variables;
public class CursePentagram extends Curse
{
- ResourceLocation curse = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
+ float rot = 0F;
+
public CursePentagram(int id, String name, int text)
{
super(id, name, text);
@@ -26,8 +27,7 @@ public class CursePentagram extends Curse
@Override
public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- }
+ {}
public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
{
@@ -35,15 +35,18 @@ public class CursePentagram extends Curse
GL11.glColor4f(1, 1, 1, 1);
Tessellator tessellator = Tessellator.instance;
TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
- texturemanager.bindTexture(curse);
+ texturemanager.bindTexture(Variables.CURSES_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
GL11.glScalef(0.1F, 0.1F, 0.1F);
- GL11.glTranslatef(1F, 20F, 1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot+=3F;
+ if (rot > 360F) rot = 0F;
float f = 0.00390625F;
float f1 = 0.00390625F;
int x = 0;
int y = 0;
- int u = 0;
+ int u = 32 * 7;
int v = 0;
int width = 32;
int height = 32;
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/00cc33c5afea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/00cc33c5afea001411cee0f8f86532a4
new file mode 100644
index 0000000..fab1a03
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/00cc33c5afea001411cee0f8f86532a4
@@ -0,0 +1,12 @@
+/**
+ *
+ */
+package darkknight.jewelrycraft.events;
+
+/**
+ * @author Sorin
+ *
+ */
+public class EventList
+{
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/00e7eba687ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/00e7eba687ea001411cee0f8f86532a4
new file mode 100644
index 0000000..9816c75
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/00e7eba687ea001411cee0f8f86532a4
@@ -0,0 +1,60 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CursePentagram extends Curse
+{
+ float rot = 0F;
+
+ public CursePentagram(String name, int txtID, String pack)
+ {
+ super(name, txtID, pack);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(Variables.CURSES_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "The Dark Lord has misterious ways of showing you his love.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/a0d5c5c83ce700141e05cdbaeb682437 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/a0d5c5c83ce700141e05cdbaeb682437
deleted file mode 100644
index 3ff5ed4..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/15/a0d5c5c83ce700141e05cdbaeb682437
+++ /dev/null
@@ -1,122 +0,0 @@
-package darkknight.jewelrycraft.events;
-
-import java.util.Iterator;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import darkknight.jewelrycraft.entities.renders.RenderHelper;
-import darkknight.jewelrycraft.item.render.BraceletRender;
-import darkknight.jewelrycraft.item.render.EarringsRender;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.model.ModelBracelet;
-import darkknight.jewelrycraft.util.JewelryNBT;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
-
-public class PlayerRenderHandler
-{
- MaskRender mask = new MaskRender();
- EarringsRender earrings = new EarringsRender();
- BraceletRender bracelet = new BraceletRender();
- public static String[] infamyCache = new String[]{};
-
- @SubscribeEvent
- public void renderScreen(RenderPlayerEvent.Specials.Post event)
- {
- ModelBiped main = event.renderer.modelBipedMain;
- Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
- if (infamyCache != null){
- while (players.hasNext()){
- EntityPlayer player = players.next();
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(1.6f, 1.6f, 1.6f);
- GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- GL11.glPopMatrix();
- }
- if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(0.07f, 0.07f, 0.07f);
- GL11.glTranslatef(0.0F, 3.0F, -2.0F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- earrings.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- GL11.glPopMatrix();
- }
- for(int i = 10; i <= 13; i++)
- if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
- if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
- if (i / 12 == 1){
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
- }else{
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- }
- GL11.glPopMatrix();
- }
- }
- }
- }
-
- /**
- * @param string
- * @return
- */
- private boolean checkPlayerInfamy(String string)
- {
- for(int i = 0; i < infamyCache.length; i++)
- if (infamyCache[i].equals(string)) return true;
- return false;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/00f6e805aeea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/00f6e805aeea001411cee0f8f86532a4
new file mode 100644
index 0000000..f708e78
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/00f6e805aeea001411cee0f8f86532a4
@@ -0,0 +1,197 @@
+/*
+ * Mod made by DarkKnight during the Modjam 3
+ * It's an awesome mod
+ * I love me! :D
+ */
+package darkknight.jewelrycraft;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.gen.structure.MapGenStructureIO;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.oredict.OreDictionary;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.Mod.EventHandler;
+import cpw.mods.fml.common.Mod.Instance;
+import cpw.mods.fml.common.ModMetadata;
+import cpw.mods.fml.common.SidedProxy;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
+import cpw.mods.fml.common.registry.EntityRegistry;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.client.gui.GuiHandler;
+import darkknight.jewelrycraft.commands.JewelrycraftCommands;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.damage.DamageSourceList;
+import darkknight.jewelrycraft.effects.EffectsList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.events.BlockEventHandler;
+import darkknight.jewelrycraft.events.BucketHandler;
+import darkknight.jewelrycraft.events.EntityEventHandler;
+import darkknight.jewelrycraft.events.EventCommonHandler;
+import darkknight.jewelrycraft.events.KeyBindings;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.network.PacketClearColorCache;
+import darkknight.jewelrycraft.network.PacketKeyPressEvent;
+import darkknight.jewelrycraft.network.PacketRequestLiquidData;
+import darkknight.jewelrycraft.network.PacketRequestPlayerInfo;
+import darkknight.jewelrycraft.network.PacketRequestSetSlot;
+import darkknight.jewelrycraft.network.PacketSendServerPlayersInfo;
+import darkknight.jewelrycraft.network.PacketSendLiquidData;
+import darkknight.jewelrycraft.network.PacketSendClientPlayerInfo;
+import darkknight.jewelrycraft.proxy.CommonProxy;
+import darkknight.jewelrycraft.recipes.CraftingRecipes;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.Variables;
+import darkknight.jewelrycraft.worldGen.Generation;
+import darkknight.jewelrycraft.worldGen.village.ComponentJewelry;
+import darkknight.jewelrycraft.worldGen.village.JCTrades;
+import darkknight.jewelrycraft.worldGen.village.VillageJewelryHandler;
+
+@Mod (modid = Variables.MODID, name = Variables.MODNAME, version = Variables.VERSION, guiFactory = Variables.CONFIG_GUI)
+public class JewelrycraftMod
+{
+ @Instance (Variables.MODID)
+ public static JewelrycraftMod instance;
+
+ @SidedProxy (clientSide = Variables.CLIENT_PROXY, serverSide = Variables.SERVER_PROXY)
+ public static CommonProxy proxy;
+ public static final Logger logger = Logger.getLogger("Jewelrycraft");
+ public static File dir;
+
+ public static CreativeTabs jewelrycraft = new CreativeTabs(Variables.MODID){
+ @Override
+ public Item getTabIconItem()
+ {
+ return Item.getItemFromBlock(BlockList.jewelCraftingTable);
+ }
+ };
+
+ public static CreativeTabs liquids = new CreativeTabLiquids("Liquids");
+ public static NBTTagCompound saveData = new NBTTagCompound();
+ public static NBTTagCompound clientData = new NBTTagCompound();
+ public static File liquidsConf;
+ public static SimpleNetworkWrapper netWrapper;
+ public static boolean fancyRender;
+
+ /**
+ * Pre initialization of mod stuff.
+ *
+ * @param e FMLPreInitializationEvent
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ @EventHandler
+ public void preInit(FMLPreInitializationEvent e) throws IOException
+ {
+ ConfigHandler.INSTANCE.loadConfig(e);
+ BlockList.preInit(e);
+ ItemList.preInit(e);
+ CraftingRecipes.preInit(e);
+ CurseList.preInit(e);
+ OreDictionary.registerOre("ingotShadow", new ItemStack(ItemList.shadowIngot));
+ OreDictionary.registerOre("oreShadow", new ItemStack(BlockList.shadowOre));
+ VillagerRegistry.instance().registerVillagerId(3000);
+ VillagerRegistry.instance().registerVillageTradeHandler(3000, new JCTrades());
+ VillagerRegistry.instance().registerVillageCreationHandler(new VillageJewelryHandler());
+ try{
+ MapGenStructureIO.func_143031_a(ComponentJewelry.class, Variables.MODID + ":Jewelry");
+ }
+ catch(Throwable e2){
+ logger.severe("Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.7.10");
+ }
+ MinecraftForge.EVENT_BUS.register(new EntityEventHandler());
+ MinecraftForge.EVENT_BUS.register(new BlockEventHandler());
+ MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
+ FMLCommonHandler.instance().bus().register(new EventCommonHandler());
+ BucketHandler.INSTANCE.buckets.put(BlockList.moltenMetal, ItemList.bucket);
+
+ ModMetadata metadata = e.getModMetadata();
+ List<String> authorList = new ArrayList<String>();
+
+ authorList.add("OnyxDarkKnight");
+ authorList.add("bspkrs");
+ authorList.add("domi1819");
+
+ dir = e.getModConfigurationDirectory();
+ proxy.preInit();
+ netWrapper = NetworkRegistry.INSTANCE.newSimpleChannel(Variables.MODID);
+ netWrapper.registerMessage(PacketRequestLiquidData.class, PacketRequestLiquidData.class, 0, Side.SERVER);
+ netWrapper.registerMessage(PacketSendLiquidData.class, PacketSendLiquidData.class, 1, Side.CLIENT);
+ netWrapper.registerMessage(PacketClearColorCache.class, PacketClearColorCache.class, 2, Side.CLIENT);
+ netWrapper.registerMessage(PacketKeyPressEvent.class, PacketKeyPressEvent.class, 3, Side.SERVER);
+ netWrapper.registerMessage(PacketRequestPlayerInfo.class, PacketRequestPlayerInfo.class, 4, Side.SERVER);
+ netWrapper.registerMessage(PacketSendClientPlayerInfo.class, PacketSendClientPlayerInfo.class, 5, Side.CLIENT);
+ netWrapper.registerMessage(PacketSendServerPlayersInfo.class, PacketSendServerPlayersInfo.class, 6, Side.CLIENT);
+ netWrapper.registerMessage(PacketRequestSetSlot.class, PacketRequestSetSlot.class, 7, Side.SERVER);
+
+ metadata.autogenerated = false;
+ metadata.authorList = authorList;
+ metadata.url = "https://github.com/sor1n/Jewelrycraft";
+
+ createEntity(EntityHeart.class, Variables.MODID + ".Heart", 0xFF0000, 0xFF0000, false);
+ createEntity(EntityHalfHeart.class, Variables.MODID + ".Half-Heart", 0x000000, 0xFF0000, false);
+
+ }
+
+ public void createEntity(Class<? extends Entity> entity, String entityName, int solidColor, int spotColor, boolean hasSpawnEgg)
+ {
+ int randomID = EntityRegistry.findGlobalUniqueEntityId();
+ if(hasSpawnEgg) EntityRegistry.registerGlobalEntityID(entity, entityName, randomID, solidColor, spotColor);
+ else EntityRegistry.registerGlobalEntityID(entity, entityName, randomID);
+ EntityRegistry.registerModEntity(entity, entityName, randomID, this, 40, 3, true);
+ }
+
+ /**
+ * Initializes the world generation and key bindings.
+ *
+ * @param e FMLInitializationEvent
+ */
+ @EventHandler
+ public void init(FMLInitializationEvent e)
+ {
+ GameRegistry.registerWorldGenerator(new Generation(), 0);
+ if (FMLCommonHandler.instance().getSide() == Side.CLIENT) FMLCommonHandler.instance().bus().register(new KeyBindings());
+ new GuiHandler();
+ FMLCommonHandler.instance().bus().register(ConfigHandler.INSTANCE);
+ }
+
+ /**
+ * Post initialization of metals, modifiers and others.
+ *
+ * @param e FMLPostInitializationEvent
+ */
+ @EventHandler
+ public void postInit(FMLPostInitializationEvent e)
+ {
+ JewelrycraftUtil.addMetals();
+ JewelrycraftUtil.jamcrafters();
+ EffectsList.postInit(e);
+ DamageSourceList.postInit(e);
+ proxy.postInit();
+ }
+
+ @Mod.EventHandler
+ public void serverLoad(FMLServerStartingEvent event)
+ {
+ event.registerServerCommand(new JewelrycraftCommands());
+ }
+
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/302024c987ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/302024c987ea001411cee0f8f86532a4
new file mode 100644
index 0000000..52ab09d
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/16/302024c987ea001411cee0f8f86532a4
@@ -0,0 +1,38 @@
+package darkknight.jewelrycraft.curses;
+
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CurseList
+{
+ public static Curse rotten;
+ public static Curse flaming;
+ public static Curse blind;
+ public static Curse greed;
+ public static Curse infamy;
+ public static Curse midasTouch;
+ public static Curse rabbitsPaw;
+ public static Curse pentagram;
+ public static Curse vampireHunger;
+ public static Curse humbleBundle;
+ public static Curse deathsTouch;
+ public static Curse antichrist;
+ public static Curse moneyEqualsPower;
+
+ public static void preInit(FMLPreInitializationEvent e)
+ {
+ rotten = new CurseRottenHeart(Variables.MODNAME + ":" + "Rotten Heart", 0, 0);
+ flaming = new CurseFlamingSoul(Variables.MODNAME + ":" + "Flaming Soul", 1, 0);
+ greed = new CurseGreed(Variables.MODNAME + ":" + "Greed", 2, 0);
+ blind = new CurseBlind(Variables.MODNAME + ":" + "Blind", 3, 0);
+ infamy = new CurseInfamy(Variables.MODNAME + ":" + "Infamy", 4, 0);
+ midasTouch = new CurseMidasTouch(Variables.MODNAME + ":" + "Midas Touch", 5, 0);
+ rabbitsPaw = new CurseRabbitsPaw(Variables.MODNAME + ":" + "Rabbit's Paw", 6, 0);
+ pentagram = new CursePentagram(Variables.MODNAME + ":" + "Pentagram", 7, 0);
+// vampireHunger = new CurseMidasTouch(8, Variables.MODNAME + ":" + "Vampire Hunger", 8, 0);
+// humbleBundle = new CurseMidasTouch(9, Variables.MODNAME + ":" + "Humble Bundle", 9, 0);
+// deathsTouch = new CurseMidasTouch(10, Variables.MODNAME + ":" + "Deaths Touch", 10, 0);
+// antichrist = new CurseMidasTouch(11, Variables.MODNAME + ":" + "Antichrist", 11, 0);
+// moneyEqualsPower = new CurseMidasTouch(12, Variables.MODNAME + ":" + "Money Equals Power", 12, 0);
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/0027527092e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/0027527092e3001417b2e384bf7c3702
deleted file mode 100644
index 3ea8ce3..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/0027527092e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,27 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, 2D, 0D, 0D, 1F, 1F);
-// RenderManager.instance.getEntityRenderObject(midas.target).doRender(midas.target, midas.target.posX - Minecraft.getMinecraft().thePlayer.posX, midas.target.posY - Minecraft.getMinecraft().thePlayer.posY, midas.target.posZ - Minecraft.getMinecraft().thePlayer.posZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/00a2b6defce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/00a2b6defce40014174fe663e69b8422
deleted file mode 100644
index 3293158..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/00a2b6defce40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static Item goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/30dc53adb2ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/30dc53adb2ea001411cee0f8f86532a4
new file mode 100644
index 0000000..7e44dc8
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/30dc53adb2ea001411cee0f8f86532a4
@@ -0,0 +1,32 @@
+package darkknight.jewelrycraft.item.render;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BraceletRender extends TileEntitySpecialRenderer
+{
+ public ModelBracelet bracelet = new ModelBracelet();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Bracelet.png");
+
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ }
+
+ public void doRender(Entity entity, double x, double y, double z, float f, float g)
+ {
+ GL11.glPushMatrix();
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+ System.out.println(x + " " + z);
+ if (z != (float)-1) bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ GL11.glTranslatef(0F, 3F, 0F);
+ if (x != (float)-1) bracelet.render(entity, 0F, 0F, 0F, (float)x, (float)y, 1.0F);
+ GL11.glPopMatrix();
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/7045c0d592ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/7045c0d592ea001411cee0f8f86532a4
new file mode 100644
index 0000000..6c9ebb0
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/7045c0d592ea001411cee0f8f86532a4
@@ -0,0 +1,31 @@
+package darkknight.jewelrycraft.item.render;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BraceletRender extends TileEntitySpecialRenderer
+{
+ public ModelBracelet bracelet = new ModelBracelet();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Bracelet.png");
+
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ }
+
+ public void doRender(Entity entity, double x, double y, double z, float f, float g)
+ {
+ GL11.glPushMatrix();
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+ bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ GL11.glTranslatef(0F, 1F, 0F);
+ bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ GL11.glPopMatrix();
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/80383f3671e300141084bb8bfb075c08 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/80383f3671e300141084bb8bfb075c08
deleted file mode 100644
index a059832..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/80383f3671e300141084bb8bfb075c08
+++ /dev/null
@@ -1,72 +0,0 @@
-package darkknight.jewelrycraft.tileentity;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.NetworkManager;
-import net.minecraft.network.Packet;
-import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
-import net.minecraft.tileentity.TileEntity;
-
-public class TileEntityMidasTouch extends TileEntity
-{
- public Entity target;
-
- public TileEntityMidasTouch()
- {
- target = null;
- }
-
- /**
- * @param nbt
- */
- @Override
- public void writeToNBT(NBTTagCompound nbt)
- {
- super.writeToNBT(nbt);
- NBTTagCompound tag = new NBTTagCompound();
- target.writeToNBT(tag);
- nbt.setTag("object", tag);
- }
-
- /**
- * @param nbt
- */
- @Override
- public void readFromNBT(NBTTagCompound nbt)
- {
- super.readFromNBT(nbt);
- }
-
- /**
- *
- */
- @Override
- public void updateEntity()
- {
- super.updateEntity();
- }
-
- /**
- * @return
- */
- @Override
- public Packet getDescriptionPacket()
- {
- NBTTagCompound nbttagcompound = new NBTTagCompound();
- writeToNBT(nbttagcompound);
- return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbttagcompound);
- }
-
- /**
- * @param net
- * @param packet
- */
- @Override
- public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet)
- {
- readFromNBT(packet.func_148857_g());
- worldObj.func_147479_m(xCoord, yCoord, zCoord);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/19/507e2e4e84ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/19/507e2e4e84ea001411cee0f8f86532a4
new file mode 100644
index 0000000..89f598d
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/19/507e2e4e84ea001411cee0f8f86532a4
@@ -0,0 +1,15 @@
+package darkknight.jewelrycraft.util;
+
+public class Variables
+{
+ public static final String MODID = "jewelrycraft2";
+ public static final String MODNAME = "Jewelrycraft 2";
+ public static final String VERSION = "1.0";
+ public static final String PACKET_CHANNEL = "jewelrycraft2";
+
+ public static final String CONFIG_GUI = "darkknight.jewelrycraft.config.ConfigGuiFactory";
+ public static final String CLIENT_PROXY = "darkknight.jewelrycraft.proxy.ClientProxy";
+ public static final String SERVER_PROXY = "darkknight.jewelrycraft.proxy.CommonProxy";
+
+ public static final int MAX_CURSES = 10;
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1a/706949a171e300141084bb8bfb075c08 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1a/706949a171e300141084bb8bfb075c08
deleted file mode 100644
index dd4db0c..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1a/706949a171e300141084bb8bfb075c08
+++ /dev/null
@@ -1,75 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidRegistry;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.tileentity.TileEntityAltar;
-import darkknight.jewelrycraft.tileentity.TileEntityBlockShadow;
-import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
-import darkknight.jewelrycraft.tileentity.TileEntityHandPedestal;
-import darkknight.jewelrycraft.tileentity.TileEntityJewelrsCraftingTable;
-import darkknight.jewelrycraft.tileentity.TileEntityMolder;
-import darkknight.jewelrycraft.tileentity.TileEntityShadowEye;
-import darkknight.jewelrycraft.tileentity.TileEntityShadowHand;
-import darkknight.jewelrycraft.tileentity.TileEntitySmelter;
-import darkknight.jewelrycraft.util.Variables;
-
-public class BlockList
-{
- public static Block shadowOre, smelter, molder, displayer, jewelCraftingTable, shadowBlock, shadowEye, jewelAltar, handPedestal, shadowHand, midasTouchBlock;
- public static BlockMoltenMetal moltenMetal;
- public static Fluid moltenMetalFluid;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- shadowOre = new BlockJCOre().setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockTextureName(Variables.MODID + ":oreShadow").setBlockName(Variables.MODID + ".oreShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- smelter = new BlockSmelter().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".smelter").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molder = new BlockMolder(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".molder").setCreativeTab(JewelrycraftMod.jewelrycraft);
- displayer = new BlockDisplayer(Material.iron).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypeMetal).setBlockName(Variables.MODID + ".displayer").setCreativeTab(JewelrycraftMod.jewelrycraft);
- jewelCraftingTable = new BlockJewelrsCraftingTable(Material.rock).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".jewelCraftingTable").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowBlock = new BlockShadow().setHardness(5.0F).setResistance(7.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":blockShadow").setBlockName(Variables.MODID + ".blockShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- jewelAltar = new BlockJewelAltar().setHardness(5.0F).setResistance(2.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":altar").setBlockName(Variables.MODID + ".altar").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowEye = new BlockShadowEye().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowEye").setCreativeTab(JewelrycraftMod.jewelrycraft);
- handPedestal = new BlockHandPedestal(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".handPedestal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowHand = new BlockShadowHand(Material.rock).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowHand").setCreativeTab(JewelrycraftMod.jewelrycraft).setBlockUnbreakable();
- midasTouchBlock = new BlockMidasTouch(Material.iron).setHardness(3.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setBlockName(Variables.MODID + ".midasTouchBlock").setCreativeTab(JewelrycraftMod.jewelrycraft);
-
- GameRegistry.registerBlock(shadowOre, "shadowOre");
- GameRegistry.registerBlock(shadowBlock, "shadowBlock");
- GameRegistry.registerBlock(smelter, "Smelter");
- GameRegistry.registerBlock(molder, "Molder");
- GameRegistry.registerBlock(jewelCraftingTable, "jewelCraftingTable");
- GameRegistry.registerBlock(displayer, "Displayer");
- GameRegistry.registerBlock(jewelAltar, "Altar");
- GameRegistry.registerBlock(shadowEye, "Shadow Eye");
- GameRegistry.registerBlock(handPedestal, "Stone Bricks Pedestal");
- GameRegistry.registerBlock(shadowHand, "Shadow Hand");
- GameRegistry.registerBlock(midasTouchBlock, "Midas Touch Block");
-
- GameRegistry.registerTileEntity(TileEntitySmelter.class, Variables.MODID + ":smelter");
- GameRegistry.registerTileEntity(TileEntityMolder.class, Variables.MODID + ":molder");
- GameRegistry.registerTileEntity(TileEntityJewelrsCraftingTable.class, Variables.MODID + ":table");
- GameRegistry.registerTileEntity(TileEntityDisplayer.class, Variables.MODID + ":displayer");
- GameRegistry.registerTileEntity(TileEntityBlockShadow.class, Variables.MODID + ":blockShadow");
- GameRegistry.registerTileEntity(TileEntityAltar.class, Variables.MODID + ":altar");
- GameRegistry.registerTileEntity(TileEntityShadowEye.class, Variables.MODID + ":shadowEye");
- GameRegistry.registerTileEntity(TileEntityHandPedestal.class, Variables.MODID + ":handPedestal");
- GameRegistry.registerTileEntity(TileEntityShadowHand.class, Variables.MODID + ":shadowHand");
-
- moltenMetalFluid = new Fluid("metal.molten").setLuminosity(15).setDensity(3000).setTemperature(2000).setViscosity(6000);
- if (!FluidRegistry.registerFluid(moltenMetalFluid)) moltenMetalFluid = FluidRegistry.getFluid("metal.molten");
- moltenMetal = new BlockMoltenMetal(moltenMetalFluid, Material.lava);
- GameRegistry.registerBlock(moltenMetal, "moltenMetalLiquid");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1a/80c6fbebafea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1a/80c6fbebafea001411cee0f8f86532a4
new file mode 100644
index 0000000..ccf918e
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1a/80c6fbebafea001411cee0f8f86532a4
@@ -0,0 +1,40 @@
+/**
+ *
+ */
+package darkknight.jewelrycraft.events;
+
+import net.minecraftforge.common.MinecraftForge;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.client.gui.GuiHandler;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.util.Variables;
+import darkknight.jewelrycraft.worldGen.Generation;
+
+public class EventList
+{
+ public static void preInit(FMLPreInitializationEvent e)
+ {
+
+ MinecraftForge.EVENT_BUS.register(new EntityEventHandler());
+ MinecraftForge.EVENT_BUS.register(new BlockEventHandler());
+ MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
+ FMLCommonHandler.instance().bus().register(new EventCommonHandler());
+ BucketHandler.INSTANCE.buckets.put(BlockList.moltenMetal, ItemList.bucket);
+ }
+
+ public static void init(FMLInitializationEvent e)
+ {
+ GameRegistry.registerWorldGenerator(new Generation(), 0);
+ if (FMLCommonHandler.instance().getSide() == Side.CLIENT) FMLCommonHandler.instance().bus().register(new KeyBindings());
+ new GuiHandler();
+ FMLCommonHandler.instance().bus().register(ConfigHandler.INSTANCE);
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1c/a0cc56d4fbe40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1c/a0cc56d4fbe40014174fe663e69b8422
deleted file mode 100644
index 4b85be6..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1c/a0cc56d4fbe40014174fe663e69b8422
+++ /dev/null
@@ -1,68 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import javax.imageio.ImageIO;
-import net.minecraft.block.Block;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.texture.TextureManager;
-import net.minecraft.client.resources.IResourceManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.StatCollector;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.effects.ModifierEffects;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public abstract class ItemGoldifiedObject extends Item
-{
- public ItemGoldifiedObject()
- {
- super();
- }
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- if (JewelryNBT.gem(stack) != null) return this.getIconIndex(JewelryNBT.gem(stack));
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return (StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
-
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1c/c0982a0792e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1c/c0982a0792e3001417b2e384bf7c3702
deleted file mode 100644
index 54ebba0..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1c/c0982a0792e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,26 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.getEntityRenderObject(midas.target).doRender(midas.target, te.xCoord - (int)Minecraft.getMinecraft().thePlayer.posX, te.yCoord - (int)Minecraft.getMinecraft().thePlayer.posY, te.zCoord - (int)Minecraft.getMinecraft().thePlayer.posZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1d/3003c407fee40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1d/3003c407fee40014174fe663e69b8422
deleted file mode 100644
index cd510dc..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1d/3003c407fee40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- public static Item goldifiedObject;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldObj().setUnlocalizedName(Variables.MODID + ".goldObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1e/0090818687ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1e/0090818687ea001411cee0f8f86532a4
new file mode 100644
index 0000000..d097030
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1e/0090818687ea001411cee0f8f86532a4
@@ -0,0 +1,25 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.world.World;
+
+public class CurseRottenHeart extends Curse
+{
+ public CurseRottenHeart(String name, int txtID, int packID)
+ {
+ super(name, txtID, packID);
+ }
+
+ @Override
+ public void action(World world, EntityPlayer player)
+ {
+ if (!player.isPotionActive(Potion.poison) || player.getActivePotionEffect(Potion.poison).getDuration() < 30) player.addPotionEffect(new PotionEffect(Potion.poison.id, 80));
+ }
+
+ public String getDescription()
+ {
+ return "Your heart slowly rots inside";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1e/c00f4e1196ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1e/c00f4e1196ea001411cee0f8f86532a4
new file mode 100644
index 0000000..837385d
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1e/c00f4e1196ea001411cee0f8f86532a4
@@ -0,0 +1,113 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.07f, 0.07f, 0.07f);
+ GL11.glTranslatef(0.0F, 2.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1e/f08e283892e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1e/f08e283892e3001417b2e384bf7c3702
deleted file mode 100644
index 15da89c..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1e/f08e283892e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,26 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.getEntityRenderObject(midas.target).doRender(midas.target, midas.target.posX - Minecraft.getMinecraft().thePlayer.posX, midas.target.posY - Minecraft.getMinecraft().thePlayer.posY, midas.target.posZ - Minecraft.getMinecraft().thePlayer.posZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2/700a88ac90e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2/700a88ac90e3001417b2e384bf7c3702
deleted file mode 100644
index 083f63f..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2/700a88ac90e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,54 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch(null);
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/20/000ed0d640e700141e05cdbaeb682437 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/20/000ed0d640e700141e05cdbaeb682437
deleted file mode 100644
index d39e416..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/20/000ed0d640e700141e05cdbaeb682437
+++ /dev/null
@@ -1,126 +0,0 @@
-package darkknight.jewelrycraft.events;
-
-import java.util.Iterator;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import darkknight.jewelrycraft.curses.CurseList;
-import darkknight.jewelrycraft.entities.renders.RenderHelper;
-import darkknight.jewelrycraft.item.render.BraceletRender;
-import darkknight.jewelrycraft.item.render.EarringsRender;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.model.ModelBracelet;
-import darkknight.jewelrycraft.util.JewelryNBT;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
-
-public class PlayerRenderHandler
-{
- MaskRender mask = new MaskRender();
- EarringsRender earrings = new EarringsRender();
- BraceletRender bracelet = new BraceletRender();
-// public static String[] infamyCache = new String[]{};
- public static NBTTagCompound playersInfo = new NBTTagCompound();
-
- @SubscribeEvent
- public void renderScreen(RenderPlayerEvent.Specials.Post event)
- {
- ModelBiped main = event.renderer.modelBipedMain;
- Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
- if (playersInfo != null){
- while (players.hasNext()){
- EntityPlayer player = players.next();
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(1.6f, 1.6f, 1.6f);
- GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- GL11.glPopMatrix();
- }
- if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(0.07f, 0.07f, 0.07f);
- GL11.glTranslatef(0.0F, 3.0F, -2.0F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- earrings.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- GL11.glPopMatrix();
- }
- for(int i = 10; i <= 13; i++)
- if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
- if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
- if (i / 12 == 1){
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
- }else{
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- }
- GL11.glPopMatrix();
- }
- }
- }
- }
-
- /**
- * @param string
- * @return
- */
- private boolean checkPlayerInfamy(String string)
- {
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
- if(playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
-// for(int i = 0; i < infamyCache.length; i++)
-// if (infamyCache[i].equals(string)) return true;
- return false;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/20/703581a771e300141084bb8bfb075c08 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/20/703581a771e300141084bb8bfb075c08
deleted file mode 100644
index 4d506d3..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/20/703581a771e300141084bb8bfb075c08
+++ /dev/null
@@ -1,56 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- Random rand = new Random();
-
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/20/80bb60f196ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/20/80bb60f196ea001411cee0f8f86532a4
new file mode 100644
index 0000000..7094757
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/20/80bb60f196ea001411cee0f8f86532a4
@@ -0,0 +1,116 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_DST_COLOR);
+ GL11.glColor3f(1F, 0F, 0F);
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/20/a0dafd1785ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/20/a0dafd1785ea001411cee0f8f86532a4
new file mode 100644
index 0000000..fa09ef2
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/20/a0dafd1785ea001411cee0f8f86532a4
@@ -0,0 +1,101 @@
+package darkknight.jewelrycraft.events;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.gui.GuiChat;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderGameOverlayEvent;
+import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
+import net.minecraftforge.event.entity.player.PlayerOpenContainerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.util.Variables;
+
+public class ScreenHandler extends Gui
+{
+ private Minecraft mc;
+ public static NBTTagCompound tagCache = null;
+ public static int cooldown;
+ static ResourceLocation texture;
+
+ public ScreenHandler(Minecraft mc, ResourceLocation tex)
+ {
+ super();
+ this.mc = mc;
+ texture = tex;
+ }
+
+ @SubscribeEvent
+ public void renderScreen(RenderGameOverlayEvent event)
+ {
+ if (event.isCancelable() || event.type != ElementType.ALL || tagCache == null) return;
+ if (!mc.gameSettings.showDebugInfo && !(mc.currentScreen instanceof GuiChat)){
+ int count = 0;
+ int size = 32;
+ ScaledResolution resolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
+ if (tagCache.hasKey("cursePoints") && tagCache.getInteger("cursePoints") > 0){
+ mc.renderEngine.bindTexture(Variables.HEARTS_TEXTURE);
+ for(Curse curse: Curse.getCurseList()){
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ drawTexturedModalRect(-16, -16 + (size - 6) * count, 0, 32, 144, 60);
+ count++;
+ }
+ }
+ mc.renderEngine.bindTexture(texture);
+ count = 0;
+ for(Curse curse: Curse.getCurseList())
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ int tag = curse.getID();
+ GL11.glPushMatrix();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glScalef(0.45f, 0.45f, 0.0f);
+ drawTexturedModalRect(28, 18 + (size + 26) * count, tag % size * size, tag / size * size, size, size);
+ GL11.glPopMatrix();
+ count++;
+ }
+ count = 0;
+ size = 16;
+ for(Curse curse: Curse.getCurseList())
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ int tag = curse.getID();
+ mc.fontRenderer.drawStringWithShadow(curse.getName().split(":")[1], 30, 11 + (size + 10) * count, 16777215);
+ if (tagCache.getInteger(curse.getName()) == 2){
+ mc.renderEngine.bindTexture(hearts);
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GL11.glColor4f(1f, 1f, 1f, 0.5f);
+ drawTexturedModalRect(95, 7 + (size + 10) * count, 3 * size, 0, size, size);
+ GL11.glPopMatrix();
+ }
+ count++;
+ }
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1f, 1f, 1f, 1.0f);
+ mc.renderEngine.bindTexture(hearts);
+ count = 0;
+ size = 16;
+ if (tagCache.getFloat("BlueHeart") > 0){
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 0 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlueHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
+ }
+ count++;
+ mc.renderEngine.bindTexture(hearts);
+ if (tagCache.getFloat("BlackHeart") > 0){
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 1 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlackHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
+ }
+ count++;
+ mc.renderEngine.bindTexture(hearts);
+ if (tagCache.getFloat("WhiteHeart") > 0)
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 2 * size, 1 * size, size, size);
+ GL11.glPopMatrix();
+ }
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/00c64cbd86ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/00c64cbd86ea001411cee0f8f86532a4
new file mode 100644
index 0000000..4a38881
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/00c64cbd86ea001411cee0f8f86532a4
@@ -0,0 +1,129 @@
+package darkknight.jewelrycraft.curses;
+
+import java.util.ArrayList;
+import java.util.Random;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+
+public class Curse
+{
+ protected int id, texturepack, textureID;
+ protected String name, description;
+ protected Random rand = new Random();
+ private static ArrayList<Curse> curses = new ArrayList<Curse>();
+ public static ArrayList<Curse> availableCurses = new ArrayList<Curse>();
+
+ /**
+ * @param id the ID of the curse
+ * @param name the name of the curse
+ * @param texturepack the ID of the pack the texture is located in
+ */
+ protected Curse(int id, String name, int txtID, int texturepack)
+ {
+ this.id = id;
+ this.name = name;
+ this.texturepack = texturepack;
+ this.textureID = txtID;
+ curses.add(this);
+ availableCurses.add(this);
+ }
+
+ /**
+ * @return the name of the curse
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * @return the description of the curse
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public Curse setDescription(String desc)
+ {
+ description = desc;
+ return this;
+ }
+
+ /**
+ * @return the texture pack ID
+ */
+ public int getTexturePack()
+ {
+ return texturepack;
+ }
+
+ /**
+ * @return the texture ID
+ */
+ public int getTextureID()
+ {
+ return textureID;
+ }
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void action(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void playerDeathAction(World world, EntityPlayer player)
+ {}
+
+ public void entityDeathAction(World world, EntityLivingBase target, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void respawnAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ public void entityDropItems(EntityPlayer player, Entity target, ArrayList<EntityItem> drops)
+ {}
+
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {}
+
+ public boolean itemToss()
+ {
+ return false;
+ }
+
+ /**
+ * @return
+ */
+ public static ArrayList<Curse> getCurseList()
+ {
+ return curses;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/503aaee588ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/503aaee588ea001411cee0f8f86532a4
new file mode 100644
index 0000000..172c969
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/503aaee588ea001411cee0f8f86532a4
@@ -0,0 +1,67 @@
+package darkknight.jewelrycraft.curses;
+
+import org.lwjgl.opengl.GL11;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.SharedMonsterAttributes;
+import net.minecraft.entity.monster.EntityMob;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import darkknight.jewelrycraft.damage.DamageSourceList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.MaskRender;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.PlayerUtils;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CurseInfamy extends Curse
+{
+ MaskRender mask = new MaskRender();
+ public CurseInfamy(String name, int txtID, String pack)
+ {
+ super(name, txtID, pack);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {
+ if (rand.nextInt(5) == 0 && !world.isRemote && !(target instanceof EntityMob) && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && target.canAttackWithItem()){
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
+ if (playerInfo.getFloat("BlackHeart") < 20F) playerInfo.setFloat("BlackHeart", playerInfo.getFloat("BlackHeart") + 1.0F);
+ if (player.getMaxHealth() >= 3F){
+ player.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(player.getMaxHealth() - 1.0F);
+ player.setHealth(player.getHealth() - 1.0F);
+ }
+ JewelrycraftUtil.addCursePoints(player, 10);
+ }
+ }
+
+ @Override
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Post event)
+ {
+ float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
+ float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
+ float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ GL11.glRotatef(yawOffset, 0, -1, 0);
+ GL11.glRotatef(yaw - 90, 0, 1, 0);
+ GL11.glRotatef(pitch, 0, 0, -1);
+ GL11.glRotatef(90F, 0, 1F, 0F);
+ RenderHelper.translateToHeadLevel(player);
+ GL11.glScalef(1.6f, 1.6f, 1.6f);
+ GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
+ mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "What have you done?!";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/705c8cde88ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/705c8cde88ea001411cee0f8f86532a4
new file mode 100644
index 0000000..42bec18
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/705c8cde88ea001411cee0f8f86532a4
@@ -0,0 +1,128 @@
+package darkknight.jewelrycraft.curses;
+
+import java.util.ArrayList;
+import java.util.Random;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+
+public class Curse
+{
+ protected int textureID;
+ protected String name, description, texturePackName;
+ protected Random rand = new Random();
+ private static ArrayList<Curse> curses = new ArrayList<Curse>();
+ public static ArrayList<Curse> availableCurses = new ArrayList<Curse>();
+
+ /**
+ * @param id the ID of the curse
+ * @param name the name of the curse
+ * @param texturepack the ID of the pack the texture is located in
+ */
+ protected Curse(String name, int txtID, String texturepack)
+ {
+ this.name = name;
+ this.texturePackName = texturepack;
+ this.textureID = txtID;
+ curses.add(this);
+ availableCurses.add(this);
+ }
+
+ /**
+ * @return the name of the curse
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * @return the description of the curse
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public Curse setDescription(String desc)
+ {
+ description = desc;
+ return this;
+ }
+
+ /**
+ * @return the texture pack ID
+ */
+ public String getTexturePack()
+ {
+ return texturePackName;
+ }
+
+ /**
+ * @return the texture ID
+ */
+ public int getTextureID()
+ {
+ return textureID;
+ }
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void action(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void playerDeathAction(World world, EntityPlayer player)
+ {}
+
+ public void entityDeathAction(World world, EntityLivingBase target, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void respawnAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ public void entityDropItems(EntityPlayer player, Entity target, ArrayList<EntityItem> drops)
+ {}
+
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Post event)
+ {}
+
+ public boolean itemToss()
+ {
+ return false;
+ }
+
+ /**
+ * @return
+ */
+ public static ArrayList<Curse> getCurseList()
+ {
+ return curses;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/80feb574b2ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/80feb574b2ea001411cee0f8f86532a4
new file mode 100644
index 0000000..04bcf83
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/80feb574b2ea001411cee0f8f86532a4
@@ -0,0 +1,117 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ float rot = 0F;
+
+ @SubscribeEvent
+ public void renderHand(RenderHandEvent event)
+ {
+ if (playersInfo != null){
+ EntityPlayer player = Minecraft.getMinecraft().thePlayer;
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && playerInfo.getInteger("cursePoints") > 0) curse.playerHandRender(player, event);
+ }
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/d09736c947e700141e05cdbaeb682437 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/d09736c947e700141e05cdbaeb682437
deleted file mode 100644
index 1143a94..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/21/d09736c947e700141e05cdbaeb682437
+++ /dev/null
@@ -1,128 +0,0 @@
-package darkknight.jewelrycraft.events;
-
-import java.util.Iterator;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import darkknight.jewelrycraft.curses.CurseList;
-import darkknight.jewelrycraft.entities.renders.RenderHelper;
-import darkknight.jewelrycraft.item.render.BraceletRender;
-import darkknight.jewelrycraft.item.render.EarringsRender;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.model.ModelBracelet;
-import darkknight.jewelrycraft.util.JewelryNBT;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
-
-public class PlayerRenderHandler
-{
- MaskRender mask = new MaskRender();
- EarringsRender earrings = new EarringsRender();
- BraceletRender bracelet = new BraceletRender();
-// public static String[] infamyCache = new String[]{};
- public static NBTTagCompound playersInfo = new NBTTagCompound();
-
- @SubscribeEvent
- public void renderScreen(RenderPlayerEvent.Specials.Post event)
- {
- ModelBiped main = event.renderer.modelBipedMain;
- Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
- if (playersInfo != null){
- while (players.hasNext()){
- EntityPlayer player = players.next();
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(1.6f, 1.6f, 1.6f);
- GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- GL11.glPopMatrix();
- }
- if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(0.07f, 0.07f, 0.07f);
- GL11.glTranslatef(0.0F, 3.0F, -2.0F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- earrings.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- GL11.glPopMatrix();
- }
- for(int i = 10; i <= 13; i++)
- if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
- if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
- if (i / 12 == 1){
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- System.out.println(nbt);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
- }else{
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- System.out.println(nbt);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- }
- GL11.glPopMatrix();
- }
- }
- }
- }
-
- /**
- * @param string
- * @return
- */
- private boolean checkPlayerInfamy(String string)
- {
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
- if(playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
-// for(int i = 0; i < infamyCache.length; i++)
-// if (infamyCache[i].equals(string)) return true;
- return false;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/22/b06623eb95ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/22/b06623eb95ea001411cee0f8f86532a4
new file mode 100644
index 0000000..4fd90c5
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/22/b06623eb95ea001411cee0f8f86532a4
@@ -0,0 +1,113 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.07f, 0.07f, 0.07f);
+ GL11.glTranslatef(0.0F, 3.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/23/90e61b1372e300141084bb8bfb075c08 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/23/90e61b1372e300141084bb8bfb075c08
deleted file mode 100644
index 5d01be0..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/23/90e61b1372e300141084bb8bfb075c08
+++ /dev/null
@@ -1,37 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.monster.EntityMob;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && !(target instanceof EntityMob) && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart)){
- target.setDead();
- world.setBlock((int)target.posX, (int)target.posY, (int)target.posZ, BlockList.midasTouchBlock, 0, 2);
- TileEntity midasTouchVictim = new TileEntityMidasTouch(target);
- world.setTileEntity((int)target.posX, (int)target.posY, (int)target.posZ, midasTouchVictim);
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/24/609d74fbfde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/24/609d74fbfde40014174fe663e69b8422
deleted file mode 100644
index 7f0dc41..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/24/609d74fbfde40014174fe663e69b8422
+++ /dev/null
@@ -1,46 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.StatCollector;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public abstract class ItemGoldObject extends Item
-{
- public ItemGoldObject()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- if (JewelryNBT.gem(stack) != null) return this.getIconIndex(JewelryNBT.gem(stack));
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return (StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/25/00d1f1fcafea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/25/00d1f1fcafea001411cee0f8f86532a4
new file mode 100644
index 0000000..ac9f61d
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/25/00d1f1fcafea001411cee0f8f86532a4
@@ -0,0 +1,39 @@
+/**
+ *
+ */
+package darkknight.jewelrycraft.events;
+
+import net.minecraftforge.common.MinecraftForge;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.client.gui.GuiHandler;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.util.Variables;
+import darkknight.jewelrycraft.worldGen.Generation;
+
+public class EventList
+{
+ public static void preInit(FMLPreInitializationEvent e)
+ {
+ MinecraftForge.EVENT_BUS.register(new EntityEventHandler());
+ MinecraftForge.EVENT_BUS.register(new BlockEventHandler());
+ MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
+ FMLCommonHandler.instance().bus().register(new EventCommonHandler());
+ BucketHandler.INSTANCE.buckets.put(BlockList.moltenMetal, ItemList.bucket);
+ }
+
+ public static void init(FMLInitializationEvent e)
+ {
+ GameRegistry.registerWorldGenerator(new Generation(), 0);
+ if (FMLCommonHandler.instance().getSide() == Side.CLIENT) FMLCommonHandler.instance().bus().register(new KeyBindings());
+ new GuiHandler();
+ FMLCommonHandler.instance().bus().register(ConfigHandler.INSTANCE);
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/25/5021877296ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/25/5021877296ea001411cee0f8f86532a4
new file mode 100644
index 0000000..10cc8aa
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/25/5021877296ea001411cee0f8f86532a4
@@ -0,0 +1,113 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/26/00cf95bfafea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/26/00cf95bfafea001411cee0f8f86532a4
new file mode 100644
index 0000000..90989cd
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/26/00cf95bfafea001411cee0f8f86532a4
@@ -0,0 +1,79 @@
+package darkknight.jewelrycraft.block;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.oredict.OreDictionary;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.registry.GameRegistry;
+import darkknight.jewelrycraft.JewelrycraftMod;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.tileentity.TileEntityAltar;
+import darkknight.jewelrycraft.tileentity.TileEntityBlockShadow;
+import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
+import darkknight.jewelrycraft.tileentity.TileEntityHandPedestal;
+import darkknight.jewelrycraft.tileentity.TileEntityJewelrsCraftingTable;
+import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
+import darkknight.jewelrycraft.tileentity.TileEntityMolder;
+import darkknight.jewelrycraft.tileentity.TileEntityShadowEye;
+import darkknight.jewelrycraft.tileentity.TileEntityShadowHand;
+import darkknight.jewelrycraft.tileentity.TileEntitySmelter;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BlockList
+{
+ public static Block shadowOre, smelter, molder, displayer, jewelCraftingTable, shadowBlock, shadowEye, jewelAltar, handPedestal, shadowHand, midasTouchBlock;
+ public static BlockMoltenMetal moltenMetal;
+ public static Fluid moltenMetalFluid;
+ private static boolean isInitialized = false;
+
+ /**
+ * @param e
+ */
+ public static void preInit(FMLPreInitializationEvent e)
+ {
+ shadowOre = new BlockJCOre().setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockTextureName(Variables.MODID + ":oreShadow").setBlockName(Variables.MODID + ".oreShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ smelter = new BlockSmelter().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".smelter").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ molder = new BlockMolder(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".molder").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ displayer = new BlockDisplayer(Material.iron).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypeMetal).setBlockName(Variables.MODID + ".displayer").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ jewelCraftingTable = new BlockJewelrsCraftingTable(Material.rock).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".jewelCraftingTable").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ shadowBlock = new BlockShadow().setHardness(5.0F).setResistance(7.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":blockShadow").setBlockName(Variables.MODID + ".blockShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ jewelAltar = new BlockJewelAltar().setHardness(5.0F).setResistance(2.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":altar").setBlockName(Variables.MODID + ".altar").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ shadowEye = new BlockShadowEye().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowEye").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ handPedestal = new BlockHandPedestal(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".handPedestal").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ shadowHand = new BlockShadowHand(Material.rock).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowHand").setCreativeTab(JewelrycraftMod.jewelrycraft).setBlockUnbreakable();
+ midasTouchBlock = new BlockMidasTouch(Material.iron).setHardness(3.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setBlockName(Variables.MODID + ".midasTouchBlock");
+ moltenMetalFluid = new Fluid("metal.molten").setLuminosity(15).setDensity(3000).setTemperature(2000).setViscosity(6000);
+ if (!FluidRegistry.registerFluid(moltenMetalFluid)) moltenMetalFluid = FluidRegistry.getFluid("metal.molten");
+ moltenMetal = new BlockMoltenMetal(moltenMetalFluid, Material.lava);
+
+ GameRegistry.registerBlock(shadowOre, "shadowOre");
+ GameRegistry.registerBlock(shadowBlock, "shadowBlock");
+ GameRegistry.registerBlock(smelter, "Smelter");
+ GameRegistry.registerBlock(molder, "Molder");
+ GameRegistry.registerBlock(jewelCraftingTable, "jewelCraftingTable");
+ GameRegistry.registerBlock(displayer, "Displayer");
+ GameRegistry.registerBlock(jewelAltar, "Altar");
+ GameRegistry.registerBlock(shadowEye, "Shadow Eye");
+ GameRegistry.registerBlock(handPedestal, "Stone Bricks Pedestal");
+ GameRegistry.registerBlock(shadowHand, "Shadow Hand");
+ GameRegistry.registerBlock(midasTouchBlock, "Midas Touch Block");
+ GameRegistry.registerBlock(moltenMetal, "moltenMetalLiquid");
+
+ GameRegistry.registerTileEntity(TileEntitySmelter.class, Variables.MODID + ":smelter");
+ GameRegistry.registerTileEntity(TileEntityMolder.class, Variables.MODID + ":molder");
+ GameRegistry.registerTileEntity(TileEntityJewelrsCraftingTable.class, Variables.MODID + ":table");
+ GameRegistry.registerTileEntity(TileEntityDisplayer.class, Variables.MODID + ":displayer");
+ GameRegistry.registerTileEntity(TileEntityBlockShadow.class, Variables.MODID + ":blockShadow");
+ GameRegistry.registerTileEntity(TileEntityAltar.class, Variables.MODID + ":altar");
+ GameRegistry.registerTileEntity(TileEntityShadowEye.class, Variables.MODID + ":shadowEye");
+ GameRegistry.registerTileEntity(TileEntityHandPedestal.class, Variables.MODID + ":handPedestal");
+ GameRegistry.registerTileEntity(TileEntityShadowHand.class, Variables.MODID + ":shadowHand");
+ GameRegistry.registerTileEntity(TileEntityMidasTouch.class, Variables.MODID + ":midsaTouch");
+
+ OreDictionary.registerOre("ingotShadow", new ItemStack(ItemList.shadowIngot));
+ OreDictionary.registerOre("oreShadow", new ItemStack(BlockList.shadowOre));
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/26/803e9d8d04e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/26/803e9d8d04e50014174fe663e69b8422
deleted file mode 100644
index 1aefce2..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/26/803e9d8d04e50014174fe663e69b8422
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- System.out.println(Block.getBlockFromItem(item.getItem()) + " " + item.getIconIndex());
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else{
-// System.out.println(Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1));
- return Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1);
- }
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/27/00520c9504e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/27/00520c9504e50014174fe663e69b8422
deleted file mode 100644
index fa89a3b..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/27/00520c9504e50014174fe663e69b8422
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
-// System.out.println(Block.getBlockFromItem(item.getItem()) + " " + item.getIconIndex());
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else{
-// System.out.println(Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1));
- return Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1);
- }
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/28/809e116607e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/28/809e116607e50014174fe663e69b8422
deleted file mode 100644
index 27f0233..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/28/809e116607e50014174fe663e69b8422
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly(Side.CLIENT)
- public boolean hasEffect(ItemStack item)
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIcon(JewelryNBT.item(stack), pass);
- else return Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1);
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/28/a04b7a8e91e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/28/a04b7a8e91e3001417b2e384bf7c3702
deleted file mode 100644
index 189332b..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/28/a04b7a8e91e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,25 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(0F, 1.0F, 1.0F);
- RenderManager.instance.getEntityRenderObject(midas.target).doRender(midas.target, 0D, 0D, 0D, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/29/4028feb585ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/29/4028feb585ea001411cee0f8f86532a4
new file mode 100644
index 0000000..29648dc
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/29/4028feb585ea001411cee0f8f86532a4
@@ -0,0 +1,100 @@
+package darkknight.jewelrycraft.events;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.gui.GuiChat;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderGameOverlayEvent;
+import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.util.Variables;
+
+public class ScreenHandler extends Gui
+{
+ private Minecraft mc;
+ public static NBTTagCompound tagCache = null;
+ public static int cooldown;
+ static ResourceLocation texture;
+
+ public ScreenHandler(Minecraft mc, ResourceLocation tex)
+ {
+ super();
+ this.mc = mc;
+ texture = tex;
+ }
+
+ @SubscribeEvent
+ public void renderScreen(RenderGameOverlayEvent event)
+ {
+ if (event.isCancelable() || event.type != ElementType.ALL || tagCache == null) return;
+ if (!mc.gameSettings.showDebugInfo && !(mc.currentScreen instanceof GuiChat)){
+ int count = 0;
+ int size = 32;
+ ScaledResolution resolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
+ if (tagCache.hasKey("cursePoints") && tagCache.getInteger("cursePoints") > 0){
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ for(Curse curse: Curse.getCurseList()){
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ drawTexturedModalRect(-16, -16 + (size - 6) * count, 0, 32, 144, 60);
+ count++;
+ }
+ }
+ mc.renderEngine.bindTexture(texture);
+ count = 0;
+ for(Curse curse: Curse.getCurseList())
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ int tag = curse.getID();
+ GL11.glPushMatrix();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glScalef(0.45f, 0.45f, 0.0f);
+ drawTexturedModalRect(28, 18 + (size + 26) * count, tag % size * size, tag / size * size, size, size);
+ GL11.glPopMatrix();
+ count++;
+ }
+ count = 0;
+ size = 16;
+ for(Curse curse: Curse.getCurseList())
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ int tag = curse.getID();
+ mc.fontRenderer.drawStringWithShadow(curse.getName().split(":")[1], 30, 11 + (size + 10) * count, 16777215);
+ if (tagCache.getInteger(curse.getName()) == 2){
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GL11.glColor4f(1f, 1f, 1f, 0.5f);
+ drawTexturedModalRect(95, 7 + (size + 10) * count, 3 * size, 0, size, size);
+ GL11.glPopMatrix();
+ }
+ count++;
+ }
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1f, 1f, 1f, 1.0f);
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ count = 0;
+ size = 16;
+ if (tagCache.getFloat("BlueHeart") > 0){
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 0 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlueHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
+ }
+ count++;
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ if (tagCache.getFloat("BlackHeart") > 0){
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 1 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlackHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
+ }
+ count++;
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ if (tagCache.getFloat("WhiteHeart") > 0)
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 2 * size, 1 * size, size, size);
+ GL11.glPopMatrix();
+ }
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/29/60372ebb47e700141e05cdbaeb682437 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/29/60372ebb47e700141e05cdbaeb682437
deleted file mode 100644
index 98a9aba..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/29/60372ebb47e700141e05cdbaeb682437
+++ /dev/null
@@ -1,128 +0,0 @@
-package darkknight.jewelrycraft.events;
-
-import java.util.Iterator;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import darkknight.jewelrycraft.curses.CurseList;
-import darkknight.jewelrycraft.entities.renders.RenderHelper;
-import darkknight.jewelrycraft.item.render.BraceletRender;
-import darkknight.jewelrycraft.item.render.EarringsRender;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.model.ModelBracelet;
-import darkknight.jewelrycraft.util.JewelryNBT;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
-
-public class PlayerRenderHandler
-{
- MaskRender mask = new MaskRender();
- EarringsRender earrings = new EarringsRender();
- BraceletRender bracelet = new BraceletRender();
-// public static String[] infamyCache = new String[]{};
- public static NBTTagCompound playersInfo = new NBTTagCompound();
-
- @SubscribeEvent
- public void renderScreen(RenderPlayerEvent.Specials.Post event)
- {
- ModelBiped main = event.renderer.modelBipedMain;
- Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
- if (playersInfo != null){
- while (players.hasNext()){
- EntityPlayer player = players.next();
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(1.6f, 1.6f, 1.6f);
- GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- GL11.glPopMatrix();
- }
- if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(0.07f, 0.07f, 0.07f);
- GL11.glTranslatef(0.0F, 3.0F, -2.0F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- earrings.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- GL11.glPopMatrix();
- }
- for(int i = 10; i <= 13; i++)
- if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
- if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
- if (i / 12 == 1){
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- System.out.println(nbt);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
- }else{
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- System.out.println(JewelryNBT.ingotColor(item));
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- }
- GL11.glPopMatrix();
- }
- }
- }
- }
-
- /**
- * @param string
- * @return
- */
- private boolean checkPlayerInfamy(String string)
- {
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
- if(playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
-// for(int i = 0; i < infamyCache.length; i++)
-// if (infamyCache[i].equals(string)) return true;
- return false;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/29/707801098ee3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/29/707801098ee3001417b2e384bf7c3702
deleted file mode 100644
index e357f13..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/29/707801098ee3001417b2e384bf7c3702
+++ /dev/null
@@ -1,24 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor4f(1F, 0.0F, 1.0F, 0.3F);
- RenderManager.instance.renderEntityStatic(midas.target, 1F, false);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/d00cc0cf74e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/29/e0f462ef84ea001411cee0f8f86532a4
index dc4d380..fb39bdd 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/d00cc0cf74e70014115de2bb951f0adf
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/29/e0f462ef84ea001411cee0f8f86532a4
@@ -18,7 +18,8 @@ import darkknight.jewelrycraft.util.Variables;
public class CursePentagram extends Curse
{
- ResourceLocation curse = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
+ float rot = 0F;
+
public CursePentagram(int id, String name, int text)
{
super(id, name, text);
@@ -26,8 +27,7 @@ public class CursePentagram extends Curse
@Override
public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- }
+ {}
public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
{
@@ -35,15 +35,18 @@ public class CursePentagram extends Curse
GL11.glColor4f(1, 1, 1, 1);
Tessellator tessellator = Tessellator.instance;
TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
- texturemanager.bindTexture(curse);
+ texturemanager.bindTexture(Variables.CURSES_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
GL11.glScalef(0.1F, 0.1F, 0.1F);
- GL11.glTranslatef(1F, 2F, 1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
float f = 0.00390625F;
float f1 = 0.00390625F;
int x = 0;
int y = 0;
- int u = 0;
+ int u = 32 * 7;
int v = 0;
int width = 32;
int height = 32;
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2a/a080c22b73e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2a/a080c22b73e70014115de2bb951f0adf
deleted file mode 100644
index cff4141..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2a/a080c22b73e70014115de2bb951f0adf
+++ /dev/null
@@ -1,48 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.client.renderer.ItemRenderer;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.item.render.MaskRender;
-
-public class CursePentagram extends Curse
-{
- MaskRender mask = new MaskRender();
- public CursePentagram(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- }
-
- public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
- {
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- Tessellator tessellator = Tessellator.instance;
- ItemStack itemStack = new ItemStack(Items.apple);
- IIcon iicon = itemStack.getIconIndex();
- float f = iicon.getMinU();
- float f1 = iicon.getMaxU();
- float f2 = iicon.getMinV();
- float f3 = iicon.getMaxV();
- ItemRenderer.renderItemIn2D(tessellator, f1, f2, f, f3, iicon.getIconWidth(), iicon.getIconHeight(), 0.0625F);
- GL11.glPopMatrix();
- }
-
- public String getDescription()
- {
- return "The Dark Lord has misterious ways of showing you his love.";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2a/e0efd1ff96ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2a/e0efd1ff96ea001411cee0f8f86532a4
new file mode 100644
index 0000000..081a125
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2a/e0efd1ff96ea001411cee0f8f86532a4
@@ -0,0 +1,116 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_DST_ALPHA);
+ GL11.glColor3f(1F, 0F, 0F);
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2b/0026ada605e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2b/0026ada605e50014174fe663e69b8422
deleted file mode 100644
index 4bb6fb3..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2b/0026ada605e50014174fe663e69b8422
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIcon(JewelryNBT.item(stack), pass);
- else{
-// System.out.println(Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1));
- return Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1);
- }
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2b/c0710fb874e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2b/c0710fb874e70014115de2bb951f0adf
deleted file mode 100644
index f0cd611..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2b/c0710fb874e70014115de2bb951f0adf
+++ /dev/null
@@ -1,62 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.ItemRenderer;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.client.renderer.texture.TextureManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.World;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.util.Variables;
-
-public class CursePentagram extends Curse
-{
- ResourceLocation curse = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
- public CursePentagram(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- }
-
- public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
- {
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- Tessellator tessellator = Tessellator.instance;
- TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
- texturemanager.bindTexture(curse);
- GL11.glScalef(0.1F, 0.1F, 0.1F);
- GL11.glTranslatef(1F, 1F, 1F);
- float f = 0.00390625F;
- float f1 = 0.00390625F;
- int x = 0;
- int y = 0;
- int u = 0;
- int v = 0;
- int width = 32;
- int height = 32;
- tessellator.startDrawingQuads();
- tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
- tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
- tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
- tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
- tessellator.draw();
- GL11.glPopMatrix();
- }
-
- public String getDescription()
- {
- return "The Dark Lord has misterious ways of showing you his love.";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2c/702bef2597ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2c/702bef2597ea001411cee0f8f86532a4
new file mode 100644
index 0000000..1eca00b
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2c/702bef2597ea001411cee0f8f86532a4
@@ -0,0 +1,116 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ GL11.glColor3f(1F, 0F, 0F);
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2d/c06ef67e91e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2d/c06ef67e91e3001417b2e384bf7c3702
deleted file mode 100644
index 17f8dd6..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2d/c06ef67e91e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,25 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(1F, 0.0F, 1.0F);
- RenderManager.instance.renderEntityStatic(midas.target, 1F, false);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2e/e03f878f72e300141084bb8bfb075c08 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2e/e03f878f72e300141084bb8bfb075c08
deleted file mode 100644
index fe769ce..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2e/e03f878f72e300141084bb8bfb075c08
+++ /dev/null
@@ -1,54 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2f/10f36a6990e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2f/10f36a6990e3001417b2e384bf7c3702
deleted file mode 100644
index 0824233..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2f/10f36a6990e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,36 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart)){
- world.setBlock((int)target.posX, (int)target.posY, (int)target.posZ, BlockList.midasTouchBlock, 0, 2);
- ((EntityLiving)target).hurtTime = 0;
- TileEntity midasTouchVictim = new TileEntityMidasTouch(target);
- world.setTileEntity((int)target.posX, (int)target.posY, (int)target.posZ, midasTouchVictim);
- target.setDead();
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2f/4004ffac98ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2f/4004ffac98ea001411cee0f8f86532a4
new file mode 100644
index 0000000..f7a4774
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2f/4004ffac98ea001411cee0f8f86532a4
@@ -0,0 +1,140 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+ float rot = 0F;
+
+ @SubscribeEvent
+ public void renderHand(RenderHandEvent event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+// GL11.glTranslatef(-16F, 15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2f/c07570fc8de3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2f/c07570fc8de3001417b2e384bf7c3702
deleted file mode 100644
index 4ea7332..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/2f/c07570fc8de3001417b2e384bf7c3702
+++ /dev/null
@@ -1,24 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glColor4f(0F, 0.0F, 0.0F, 1F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- RenderManager.instance.renderEntityStatic(midas.target, 1F, false);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3/e0e45da796ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3/e0e45da796ea001411cee0f8f86532a4
new file mode 100644
index 0000000..76c9b60
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3/e0e45da796ea001411cee0f8f86532a4
@@ -0,0 +1,115 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glColor3f(0F, 1F, 1F);
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/31/c0b15c7987ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/31/c0b15c7987ea001411cee0f8f86532a4
new file mode 100644
index 0000000..32ecfa6
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/31/c0b15c7987ea001411cee0f8f86532a4
@@ -0,0 +1,65 @@
+package darkknight.jewelrycraft.curses;
+
+import org.lwjgl.opengl.GL11;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.SharedMonsterAttributes;
+import net.minecraft.entity.monster.EntityMob;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import darkknight.jewelrycraft.damage.DamageSourceList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.MaskRender;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.PlayerUtils;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CurseInfamy extends Curse
+{
+ MaskRender mask = new MaskRender();
+ public CurseInfamy(String name, int txtID, String pack)
+ {
+ super(name, txtID, pack);
+ }
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {
+ if (rand.nextInt(5) == 0 && !world.isRemote && !(target instanceof EntityMob) && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && target.canAttackWithItem()){
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
+ if (playerInfo.getFloat("BlackHeart") < 20F) playerInfo.setFloat("BlackHeart", playerInfo.getFloat("BlackHeart") + 1.0F);
+ if (player.getMaxHealth() >= 3F){
+ player.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(player.getMaxHealth() - 1.0F);
+ player.setHealth(player.getHealth() - 1.0F);
+ }
+ JewelrycraftUtil.addCursePoints(player, 10);
+ }
+ }
+
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {
+ float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
+ float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
+ float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ GL11.glRotatef(yawOffset, 0, -1, 0);
+ GL11.glRotatef(yaw - 90, 0, 1, 0);
+ GL11.glRotatef(pitch, 0, 0, -1);
+ GL11.glRotatef(90F, 0, 1F, 0F);
+ RenderHelper.translateToHeadLevel(player);
+ GL11.glScalef(1.6f, 1.6f, 1.6f);
+ GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
+ mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "What have you done?!";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/32/206828078de3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/32/206828078de3001417b2e384bf7c3702
deleted file mode 100644
index 9687636..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/32/206828078de3001417b2e384bf7c3702
+++ /dev/null
@@ -1,37 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.monster.EntityMob;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart)){
- world.setBlock((int)target.posX, (int)target.posY, (int)target.posZ, BlockList.midasTouchBlock, 0, 2);
- TileEntity midasTouchVictim = new TileEntityMidasTouch(target);
- world.setTileEntity((int)target.posX, (int)target.posY, (int)target.posZ, midasTouchVictim);
- target.setDead();
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/32/30ca78699ae3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/32/30ca78699ae3001412c4c4819c88e86b
deleted file mode 100644
index 3ac4004..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/32/30ca78699ae3001412c4c4819c88e86b
+++ /dev/null
@@ -1,86 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.ArrayList;
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- @Override
- public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune)
- {
- ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
-
- TileEntity tile = world.getTileEntity(x, y, z);
- if (tile != null && ((TileEntityMidasTouch)tile).target != null)
- ret.add(new ItemStack(Items.gold_nugget, (int)(((TileEntityMidasTouch)tile).target.width*((TileEntityMidasTouch)tile).target.height), 0));
-
- return ret;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null) this.setBlockBounds(0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0F, 0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2, ((TileEntityMidasTouch)tile).target.height, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2);
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/32/50aa567f09e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/32/50aa567f09e50014174fe663e69b8422
deleted file mode 100644
index 180f11f..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/32/50aa567f09e50014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- public static Item goldObj;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldObj = new ItemGoldObj().setUnlocalizedName(Variables.MODID + ".goldObject").setTextureName(Variables.MODID + ":goldObj");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldObj, "goldObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/32/c03a5cf1aeea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/32/c03a5cf1aeea001411cee0f8f86532a4
new file mode 100644
index 0000000..34cc2ed
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/32/c03a5cf1aeea001411cee0f8f86532a4
@@ -0,0 +1,18 @@
+package darkknight.jewelrycraft.entities;
+
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.JewelrycraftMod;
+import darkknight.jewelrycraft.util.Variables;
+
+public class EntityList
+{
+
+ public static void preInit(FMLPreInitializationEvent e)
+ {
+
+ createEntity(EntityHeart.class, Variables.MODID + ".Heart", 0xFF0000, 0xFF0000, false);
+ createEntity(EntityHalfHeart.class, Variables.MODID + ".Half-Heart", 0x000000, 0xFF0000, false);
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/33/f001bde393e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/33/f001bde393e3001412c4c4819c88e86b
deleted file mode 100644
index fe769ce..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/33/f001bde393e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,54 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/35/5069282604e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/35/5069282604e50014174fe663e69b8422
deleted file mode 100644
index d3ac3b6..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/35/5069282604e50014174fe663e69b8422
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- System.out.println(item.getItem().getIconIndex(JewelryNBT.item(stack)));
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else return Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1);
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/36/f05b927173e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/36/f05b927173e70014115de2bb951f0adf
deleted file mode 100644
index 2844d05..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/36/f05b927173e70014115de2bb951f0adf
+++ /dev/null
@@ -1,54 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.ItemRenderer;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.client.renderer.texture.TextureManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.item.render.MaskRender;
-
-public class CursePentagram extends Curse
-{
- MaskRender mask = new MaskRender();
- public CursePentagram(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- }
-
- public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
- {
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- Tessellator tessellator = Tessellator.instance;
- ItemStack itemStack = new ItemStack(Items.apple);
- TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
- texturemanager.bindTexture(texturemanager.getResourceLocation(itemStack.getItemSpriteNumber()));
- IIcon iicon = itemStack.getIconIndex();
- float f = iicon.getMinU();
- float f1 = iicon.getMaxU();
- float f2 = iicon.getMinV();
- float f3 = iicon.getMaxV();
- GL11.glRotatef(90F, 1F, 0F, 0F);
- System.out.println("Hello");
- ItemRenderer.renderItemIn2D(tessellator, f1, f2, f, f3, iicon.getIconWidth(), iicon.getIconHeight(), 0.0625F);
- GL11.glPopMatrix();
- }
-
- public String getDescription()
- {
- return "The Dark Lord has misterious ways of showing you his love.";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/00d07f6a97ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/00d07f6a97ea001411cee0f8f86532a4
new file mode 100644
index 0000000..4e1a3c1
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/00d07f6a97ea001411cee0f8f86532a4
@@ -0,0 +1,66 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CursePentagram extends Curse
+{
+ float rot = 0F;
+
+ public CursePentagram(String name, int txtID, String pack)
+ {
+ super(name, txtID, pack);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ @Override
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glColor4f(1F, 1F, 1F, 0.3F);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "The Dark Lord has misterious ways of showing you his love.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/303670b098ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/303670b098ea001411cee0f8f86532a4
new file mode 100644
index 0000000..fe6f14a
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/303670b098ea001411cee0f8f86532a4
@@ -0,0 +1,140 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+ float rot = 0F;
+
+ @SubscribeEvent
+ public void renderHand(RenderHandEvent event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-1F, 1F, -1F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/600d023b95e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/600d023b95e3001412c4c4819c88e86b
deleted file mode 100644
index 898a587..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/600d023b95e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,74 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
- TileEntity tile = world.getTileEntity(x, y, z);
- if(((TileEntityMidasTouch)tile).target != null){
- System.out.println(this.getBlockBoundsMinY());
-// this.setBlockBounds((float)((TileEntityMidasTouch)tile).target.boundingBox.minX, (float)((TileEntityMidasTouch)tile).target.boundingBox.minY, (float)((TileEntityMidasTouch)tile).target.boundingBox.minZ, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxX, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxY, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxZ);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/8062bf2107e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/8062bf2107e50014174fe663e69b8422
deleted file mode 100644
index 71b20ff..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/8062bf2107e50014174fe663e69b8422
+++ /dev/null
@@ -1,96 +0,0 @@
-package darkknight.jewelrycraft.proxy;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.item.Item;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.MinecraftForgeClient;
-import net.minecraftforge.common.MinecraftForge;
-import cpw.mods.fml.client.registry.ClientRegistry;
-import cpw.mods.fml.client.registry.RenderingRegistry;
-import cpw.mods.fml.common.registry.VillagerRegistry;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.client.InventoryTabVanilla;
-import darkknight.jewelrycraft.client.TabJewelry;
-import darkknight.jewelrycraft.client.TabRegistry;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.entities.renders.HeartRender;
-import darkknight.jewelrycraft.events.PlayerRenderHandler;
-import darkknight.jewelrycraft.events.ScreenHandler;
-import darkknight.jewelrycraft.item.ItemList;
-import darkknight.jewelrycraft.item.render.ItemRender;
-import darkknight.jewelrycraft.model.ModelDisplayer;
-import darkknight.jewelrycraft.model.ModelHalfHeart;
-import darkknight.jewelrycraft.model.ModelHandPedestal;
-import darkknight.jewelrycraft.model.ModelHeart;
-import darkknight.jewelrycraft.model.ModelJewlersCraftingBench;
-import darkknight.jewelrycraft.model.ModelMolder;
-import darkknight.jewelrycraft.model.ModelShadowEye;
-import darkknight.jewelrycraft.model.ModelShadowHand;
-import darkknight.jewelrycraft.model.ModelSmelter;
-import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
-import darkknight.jewelrycraft.tileentity.TileEntityHandPedestal;
-import darkknight.jewelrycraft.tileentity.TileEntityJewelrsCraftingTable;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-import darkknight.jewelrycraft.tileentity.TileEntityMolder;
-import darkknight.jewelrycraft.tileentity.TileEntityShadowEye;
-import darkknight.jewelrycraft.tileentity.TileEntityShadowHand;
-import darkknight.jewelrycraft.tileentity.TileEntitySmelter;
-import darkknight.jewelrycraft.tileentity.renders.TileEntityDisplayerRender;
-import darkknight.jewelrycraft.tileentity.renders.TileEntityHandPedestalRender;
-import darkknight.jewelrycraft.tileentity.renders.TileEntityJewelrsCraftingTableRender;
-import darkknight.jewelrycraft.tileentity.renders.TileEntityMidasTouchRender;
-import darkknight.jewelrycraft.tileentity.renders.TileEntityMolderRender;
-import darkknight.jewelrycraft.tileentity.renders.TileEntityShadowEyeRender;
-import darkknight.jewelrycraft.tileentity.renders.TileEntityShadowHandRender;
-import darkknight.jewelrycraft.tileentity.renders.TileEntitySmelterRender;
-import darkknight.jewelrycraft.util.JewelrycraftUtil;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ClientProxy extends CommonProxy
-{
- @Override
- public void preInit()
- {
- ResourceLocation pedestalResourceLocation = new ResourceLocation(Variables.MODID, "textures/tileentities/BricksPedestal.png");
- TileEntityHandPedestalRender pedestalRender = new TileEntityHandPedestalRender(new ModelHandPedestal(pedestalResourceLocation), pedestalResourceLocation);
- ResourceLocation shadowResourceLocation = new ResourceLocation(Variables.MODID, "textures/tileentities/ShadowHand.png");
- TileEntityShadowHandRender shadowHandRender = new TileEntityShadowHandRender(new ModelShadowHand(shadowResourceLocation), shadowResourceLocation);
-
- ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmelter.class, new TileEntitySmelterRender());
- ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMolder.class, new TileEntityMolderRender());
- ClientRegistry.bindTileEntitySpecialRenderer(TileEntityJewelrsCraftingTable.class, new TileEntityJewelrsCraftingTableRender());
- ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDisplayer.class, new TileEntityDisplayerRender());
- ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShadowEye.class, new TileEntityShadowEyeRender());
- ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMidasTouch.class, new TileEntityMidasTouchRender());
- ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHandPedestal.class, pedestalRender);
- ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShadowHand.class, shadowHandRender);
-
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.displayer), new ItemRender(new TileEntityDisplayerRender(), new TileEntityDisplayer(), new ModelDisplayer()));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.jewelCraftingTable), new ItemRender(new TileEntityJewelrsCraftingTableRender(), new TileEntityJewelrsCraftingTable(), new ModelJewlersCraftingBench()));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.smelter), new ItemRender(new TileEntitySmelterRender(), new TileEntitySmelter(), new ModelSmelter()));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.molder), new ItemRender(new TileEntityMolderRender(), new TileEntityMolder(), new ModelMolder()));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.shadowEye), new ItemRender(new TileEntityShadowEyeRender(), new TileEntityShadowEye(), new ModelShadowEye()));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.handPedestal), new ItemRender(pedestalRender, new TileEntityHandPedestal(), new ModelHandPedestal(pedestalResourceLocation)));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.shadowHand), new ItemRender(shadowHandRender, new TileEntityShadowHand(), new ModelShadowHand(shadowResourceLocation)));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ItemList.goldObj), new ItemRender());
-
- VillagerRegistry.instance().registerVillagerSkin(3000, new ResourceLocation(Variables.MODID, "textures/entities/jeweler.png"));
-
- RenderingRegistry.registerEntityRenderingHandler(EntityHeart.class, new HeartRender(new ModelHeart(), 0.25F));
- RenderingRegistry.registerEntityRenderingHandler(EntityHalfHeart.class, new HeartRender(new ModelHalfHeart(), 0.25F));
-
- TabRegistry.registerTab(new InventoryTabVanilla());
- TabRegistry.registerTab(new TabJewelry());
- MinecraftForge.EVENT_BUS.register(new TabRegistry());
- MinecraftForge.EVENT_BUS.register(new PlayerRenderHandler());
- ResourceLocation jeweleryTexture = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
- MinecraftForge.EVENT_BUS.register(new ScreenHandler(Minecraft.getMinecraft(), jeweleryTexture));
- }
-
- @Override
- public void postInit()
- {
- JewelrycraftUtil.addStuff();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/b01358c6fce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/b01358c6fce40014174fe663e69b8422
deleted file mode 100644
index 62c96d7..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/37/b01358c6fce40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static ItemGoldifiedObject goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = (ItemGoldifiedObject)new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e1/508b21c574e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/38/000d9ccf88ea001411cee0f8f86532a4
index 2ef4c69..68adc20 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e1/508b21c574e70014115de2bb951f0adf
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/38/000d9ccf88ea001411cee0f8f86532a4
@@ -1,49 +1,49 @@
package darkknight.jewelrycraft.curses;
import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderPlayerEvent;
import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.item.render.MaskRender;
import darkknight.jewelrycraft.util.Variables;
public class CursePentagram extends Curse
{
- ResourceLocation curse = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
- public CursePentagram(int id, String name, int text)
+ float rot = 0F;
+
+ public CursePentagram(String name, int txtID, String pack)
{
- super(id, name, text);
+ super(name, txtID, pack);
}
@Override
public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- }
+ {}
- public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ @Override
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Post event)
{
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
GL11.glPushMatrix();
GL11.glColor4f(1, 1, 1, 1);
Tessellator tessellator = Tessellator.instance;
TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
- texturemanager.bindTexture(curse);
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, -25F, -16F);
GL11.glRotatef(90F, 1F, 0F, 0F);
- GL11.glTranslatef(1F, 1F, 1F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
float f = 0.00390625F;
float f1 = 0.00390625F;
int x = 0;
int y = 0;
- int u = 0;
+ int u = 32 * 7;
int v = 0;
int width = 32;
int height = 32;
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3a/90d0928795ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3a/90d0928795ea001411cee0f8f86532a4
new file mode 100644
index 0000000..dce2abb
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3a/90d0928795ea001411cee0f8f86532a4
@@ -0,0 +1,113 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int gemCol = -1;
+ int ingotCol = -1;
+ float size = 0.055F;
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
+ float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
+ float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ GL11.glRotatef(yawOffset, 0, -1, 0);
+ GL11.glRotatef(yaw - 90, 0, 1, 0);
+ GL11.glRotatef(pitch, 0, 0, -1);
+ GL11.glRotatef(90F, 0, 1F, 0F);
+ RenderHelper.translateToHeadLevel(player);
+ GL11.glScalef(0.07f, 0.07f, 0.07f);
+ GL11.glTranslatef(0.0F, 3.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) gemCol = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotCol = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)ingotCol, (float)gemCol, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3a/c05f454b92ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3a/c05f454b92ea001411cee0f8f86532a4
new file mode 100644
index 0000000..4734712
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3a/c05f454b92ea001411cee0f8f86532a4
@@ -0,0 +1,280 @@
+package darkknight.jewelrycraft.model;
+
+import java.awt.Color;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import org.lwjgl.opengl.GL11;
+
+/**
+ * ModelBiped - Either Mojang or a mod author Created using Tabula 4.1.1
+ */
+public class ModelBracelet extends ModelBase
+{
+ public ModelRenderer metal1;
+ public ModelRenderer metal2;
+ public ModelRenderer metal3;
+ public ModelRenderer metal4;
+ public ModelRenderer gem1;
+ public ModelRenderer gem2;
+ public ModelRenderer gem3;
+ public ModelRenderer gem4;
+ public ModelRenderer gem5;
+ public ModelRenderer gem6;
+ public ModelRenderer gem7;
+ public ModelRenderer gem8;
+ public ModelRenderer gem9;
+
+ public ModelBracelet()
+ {
+ this.textureWidth = 16;
+ this.textureHeight = 16;
+ this.metal4 = new ModelRenderer(this, 0, 8);
+ this.metal4.setRotationPoint(-5.0F, 12.0F, -2.0F);
+ this.metal4.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4, 0.0F);
+ this.gem4 = new ModelRenderer(this, 0, 0);
+ this.gem4.setRotationPoint(-3.0F, 12.8F, -3.5F);
+ this.gem4.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.setRotateAngle(gem4, 0.0F, 0.008901179185171082F, 0.0F);
+ this.gem3 = new ModelRenderer(this, 0, 0);
+ this.gem3.setRotationPoint(-4.8F, 12.2F, -3.5F);
+ this.gem3.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem2 = new ModelRenderer(this, 0, 0);
+ this.gem2.setRotationPoint(-1.5F, 12.8F, -3.5F);
+ this.gem2.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem1 = new ModelRenderer(this, 0, 0);
+ this.gem1.setRotationPoint(0.3F, 12.2F, -3.5F);
+ this.gem1.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.metal1 = new ModelRenderer(this, 0, 8);
+ this.metal1.setRotationPoint(-5.0F, 12.0F, -3.0F);
+ this.metal1.addBox(0.0F, 0.0F, 0.0F, 6, 2, 1, 0.0F);
+ this.gem6 = new ModelRenderer(this, 0, 0);
+ this.gem6.setRotationPoint(-4.3F, 12.7F, -3.5F);
+ this.gem6.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
+ this.gem7 = new ModelRenderer(this, 0, 0);
+ this.gem7.setRotationPoint(-3.8F, 12.7F, -3.5F);
+ this.gem7.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem8 = new ModelRenderer(this, 0, 0);
+ this.gem8.setRotationPoint(-0.2F, 12.7F, -3.5F);
+ this.gem8.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
+ this.metal2 = new ModelRenderer(this, 0, 8);
+ this.metal2.setRotationPoint(-5.0F, 12.0F, 2.0F);
+ this.metal2.addBox(0.0F, 0.0F, 0.0F, 6, 2, 1, 0.0F);
+ this.gem5 = new ModelRenderer(this, 0, 0);
+ this.gem5.setRotationPoint(-2.5F, 12.3F, -3.5F);
+ this.gem5.addBox(0.0F, 0.0F, 0.0F, 2, 3, 1, 0.0F);
+ this.metal3 = new ModelRenderer(this, 0, 8);
+ this.metal3.setRotationPoint(0.0F, 12.0F, -2.0F);
+ this.metal3.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4, 0.0F);
+ this.gem9 = new ModelRenderer(this, 0, 0);
+ this.gem9.setRotationPoint(-0.7F, 12.7F, -3.5F);
+ this.gem9.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ }
+
+ @Override
+ public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
+ {
+ GL11.glDisable(GL11.GL_LIGHTING);
+ if ((int)f3 != -1){
+ int ingotColor = (int)f3;
+ int red = (ingotColor >> 16) & 0xff;
+ int green = (ingotColor >> 8) & 0xff;
+ int blue = ingotColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ this.metal1.render(f5);
+ this.metal2.render(f5);
+ this.metal3.render(f5);
+ this.metal4.render(f5);
+ }
+ if ((int)f4 != -1){
+ int gemColor = (int)f4;
+ int red = gemColor >> 16 & 0xff;
+ int green = gemColor >> 8 & 0xff;
+ int blue = gemColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE_MINUS_DST_COLOR);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem4.offsetX, this.gem4.offsetY, this.gem4.offsetZ);
+ GL11.glTranslatef(this.gem4.rotationPointX * f5, this.gem4.rotationPointY * f5, this.gem4.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem4.offsetX, -this.gem4.offsetY, -this.gem4.offsetZ);
+ GL11.glTranslatef(-this.gem4.rotationPointX * f5, -this.gem4.rotationPointY * f5, -this.gem4.rotationPointZ * f5);
+ this.gem4.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem3.offsetX, this.gem3.offsetY, this.gem3.offsetZ);
+ GL11.glTranslatef(this.gem3.rotationPointX * f5, this.gem3.rotationPointY * f5, this.gem3.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem3.offsetX, -this.gem3.offsetY, -this.gem3.offsetZ);
+ GL11.glTranslatef(-this.gem3.rotationPointX * f5, -this.gem3.rotationPointY * f5, -this.gem3.rotationPointZ * f5);
+ this.gem3.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem2.offsetX, this.gem2.offsetY, this.gem2.offsetZ);
+ GL11.glTranslatef(this.gem2.rotationPointX * f5, this.gem2.rotationPointY * f5, this.gem2.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem2.offsetX, -this.gem2.offsetY, -this.gem2.offsetZ);
+ GL11.glTranslatef(-this.gem2.rotationPointX * f5, -this.gem2.rotationPointY * f5, -this.gem2.rotationPointZ * f5);
+ this.gem2.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem1.offsetX, this.gem1.offsetY, this.gem1.offsetZ);
+ GL11.glTranslatef(this.gem1.rotationPointX * f5, this.gem1.rotationPointY * f5, this.gem1.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem1.offsetX, -this.gem1.offsetY, -this.gem1.offsetZ);
+ GL11.glTranslatef(-this.gem1.rotationPointX * f5, -this.gem1.rotationPointY * f5, -this.gem1.rotationPointZ * f5);
+ this.gem1.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem6.offsetX, this.gem6.offsetY, this.gem6.offsetZ);
+ GL11.glTranslatef(this.gem6.rotationPointX * f5, this.gem6.rotationPointY * f5, this.gem6.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem6.offsetX, -this.gem6.offsetY, -this.gem6.offsetZ);
+ GL11.glTranslatef(-this.gem6.rotationPointX * f5, -this.gem6.rotationPointY * f5, -this.gem6.rotationPointZ * f5);
+ this.gem6.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem7.offsetX, this.gem7.offsetY, this.gem7.offsetZ);
+ GL11.glTranslatef(this.gem7.rotationPointX * f5, this.gem7.rotationPointY * f5, this.gem7.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem7.offsetX, -this.gem7.offsetY, -this.gem7.offsetZ);
+ GL11.glTranslatef(-this.gem7.rotationPointX * f5, -this.gem7.rotationPointY * f5, -this.gem7.rotationPointZ * f5);
+ this.gem7.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem8.offsetX, this.gem8.offsetY, this.gem8.offsetZ);
+ GL11.glTranslatef(this.gem8.rotationPointX * f5, this.gem8.rotationPointY * f5, this.gem8.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem8.offsetX, -this.gem8.offsetY, -this.gem8.offsetZ);
+ GL11.glTranslatef(-this.gem8.rotationPointX * f5, -this.gem8.rotationPointY * f5, -this.gem8.rotationPointZ * f5);
+ this.gem8.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem5.offsetX, this.gem5.offsetY, this.gem5.offsetZ);
+ GL11.glTranslatef(this.gem5.rotationPointX * f5, this.gem5.rotationPointY * f5, this.gem5.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem5.offsetX, -this.gem5.offsetY, -this.gem5.offsetZ);
+ GL11.glTranslatef(-this.gem5.rotationPointX * f5, -this.gem5.rotationPointY * f5, -this.gem5.rotationPointZ * f5);
+ this.gem5.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem9.offsetX, this.gem9.offsetY, this.gem9.offsetZ);
+ GL11.glTranslatef(this.gem9.rotationPointX * f5, this.gem9.rotationPointY * f5, this.gem9.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem9.offsetX, -this.gem9.offsetY, -this.gem9.offsetZ);
+ GL11.glTranslatef(-this.gem9.rotationPointX * f5, -this.gem9.rotationPointY * f5, -this.gem9.rotationPointZ * f5);
+ this.gem9.render(f5);
+ GL11.glPopMatrix();
+ GL11.glDisable(GL11.GL_BLEND);
+ }
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glTranslatef(0F, 1.5F, 0F);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ if ((int)f3 != -1){
+ int ingotColor = (int)f3;
+ int red = (ingotColor >> 16) & 0xff;
+ int green = (ingotColor >> 8) & 0xff;
+ int blue = ingotColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ this.metal1.render(f5);
+ this.metal2.render(f5);
+ this.metal3.render(f5);
+ this.metal4.render(f5);
+ }
+ if ((int)f4 != -1){
+ int gemColor = (int)f4;
+ int red = gemColor >> 16 & 0xff;
+ int green = gemColor >> 8 & 0xff;
+ int blue = gemColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE_MINUS_DST_COLOR);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem4.offsetX, this.gem4.offsetY, this.gem4.offsetZ);
+ GL11.glTranslatef(this.gem4.rotationPointX * f5, this.gem4.rotationPointY * f5, this.gem4.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem4.offsetX, -this.gem4.offsetY, -this.gem4.offsetZ);
+ GL11.glTranslatef(-this.gem4.rotationPointX * f5, -this.gem4.rotationPointY * f5, -this.gem4.rotationPointZ * f5);
+ this.gem4.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem3.offsetX, this.gem3.offsetY, this.gem3.offsetZ);
+ GL11.glTranslatef(this.gem3.rotationPointX * f5, this.gem3.rotationPointY * f5, this.gem3.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem3.offsetX, -this.gem3.offsetY, -this.gem3.offsetZ);
+ GL11.glTranslatef(-this.gem3.rotationPointX * f5, -this.gem3.rotationPointY * f5, -this.gem3.rotationPointZ * f5);
+ this.gem3.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem2.offsetX, this.gem2.offsetY, this.gem2.offsetZ);
+ GL11.glTranslatef(this.gem2.rotationPointX * f5, this.gem2.rotationPointY * f5, this.gem2.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem2.offsetX, -this.gem2.offsetY, -this.gem2.offsetZ);
+ GL11.glTranslatef(-this.gem2.rotationPointX * f5, -this.gem2.rotationPointY * f5, -this.gem2.rotationPointZ * f5);
+ this.gem2.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem1.offsetX, this.gem1.offsetY, this.gem1.offsetZ);
+ GL11.glTranslatef(this.gem1.rotationPointX * f5, this.gem1.rotationPointY * f5, this.gem1.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem1.offsetX, -this.gem1.offsetY, -this.gem1.offsetZ);
+ GL11.glTranslatef(-this.gem1.rotationPointX * f5, -this.gem1.rotationPointY * f5, -this.gem1.rotationPointZ * f5);
+ this.gem1.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem6.offsetX, this.gem6.offsetY, this.gem6.offsetZ);
+ GL11.glTranslatef(this.gem6.rotationPointX * f5, this.gem6.rotationPointY * f5, this.gem6.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem6.offsetX, -this.gem6.offsetY, -this.gem6.offsetZ);
+ GL11.glTranslatef(-this.gem6.rotationPointX * f5, -this.gem6.rotationPointY * f5, -this.gem6.rotationPointZ * f5);
+ this.gem6.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem7.offsetX, this.gem7.offsetY, this.gem7.offsetZ);
+ GL11.glTranslatef(this.gem7.rotationPointX * f5, this.gem7.rotationPointY * f5, this.gem7.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem7.offsetX, -this.gem7.offsetY, -this.gem7.offsetZ);
+ GL11.glTranslatef(-this.gem7.rotationPointX * f5, -this.gem7.rotationPointY * f5, -this.gem7.rotationPointZ * f5);
+ this.gem7.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem8.offsetX, this.gem8.offsetY, this.gem8.offsetZ);
+ GL11.glTranslatef(this.gem8.rotationPointX * f5, this.gem8.rotationPointY * f5, this.gem8.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem8.offsetX, -this.gem8.offsetY, -this.gem8.offsetZ);
+ GL11.glTranslatef(-this.gem8.rotationPointX * f5, -this.gem8.rotationPointY * f5, -this.gem8.rotationPointZ * f5);
+ this.gem8.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem5.offsetX, this.gem5.offsetY, this.gem5.offsetZ);
+ GL11.glTranslatef(this.gem5.rotationPointX * f5, this.gem5.rotationPointY * f5, this.gem5.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem5.offsetX, -this.gem5.offsetY, -this.gem5.offsetZ);
+ GL11.glTranslatef(-this.gem5.rotationPointX * f5, -this.gem5.rotationPointY * f5, -this.gem5.rotationPointZ * f5);
+ this.gem5.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem9.offsetX, this.gem9.offsetY, this.gem9.offsetZ);
+ GL11.glTranslatef(this.gem9.rotationPointX * f5, this.gem9.rotationPointY * f5, this.gem9.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem9.offsetX, -this.gem9.offsetY, -this.gem9.offsetZ);
+ GL11.glTranslatef(-this.gem9.rotationPointX * f5, -this.gem9.rotationPointY * f5, -this.gem9.rotationPointZ * f5);
+ this.gem9.render(f5);
+ GL11.glPopMatrix();
+ GL11.glDisable(GL11.GL_BLEND);
+ }
+ GL11.glEnable(GL11.GL_LIGHTING);
+ }
+
+ /**
+ * This is a helper function from Tabula to set the rotation of model parts
+ */
+ public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z)
+ {
+ modelRenderer.rotateAngleX = x;
+ modelRenderer.rotateAngleY = y;
+ modelRenderer.rotateAngleZ = z;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3b/10b462f7fce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3b/10b462f7fce40014174fe663e69b8422
deleted file mode 100644
index 974f7e5..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3b/10b462f7fce40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static Item goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
-// goldifiedObject = new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3c/e03ea8c592ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3c/e03ea8c592ea001411cee0f8f86532a4
new file mode 100644
index 0000000..b9d9b16
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3c/e03ea8c592ea001411cee0f8f86532a4
@@ -0,0 +1,30 @@
+package darkknight.jewelrycraft.item.render;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BraceletRender extends TileEntitySpecialRenderer
+{
+ public ModelBracelet bracelet = new ModelBracelet();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Bracelet.png");
+
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ }
+
+ public void doRender(Entity entity, double x, double y, double z, float f, float g)
+ {
+ GL11.glPushMatrix();
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+ bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ bracelet.render(entity, 0F, 1F, 0F, (float)z, f, 1.0F);
+ GL11.glPopMatrix();
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1c/50eda2a547e700141e05cdbaeb682437 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3d/90f34aec91ea001411cee0f8f86532a4
index e81ef93..bad030d 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/1c/50eda2a547e700141e05cdbaeb682437
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3d/90f34aec91ea001411cee0f8f86532a4
@@ -1,59 +1,42 @@
package darkknight.jewelrycraft.events;
import java.util.Iterator;
-import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.RenderPlayerEvent;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
import darkknight.jewelrycraft.curses.CurseList;
import darkknight.jewelrycraft.entities.renders.RenderHelper;
import darkknight.jewelrycraft.item.render.BraceletRender;
import darkknight.jewelrycraft.item.render.EarringsRender;
-import darkknight.jewelrycraft.item.render.MaskRender;
import darkknight.jewelrycraft.model.ModelBracelet;
import darkknight.jewelrycraft.util.JewelryNBT;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
public class PlayerRenderHandler
{
- MaskRender mask = new MaskRender();
EarringsRender earrings = new EarringsRender();
BraceletRender bracelet = new BraceletRender();
-// public static String[] infamyCache = new String[]{};
public static NBTTagCompound playersInfo = new NBTTagCompound();
@SubscribeEvent
public void renderScreen(RenderPlayerEvent.Specials.Post event)
{
ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
if (playersInfo != null){
while (players.hasNext()){
EntityPlayer player = players.next();
NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(1.6f, 1.6f, 1.6f);
- GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- GL11.glPopMatrix();
- }
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
@@ -82,29 +65,41 @@ public class PlayerRenderHandler
ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
GL11.glPushMatrix();
GL11.glColor4f(1, 1, 1, 1);
- GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
- if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
+ float size = 0.055F;
if (i / 12 == 1){
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
+// GL11.glTranslatef(0F, -(12-i)*0.1F, 0F);
+ float sizeY=(13-i)*0.055F;
+ rightArm.postRender(0.6F);
+// if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+// if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F)
+// GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * sizeY, rightArm.rotationPointZ * size);
+// }else{
+// GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * sizeY, rightArm.rotationPointZ * size);
+// if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+// if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+// if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+// }
+// GL11.glScalef(0.05f, 0.03f, 0.05f);
int gemColor = -1;
int ingotColor = -1;
if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- System.out.println(gemColor + " " + ingotColor);
bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
}else{
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F)
+ GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
int gemColor = -1;
int ingotColor = -1;
if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- System.out.println(gemColor + " " + ingotColor);
bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
}
GL11.glPopMatrix();
@@ -120,9 +115,7 @@ public class PlayerRenderHandler
private boolean checkPlayerInfamy(String string)
{
NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
- if(playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
-// for(int i = 0; i < infamyCache.length; i++)
-// if (infamyCache[i].equals(string)) return true;
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
return false;
}
}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3d/a08b206401e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3d/a08b206401e50014174fe663e69b8422
deleted file mode 100644
index 3cf6eb4..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3d/a08b206401e50014174fe663e69b8422
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null)
- return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3d/c0fca79b92ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3d/c0fca79b92ea001411cee0f8f86532a4
new file mode 100644
index 0000000..b8e8da2
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3d/c0fca79b92ea001411cee0f8f86532a4
@@ -0,0 +1,184 @@
+package darkknight.jewelrycraft.model;
+
+import java.awt.Color;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import org.lwjgl.opengl.GL11;
+
+/**
+ * ModelBiped - Either Mojang or a mod author Created using Tabula 4.1.1
+ */
+public class ModelBracelet extends ModelBase
+{
+ public ModelRenderer metal1;
+ public ModelRenderer metal2;
+ public ModelRenderer metal3;
+ public ModelRenderer metal4;
+ public ModelRenderer gem1;
+ public ModelRenderer gem2;
+ public ModelRenderer gem3;
+ public ModelRenderer gem4;
+ public ModelRenderer gem5;
+ public ModelRenderer gem6;
+ public ModelRenderer gem7;
+ public ModelRenderer gem8;
+ public ModelRenderer gem9;
+
+ public ModelBracelet()
+ {
+ this.textureWidth = 16;
+ this.textureHeight = 16;
+ this.metal4 = new ModelRenderer(this, 0, 8);
+ this.metal4.setRotationPoint(-5.0F, 12.0F, -2.0F);
+ this.metal4.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4, 0.0F);
+ this.gem4 = new ModelRenderer(this, 0, 0);
+ this.gem4.setRotationPoint(-3.0F, 12.8F, -3.5F);
+ this.gem4.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.setRotateAngle(gem4, 0.0F, 0.008901179185171082F, 0.0F);
+ this.gem3 = new ModelRenderer(this, 0, 0);
+ this.gem3.setRotationPoint(-4.8F, 12.2F, -3.5F);
+ this.gem3.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem2 = new ModelRenderer(this, 0, 0);
+ this.gem2.setRotationPoint(-1.5F, 12.8F, -3.5F);
+ this.gem2.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem1 = new ModelRenderer(this, 0, 0);
+ this.gem1.setRotationPoint(0.3F, 12.2F, -3.5F);
+ this.gem1.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.metal1 = new ModelRenderer(this, 0, 8);
+ this.metal1.setRotationPoint(-5.0F, 12.0F, -3.0F);
+ this.metal1.addBox(0.0F, 0.0F, 0.0F, 6, 2, 1, 0.0F);
+ this.gem6 = new ModelRenderer(this, 0, 0);
+ this.gem6.setRotationPoint(-4.3F, 12.7F, -3.5F);
+ this.gem6.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
+ this.gem7 = new ModelRenderer(this, 0, 0);
+ this.gem7.setRotationPoint(-3.8F, 12.7F, -3.5F);
+ this.gem7.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem8 = new ModelRenderer(this, 0, 0);
+ this.gem8.setRotationPoint(-0.2F, 12.7F, -3.5F);
+ this.gem8.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
+ this.metal2 = new ModelRenderer(this, 0, 8);
+ this.metal2.setRotationPoint(-5.0F, 12.0F, 2.0F);
+ this.metal2.addBox(0.0F, 0.0F, 0.0F, 6, 2, 1, 0.0F);
+ this.gem5 = new ModelRenderer(this, 0, 0);
+ this.gem5.setRotationPoint(-2.5F, 12.3F, -3.5F);
+ this.gem5.addBox(0.0F, 0.0F, 0.0F, 2, 3, 1, 0.0F);
+ this.metal3 = new ModelRenderer(this, 0, 8);
+ this.metal3.setRotationPoint(0.0F, 12.0F, -2.0F);
+ this.metal3.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4, 0.0F);
+ this.gem9 = new ModelRenderer(this, 0, 0);
+ this.gem9.setRotationPoint(-0.7F, 12.7F, -3.5F);
+ this.gem9.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ }
+
+ @Override
+ public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
+ {
+ GL11.glDisable(GL11.GL_LIGHTING);
+ if ((int)f3 != -1){
+ int ingotColor = (int)f3;
+ int red = (ingotColor >> 16) & 0xff;
+ int green = (ingotColor >> 8) & 0xff;
+ int blue = ingotColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ this.metal1.render(f5);
+ this.metal2.render(f5);
+ this.metal3.render(f5);
+ this.metal4.render(f5);
+ }
+ if ((int)f4 != -1){
+ int gemColor = (int)f4;
+ int red = gemColor >> 16 & 0xff;
+ int green = gemColor >> 8 & 0xff;
+ int blue = gemColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE_MINUS_DST_COLOR);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem4.offsetX, this.gem4.offsetY, this.gem4.offsetZ);
+ GL11.glTranslatef(this.gem4.rotationPointX * f5, this.gem4.rotationPointY * f5, this.gem4.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem4.offsetX, -this.gem4.offsetY, -this.gem4.offsetZ);
+ GL11.glTranslatef(-this.gem4.rotationPointX * f5, -this.gem4.rotationPointY * f5, -this.gem4.rotationPointZ * f5);
+ this.gem4.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem3.offsetX, this.gem3.offsetY, this.gem3.offsetZ);
+ GL11.glTranslatef(this.gem3.rotationPointX * f5, this.gem3.rotationPointY * f5, this.gem3.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem3.offsetX, -this.gem3.offsetY, -this.gem3.offsetZ);
+ GL11.glTranslatef(-this.gem3.rotationPointX * f5, -this.gem3.rotationPointY * f5, -this.gem3.rotationPointZ * f5);
+ this.gem3.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem2.offsetX, this.gem2.offsetY, this.gem2.offsetZ);
+ GL11.glTranslatef(this.gem2.rotationPointX * f5, this.gem2.rotationPointY * f5, this.gem2.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem2.offsetX, -this.gem2.offsetY, -this.gem2.offsetZ);
+ GL11.glTranslatef(-this.gem2.rotationPointX * f5, -this.gem2.rotationPointY * f5, -this.gem2.rotationPointZ * f5);
+ this.gem2.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem1.offsetX, this.gem1.offsetY, this.gem1.offsetZ);
+ GL11.glTranslatef(this.gem1.rotationPointX * f5, this.gem1.rotationPointY * f5, this.gem1.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem1.offsetX, -this.gem1.offsetY, -this.gem1.offsetZ);
+ GL11.glTranslatef(-this.gem1.rotationPointX * f5, -this.gem1.rotationPointY * f5, -this.gem1.rotationPointZ * f5);
+ this.gem1.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem6.offsetX, this.gem6.offsetY, this.gem6.offsetZ);
+ GL11.glTranslatef(this.gem6.rotationPointX * f5, this.gem6.rotationPointY * f5, this.gem6.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem6.offsetX, -this.gem6.offsetY, -this.gem6.offsetZ);
+ GL11.glTranslatef(-this.gem6.rotationPointX * f5, -this.gem6.rotationPointY * f5, -this.gem6.rotationPointZ * f5);
+ this.gem6.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem7.offsetX, this.gem7.offsetY, this.gem7.offsetZ);
+ GL11.glTranslatef(this.gem7.rotationPointX * f5, this.gem7.rotationPointY * f5, this.gem7.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem7.offsetX, -this.gem7.offsetY, -this.gem7.offsetZ);
+ GL11.glTranslatef(-this.gem7.rotationPointX * f5, -this.gem7.rotationPointY * f5, -this.gem7.rotationPointZ * f5);
+ this.gem7.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem8.offsetX, this.gem8.offsetY, this.gem8.offsetZ);
+ GL11.glTranslatef(this.gem8.rotationPointX * f5, this.gem8.rotationPointY * f5, this.gem8.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem8.offsetX, -this.gem8.offsetY, -this.gem8.offsetZ);
+ GL11.glTranslatef(-this.gem8.rotationPointX * f5, -this.gem8.rotationPointY * f5, -this.gem8.rotationPointZ * f5);
+ this.gem8.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem5.offsetX, this.gem5.offsetY, this.gem5.offsetZ);
+ GL11.glTranslatef(this.gem5.rotationPointX * f5, this.gem5.rotationPointY * f5, this.gem5.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem5.offsetX, -this.gem5.offsetY, -this.gem5.offsetZ);
+ GL11.glTranslatef(-this.gem5.rotationPointX * f5, -this.gem5.rotationPointY * f5, -this.gem5.rotationPointZ * f5);
+ this.gem5.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem9.offsetX, this.gem9.offsetY, this.gem9.offsetZ);
+ GL11.glTranslatef(this.gem9.rotationPointX * f5, this.gem9.rotationPointY * f5, this.gem9.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem9.offsetX, -this.gem9.offsetY, -this.gem9.offsetZ);
+ GL11.glTranslatef(-this.gem9.rotationPointX * f5, -this.gem9.rotationPointY * f5, -this.gem9.rotationPointZ * f5);
+ this.gem9.render(f5);
+ GL11.glPopMatrix();
+ GL11.glDisable(GL11.GL_BLEND);
+ }
+ GL11.glEnable(GL11.GL_LIGHTING);
+ }
+
+ /**
+ * This is a helper function from Tabula to set the rotation of model parts
+ */
+ public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z)
+ {
+ modelRenderer.rotateAngleX = x;
+ modelRenderer.rotateAngleY = y;
+ modelRenderer.rotateAngleZ = z;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3d/e023756e88ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3d/e023756e88ea001411cee0f8f86532a4
new file mode 100644
index 0000000..f46bf69
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3d/e023756e88ea001411cee0f8f86532a4
@@ -0,0 +1,128 @@
+package darkknight.jewelrycraft.curses;
+
+import java.util.ArrayList;
+import java.util.Random;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+
+public class Curse
+{
+ protected int textureID;
+ protected String name, description, texturePackName;
+ protected Random rand = new Random();
+ private static ArrayList<Curse> curses = new ArrayList<Curse>();
+ public static ArrayList<Curse> availableCurses = new ArrayList<Curse>();
+
+ /**
+ * @param id the ID of the curse
+ * @param name the name of the curse
+ * @param texturepack the ID of the pack the texture is located in
+ */
+ protected Curse(String name, int txtID, String texturepack)
+ {
+ this.name = name;
+ this.texturePackName = texturepack;
+ this.textureID = txtID;
+ curses.add(this);
+ availableCurses.add(this);
+ }
+
+ /**
+ * @return the name of the curse
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * @return the description of the curse
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public Curse setDescription(String desc)
+ {
+ description = desc;
+ return this;
+ }
+
+ /**
+ * @return the texture pack ID
+ */
+ public String getTexturePack()
+ {
+ return texturePackName;
+ }
+
+ /**
+ * @return the texture ID
+ */
+ public int getTextureID()
+ {
+ return textureID;
+ }
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void action(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void playerDeathAction(World world, EntityPlayer player)
+ {}
+
+ public void entityDeathAction(World world, EntityLivingBase target, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void respawnAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ public void entityDropItems(EntityPlayer player, Entity target, ArrayList<EntityItem> drops)
+ {}
+
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {}
+
+ public boolean itemToss()
+ {
+ return false;
+ }
+
+ /**
+ * @return
+ */
+ public static ArrayList<Curse> getCurseList()
+ {
+ return curses;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3f/f026c032fde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3f/f026c032fde40014174fe663e69b8422
deleted file mode 100644
index 07bb2b6..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3f/f026c032fde40014174fe663e69b8422
+++ /dev/null
@@ -1,46 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.StatCollector;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public abstract class ItemGoldObject extends Item
-{
- public ItemGoldifiedObject()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- if (JewelryNBT.gem(stack) != null) return this.getIconIndex(JewelryNBT.gem(stack));
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return (StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/40/a03afdd19ae3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/40/a03afdd19ae3001412c4c4819c88e86b
deleted file mode 100644
index 3ac4004..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/40/a03afdd19ae3001412c4c4819c88e86b
+++ /dev/null
@@ -1,86 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.ArrayList;
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- @Override
- public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune)
- {
- ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
-
- TileEntity tile = world.getTileEntity(x, y, z);
- if (tile != null && ((TileEntityMidasTouch)tile).target != null)
- ret.add(new ItemStack(Items.gold_nugget, (int)(((TileEntityMidasTouch)tile).target.width*((TileEntityMidasTouch)tile).target.height), 0));
-
- return ret;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null) this.setBlockBounds(0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0F, 0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2, ((TileEntityMidasTouch)tile).target.height, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2);
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/41/900c963102e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/41/900c963102e50014174fe663e69b8422
deleted file mode 100644
index 5bf09b9..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/41/900c963102e50014174fe663e69b8422
+++ /dev/null
@@ -1,55 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.item.ItemList;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && player.inventory.getCurrentItem() == null){
- world.setBlock(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), BlockList.midasTouchBlock, 0, 2);
- TileEntityMidasTouch midasTouchVictim = new TileEntityMidasTouch();
- midasTouchVictim.setEntity(target);
- world.setTileEntity(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), midasTouchVictim);
- target.setDead();
- }
- }
-
- @Override
- public void action(World world, EntityPlayer player)
- {
- ItemStack curItem = player.inventory.getCurrentItem();
- if(curItem != null && curItem.getItem() != ItemList.goldObj && Block.getBlockFromItem(curItem.getItem()) == Blocks.air){
- int index = player.inventory.currentItem;
- ItemStack item = curItem;
- ItemStack result = new ItemStack(ItemList.goldObj, item.stackSize, item.getItemDamage());
- JewelryNBT.addItem(result, item);
- player.inventory.setInventorySlotContents(index, result);
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/42/5070783bb0ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/42/5070783bb0ea001411cee0f8f86532a4
new file mode 100644
index 0000000..ad68fee
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/42/5070783bb0ea001411cee0f8f86532a4
@@ -0,0 +1,50 @@
+/**
+ *
+ */
+package darkknight.jewelrycraft.events;
+
+import net.minecraftforge.common.MinecraftForge;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.JewelrycraftMod;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.client.gui.GuiHandler;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.damage.DamageSourceList;
+import darkknight.jewelrycraft.effects.EffectsList;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.worldGen.Generation;
+
+public class EventList
+{
+ public static void preInit(FMLPreInitializationEvent e)
+ {
+ MinecraftForge.EVENT_BUS.register(new EntityEventHandler());
+ MinecraftForge.EVENT_BUS.register(new BlockEventHandler());
+ MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
+ FMLCommonHandler.instance().bus().register(new EventCommonHandler());
+ BucketHandler.INSTANCE.buckets.put(BlockList.moltenMetal, ItemList.bucket);
+ }
+
+ public static void init(FMLInitializationEvent e)
+ {
+ GameRegistry.registerWorldGenerator(new Generation(), 0);
+ if (FMLCommonHandler.instance().getSide() == Side.CLIENT) FMLCommonHandler.instance().bus().register(new KeyBindings());
+ new GuiHandler();
+ FMLCommonHandler.instance().bus().register(ConfigHandler.INSTANCE);
+ }
+
+ public static void postInit(FMLPostInitializationEvent e)
+ {
+ JewelrycraftUtil.addMetals();
+ JewelrycraftUtil.jamcrafters();
+ EffectsList.postInit(e);
+ DamageSourceList.postInit(e);
+ JewelrycraftMod.proxy.postInit();
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/42/6046f61185ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/42/6046f61185ea001411cee0f8f86532a4
new file mode 100644
index 0000000..85e2571
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/42/6046f61185ea001411cee0f8f86532a4
@@ -0,0 +1,21 @@
+package darkknight.jewelrycraft.util;
+
+import net.minecraft.util.ResourceLocation;
+
+public class Variables
+{
+ public static final String MODID = "jewelrycraft2";
+ public static final String MODNAME = "Jewelrycraft 2";
+ public static final String VERSION = "1.0";
+ public static final String PACKET_CHANNEL = "jewelrycraft2";
+
+ public static final String CONFIG_GUI = "darkknight.jewelrycraft.config.ConfigGuiFactory";
+ public static final String CLIENT_PROXY = "darkknight.jewelrycraft.proxy.ClientProxy";
+ public static final String SERVER_PROXY = "darkknight.jewelrycraft.proxy.CommonProxy";
+
+ public static final int MAX_CURSES = 10;
+ public static final ResourceLocation PEDESTAL_TEXTURE = new ResourceLocation(Variables.MODID, "textures/tileentities/BricksPedestal.png");
+ public static final ResourceLocation SHADOW_HAND_TEXTURE = new ResourceLocation(Variables.MODID, "textures/tileentities/ShadowHand.png");
+ public static final ResourceLocation CURSES_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
+ public static final ResourceLocation VILLAGER_TEXTURE = new ResourceLocation(Variables.MODID, "textures/entities/jeweler.png");
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/42/f061f27170e300141084bb8bfb075c08 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/42/f061f27170e300141084bb8bfb075c08
deleted file mode 100644
index 2ecf660..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/42/f061f27170e300141084bb8bfb075c08
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.tileentity;
-
-/**
- * @author Sorin
- *
- */
-public class TileEntityMidasTouch
-{
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/42/f0bc215473e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/42/f0bc215473e70014115de2bb951f0adf
deleted file mode 100644
index c8e2b42..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/42/f0bc215473e70014115de2bb951f0adf
+++ /dev/null
@@ -1,53 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.ItemRenderer;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.client.renderer.texture.TextureManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.item.render.MaskRender;
-
-public class CursePentagram extends Curse
-{
- MaskRender mask = new MaskRender();
- public CursePentagram(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- }
-
- public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
- {
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- Tessellator tessellator = Tessellator.instance;
- ItemStack itemStack = new ItemStack(Items.apple);
- TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
- texturemanager.bindTexture(texturemanager.getResourceLocation(itemStack.getItemSpriteNumber()));
- IIcon iicon = itemStack.getIconIndex();
- float f = iicon.getMinU();
- float f1 = iicon.getMaxU();
- float f2 = iicon.getMinV();
- float f3 = iicon.getMaxV();
- GL11.glRotatef(90F, 1F, 0F, 0F);
- ItemRenderer.renderItemIn2D(tessellator, f1, f2, f, f3, iicon.getIconWidth(), iicon.getIconHeight(), 0.0625F);
- GL11.glPopMatrix();
- }
-
- public String getDescription()
- {
- return "The Dark Lord has misterious ways of showing you his love.";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/44/40f706d787ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/44/40f706d787ea001411cee0f8f86532a4
new file mode 100644
index 0000000..cf2e9c9
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/44/40f706d787ea001411cee0f8f86532a4
@@ -0,0 +1,38 @@
+package darkknight.jewelrycraft.curses;
+
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CurseList
+{
+ public static Curse rotten;
+ public static Curse flaming;
+ public static Curse blind;
+ public static Curse greed;
+ public static Curse infamy;
+ public static Curse midasTouch;
+ public static Curse rabbitsPaw;
+ public static Curse pentagram;
+ public static Curse vampireHunger;
+ public static Curse humbleBundle;
+ public static Curse deathsTouch;
+ public static Curse antichrist;
+ public static Curse moneyEqualsPower;
+
+ public static void preInit(FMLPreInitializationEvent e)
+ {
+ rotten = new CurseRottenHeart(Variables.MODNAME + ":" + "Rotten Heart", 0, Variables.MODNAME + "_curses_0");
+ flaming = new CurseFlamingSoul(Variables.MODNAME + ":" + "Flaming Soul", 1, Variables.MODNAME + "_curses_0");
+ greed = new CurseGreed(Variables.MODNAME + ":" + "Greed", 2, Variables.MODNAME + "_curses_0");
+ blind = new CurseBlind(Variables.MODNAME + ":" + "Blind", 3, Variables.MODNAME + "_curses_0");
+ infamy = new CurseInfamy(Variables.MODNAME + ":" + "Infamy", 4, Variables.MODNAME + "_curses_0");
+ midasTouch = new CurseMidasTouch(Variables.MODNAME + ":" + "Midas Touch", 5, Variables.MODNAME + "_curses_0");
+ rabbitsPaw = new CurseRabbitsPaw(Variables.MODNAME + ":" + "Rabbit's Paw", 6, Variables.MODNAME + "_curses_0");
+ pentagram = new CursePentagram(Variables.MODNAME + ":" + "Pentagram", 7, Variables.MODNAME + "_curses_0");
+// vampireHunger = new CurseMidasTouch(8, Variables.MODNAME + ":" + "Vampire Hunger", 8, 0);
+// humbleBundle = new CurseMidasTouch(9, Variables.MODNAME + ":" + "Humble Bundle", 9, 0);
+// deathsTouch = new CurseMidasTouch(10, Variables.MODNAME + ":" + "Deaths Touch", 10, 0);
+// antichrist = new CurseMidasTouch(11, Variables.MODNAME + ":" + "Antichrist", 11, 0);
+// moneyEqualsPower = new CurseMidasTouch(12, Variables.MODNAME + ":" + "Money Equals Power", 12, 0);
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/44/c043415c99e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/44/c043415c99e3001412c4c4819c88e86b
deleted file mode 100644
index 48e2915..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/44/c043415c99e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,27 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
-// System.out.println(midas.target.rotationYaw);
-// GL11.glRotatef(, 0.0F, 1.0F, 0.0F);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, midas.xCoord - RenderManager.instance.renderPosX, midas.yCoord - RenderManager.instance.renderPosY, midas.zCoord - RenderManager.instance.renderPosZ, midas.target.rotationYaw, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/44/f08a8a6398ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/44/f08a8a6398ea001411cee0f8f86532a4
new file mode 100644
index 0000000..10cc8aa
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/44/f08a8a6398ea001411cee0f8f86532a4
@@ -0,0 +1,113 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/45/6018c4e6fce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/45/6018c4e6fce40014174fe663e69b8422
deleted file mode 100644
index 9fb6a5d..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/45/6018c4e6fce40014174fe663e69b8422
+++ /dev/null
@@ -1,47 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.StatCollector;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public abstract class ItemGoldifiedObject extends Item
-{
- public ItemGoldifiedObject()
- {
- super();}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- if (JewelryNBT.gem(stack) != null) return this.getIconIndex(JewelryNBT.gem(stack));
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return (StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/45/d0f8a1e295ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/45/d0f8a1e295ea001411cee0f8f86532a4
new file mode 100644
index 0000000..dcb0388
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/45/d0f8a1e295ea001411cee0f8f86532a4
@@ -0,0 +1,112 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.07f, 0.07f, 0.07f);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/46/10ad6cb191e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/46/10ad6cb191e3001417b2e384bf7c3702
deleted file mode 100644
index 6685fc4..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/46/10ad6cb191e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,25 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.getEntityRenderObject(midas.target).doRender(midas.target, 0D, 0D, 0D, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/46/d01a6b619ce3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/46/d01a6b619ce3001412c4c4819c88e86b
deleted file mode 100644
index 70b60fe..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/46/d01a6b619ce3001412c4c4819c88e86b
+++ /dev/null
@@ -1,33 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- EntityLiving target = ((EntityLiving)midas.target);
- target.hurtTime = 0;
- float yaw = target.prevRotationYawHead + (target.rotationYawHead - target.prevRotationYawHead);
- float yawOffset = target.prevRenderYawOffset + (target.renderYawOffset - target.prevRenderYawOffset);
- float pitch = target.prevRotationPitch + (target.rotationPitch - target.prevRotationPitch);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glTranslatef(0.5F, 0.0F, 0.5F);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, midas.xCoord, midas.yCoord, midas.zCoord, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/47/5092922099ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/47/5092922099ea001411cee0f8f86532a4
new file mode 100644
index 0000000..b3b5ea9
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/47/5092922099ea001411cee0f8f86532a4
@@ -0,0 +1,141 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+ float rot = 0F;
+
+ @SubscribeEvent
+ public void renderHand(RenderHandEvent event)
+ {
+ System.out.println(event.context);
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, -16F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/48/c01e000872e300141084bb8bfb075c08 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/48/c01e000872e300141084bb8bfb075c08
deleted file mode 100644
index 98ec2cb..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/48/c01e000872e300141084bb8bfb075c08
+++ /dev/null
@@ -1,85 +0,0 @@
-package darkknight.jewelrycraft.tileentity;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.NetworkManager;
-import net.minecraft.network.Packet;
-import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
-import net.minecraft.tileentity.TileEntity;
-
-public class TileEntityMidasTouch extends TileEntity
-{
- public Entity target;
-
- public TileEntityMidasTouch()
- {
- target = null;
- }
-
- /**
- * @param nbt
- */
- @Override
- public void writeToNBT(NBTTagCompound nbt)
- {
- super.writeToNBT(nbt);
- NBTTagCompound tag = new NBTTagCompound();
- target.writeToNBT(tag);
- int id = EntityList.getEntityID(target);
- nbt.setInteger("entityID", id);
- nbt.setTag("entity", tag);
- }
-
- /**
- * @param nbt
- */
- @Override
- public void readFromNBT(NBTTagCompound nbt)
- {
- super.readFromNBT(nbt);
- if (nbt.hasKey("entityID") && nbt.hasKey("entity")){
- NBTTagCompound en = (NBTTagCompound)nbt.getTag("entity");
- int entityID = nbt.getInteger("entityID");
- EntityLivingBase entity = (EntityLivingBase)EntityList.createEntityByID(entityID, worldObj);
- if (entity != null && entity instanceof EntityLivingBase){
- entity.readFromNBT(en);
- target = entity;
- }
- }
- }
-
- /**
- *
- */
- @Override
- public void updateEntity()
- {
- super.updateEntity();
- }
-
- /**
- * @return
- */
- @Override
- public Packet getDescriptionPacket()
- {
- NBTTagCompound nbttagcompound = new NBTTagCompound();
- writeToNBT(nbttagcompound);
- return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbttagcompound);
- }
-
- /**
- * @param net
- * @param packet
- */
- @Override
- public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet)
- {
- readFromNBT(packet.func_148857_g());
- worldObj.func_147479_m(xCoord, yCoord, zCoord);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/49/10b8eac006e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/49/10b8eac006e50014174fe663e69b8422
deleted file mode 100644
index b29bb85..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/49/10b8eac006e50014174fe663e69b8422
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly(Side.CLIENT)
- public boolean hasEffect(ItemStack item)
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIcon(JewelryNBT.item(stack), pass);
- else return Block.getBlockFromItem(item.).getBlockTextureFromSide(1);
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/49/900ffa92b1ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/49/900ffa92b1ea001411cee0f8f86532a4
new file mode 100644
index 0000000..2e55759
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/49/900ffa92b1ea001411cee0f8f86532a4
@@ -0,0 +1,263 @@
+package darkknight.jewelrycraft.tileentity.renders;
+
+import java.awt.Color;
+import java.util.HashMap;
+import java.util.List;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.entity.RenderManager;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelDisplayer;
+import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
+import darkknight.jewelrycraft.util.Variables;
+
+public class TileEntityDisplayerRender extends TileEntitySpecialRenderer
+{
+ ModelDisplayer displayer = new ModelDisplayer();
+ String texture = "textures/tileentities/Displayer.png";
+ HashMap<EnumChatFormatting, Integer> colors = new HashMap<EnumChatFormatting, Integer>(){
+ {
+ put(EnumChatFormatting.AQUA, 5636095);
+ put(EnumChatFormatting.BLACK, 0);
+ put(EnumChatFormatting.BLUE, 5592575);
+ put(EnumChatFormatting.DARK_AQUA, 43690);
+ put(EnumChatFormatting.DARK_BLUE, 170);
+ put(EnumChatFormatting.DARK_GRAY, 5592405);
+ put(EnumChatFormatting.DARK_GREEN, 43520);
+ put(EnumChatFormatting.DARK_PURPLE, 11141290);
+ put(EnumChatFormatting.DARK_RED, 11141120);
+ put(EnumChatFormatting.GOLD, 16755200);
+ put(EnumChatFormatting.GRAY, 11184810);
+ put(EnumChatFormatting.GREEN, 5635925);
+ put(EnumChatFormatting.LIGHT_PURPLE, 16733695);
+ put(EnumChatFormatting.RED, 16733525);
+ put(EnumChatFormatting.WHITE, 16777215);
+ put(EnumChatFormatting.YELLOW, 16777045);
+ }
+ };
+
+ /**
+ * @param te
+ * @param x
+ * @param y
+ * @param z
+ * @param scale
+ */
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ GL11.glPushMatrix();
+ GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
+ TileEntityDisplayer disp = (TileEntityDisplayer)te;
+ ResourceLocation blockTexture = new ResourceLocation(Variables.MODID, texture);
+ Minecraft.getMinecraft().renderEngine.bindTexture(blockTexture);
+ GL11.glPushMatrix();
+ GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
+ displayer.render((Entity)null, disp.ringTranslation1, disp.ringTranslation2, disp.ringTranslation3, 0.0F, 0.0F, 0.0625F);
+ try{
+ int block = disp.getBlockMetadata();
+ if (disp != null && disp.hasObject && disp.object != null && disp.object.getItem() != null && disp.object != new ItemStack(Item.getItemById(0), 0, 0)){
+ int ind = -3;
+ GL11.glPushMatrix();
+ EntityItem entityitem = new EntityItem(te.getWorldObj(), 0.0D, 0.0D, 0.0D, disp.object);
+ entityitem.hoverStart = 0.0F;
+ disp.object.stackSize = 1;
+ GL11.glRotatef(180F, 1F, 0F, 0F);
+ GL11.glTranslatef(0.0F, -0.6F + disp.ringTranslation1 / 5, 0F);
+ GL11.glRotatef(disp.rotAngle, 0F, 1F, 0F);
+ if (RenderManager.instance.options.fancyGraphics) RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
+ else{
+ GL11.glRotatef(180F, 0F, 1F, 0F);
+ RenderManager.instance.options.fancyGraphics = true;
+ int i = 15728880;
+ int j = i % 65536;
+ int k = i / 65536;
+// OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, j / 1.0F, k / 1.0F);
+ RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
+ RenderManager.instance.options.fancyGraphics = false;
+ }
+ EntityPlayer player = te.getWorldObj().getClosestPlayer(te.xCoord, te.yCoord, te.zCoord, 5D);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ if (player != null) renderLabel(disp.object.getDisplayName(), 0F, -0.171F * ind, 0F, block, disp, colors.get(disp.object.getRarity().rarityColor));
+ GL11.glPopMatrix();
+ ind++;
+ if (player != null && disp.quantity > 1){
+ GL11.glPushMatrix();
+ renderLabel("x" + Integer.toString(disp.quantity), 0F, -0.171F * ind, 0F, block, disp, Color.GRAY.getRGB());
+ GL11.glPopMatrix();
+ ind++;
+ }
+ if (disp.object.getItem() != Items.map && player != null && disp.object.getTooltip(player, true) != null){
+ List tooltips = disp.object.getTooltip(player, true);
+ if (disp.infoIndex + 5 > tooltips.size()) disp.infoIndex = 1;
+ if (tooltips.size() < 5) for(int i = 1; i < tooltips.size(); i++){
+ String tooltip = tooltips.get(i).toString();
+ RenderManager.instance.getFontRenderer();
+ if (tooltip != ""){
+ GL11.glPushMatrix();
+ renderLabel(tooltip, 0F, -0.171F * ind, 0F, block, disp, Color.GRAY.getRGB());
+ GL11.glPopMatrix();
+ ind++;
+ }
+ }
+ else for(int i = disp.infoIndex; i < disp.infoIndex + 5; i++){
+ String tooltip = tooltips.get(i).toString();
+ RenderManager.instance.getFontRenderer();
+ if (tooltip != ""){
+ GL11.glPushMatrix();
+ renderLabel(tooltip, 0F, -0.171F * ind, 0F, block, disp, Color.GRAY.getRGB());
+ GL11.glPopMatrix();
+ ind++;
+ }
+ }
+ }
+ }
+ }
+ catch(Exception e){}
+ GL11.glPopMatrix();
+ GL11.glPopMatrix();
+ }
+
+ /**
+ * @param par2Str
+ * @param x
+ * @param y
+ * @param z
+ * @param metadata
+ * @param te
+ * @param color
+ */
+ protected void renderLabel(String par2Str, double x, double y, double z, int metadata, TileEntity te, int color)
+ {
+ FontRenderer fontrenderer = RenderManager.instance.getFontRenderer();
+ float var14 = 0.01266667F * 1.5F;
+ float var17 = 0.015F;
+ GL11.glRotatef(180F, 0F, 0F, 1F);
+ if (metadata == 0) GL11.glRotatef(0F, 0F, 1F, 0F);
+ else if (metadata == 1) GL11.glRotatef(270F, 0F, 1F, 0F);
+ else if (metadata == 2) GL11.glRotatef(180F, 0F, 1F, 0F);
+ else if (metadata == 3) GL11.glRotatef(90F, 0F, 1F, 0F);
+ GL11.glTranslatef((float)x, (float)y, (float)z + 0.45F);
+ GL11.glScalef(-0.015F, -var14, 0.015F);
+ GL11.glPushMatrix();
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ Tessellator tessellator = Tessellator.instance;
+ GL11.glDisable(GL11.GL_TEXTURE_2D);
+ int j = fontrenderer.getStringWidth(par2Str) / 2;
+ tessellator.startDrawingQuads();
+ tessellator.setColorRGBA_F(0.0F, 0.2F, 0.2F, 0.9F);
+ tessellator.addVertex(-33.333 - 0, 0D, 0.1D);
+ tessellator.addVertex(-33.333 - 0, 9D, 0.1D);
+ tessellator.addVertex(33.333 + 0, 9D, 0.1D);
+ tessellator.addVertex(33.333 + 0, 0D, 0.1D);
+ tessellator.draw();
+ if (fontrenderer.getStringWidth(par2Str) / 2 > 20) var17 = 0.9F / fontrenderer.getStringWidth(par2Str);
+ else var17 = var14;
+ int red = color >> 16 & 0xFF;
+ int green = color >> 8 & 0xFF;
+ int blue = color & 0xFF;
+ GL11.glTranslatef((float)x + 1f, (float)y + 1f, (float)z);
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_TEXTURE_2D);
+ GL11.glScalef(var17 * 70F, 1F, 0F);
+ int i = 15728880;
+ int t = i % 65536;
+ int k = i / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, t / 1.0F, k / 1.0F);
+ fontrenderer.drawString(par2Str.replaceFirst("§0", "§r").replaceFirst("§1", "§r").replaceFirst("§2", "§r").replaceFirst("§3", "§r").replaceFirst("§4", "§r").replaceFirst("§5", "§r").replaceFirst("§6", "§r").replaceFirst("§7", "§r").replaceFirst("§8", "§r").replaceFirst("§9", "§r").replaceFirst("§a", "§r").replaceFirst("§b", "§r").replaceFirst("§c", "§r").replaceFirst("§d", "§r").replaceFirst("§e", "§r").replaceFirst("§f", "§r"), -j, 0, 65536 * (red > 170 ? red - 170 : 0) + 256 * (green > 170 ? green - 170 : 0) + (blue > 170 ? blue - 170 : 0));
+ GL11.glPopMatrix();
+ GL11.glTranslatef((float)x - 1f, (float)y - 1f, (float)z - 1F);
+ GL11.glScalef(var17 * 70F, 1F, 0F);
+ fontrenderer.drawString(par2Str, -j, 0, color);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glPopMatrix();
+ }
+
+ /**
+ * @param str
+ * @param color
+ */
+ public void replaceEnumEnchValues(String str, int color)
+ {
+ if (str.contains("§0")){
+ color = Color.BLACK.getRGB();
+ str.replace("§0", "");
+ }
+ if (str.contains("§1")){
+ color = 85;
+ str.replace("§1", "");
+ }
+ if (str.contains("§2")){
+ color = 17920;
+ str.replace("§2", "");
+ }
+ if (str.contains("§3")){
+ color = 1336183;
+ str.replace("§3", "");
+ }
+ if (str.contains("§4")){
+ color = 4587520;
+ str.replace("§4", "");
+ }
+ if (str.contains("§5")){
+ color = 5701759;
+ str.replace("§5", "");
+ }
+ if (str.contains("§6")){
+ color = 16762880;
+ str.replace("§6", "");
+ }
+ if (str.contains("§7")){
+ color = Color.GRAY.getRGB();
+ str.replace("§7", "");
+ }
+ if (str.contains("§8")){
+ color = Color.DARK_GRAY.getRGB();
+ str.replace("§8", "");
+ }
+ if (str.contains("§9")){
+ color = Color.BLUE.getRGB();
+ str.replace("§9", "");
+ }
+ if (str.contains("§a")){
+ color = Color.GREEN.getRGB();
+ str.replace("§a", "");
+ }
+ if (str.contains("§b")){
+ color = Color.CYAN.getRGB();
+ str.replace("§b", "");
+ }
+ if (str.contains("§c")){
+ color = Color.RED.getRGB();
+ str.replace("§c", "");
+ }
+ if (str.contains("§d")){
+ color = 11665663;
+ str.replace("§d", "");
+ }
+ if (str.contains("§e")){
+ color = Color.YELLOW.getRGB();
+ str.replace("§e", "");
+ }
+ if (str.contains("§f")){
+ color = Color.WHITE.getRGB();
+ str.replace("§f", "");
+ }
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/49/d0668676b4ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/49/d0668676b4ea001411cee0f8f86532a4
new file mode 100644
index 0000000..e9609ae
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/49/d0668676b4ea001411cee0f8f86532a4
@@ -0,0 +1,31 @@
+package darkknight.jewelrycraft.item.render;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BraceletRender extends TileEntitySpecialRenderer
+{
+ public ModelBracelet bracelet = new ModelBracelet();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Bracelet.png");
+
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ }
+
+ public void doRender(Entity entity, double x, double y, double z, float f, float g)
+ {
+ GL11.glPushMatrix();
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+ if ((float)z != -1) bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ GL11.glTranslatef(0F, 3F, 0F);
+ if ((float)x != -1) bracelet.render(entity, 0F, 0F, 0F, (float)x, (float)y, 1.0F);
+ GL11.glPopMatrix();
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4a/608194048ee3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4a/608194048ee3001417b2e384bf7c3702
deleted file mode 100644
index ab988e7..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4a/608194048ee3001417b2e384bf7c3702
+++ /dev/null
@@ -1,24 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor4f(1F, 0.0F, 0.0F, 0.3F);
- RenderManager.instance.renderEntityStatic(midas.target, 1F, false);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4a/80a948a2fce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4a/80a948a2fce40014174fe663e69b8422
deleted file mode 100644
index 3293158..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4a/80a948a2fce40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static Item goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4a/f0ef41723ee700141e05cdbaeb682437 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4a/f0ef41723ee700141e05cdbaeb682437
deleted file mode 100644
index 2b78aa0..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4a/f0ef41723ee700141e05cdbaeb682437
+++ /dev/null
@@ -1,123 +0,0 @@
-package darkknight.jewelrycraft.events;
-
-import java.util.Iterator;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import darkknight.jewelrycraft.entities.renders.RenderHelper;
-import darkknight.jewelrycraft.item.render.BraceletRender;
-import darkknight.jewelrycraft.item.render.EarringsRender;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.model.ModelBracelet;
-import darkknight.jewelrycraft.util.JewelryNBT;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
-
-public class PlayerRenderHandler
-{
- MaskRender mask = new MaskRender();
- EarringsRender earrings = new EarringsRender();
- BraceletRender bracelet = new BraceletRender();
-// public static String[] infamyCache = new String[]{};
- public static NBTTagCompound playersInfo = new NBTTagCompound();
-
- @SubscribeEvent
- public void renderScreen(RenderPlayerEvent.Specials.Post event)
- {
- ModelBiped main = event.renderer.modelBipedMain;
- Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
- if (playersInfo != null){
- while (players.hasNext()){
- EntityPlayer player = players.next();
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(1.6f, 1.6f, 1.6f);
- GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- GL11.glPopMatrix();
- }
- if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(0.07f, 0.07f, 0.07f);
- GL11.glTranslatef(0.0F, 3.0F, -2.0F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- earrings.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- GL11.glPopMatrix();
- }
- for(int i = 10; i <= 13; i++)
- if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
- if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
- if (i / 12 == 1){
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
- }else{
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- }
- GL11.glPopMatrix();
- }
- }
- }
- }
-
- /**
- * @param string
- * @return
- */
- private boolean checkPlayerInfamy(String string)
- {
- for(int i = 0; i < infamyCache.length; i++)
- if (infamyCache[i].equals(string)) return true;
- return false;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4b/009902e3fbe40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4b/009902e3fbe40014174fe663e69b8422
deleted file mode 100644
index 41d620d..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4b/009902e3fbe40014174fe663e69b8422
+++ /dev/null
@@ -1,64 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static Item goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4b/7061ab089aea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4b/7061ab089aea001411cee0f8f86532a4
new file mode 100644
index 0000000..617990c
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4b/7061ab089aea001411cee0f8f86532a4
@@ -0,0 +1,113 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ float rot = 0F;
+
+ @SubscribeEvent
+ public void renderHand(RenderHandEvent event)
+ {
+ for(Curse curse: Curse.getCurseList())
+ curse.playerHandRender(event);
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/55/2016e2c66be70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4c/204c56b7afea001411cee0f8f86532a4
index e69de29..e69de29 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/55/2016e2c66be70014115de2bb951f0adf
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4c/204c56b7afea001411cee0f8f86532a4
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4c/5014ba759ce3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4c/5014ba759ce3001412c4c4819c88e86b
deleted file mode 100644
index 73d2ad6..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4c/5014ba759ce3001412c4c4819c88e86b
+++ /dev/null
@@ -1,33 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- EntityLiving target = ((EntityLiving)midas.target);
- target.hurtTime = 0;
- float yaw = target.prevRotationYawHead + (target.rotationYawHead - target.prevRotationYawHead);
- float yawOffset = target.prevRenderYawOffset + (target.renderYawOffset - target.prevRenderYawOffset);
- float pitch = target.prevRotationPitch + (target.rotationPitch - target.prevRotationPitch);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glTranslatef(0.5F, 0.0F, 0.5F);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(target, target.posX - RenderManager.instance.renderPosX, target.posY - RenderManager.instance.renderPosY, target.posZ - RenderManager.instance.renderPosZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4e/7067fef3afea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4e/7067fef3afea001411cee0f8f86532a4
new file mode 100644
index 0000000..45f335c
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4e/7067fef3afea001411cee0f8f86532a4
@@ -0,0 +1,175 @@
+/*
+ * Mod made by DarkKnight during the Modjam 3
+ * It's an awesome mod
+ * I love me! :D
+ */
+package darkknight.jewelrycraft;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.gen.structure.MapGenStructureIO;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.oredict.OreDictionary;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.Mod.EventHandler;
+import cpw.mods.fml.common.Mod.Instance;
+import cpw.mods.fml.common.ModMetadata;
+import cpw.mods.fml.common.SidedProxy;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
+import cpw.mods.fml.common.registry.EntityRegistry;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.client.gui.GuiHandler;
+import darkknight.jewelrycraft.commands.JewelrycraftCommands;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.damage.DamageSourceList;
+import darkknight.jewelrycraft.effects.EffectsList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.entities.EntityList;
+import darkknight.jewelrycraft.events.BlockEventHandler;
+import darkknight.jewelrycraft.events.BucketHandler;
+import darkknight.jewelrycraft.events.EntityEventHandler;
+import darkknight.jewelrycraft.events.EventCommonHandler;
+import darkknight.jewelrycraft.events.EventList;
+import darkknight.jewelrycraft.events.KeyBindings;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.network.PacketClearColorCache;
+import darkknight.jewelrycraft.network.PacketHandler;
+import darkknight.jewelrycraft.network.PacketKeyPressEvent;
+import darkknight.jewelrycraft.network.PacketRequestLiquidData;
+import darkknight.jewelrycraft.network.PacketRequestPlayerInfo;
+import darkknight.jewelrycraft.network.PacketRequestSetSlot;
+import darkknight.jewelrycraft.network.PacketSendServerPlayersInfo;
+import darkknight.jewelrycraft.network.PacketSendLiquidData;
+import darkknight.jewelrycraft.network.PacketSendClientPlayerInfo;
+import darkknight.jewelrycraft.proxy.CommonProxy;
+import darkknight.jewelrycraft.recipes.CraftingRecipes;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.Variables;
+import darkknight.jewelrycraft.worldGen.Generation;
+import darkknight.jewelrycraft.worldGen.village.ComponentJewelry;
+import darkknight.jewelrycraft.worldGen.village.JCTrades;
+import darkknight.jewelrycraft.worldGen.village.VillageJewelryHandler;
+
+@Mod (modid = Variables.MODID, name = Variables.MODNAME, version = Variables.VERSION, guiFactory = Variables.CONFIG_GUI, acceptedMinecraftVersions = "[1.7.10,1.8)", canBeDeactivated = true)
+public class JewelrycraftMod
+{
+ @Instance (Variables.MODID)
+ public static JewelrycraftMod instance;
+
+ @SidedProxy (clientSide = Variables.CLIENT_PROXY, serverSide = Variables.SERVER_PROXY)
+ public static CommonProxy proxy;
+ public static final Logger logger = Logger.getLogger("Jewelrycraft");
+ public static File dir;
+
+ public static CreativeTabs jewelrycraft = new CreativeTabs(Variables.MODID){
+ @Override
+ public Item getTabIconItem()
+ {
+ return Item.getItemFromBlock(BlockList.jewelCraftingTable);
+ }
+ };
+
+ public static CreativeTabs liquids = new CreativeTabLiquids("Liquids");
+ public static NBTTagCompound saveData = new NBTTagCompound();
+ public static NBTTagCompound clientData = new NBTTagCompound();
+ public static File liquidsConf;
+ public static SimpleNetworkWrapper netWrapper;
+ public static boolean fancyRender;
+ List<String> authorList = new ArrayList<String>();
+
+ /**
+ * Pre initialization of mod stuff.
+ *
+ * @param e FMLPreInitializationEvent
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ @EventHandler
+ public void preInit(FMLPreInitializationEvent e) throws IOException
+ {
+ ModMetadata metadata = e.getModMetadata();
+ dir = e.getModConfigurationDirectory();
+
+ ConfigHandler.INSTANCE.loadConfig(e);
+ BlockList.preInit(e);
+ ItemList.preInit(e);
+ CraftingRecipes.preInit(e);
+ CurseList.preInit(e);
+ PacketHandler.preInit(e);
+ EntityList.preInit(e);
+
+ proxy.preInit();
+
+ VillagerRegistry.instance().registerVillagerId(3000);
+ VillagerRegistry.instance().registerVillageTradeHandler(3000, new JCTrades());
+ VillagerRegistry.instance().registerVillageCreationHandler(new VillageJewelryHandler());
+ try{
+ MapGenStructureIO.func_143031_a(ComponentJewelry.class, Variables.MODID + ":Jewelry");
+ }
+ catch(Throwable e2){
+ logger.severe("Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.7.10");
+ }
+ EventList.preInit(e);
+
+ authorList.add("OnyxDarkKnight");
+ authorList.add("bspkrs");
+ authorList.add("domi1819");
+ metadata.autogenerated = false;
+ metadata.authorList = authorList;
+ metadata.url = "https://github.com/sor1n/Jewelrycraft";
+ }
+
+ /**
+ * Initializes the world generation and key bindings.
+ *
+ * @param e FMLInitializationEvent
+ */
+ @EventHandler
+ public void init(FMLInitializationEvent e)
+ {
+ GameRegistry.registerWorldGenerator(new Generation(), 0);
+ if (FMLCommonHandler.instance().getSide() == Side.CLIENT) FMLCommonHandler.instance().bus().register(new KeyBindings());
+ new GuiHandler();
+ FMLCommonHandler.instance().bus().register(ConfigHandler.INSTANCE);
+ }
+
+ /**
+ * Post initialization of metals, modifiers and others.
+ *
+ * @param e FMLPostInitializationEvent
+ */
+ @EventHandler
+ public void postInit(FMLPostInitializationEvent e)
+ {
+ JewelrycraftUtil.addMetals();
+ JewelrycraftUtil.jamcrafters();
+ EffectsList.postInit(e);
+ DamageSourceList.postInit(e);
+ proxy.postInit();
+ }
+
+ @Mod.EventHandler
+ public void serverLoad(FMLServerStartingEvent event)
+ {
+ event.registerServerCommand(new JewelrycraftCommands());
+ }
+
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4f/10edfebd88ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4f/10edfebd88ea001411cee0f8f86532a4
new file mode 100644
index 0000000..8d72753
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4f/10edfebd88ea001411cee0f8f86532a4
@@ -0,0 +1,63 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CursePentagram extends Curse
+{
+ float rot = 0F;
+
+ public CursePentagram(String name, int txtID, String pack)
+ {
+ super(name, txtID, pack);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ @Override
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Post event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "The Dark Lord has misterious ways of showing you his love.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4f/a0532f0bfce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4f/a0532f0bfce40014174fe663e69b8422
deleted file mode 100644
index c682c5b..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4f/a0532f0bfce40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.*;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static Item goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject").setTextureName(Variables.MODID + ":jewelryModifier");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4f/b06750e295e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4f/b06750e295e3001412c4c4819c88e86b
deleted file mode 100644
index 0dfaaf8..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/4f/b06750e295e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,81 +0,0 @@
-package darkknight.jewelrycraft.tileentity;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.NetworkManager;
-import net.minecraft.network.Packet;
-import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
-import net.minecraft.tileentity.TileEntity;
-
-public class TileEntityMidasTouch extends TileEntity
-{
- public Entity target;
-
- public TileEntityMidasTouch()
- {}
-
- public void setEntity(Entity ent)
- {
- target = ent;
- }
-
- @Override
- public void writeToNBT(NBTTagCompound nbt)
- {
- super.writeToNBT(nbt);
- if (target != null){
- int id = EntityList.getEntityID(target);
- NBTTagCompound tag = new NBTTagCompound();
- target.writeToNBT(tag);
- nbt.setInteger("entityID", id);
- nbt.setTag("entity", tag);
- }
- }
-
- /**
- * @param nbt
- */
- @Override
- public void readFromNBT(NBTTagCompound nbt)
- {
- super.readFromNBT(nbt);
- NBTTagCompound en = (NBTTagCompound)nbt.getTag("entity");
- int entityID = nbt.getInteger("entityID");
- EntityLivingBase entity = (EntityLivingBase)EntityList.createEntityByID(entityID, worldObj);
- entity.readFromNBT(en);
- target = entity;
- }
-
- /**
- *
- */
- @Override
- public boolean canUpdate()
- {
- return false;
- }
-
- /**
- * @return
- */
- @Override
- public Packet getDescriptionPacket()
- {
- NBTTagCompound nbttagcompound = new NBTTagCompound();
- writeToNBT(nbttagcompound);
- return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbttagcompound);
- }
-
- /**
- * @param net
- * @param packet
- */
- @Override
- public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet)
- {
- readFromNBT(packet.func_148857_g());
- worldObj.func_147479_m(xCoord, yCoord, zCoord);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5/2064f33d99e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5/2064f33d99e3001412c4c4819c88e86b
deleted file mode 100644
index 2667fe6..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5/2064f33d99e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,28 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.MathHelper;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
-// System.out.println(midas.target.rotationYaw);
-// GL11.glRotatef(, 0.0F, 1.0F, 0.0F);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, MathHelper.floor_double(midas.target.posX - RenderManager.instance.renderPosX), MathHelper.floor_double(midas.target.posY - RenderManager.instance.renderPosY), MathHelper.floor_double(midas.target.posZ - RenderManager.instance.renderPosZ), midas.target.rotationYaw, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5/e02aac7c87ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5/e02aac7c87ea001411cee0f8f86532a4
new file mode 100644
index 0000000..e1f826a
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5/e02aac7c87ea001411cee0f8f86532a4
@@ -0,0 +1,25 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.world.World;
+
+public class CurseBlind extends Curse
+{
+ public CurseBlind(String name, int txtID, int packID)
+ {
+ super(name, txtID, packID);
+ }
+
+ @Override
+ public void action(World world, EntityPlayer player)
+ {
+ if (!player.isPotionActive(Potion.blindness) || player.getActivePotionEffect(Potion.blindness).getDuration() < 30) player.addPotionEffect(new PotionEffect(Potion.blindness.id, 60));
+ }
+
+ public String getDescription()
+ {
+ return "You see the light slowly fading in front of you";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/52/5089f60bfee40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/52/5089f60bfee40014174fe663e69b8422
deleted file mode 100644
index ddd7e9b..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/52/5089f60bfee40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- public static Item goldObj;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldObj = new ItemGoldObj().setUnlocalizedName(Variables.MODID + ".goldObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldObj, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/53/20b73ad899ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/53/20b73ad899ea001411cee0f8f86532a4
new file mode 100644
index 0000000..e520fc9
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/53/20b73ad899ea001411cee0f8f86532a4
@@ -0,0 +1,140 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+ float rot = 0F;
+
+ @SubscribeEvent
+ public void renderHand(RenderHandEvent event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, -16F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/53/500f4e3704e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/53/500f4e3704e50014174fe663e69b8422
deleted file mode 100644
index 3478a71..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/53/500f4e3704e50014174fe663e69b8422
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
-// System.out.println(item.getItem().getIconIndex(JewelryNBT.item(stack)));
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else{
- System.out.println(Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1));
- return Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1);
- }
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/53/707860379ce3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/53/707860379ce3001412c4c4819c88e86b
deleted file mode 100644
index 79e5667..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/53/707860379ce3001412c4c4819c88e86b
+++ /dev/null
@@ -1,33 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- EntityLiving target = ((EntityLiving)midas.target);
- target.hurtTime = 0;
- float yaw = target.prevRotationYawHead + (target.rotationYawHead - target.prevRotationYawHead);
- float yawOffset = target.prevRenderYawOffset + (target.renderYawOffset - target.prevRenderYawOffset);
- float pitch = target.prevRotationPitch + (target.rotationPitch - target.prevRotationPitch);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glTranslatef(0.5F, 0.0F, 0.5F);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, midas.xCoord - RenderManager.instance.renderPosX, midas.yCoord - RenderManager.instance.renderPosY, midas.zCoord - RenderManager.instance.renderPosZ, midas.target.rotationYaw, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/54/10afc221b3ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/54/10afc221b3ea001411cee0f8f86532a4
new file mode 100644
index 0000000..5b38d47
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/54/10afc221b3ea001411cee0f8f86532a4
@@ -0,0 +1,32 @@
+package darkknight.jewelrycraft.item.render;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BraceletRender extends TileEntitySpecialRenderer
+{
+ public ModelBracelet bracelet = new ModelBracelet();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Bracelet.png");
+
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ }
+
+ public void doRender(Entity entity, double x, double y, double z, float f, float g)
+ {
+ GL11.glPushMatrix();
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+// System.out.println((int)x + " " + (int)z);
+ if ((int)z != 16777215) bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ GL11.glTranslatef(0F, 3F, 0F);
+ if ((int)x != 16777215) bracelet.render(entity, 0F, 0F, 0F, (float)x, (float)y, 1.0F);
+ GL11.glPopMatrix();
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/54/d08a12f794e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/54/d08a12f794e3001412c4c4819c88e86b
deleted file mode 100644
index 58c8981..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/54/d08a12f794e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,74 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
- TileEntity tile = world.getTileEntity(x, y, z);
- if(((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target.boundingBox.minX);
- this.setBlockBounds((float)((TileEntityMidasTouch)tile).target.boundingBox.minX, (float)((TileEntityMidasTouch)tile).target.boundingBox.minY, (float)((TileEntityMidasTouch)tile).target.boundingBox.minZ, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxX, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxY, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxZ);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/55/20f4f59697ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/55/20f4f59697ea001411cee0f8f86532a4
new file mode 100644
index 0000000..ae20ba2
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/55/20f4f59697ea001411cee0f8f86532a4
@@ -0,0 +1,66 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CursePentagram extends Curse
+{
+ float rot = 0F;
+
+ public CursePentagram(String name, int txtID, String pack)
+ {
+ super(name, txtID, pack);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ @Override
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+// GL11.glEnable(GL11.GL_BLEND);
+// GL11.glColor4f(1F, 1F, 1F, 0.3F);
+// GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+// GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "The Dark Lord has misterious ways of showing you his love.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6f/70d2e64cfae40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/55/b019924ab0ea001411cee0f8f86532a4
index e69de29..e69de29 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6f/70d2e64cfae40014174fe663e69b8422
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/55/b019924ab0ea001411cee0f8f86532a4
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/55/b076e5188ee3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/55/b076e5188ee3001417b2e384bf7c3702
deleted file mode 100644
index 85db83f..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/55/b076e5188ee3001417b2e384bf7c3702
+++ /dev/null
@@ -1,24 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glColor4f(1F, 0.0F, 1.0F, 0.3F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- RenderManager.instance.renderEntityStatic(midas.target, 1F, false);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/55/f055598098e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/55/f055598098e3001412c4c4819c88e86b
deleted file mode 100644
index 59f4f6c..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/55/f055598098e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,37 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart)){
- world.setBlock(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), BlockList.midasTouchBlock, 0, 2);
- TileEntityMidasTouch midasTouchVictim = new TileEntityMidasTouch();
- midasTouchVictim.setEntity(target);
- world.setTileEntity(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), midasTouchVictim);
- target.setDead();
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/56/00dd512eb3ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/56/00dd512eb3ea001411cee0f8f86532a4
new file mode 100644
index 0000000..e56ac15
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/56/00dd512eb3ea001411cee0f8f86532a4
@@ -0,0 +1,32 @@
+package darkknight.jewelrycraft.item.render;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BraceletRender extends TileEntitySpecialRenderer
+{
+ public ModelBracelet bracelet = new ModelBracelet();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Bracelet.png");
+
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ }
+
+ public void doRender(Entity entity, double x, double y, double z, float f, float g)
+ {
+ GL11.glPushMatrix();
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+ System.out.println((float)x + " " + (float)z);
+ if ((float)z != -1) bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ GL11.glTranslatef(0F, 3F, 0F);
+ if ((float)x != -1) bracelet.render(entity, 0F, 0F, 0F, (float)x, (float)y, 1.0F);
+ GL11.glPopMatrix();
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/57/e0bfffad9ce3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/57/e0bfffad9ce3001412c4c4819c88e86b
deleted file mode 100644
index 9104ba3..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/57/e0bfffad9ce3001412c4c4819c88e86b
+++ /dev/null
@@ -1,33 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- EntityLiving target = ((EntityLiving)midas.target);
- target.hurtTime = 0;
- float yaw = target.prevRotationYawHead + (target.rotationYawHead - target.prevRotationYawHead);
- float yawOffset = target.prevRenderYawOffset + (target.renderYawOffset - target.prevRenderYawOffset);
- float pitch = target.prevRotationPitch + (target.rotationPitch - target.prevRotationPitch);
-// GL11.glRotatef(yawOffset, 0, -1, 0);
-// GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glTranslatef(0.5F, 0.0F, 0.5F);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- RenderManager.instance.renderEntityWithPosYaw(target, midas.xCoord - RenderManager.instance.renderPosX, midas.yCoord - RenderManager.instance.renderPosY, midas.zCoord - RenderManager.instance.renderPosZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/58/50838a4199ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/58/50838a4199ea001411cee0f8f86532a4
new file mode 100644
index 0000000..f19c034
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/58/50838a4199ea001411cee0f8f86532a4
@@ -0,0 +1,141 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+ float rot = 0F;
+
+ @SubscribeEvent
+ public void renderHand(RenderHandEvent event)
+ {
+ System.out.println(event.context.tileEntities);
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, -16F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/20ea69c702e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/20ea69c702e50014174fe663e69b8422
deleted file mode 100644
index 7babda2..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/20ea69c702e50014174fe663e69b8422
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else return Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(0);
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/3020e4818ee3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/3020e4818ee3001417b2e384bf7c3702
deleted file mode 100644
index a274f20..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/3020e4818ee3001417b2e384bf7c3702
+++ /dev/null
@@ -1,82 +0,0 @@
-package darkknight.jewelrycraft.tileentity;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.NetworkManager;
-import net.minecraft.network.Packet;
-import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
-import net.minecraft.tileentity.TileEntity;
-
-public class TileEntityMidasTouch extends TileEntity
-{
- public Entity target;
-
- public TileEntityMidasTouch(Entity target)
- {
- this.target = target;
- }
-
- /**
- * @param nbt
- */
- @Override
- public void writeToNBT(NBTTagCompound nbt)
- {
- super.writeToNBT(nbt);
- NBTTagCompound tag = new NBTTagCompound();
- target.writeToNBT(tag);
- int id = EntityList.getEntityID(target);
- nbt.setInteger("entityID", id);
- nbt.setTag("entity", tag);
- }
-
- /**
- * @param nbt
- */
- @Override
- public void readFromNBT(NBTTagCompound nbt)
- {
- super.readFromNBT(nbt);
- if (nbt.hasKey("entityID") && nbt.hasKey("entity")){
- NBTTagCompound en = (NBTTagCompound)nbt.getTag("entity");
- int entityID = nbt.getInteger("entityID");
- EntityLivingBase entity = (EntityLivingBase)EntityList.createEntityByID(entityID, worldObj);
- entity.readFromNBT(en);
- target = entity;
- }
- }
-
- /**
- *
- */
- @Override
- public void updateEntity()
- {
- super.updateEntity();
- System.out.println(target);
- }
-
- /**
- * @return
- */
- @Override
- public Packet getDescriptionPacket()
- {
- NBTTagCompound nbttagcompound = new NBTTagCompound();
- writeToNBT(nbttagcompound);
- return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbttagcompound);
- }
-
- /**
- * @param net
- * @param packet
- */
- @Override
- public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet)
- {
- readFromNBT(packet.func_148857_g());
- worldObj.func_147479_m(xCoord, yCoord, zCoord);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/5060e6c998e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/5060e6c998e3001412c4c4819c88e86b
deleted file mode 100644
index 784d37e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/5060e6c998e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,27 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
-// System.out.println(midas.target.rotationYaw);
- GL11.glRotatef(midas.target.rotationYaw, 0.0F, 1.0F, 0.0F);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, midas.target.posX - RenderManager.instance.renderPosX, midas.target.posY - RenderManager.instance.renderPosY, midas.target.posZ - RenderManager.instance.renderPosZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/70bca93e97ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/70bca93e97ea001411cee0f8f86532a4
new file mode 100644
index 0000000..abb2952
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/70bca93e97ea001411cee0f8f86532a4
@@ -0,0 +1,63 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CursePentagram extends Curse
+{
+ float rot = 0F;
+
+ public CursePentagram(String name, int txtID, String pack)
+ {
+ super(name, txtID, pack);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ @Override
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "The Dark Lord has misterious ways of showing you his love.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/a07b1864afea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/a07b1864afea001411cee0f8f86532a4
new file mode 100644
index 0000000..f98db9a
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/59/a07b1864afea001411cee0f8f86532a4
@@ -0,0 +1,76 @@
+package darkknight.jewelrycraft.block;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.oredict.OreDictionary;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.registry.GameRegistry;
+import darkknight.jewelrycraft.JewelrycraftMod;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.tileentity.TileEntityAltar;
+import darkknight.jewelrycraft.tileentity.TileEntityBlockShadow;
+import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
+import darkknight.jewelrycraft.tileentity.TileEntityHandPedestal;
+import darkknight.jewelrycraft.tileentity.TileEntityJewelrsCraftingTable;
+import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
+import darkknight.jewelrycraft.tileentity.TileEntityMolder;
+import darkknight.jewelrycraft.tileentity.TileEntityShadowEye;
+import darkknight.jewelrycraft.tileentity.TileEntityShadowHand;
+import darkknight.jewelrycraft.tileentity.TileEntitySmelter;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BlockList
+{
+ public static Block shadowOre, smelter, molder, displayer, jewelCraftingTable, shadowBlock, shadowEye, jewelAltar, handPedestal, shadowHand, midasTouchBlock;
+ public static BlockMoltenMetal moltenMetal;
+ public static Fluid moltenMetalFluid;
+ private static boolean isInitialized = false;
+
+ /**
+ * @param e
+ */
+ public static void preInit(FMLPreInitializationEvent e)
+ {
+ shadowOre = new BlockJCOre().setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockTextureName(Variables.MODID + ":oreShadow").setBlockName(Variables.MODID + ".oreShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ smelter = new BlockSmelter().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".smelter").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ molder = new BlockMolder(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".molder").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ displayer = new BlockDisplayer(Material.iron).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypeMetal).setBlockName(Variables.MODID + ".displayer").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ jewelCraftingTable = new BlockJewelrsCraftingTable(Material.rock).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".jewelCraftingTable").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ shadowBlock = new BlockShadow().setHardness(5.0F).setResistance(7.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":blockShadow").setBlockName(Variables.MODID + ".blockShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ jewelAltar = new BlockJewelAltar().setHardness(5.0F).setResistance(2.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":altar").setBlockName(Variables.MODID + ".altar").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ shadowEye = new BlockShadowEye().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowEye").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ handPedestal = new BlockHandPedestal(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".handPedestal").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ shadowHand = new BlockShadowHand(Material.rock).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowHand").setCreativeTab(JewelrycraftMod.jewelrycraft).setBlockUnbreakable();
+ midasTouchBlock = new BlockMidasTouch(Material.iron).setHardness(3.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setBlockName(Variables.MODID + ".midasTouchBlock");
+ GameRegistry.registerBlock(shadowOre, "shadowOre");
+ GameRegistry.registerBlock(shadowBlock, "shadowBlock");
+ GameRegistry.registerBlock(smelter, "Smelter");
+ GameRegistry.registerBlock(molder, "Molder");
+ GameRegistry.registerBlock(jewelCraftingTable, "jewelCraftingTable");
+ GameRegistry.registerBlock(displayer, "Displayer");
+ GameRegistry.registerBlock(jewelAltar, "Altar");
+ GameRegistry.registerBlock(shadowEye, "Shadow Eye");
+ GameRegistry.registerBlock(handPedestal, "Stone Bricks Pedestal");
+ GameRegistry.registerBlock(shadowHand, "Shadow Hand");
+ GameRegistry.registerBlock(midasTouchBlock, "Midas Touch Block");
+ GameRegistry.registerTileEntity(TileEntitySmelter.class, Variables.MODID + ":smelter");
+ GameRegistry.registerTileEntity(TileEntityMolder.class, Variables.MODID + ":molder");
+ GameRegistry.registerTileEntity(TileEntityJewelrsCraftingTable.class, Variables.MODID + ":table");
+ GameRegistry.registerTileEntity(TileEntityDisplayer.class, Variables.MODID + ":displayer");
+ GameRegistry.registerTileEntity(TileEntityBlockShadow.class, Variables.MODID + ":blockShadow");
+ GameRegistry.registerTileEntity(TileEntityAltar.class, Variables.MODID + ":altar");
+ GameRegistry.registerTileEntity(TileEntityShadowEye.class, Variables.MODID + ":shadowEye");
+ GameRegistry.registerTileEntity(TileEntityHandPedestal.class, Variables.MODID + ":handPedestal");
+ GameRegistry.registerTileEntity(TileEntityShadowHand.class, Variables.MODID + ":shadowHand");
+ GameRegistry.registerTileEntity(TileEntityMidasTouch.class, Variables.MODID + ":midsaTouch");
+ moltenMetalFluid = new Fluid("metal.molten").setLuminosity(15).setDensity(3000).setTemperature(2000).setViscosity(6000);
+ if (!FluidRegistry.registerFluid(moltenMetalFluid)) moltenMetalFluid = FluidRegistry.getFluid("metal.molten");
+ moltenMetal = new BlockMoltenMetal(moltenMetalFluid, Material.lava);
+ GameRegistry.registerBlock(moltenMetal, "moltenMetalLiquid");
+ OreDictionary.registerOre("ingotShadow", new ItemStack(ItemList.shadowIngot));
+ OreDictionary.registerOre("oreShadow", new ItemStack(BlockList.shadowOre));
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5a/c0ff301ab0ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5a/c0ff301ab0ea001411cee0f8f86532a4
new file mode 100644
index 0000000..74ea673
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5a/c0ff301ab0ea001411cee0f8f86532a4
@@ -0,0 +1,167 @@
+/*
+ * Mod made by DarkKnight during the Modjam 3
+ * It's an awesome mod
+ * I love me! :D
+ */
+package darkknight.jewelrycraft;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.gen.structure.MapGenStructureIO;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.oredict.OreDictionary;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.Mod.EventHandler;
+import cpw.mods.fml.common.Mod.Instance;
+import cpw.mods.fml.common.ModMetadata;
+import cpw.mods.fml.common.SidedProxy;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
+import cpw.mods.fml.common.registry.EntityRegistry;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.client.gui.GuiHandler;
+import darkknight.jewelrycraft.commands.JewelrycraftCommands;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.damage.DamageSourceList;
+import darkknight.jewelrycraft.effects.EffectsList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.entities.EntityList;
+import darkknight.jewelrycraft.events.BlockEventHandler;
+import darkknight.jewelrycraft.events.BucketHandler;
+import darkknight.jewelrycraft.events.EntityEventHandler;
+import darkknight.jewelrycraft.events.EventCommonHandler;
+import darkknight.jewelrycraft.events.EventList;
+import darkknight.jewelrycraft.events.KeyBindings;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.network.PacketClearColorCache;
+import darkknight.jewelrycraft.network.PacketHandler;
+import darkknight.jewelrycraft.network.PacketKeyPressEvent;
+import darkknight.jewelrycraft.network.PacketRequestLiquidData;
+import darkknight.jewelrycraft.network.PacketRequestPlayerInfo;
+import darkknight.jewelrycraft.network.PacketRequestSetSlot;
+import darkknight.jewelrycraft.network.PacketSendServerPlayersInfo;
+import darkknight.jewelrycraft.network.PacketSendLiquidData;
+import darkknight.jewelrycraft.network.PacketSendClientPlayerInfo;
+import darkknight.jewelrycraft.proxy.CommonProxy;
+import darkknight.jewelrycraft.recipes.CraftingRecipes;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.Variables;
+import darkknight.jewelrycraft.worldGen.Generation;
+import darkknight.jewelrycraft.worldGen.village.ComponentJewelry;
+import darkknight.jewelrycraft.worldGen.village.JCTrades;
+import darkknight.jewelrycraft.worldGen.village.VillageJewelryHandler;
+
+@Mod (modid = Variables.MODID, name = Variables.MODNAME, version = Variables.VERSION, guiFactory = Variables.CONFIG_GUI, acceptedMinecraftVersions = "[1.7.10,1.8)", canBeDeactivated = true)
+public class JewelrycraftMod
+{
+ @Instance (Variables.MODID)
+ public static JewelrycraftMod instance;
+
+ @SidedProxy (clientSide = Variables.CLIENT_PROXY, serverSide = Variables.SERVER_PROXY)
+ public static CommonProxy proxy;
+ public static final Logger logger = Logger.getLogger("Jewelrycraft");
+ public static File dir;
+
+ public static CreativeTabs jewelrycraft = new CreativeTabs(Variables.MODID){
+ @Override
+ public Item getTabIconItem()
+ {
+ return Item.getItemFromBlock(BlockList.jewelCraftingTable);
+ }
+ };
+
+ public static CreativeTabs liquids = new CreativeTabLiquids("Liquids");
+ public static NBTTagCompound saveData = new NBTTagCompound();
+ public static NBTTagCompound clientData = new NBTTagCompound();
+ public static File liquidsConf;
+ public static SimpleNetworkWrapper netWrapper;
+ public static boolean fancyRender;
+ List<String> authorList = new ArrayList<String>();
+
+ /**
+ * Pre initialization of mod stuff.
+ *
+ * @param e FMLPreInitializationEvent
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ @EventHandler
+ public void preInit(FMLPreInitializationEvent e) throws IOException
+ {
+ ModMetadata metadata = e.getModMetadata();
+ dir = e.getModConfigurationDirectory();
+
+ ConfigHandler.INSTANCE.loadConfig(e);
+ BlockList.preInit(e);
+ ItemList.preInit(e);
+ CraftingRecipes.preInit(e);
+ CurseList.preInit(e);
+ PacketHandler.preInit(e);
+ EntityList.preInit(e);
+
+ VillagerRegistry.instance().registerVillagerId(3000);
+ VillagerRegistry.instance().registerVillageTradeHandler(3000, new JCTrades());
+ VillagerRegistry.instance().registerVillageCreationHandler(new VillageJewelryHandler());
+ try{
+ MapGenStructureIO.func_143031_a(ComponentJewelry.class, Variables.MODID + ":Jewelry");
+ }
+ catch(Throwable e2){
+ logger.severe("Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.7.10");
+ }
+ EventList.preInit(e);
+ proxy.preInit();
+
+ authorList.add("OnyxDarkKnight");
+ authorList.add("bspkrs");
+ authorList.add("domi1819");
+ metadata.autogenerated = false;
+ metadata.authorList = authorList;
+ metadata.url = "https://github.com/sor1n/Jewelrycraft";
+ }
+
+ /**
+ * Initializes the world generation and key bindings.
+ *
+ * @param e FMLInitializationEvent
+ */
+ @EventHandler
+ public void init(FMLInitializationEvent e)
+ {
+ EventList.init(e);
+ }
+
+ /**
+ * Post initialization of metals, modifiers and others.
+ *
+ * @param e FMLPostInitializationEvent
+ */
+ @EventHandler
+ public void postInit(FMLPostInitializationEvent e)
+ {
+ EventList.postInit(e);
+ }
+
+ @Mod.EventHandler
+ public void serverLoad(FMLServerStartingEvent event)
+ {
+ event.registerServerCommand(new JewelrycraftCommands());
+ }
+
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5b/800cb89f9ce3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5b/800cb89f9ce3001412c4c4819c88e86b
deleted file mode 100644
index 10bf6e3..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5b/800cb89f9ce3001412c4c4819c88e86b
+++ /dev/null
@@ -1,33 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- EntityLiving target = ((EntityLiving)midas.target);
- target.hurtTime = 0;
- float yaw = target.prevRotationYawHead + (target.rotationYawHead - target.prevRotationYawHead);
- float yawOffset = target.prevRenderYawOffset + (target.renderYawOffset - target.prevRenderYawOffset);
- float pitch = target.prevRotationPitch + (target.rotationPitch - target.prevRotationPitch);
-// GL11.glRotatef(yawOffset, 0, -1, 0);
-// GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glTranslatef(0.5F, 0.0F, 0.5F);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(target, midas.xCoord - RenderManager.instance.renderPosX, midas.yCoord - RenderManager.instance.renderPosY, midas.zCoord - RenderManager.instance.renderPosZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5c/40f3d19e91e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5c/40f3d19e91e3001417b2e384bf7c3702
deleted file mode 100644
index 75b0e69..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5c/40f3d19e91e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,25 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(1.0F, 0.8F, 0.0F);
- RenderManager.instance.getEntityRenderObject(midas.target).doRender(midas.target, 0D, 0D, 0D, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5c/70816d6f94e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5c/70816d6f94e3001412c4c4819c88e86b
deleted file mode 100644
index f7e9cc2..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5c/70816d6f94e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5d/7052eb2f97ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5d/7052eb2f97ea001411cee0f8f86532a4
new file mode 100644
index 0000000..1eca00b
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5d/7052eb2f97ea001411cee0f8f86532a4
@@ -0,0 +1,116 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ GL11.glColor3f(1F, 0F, 0F);
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5d/90359fe194e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5d/90359fe194e3001412c4c4819c88e86b
deleted file mode 100644
index 9c492f3..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5d/90359fe194e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,74 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
- TileEntity tile = world.getTileEntity(x, y, z);
- if(((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target.boundingBox);
- this.setBlockBounds((float)((TileEntityMidasTouch)tile).target.boundingBox.minX, (float)((TileEntityMidasTouch)tile).target.boundingBox.minY, (float)((TileEntityMidasTouch)tile).target.boundingBox.minZ, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxX, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxY, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxZ);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5e/100ab1a1b2ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5e/100ab1a1b2ea001411cee0f8f86532a4
new file mode 100644
index 0000000..a291667
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5e/100ab1a1b2ea001411cee0f8f86532a4
@@ -0,0 +1,31 @@
+package darkknight.jewelrycraft.item.render;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BraceletRender extends TileEntitySpecialRenderer
+{
+ public ModelBracelet bracelet = new ModelBracelet();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Bracelet.png");
+
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ }
+
+ public void doRender(Entity entity, double x, double y, double z, float f, float g)
+ {
+ GL11.glPushMatrix();
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+ if (z != (float)-1) bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ GL11.glTranslatef(0F, 3F, 0F);
+ if (x != (float)-1) bracelet.render(entity, 0F, 0F, 0F, (float)x, (float)y, 1.0F);
+ GL11.glPopMatrix();
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5e/50be335402e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5e/50be335402e50014174fe663e69b8422
deleted file mode 100644
index bcc6cff..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5e/50be335402e50014174fe663e69b8422
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) if (Block.getBlockFromItem(item.getItem()) != Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else return Block.getBlockFromItem(item.getItem()).getIcon(0, 0);
- else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/31/30675ea024e60014127dc373d78c1666 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5e/e0583b6884ea001411cee0f8f86532a4
index 20da581..3709b5f 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/31/30675ea024e60014127dc373d78c1666
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5e/e0583b6884ea001411cee0f8f86532a4
@@ -7,6 +7,7 @@ import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
+import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.VillagerRegistry;
import darkknight.jewelrycraft.block.BlockList;
import darkknight.jewelrycraft.client.InventoryTabVanilla;
@@ -79,7 +80,7 @@ public class ClientProxy extends CommonProxy
RenderingRegistry.registerEntityRenderingHandler(EntityHeart.class, new HeartRender(new ModelHeart(), 0.25F));
RenderingRegistry.registerEntityRenderingHandler(EntityHalfHeart.class, new HeartRender(new ModelHalfHeart(), 0.25F));
-
+
TabRegistry.registerTab(new InventoryTabVanilla());
TabRegistry.registerTab(new TabJewelry());
MinecraftForge.EVENT_BUS.register(new TabRegistry());
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5e/f0632658c0e50014122af9ad4a560236 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5e/f0632658c0e50014122af9ad4a560236
deleted file mode 100644
index 4628831..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5e/f0632658c0e50014122af9ad4a560236
+++ /dev/null
@@ -1,55 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.item.ItemList;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && player.inventory.getCurrentItem() == null){
- world.setBlock(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), BlockList.midasTouchBlock, 0, 2);
- TileEntityMidasTouch midasTouchVictim = new TileEntityMidasTouch();
- midasTouchVictim.setEntity(target);
- world.setTileEntity(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), midasTouchVictim);
- target.setDead();
- }
- }
-
- @Override
- public void action(World world, EntityPlayer player)
- {
- ItemStack curItem = player.inventory.getCurrentItem();
- if(curItem != null && curItem.getItem() != ItemList.goldObj){
- int index = player.inventory.currentItem;
- ItemStack item = curItem;
- ItemStack result = new ItemStack(ItemList.goldObj, item.stackSize, item.getItemDamage());
- JewelryNBT.addItem(result, item);
- player.inventory.setInventorySlotContents(index, result);
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/e05898fa47e700141e05cdbaeb682437 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5f/50bf67fb93ea001411cee0f8f86532a4
index 842c659..67305db 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/10/e05898fa47e700141e05cdbaeb682437
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5f/50bf67fb93ea001411cee0f8f86532a4
@@ -1,60 +1,43 @@
package darkknight.jewelrycraft.events;
import java.util.Iterator;
-import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.RenderPlayerEvent;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
import darkknight.jewelrycraft.curses.CurseList;
import darkknight.jewelrycraft.entities.renders.RenderHelper;
import darkknight.jewelrycraft.item.render.BraceletRender;
import darkknight.jewelrycraft.item.render.EarringsRender;
-import darkknight.jewelrycraft.item.render.MaskRender;
import darkknight.jewelrycraft.model.ModelBracelet;
import darkknight.jewelrycraft.util.JewelryNBT;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
public class PlayerRenderHandler
{
- MaskRender mask = new MaskRender();
EarringsRender earrings = new EarringsRender();
BraceletRender bracelet = new BraceletRender();
-// public static String[] infamyCache = new String[]{};
public static NBTTagCompound playersInfo = new NBTTagCompound();
@SubscribeEvent
public void renderScreen(RenderPlayerEvent.Specials.Post event)
{
ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ float size = 0.055F;
if (playersInfo != null){
while (players.hasNext()){
EntityPlayer player = players.next();
NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
- System.out.println(PlayerUtils.getModPlayerPersistTag(player, Variables.MODID));
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(1.6f, 1.6f, 1.6f);
- GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- GL11.glPopMatrix();
- }
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
@@ -81,25 +64,38 @@ public class PlayerRenderHandler
if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+
GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
- if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
+// GL11.glColor4f(1, 1, 1, 1);
if (i / 12 == 1){
+// GL11.glTranslatef(0F, -(12-i)*0.1F, 0F);
+ float sizeY=(13-i)*0.055F;
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F)
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * sizeY, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * sizeY, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
int gemColor = -1;
int ingotColor = -1;
if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor, (float)gemColor, (float)ingotColor, (float)gemColor, 0.0F);
}else{
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F)
+ GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
int gemColor = -1;
int ingotColor = -1;
if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
@@ -119,9 +115,7 @@ public class PlayerRenderHandler
private boolean checkPlayerInfamy(String string)
{
NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
- if(playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
-// for(int i = 0; i < infamyCache.length; i++)
-// if (infamyCache[i].equals(string)) return true;
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
return false;
}
}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7e/50e1e03570e300141084bb8bfb075c08 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5f/6043e0b5aeea001411cee0f8f86532a4
index e69de29..e69de29 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7e/50e1e03570e300141084bb8bfb075c08
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5f/6043e0b5aeea001411cee0f8f86532a4
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6/0065cfc101e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6/0065cfc101e50014174fe663e69b8422
deleted file mode 100644
index 27f3bbc..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6/0065cfc101e50014174fe663e69b8422
+++ /dev/null
@@ -1,53 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.item.ItemList;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && player.inventory.getCurrentItem() == null){
- world.setBlock(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), BlockList.midasTouchBlock, 0, 2);
- TileEntityMidasTouch midasTouchVictim = new TileEntityMidasTouch();
- midasTouchVictim.setEntity(target);
- world.setTileEntity(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), midasTouchVictim);
- target.setDead();
- }
- }
-
- @Override
- public void action(World world, EntityPlayer player)
- {
- ItemStack curItem = player.inventory.getCurrentItem();
- if(curItem != null && curItem.getItem() != ItemList.goldObj && Item.getIdFromItem(curItem.getItem()) > 0){
- int index = player.inventory.currentItem;
- ItemStack item = curItem;
- ItemStack result = new ItemStack(ItemList.goldObj, item.stackSize, item.getItemDamage());
- JewelryNBT.addItem(result, item);
- player.inventory.setInventorySlotContents(index, result);
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/60/101c12cdafea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/60/101c12cdafea001411cee0f8f86532a4
new file mode 100644
index 0000000..58538ef
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/60/101c12cdafea001411cee0f8f86532a4
@@ -0,0 +1,17 @@
+/**
+ *
+ */
+package darkknight.jewelrycraft.events;
+
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.util.Variables;
+
+public class EventList
+{
+
+ public static void preInit(FMLPreInitializationEvent e)
+ {
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/60/702c893e73e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/60/702c893e73e70014115de2bb951f0adf
deleted file mode 100644
index acb7897..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/60/702c893e73e70014115de2bb951f0adf
+++ /dev/null
@@ -1,53 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.ItemRenderer;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.client.renderer.texture.TextureManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.item.render.MaskRender;
-
-public class CursePentagram extends Curse
-{
- MaskRender mask = new MaskRender();
- public CursePentagram(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- }
-
- public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
- {
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- Tessellator tessellator = Tessellator.instance;
- ItemStack itemStack = new ItemStack(Items.apple);
- TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
- texturemanager.bindTexture(texturemanager.getResourceLocation(itemStack.getItemSpriteNumber()));
- IIcon iicon = itemStack.getIconIndex();
- float f = iicon.getMinU();
- float f1 = iicon.getMaxU();
- float f2 = iicon.getMinV();
- float f3 = iicon.getMaxV();
- GL11.glRotatef(90F, 0F, 0F, 1F);
- ItemRenderer.renderItemIn2D(tessellator, f1, f2, f, f3, iicon.getIconWidth(), iicon.getIconHeight(), 0.0625F);
- GL11.glPopMatrix();
- }
-
- public String getDescription()
- {
- return "The Dark Lord has misterious ways of showing you his love.";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/60/f045b1c8fce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/60/f045b1c8fce40014174fe663e69b8422
deleted file mode 100644
index bb0a4a6..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/60/f045b1c8fce40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static Item goldifiedObject;
- public static Item ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/63/d06f8207b0ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/63/d06f8207b0ea001411cee0f8f86532a4
new file mode 100644
index 0000000..b6f7c36
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/63/d06f8207b0ea001411cee0f8f86532a4
@@ -0,0 +1,171 @@
+/*
+ * Mod made by DarkKnight during the Modjam 3
+ * It's an awesome mod
+ * I love me! :D
+ */
+package darkknight.jewelrycraft;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.gen.structure.MapGenStructureIO;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.oredict.OreDictionary;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.Mod.EventHandler;
+import cpw.mods.fml.common.Mod.Instance;
+import cpw.mods.fml.common.ModMetadata;
+import cpw.mods.fml.common.SidedProxy;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
+import cpw.mods.fml.common.registry.EntityRegistry;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.client.gui.GuiHandler;
+import darkknight.jewelrycraft.commands.JewelrycraftCommands;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.damage.DamageSourceList;
+import darkknight.jewelrycraft.effects.EffectsList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.entities.EntityList;
+import darkknight.jewelrycraft.events.BlockEventHandler;
+import darkknight.jewelrycraft.events.BucketHandler;
+import darkknight.jewelrycraft.events.EntityEventHandler;
+import darkknight.jewelrycraft.events.EventCommonHandler;
+import darkknight.jewelrycraft.events.EventList;
+import darkknight.jewelrycraft.events.KeyBindings;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.network.PacketClearColorCache;
+import darkknight.jewelrycraft.network.PacketHandler;
+import darkknight.jewelrycraft.network.PacketKeyPressEvent;
+import darkknight.jewelrycraft.network.PacketRequestLiquidData;
+import darkknight.jewelrycraft.network.PacketRequestPlayerInfo;
+import darkknight.jewelrycraft.network.PacketRequestSetSlot;
+import darkknight.jewelrycraft.network.PacketSendServerPlayersInfo;
+import darkknight.jewelrycraft.network.PacketSendLiquidData;
+import darkknight.jewelrycraft.network.PacketSendClientPlayerInfo;
+import darkknight.jewelrycraft.proxy.CommonProxy;
+import darkknight.jewelrycraft.recipes.CraftingRecipes;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.Variables;
+import darkknight.jewelrycraft.worldGen.Generation;
+import darkknight.jewelrycraft.worldGen.village.ComponentJewelry;
+import darkknight.jewelrycraft.worldGen.village.JCTrades;
+import darkknight.jewelrycraft.worldGen.village.VillageJewelryHandler;
+
+@Mod (modid = Variables.MODID, name = Variables.MODNAME, version = Variables.VERSION, guiFactory = Variables.CONFIG_GUI, acceptedMinecraftVersions = "[1.7.10,1.8)", canBeDeactivated = true)
+public class JewelrycraftMod
+{
+ @Instance (Variables.MODID)
+ public static JewelrycraftMod instance;
+
+ @SidedProxy (clientSide = Variables.CLIENT_PROXY, serverSide = Variables.SERVER_PROXY)
+ public static CommonProxy proxy;
+ public static final Logger logger = Logger.getLogger("Jewelrycraft");
+ public static File dir;
+
+ public static CreativeTabs jewelrycraft = new CreativeTabs(Variables.MODID){
+ @Override
+ public Item getTabIconItem()
+ {
+ return Item.getItemFromBlock(BlockList.jewelCraftingTable);
+ }
+ };
+
+ public static CreativeTabs liquids = new CreativeTabLiquids("Liquids");
+ public static NBTTagCompound saveData = new NBTTagCompound();
+ public static NBTTagCompound clientData = new NBTTagCompound();
+ public static File liquidsConf;
+ public static SimpleNetworkWrapper netWrapper;
+ public static boolean fancyRender;
+ List<String> authorList = new ArrayList<String>();
+
+ /**
+ * Pre initialization of mod stuff.
+ *
+ * @param e FMLPreInitializationEvent
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ @EventHandler
+ public void preInit(FMLPreInitializationEvent e) throws IOException
+ {
+ ModMetadata metadata = e.getModMetadata();
+ dir = e.getModConfigurationDirectory();
+
+ ConfigHandler.INSTANCE.loadConfig(e);
+ BlockList.preInit(e);
+ ItemList.preInit(e);
+ CraftingRecipes.preInit(e);
+ CurseList.preInit(e);
+ PacketHandler.preInit(e);
+ EntityList.preInit(e);
+
+ VillagerRegistry.instance().registerVillagerId(3000);
+ VillagerRegistry.instance().registerVillageTradeHandler(3000, new JCTrades());
+ VillagerRegistry.instance().registerVillageCreationHandler(new VillageJewelryHandler());
+ try{
+ MapGenStructureIO.func_143031_a(ComponentJewelry.class, Variables.MODID + ":Jewelry");
+ }
+ catch(Throwable e2){
+ logger.severe("Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.7.10");
+ }
+ EventList.preInit(e);
+ proxy.preInit();
+
+ authorList.add("OnyxDarkKnight");
+ authorList.add("bspkrs");
+ authorList.add("domi1819");
+ metadata.autogenerated = false;
+ metadata.authorList = authorList;
+ metadata.url = "https://github.com/sor1n/Jewelrycraft";
+ }
+
+ /**
+ * Initializes the world generation and key bindings.
+ *
+ * @param e FMLInitializationEvent
+ */
+ @EventHandler
+ public void init(FMLInitializationEvent e)
+ {
+ EventList.init(e);
+ }
+
+ /**
+ * Post initialization of metals, modifiers and others.
+ *
+ * @param e FMLPostInitializationEvent
+ */
+ @EventHandler
+ public void postInit(FMLPostInitializationEvent e)
+ {
+ JewelrycraftUtil.addMetals();
+ JewelrycraftUtil.jamcrafters();
+ EffectsList.postInit(e);
+ DamageSourceList.postInit(e);
+ proxy.postInit();
+ }
+
+ @Mod.EventHandler
+ public void serverLoad(FMLServerStartingEvent event)
+ {
+ event.registerServerCommand(new JewelrycraftCommands());
+ }
+
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/65/90112c4074e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/65/90112c4074e70014115de2bb951f0adf
deleted file mode 100644
index 02143d6..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/65/90112c4074e70014115de2bb951f0adf
+++ /dev/null
@@ -1,54 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.ItemRenderer;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.client.renderer.texture.TextureManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.item.render.MaskRender;
-
-public class CursePentagram extends Curse
-{
- MaskRender mask = new MaskRender();
- public CursePentagram(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- }
-
- public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
- {
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- Tessellator tessellator = Tessellator.instance;
- ItemStack itemStack = new ItemStack(Items.apple);
- TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
- texturemanager.bindTexture(texturemanager.getResourceLocation(itemStack.getItemSpriteNumber()));
- IIcon iicon = itemStack.getIconIndex();
- float f = iicon.getMinU();
- float f1 = iicon.getMaxU();
- float f2 = iicon.getMinV();
- float f3 = iicon.getMaxV();
- GL11.glRotatef(90F, 1F, 0F, 0F);
-// System.out.println("Hello");
- ItemRenderer.renderItemIn2D(tessellator, f1, f2, f, f3, iicon.getIconWidth(), iicon.getIconHeight(), 0.0625F);
- GL11.glPopMatrix();
- }
-
- public String getDescription()
- {
- return "The Dark Lord has misterious ways of showing you his love.";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/65/c09cf2a692ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/65/c09cf2a692ea001411cee0f8f86532a4
new file mode 100644
index 0000000..b9d9b16
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/65/c09cf2a692ea001411cee0f8f86532a4
@@ -0,0 +1,30 @@
+package darkknight.jewelrycraft.item.render;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BraceletRender extends TileEntitySpecialRenderer
+{
+ public ModelBracelet bracelet = new ModelBracelet();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Bracelet.png");
+
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ }
+
+ public void doRender(Entity entity, double x, double y, double z, float f, float g)
+ {
+ GL11.glPushMatrix();
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+ bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ bracelet.render(entity, 0F, 1F, 0F, (float)z, f, 1.0F);
+ GL11.glPopMatrix();
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/65/d0ebb9bd98e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/65/d0ebb9bd98e3001412c4c4819c88e86b
deleted file mode 100644
index 0f5b2aa..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/65/d0ebb9bd98e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,27 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
-// GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
-// System.out.println(midas.target.rotationYaw);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, midas.target.posX - RenderManager.instance.renderPosX, midas.target.posY - RenderManager.instance.renderPosY, midas.target.posZ - RenderManager.instance.renderPosZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/66/1063c37f8ee3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/66/1063c37f8ee3001417b2e384bf7c3702
deleted file mode 100644
index d115403..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/66/1063c37f8ee3001417b2e384bf7c3702
+++ /dev/null
@@ -1,83 +0,0 @@
-package darkknight.jewelrycraft.tileentity;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.NetworkManager;
-import net.minecraft.network.Packet;
-import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
-import net.minecraft.tileentity.TileEntity;
-
-public class TileEntityMidasTouch extends TileEntity
-{
- public Entity target;
-
- public TileEntityMidasTouch(Entity target)
- {
- this.target = target;
- }
-
- /**
- * @param nbt
- */
- @Override
- public void writeToNBT(NBTTagCompound nbt)
- {
- super.writeToNBT(nbt);
- NBTTagCompound tag = new NBTTagCompound();
- target.writeToNBT(tag);
- int id = EntityList.getEntityID(target);
- nbt.setInteger("entityID", id);
- nbt.setTag("entity", tag);
- }
-
- /**
- * @param nbt
- */
- @Override
- public void readFromNBT(NBTTagCompound nbt)
- {
- super.readFromNBT(nbt);
- if (nbt.hasKey("entityID") && nbt.hasKey("entity")){
- NBTTagCompound en = (NBTTagCompound)nbt.getTag("entity");
- int entityID = nbt.getInteger("entityID");
- EntityLivingBase entity = (EntityLivingBase)EntityList.createEntityByID(entityID, worldObj);
- if (entity != null && entity instanceof EntityLivingBase){
- entity.readFromNBT(en);
- target = entity;
- }
- }
- }
-
- /**
- *
- */
- @Override
- public void updateEntity()
- {
- super.updateEntity();
- }
-
- /**
- * @return
- */
- @Override
- public Packet getDescriptionPacket()
- {
- NBTTagCompound nbttagcompound = new NBTTagCompound();
- writeToNBT(nbttagcompound);
- return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbttagcompound);
- }
-
- /**
- * @param net
- * @param packet
- */
- @Override
- public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet)
- {
- readFromNBT(packet.func_148857_g());
- worldObj.func_147479_m(xCoord, yCoord, zCoord);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/66/70c19d3a73e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/66/70c19d3a73e70014115de2bb951f0adf
deleted file mode 100644
index b35bd5c..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/66/70c19d3a73e70014115de2bb951f0adf
+++ /dev/null
@@ -1,52 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.ItemRenderer;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.client.renderer.texture.TextureManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.item.render.MaskRender;
-
-public class CursePentagram extends Curse
-{
- MaskRender mask = new MaskRender();
- public CursePentagram(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- }
-
- public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
- {
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- Tessellator tessellator = Tessellator.instance;
- ItemStack itemStack = new ItemStack(Items.apple);
- TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
- texturemanager.bindTexture(texturemanager.getResourceLocation(itemStack.getItemSpriteNumber()));
- IIcon iicon = itemStack.getIconIndex();
- float f = iicon.getMinU();
- float f1 = iicon.getMaxU();
- float f2 = iicon.getMinV();
- float f3 = iicon.getMaxV();
- ItemRenderer.renderItemIn2D(tessellator, f1, f2, f, f3, iicon.getIconWidth(), iicon.getIconHeight(), 0.0625F);
- GL11.glPopMatrix();
- }
-
- public String getDescription()
- {
- return "The Dark Lord has misterious ways of showing you his love.";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/10be20cb88ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/10be20cb88ea001411cee0f8f86532a4
new file mode 100644
index 0000000..094d703
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/10be20cb88ea001411cee0f8f86532a4
@@ -0,0 +1,63 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CursePentagram extends Curse
+{
+ float rot = 0F;
+
+ public CursePentagram(String name, int txtID, String pack)
+ {
+ super(name, txtID, pack);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ @Override
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Post event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, 25F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "The Dark Lord has misterious ways of showing you his love.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/502eece29ce3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/502eece29ce3001412c4c4819c88e86b
deleted file mode 100644
index 7a096a0..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/502eece29ce3001412c4c4819c88e86b
+++ /dev/null
@@ -1,95 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.ArrayList;
-import java.util.Random;
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-import darkknight.jewelrycraft.tileentity.TileEntityMolder;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 0;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- @Override
- public void breakBlock(World world, int i, int j, int k, Block par5, int par6)
- {
- TileEntityMidasTouch te = (TileEntityMidasTouch)world.getTileEntity(i, j, k);
- if (te.target != null) dropItem(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, new ItemStack(Items.gold_nugget, (int)(te.target.width * te.target.height * 100), 0));
- System.out.println("drop");
- super.breakBlock(world, i, j, k, par5, par6);
- }
-
- public void dropItem(World world, double x, double y, double z, ItemStack stack)
- {
- EntityItem entityitem = new EntityItem(world, x + 0.5D, y + 0.5D, z + 0.5D, stack);
- entityitem.motionX = 0;
- entityitem.motionZ = 0;
- entityitem.motionY = 0.11000000298023224D;
- world.spawnEntityInWorld(entityitem);
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null) this.setBlockBounds(0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0F, 0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2, ((TileEntityMidasTouch)tile).target.height, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2);
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/8018e58904e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/8018e58904e50014174fe663e69b8422
deleted file mode 100644
index fc804c3..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/8018e58904e50014174fe663e69b8422
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- System.out.println(Block.getBlockFromItem(item.getItem()));
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else{
-// System.out.println(Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1));
- return Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1);
- }
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/c0bee05e02e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/c0bee05e02e50014174fe663e69b8422
deleted file mode 100644
index de7a378..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/c0bee05e02e50014174fe663e69b8422
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else return Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(0);
- else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/f076514d01e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/f076514d01e50014174fe663e69b8422
deleted file mode 100644
index 022932b..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/67/f076514d01e50014174fe663e69b8422
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null && Block.getBlockFromItem(item.getItem()) != null)
- return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/68/40551ae474e300141084bb8bfb075c08 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/68/40551ae474e300141084bb8bfb075c08
deleted file mode 100644
index 5a1aaa7..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/68/40551ae474e300141084bb8bfb075c08
+++ /dev/null
@@ -1,37 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.monster.EntityMob;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart)){
- target.setDead();
- world.setBlock((int)target.posX, (int)target.posY, (int)target.posZ, BlockList.midasTouchBlock, 0, 2);
- TileEntity midasTouchVictim = new TileEntityMidasTouch(target);
- world.setTileEntity((int)target.posX, (int)target.posY, (int)target.posZ, midasTouchVictim);
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/68/6011626f87ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/68/6011626f87ea001411cee0f8f86532a4
new file mode 100644
index 0000000..360477c
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/68/6011626f87ea001411cee0f8f86532a4
@@ -0,0 +1,62 @@
+/**
+ *
+ */
+package darkknight.jewelrycraft.curses;
+
+import java.util.ArrayList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.item.EntityXPOrb;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class CurseRabbitsPaw extends Curse
+{
+ public CurseRabbitsPaw(String name, int txtID, int packID)
+ {
+ super(name, txtID, packID);
+ }
+
+ @Override
+ public void entityDropItems(EntityPlayer player, Entity target, ArrayList<EntityItem> drops)
+ {
+ for(EntityItem item: drops){
+ ItemStack drop = item.getEntityItem().copy();
+ drop.stackSize = this.rand.nextInt(4);
+ if (drop.stackSize > 0) target.entityDropItem(drop, 0.5F);
+ }
+ }
+
+ public void entityDeathAction(World world, EntityLivingBase target, EntityPlayer player)
+ {
+ String[] types = {"Red", "Blue", "White", "Black"};
+ String type = types[rand.nextInt(4)];
+ if (rand.nextInt(3) == 0){
+ if (type == "White"){
+ EntityHeart h = new EntityHalfHeart(world);
+ h.setType(type);
+ h.setLocationAndAngles(target.posX, target.posY, target.posZ, MathHelper.wrapAngleTo180_float(rand.nextFloat() * 360.0F), 0.0F);
+ world.spawnEntityInWorld(h);
+ }else{
+ for(int i = 1; i <= 1 + rand.nextInt(1 + (int)(target.getMaxHealth() / 20)); i++){
+ EntityHeart[] hearts = {new EntityHeart(world), new EntityHalfHeart(world)};
+ EntityHeart h = hearts[rand.nextInt(2)];
+ h.setType(type);
+ h.setLocationAndAngles(target.posX, target.posY, target.posZ, MathHelper.wrapAngleTo180_float(rand.nextFloat() * 360.0F), 0.0F);
+ world.spawnEntityInWorld(h);
+ }
+ }
+ }
+ if (rand.nextInt(3) == 0) world.spawnEntityInWorld(new EntityXPOrb(world, target.posX, target.posY, target.posZ, 1 + rand.nextInt(40)));
+ }
+
+ public String getDescription()
+ {
+ return "The Dark One is giving you a gift. Don't lose it.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/68/a011af0c03e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/68/a011af0c03e50014174fe663e69b8422
deleted file mode 100644
index 6f6d33d..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/68/a011af0c03e50014174fe663e69b8422
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else return Block.getBlockFromItem(item.getItem()).getIcon(16, 16);
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/68/a0a1c6429ae3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/68/a0a1c6429ae3001412c4c4819c88e86b
deleted file mode 100644
index 10f313b..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/68/a0a1c6429ae3001412c4c4819c88e86b
+++ /dev/null
@@ -1,86 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.ArrayList;
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- @Override
- public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune)
- {
- ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
-
- int count = quantityDropped(metadata, fortune, world.rand);
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null) ret.add(new ItemStack(Items.gold_nugget, (int)(((TileEntityMidasTouch)tile).target.width*((TileEntityMidasTouch)tile).target.height), 0));
-
- return ret;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null) this.setBlockBounds(0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0F, 0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2, ((TileEntityMidasTouch)tile).target.height, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2);
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/69/10a8e852ffe40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/69/10a8e852ffe40014174fe663e69b8422
deleted file mode 100644
index 0cd13f7..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/69/10a8e852ffe40014174fe663e69b8422
+++ /dev/null
@@ -1,51 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.item.ItemList;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && player.inventory.getCurrentItem() == null){
- world.setBlock(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), BlockList.midasTouchBlock, 0, 2);
- TileEntityMidasTouch midasTouchVictim = new TileEntityMidasTouch();
- midasTouchVictim.setEntity(target);
- world.setTileEntity(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), midasTouchVictim);
- target.setDead();
- }
- }
-
- @Override
- public void action(World world, EntityPlayer player)
- {
- if(player.inventory.getCurrentItem() != null && !player.inventory.getCurrentItem().getUnlocalizedName().contains("gold")){
- int index = player.inventory.currentItem;
- ItemStack item = player.inventory.getCurrentItem();
- ItemStack result = new ItemStack(ItemList.goldObj, item.stackSize, item.getItemDamage());
- JewelryNBT.addItem(result, item);
- player.inventory.setInventorySlotContents(index, result);
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/39/305de0c774e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6a/d0fc55a084ea001411cee0f8f86532a4
index 2943ec9..4ea4ee7 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/39/305de0c774e70014115de2bb951f0adf
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6a/d0fc55a084ea001411cee0f8f86532a4
@@ -19,6 +19,8 @@ import darkknight.jewelrycraft.util.Variables;
public class CursePentagram extends Curse
{
ResourceLocation curse = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
+ float rot = 0F;
+
public CursePentagram(int id, String name, int text)
{
super(id, name, text);
@@ -26,8 +28,7 @@ public class CursePentagram extends Curse
@Override
public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- }
+ {}
public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
{
@@ -36,14 +37,17 @@ public class CursePentagram extends Curse
Tessellator tessellator = Tessellator.instance;
TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
texturemanager.bindTexture(curse);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
GL11.glScalef(0.1F, 0.1F, 0.1F);
- GL11.glTranslatef(1F, 1F, 1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot+=3F;
+ if (rot > 360F) rot = 0F;
float f = 0.00390625F;
float f1 = 0.00390625F;
int x = 0;
int y = 0;
- int u = 0;
+ int u = 32 * 7;
int v = 0;
int width = 32;
int height = 32;
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6b/700e006d95e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6b/700e006d95e3001412c4c4819c88e86b
deleted file mode 100644
index be8080b..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6b/700e006d95e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,74 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
- TileEntity tile = world.getTileEntity(x, y, z);
- if(((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target.ySize);
- this.setBlockBounds(0F, 0F, 0F, 1F, 1F, 1F);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6b/8040daa897e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6b/8040daa897e3001412c4c4819c88e86b
deleted file mode 100644
index 433aee9..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6b/8040daa897e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,75 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target.width);
- this.setBlockBounds(-((TileEntityMidasTouch)tile).target.width/2, 0F, -((TileEntityMidasTouch)tile).target.width/2, ((TileEntityMidasTouch)tile).target.width/2, ((TileEntityMidasTouch)tile).target.height, ((TileEntityMidasTouch)tile).target.width/2);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/50f2d7ca74e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6b/c02cc87d88ea001411cee0f8f86532a4
index dc4d380..6b3155b 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/18/50f2d7ca74e70014115de2bb951f0adf
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6b/c02cc87d88ea001411cee0f8f86532a4
@@ -1,49 +1,48 @@
package darkknight.jewelrycraft.curses;
import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderPlayerEvent;
import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.item.render.MaskRender;
import darkknight.jewelrycraft.util.Variables;
public class CursePentagram extends Curse
{
- ResourceLocation curse = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
- public CursePentagram(int id, String name, int text)
+ float rot = 0F;
+
+ public CursePentagram(String name, int txtID, String pack)
{
- super(id, name, text);
+ super(name, txtID, pack);
}
@Override
public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- }
+ {}
public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
{
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
GL11.glPushMatrix();
GL11.glColor4f(1, 1, 1, 1);
Tessellator tessellator = Tessellator.instance;
TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
- texturemanager.bindTexture(curse);
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
GL11.glScalef(0.1F, 0.1F, 0.1F);
- GL11.glTranslatef(1F, 2F, 1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
float f = 0.00390625F;
float f1 = 0.00390625F;
int x = 0;
int y = 0;
- int u = 0;
+ int u = 32 * 7;
int v = 0;
int width = 32;
int height = 32;
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6c/1001cf0b72e300141084bb8bfb075c08 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6c/1001cf0b72e300141084bb8bfb075c08
deleted file mode 100644
index a806253..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6c/1001cf0b72e300141084bb8bfb075c08
+++ /dev/null
@@ -1,36 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.monster.EntityMob;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && !(target instanceof EntityMob) && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart)){
- target.setDead();
- world.setBlock(target.posX, target.posY, target.posZ, BlockList.midasTouchBlock, 0, 2);
- TileEntity midasTouchVictim = new TileEntityMidasTouch();
- world.setTileEntity(p_147455_1_, p_147455_2_, p_147455_3_, p_147455_4_);
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6c/70f1d8b985ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6c/70f1d8b985ea001411cee0f8f86532a4
new file mode 100644
index 0000000..140d9cb
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6c/70f1d8b985ea001411cee0f8f86532a4
@@ -0,0 +1,92 @@
+package darkknight.jewelrycraft.proxy;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.item.Item;
+import net.minecraftforge.client.MinecraftForgeClient;
+import net.minecraftforge.common.MinecraftForge;
+import cpw.mods.fml.client.registry.ClientRegistry;
+import cpw.mods.fml.client.registry.RenderingRegistry;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.client.InventoryTabVanilla;
+import darkknight.jewelrycraft.client.TabJewelry;
+import darkknight.jewelrycraft.client.TabRegistry;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.entities.renders.HeartRender;
+import darkknight.jewelrycraft.events.PlayerRenderHandler;
+import darkknight.jewelrycraft.events.ScreenHandler;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.item.render.ItemRender;
+import darkknight.jewelrycraft.model.ModelDisplayer;
+import darkknight.jewelrycraft.model.ModelHalfHeart;
+import darkknight.jewelrycraft.model.ModelHandPedestal;
+import darkknight.jewelrycraft.model.ModelHeart;
+import darkknight.jewelrycraft.model.ModelJewlersCraftingBench;
+import darkknight.jewelrycraft.model.ModelMolder;
+import darkknight.jewelrycraft.model.ModelShadowEye;
+import darkknight.jewelrycraft.model.ModelShadowHand;
+import darkknight.jewelrycraft.model.ModelSmelter;
+import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
+import darkknight.jewelrycraft.tileentity.TileEntityHandPedestal;
+import darkknight.jewelrycraft.tileentity.TileEntityJewelrsCraftingTable;
+import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
+import darkknight.jewelrycraft.tileentity.TileEntityMolder;
+import darkknight.jewelrycraft.tileentity.TileEntityShadowEye;
+import darkknight.jewelrycraft.tileentity.TileEntityShadowHand;
+import darkknight.jewelrycraft.tileentity.TileEntitySmelter;
+import darkknight.jewelrycraft.tileentity.renders.TileEntityDisplayerRender;
+import darkknight.jewelrycraft.tileentity.renders.TileEntityHandPedestalRender;
+import darkknight.jewelrycraft.tileentity.renders.TileEntityJewelrsCraftingTableRender;
+import darkknight.jewelrycraft.tileentity.renders.TileEntityMidasTouchRender;
+import darkknight.jewelrycraft.tileentity.renders.TileEntityMolderRender;
+import darkknight.jewelrycraft.tileentity.renders.TileEntityShadowEyeRender;
+import darkknight.jewelrycraft.tileentity.renders.TileEntityShadowHandRender;
+import darkknight.jewelrycraft.tileentity.renders.TileEntitySmelterRender;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.Variables;
+
+public class ClientProxy extends CommonProxy
+{
+ @Override
+ public void preInit()
+ {
+ TileEntityHandPedestalRender pedestalRender = new TileEntityHandPedestalRender(new ModelHandPedestal(Variables.PEDESTAL_TEXTURE), Variables.PEDESTAL_TEXTURE);
+ TileEntityShadowHandRender shadowHandRender = new TileEntityShadowHandRender(new ModelShadowHand(Variables.SHADOW_HAND_TEXTURE), Variables.SHADOW_HAND_TEXTURE);
+
+ ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmelter.class, new TileEntitySmelterRender());
+ ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMolder.class, new TileEntityMolderRender());
+ ClientRegistry.bindTileEntitySpecialRenderer(TileEntityJewelrsCraftingTable.class, new TileEntityJewelrsCraftingTableRender());
+ ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDisplayer.class, new TileEntityDisplayerRender());
+ ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShadowEye.class, new TileEntityShadowEyeRender());
+ ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMidasTouch.class, new TileEntityMidasTouchRender());
+ ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHandPedestal.class, pedestalRender);
+ ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShadowHand.class, shadowHandRender);
+
+ MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.displayer), new ItemRender(new TileEntityDisplayerRender(), new TileEntityDisplayer(), new ModelDisplayer()));
+ MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.jewelCraftingTable), new ItemRender(new TileEntityJewelrsCraftingTableRender(), new TileEntityJewelrsCraftingTable(), new ModelJewlersCraftingBench()));
+ MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.smelter), new ItemRender(new TileEntitySmelterRender(), new TileEntitySmelter(), new ModelSmelter()));
+ MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.molder), new ItemRender(new TileEntityMolderRender(), new TileEntityMolder(), new ModelMolder()));
+ MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.shadowEye), new ItemRender(new TileEntityShadowEyeRender(), new TileEntityShadowEye(), new ModelShadowEye()));
+ MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.handPedestal), new ItemRender(pedestalRender, new TileEntityHandPedestal(), new ModelHandPedestal(Variables.PEDESTAL_TEXTURE)));
+ MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.shadowHand), new ItemRender(shadowHandRender, new TileEntityShadowHand(), new ModelShadowHand(Variables.SHADOW_HAND_TEXTURE)));
+ MinecraftForgeClient.registerItemRenderer(ItemList.goldObj, new ItemRender());
+
+ VillagerRegistry.instance().registerVillagerSkin(3000, Variables.VILLAGER_TEXTURE);
+
+ RenderingRegistry.registerEntityRenderingHandler(EntityHeart.class, new HeartRender(new ModelHeart(), 0.25F));
+ RenderingRegistry.registerEntityRenderingHandler(EntityHalfHeart.class, new HeartRender(new ModelHalfHeart(), 0.25F));
+
+ TabRegistry.registerTab(new InventoryTabVanilla());
+ TabRegistry.registerTab(new TabJewelry());
+ MinecraftForge.EVENT_BUS.register(new TabRegistry());
+ MinecraftForge.EVENT_BUS.register(new PlayerRenderHandler());
+ MinecraftForge.EVENT_BUS.register(new ScreenHandler(Minecraft.getMinecraft(), Variables.CURSES_TEXTURE));
+ }
+
+ @Override
+ public void postInit()
+ {
+ JewelrycraftUtil.addStuff();
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6c/809dbb21fde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6c/809dbb21fde40014174fe663e69b8422
deleted file mode 100644
index 0a8aba6..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6c/809dbb21fde40014174fe663e69b8422
+++ /dev/null
@@ -1,64 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6c/c0551c9a47e700141e05cdbaeb682437 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6c/c0551c9a47e700141e05cdbaeb682437
deleted file mode 100644
index 1a10446..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6c/c0551c9a47e700141e05cdbaeb682437
+++ /dev/null
@@ -1,127 +0,0 @@
-package darkknight.jewelrycraft.events;
-
-import java.util.Iterator;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import darkknight.jewelrycraft.curses.CurseList;
-import darkknight.jewelrycraft.entities.renders.RenderHelper;
-import darkknight.jewelrycraft.item.render.BraceletRender;
-import darkknight.jewelrycraft.item.render.EarringsRender;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.model.ModelBracelet;
-import darkknight.jewelrycraft.util.JewelryNBT;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
-
-public class PlayerRenderHandler
-{
- MaskRender mask = new MaskRender();
- EarringsRender earrings = new EarringsRender();
- BraceletRender bracelet = new BraceletRender();
-// public static String[] infamyCache = new String[]{};
- public static NBTTagCompound playersInfo = new NBTTagCompound();
-
- @SubscribeEvent
- public void renderScreen(RenderPlayerEvent.Specials.Post event)
- {
- ModelBiped main = event.renderer.modelBipedMain;
- Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
- if (playersInfo != null){
- while (players.hasNext()){
- EntityPlayer player = players.next();
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(1.6f, 1.6f, 1.6f);
- GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- GL11.glPopMatrix();
- }
- if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(0.07f, 0.07f, 0.07f);
- GL11.glTranslatef(0.0F, 3.0F, -2.0F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- System.out.println(gemColor + " " + ingotColor);
- earrings.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- GL11.glPopMatrix();
- }
- for(int i = 10; i <= 13; i++)
- if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
- if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
- if (i / 12 == 1){
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
- }else{
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- }
- GL11.glPopMatrix();
- }
- }
- }
- }
-
- /**
- * @param string
- * @return
- */
- private boolean checkPlayerInfamy(String string)
- {
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
- if(playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
-// for(int i = 0; i < infamyCache.length; i++)
-// if (infamyCache[i].equals(string)) return true;
- return false;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6d/60e10dae86ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6d/60e10dae86ea001411cee0f8f86532a4
new file mode 100644
index 0000000..bada47f
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6d/60e10dae86ea001411cee0f8f86532a4
@@ -0,0 +1,98 @@
+package darkknight.jewelrycraft.events;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.gui.GuiChat;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderGameOverlayEvent;
+import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.util.Variables;
+
+public class ScreenHandler extends Gui
+{
+ private Minecraft mc;
+ public static NBTTagCompound tagCache = null;
+ public static int cooldown;
+
+ public ScreenHandler(Minecraft mc)
+ {
+ super();
+ this.mc = mc;
+ }
+
+ @SubscribeEvent
+ public void renderScreen(RenderGameOverlayEvent event)
+ {
+ if (event.isCancelable() || event.type != ElementType.ALL || tagCache == null) return;
+ if (!mc.gameSettings.showDebugInfo && !(mc.currentScreen instanceof GuiChat)){
+ int count = 0;
+ int size = 32;
+ ScaledResolution resolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
+ if (tagCache.hasKey("cursePoints") && tagCache.getInteger("cursePoints") > 0){
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ for(Curse curse: Curse.getCurseList()){
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ drawTexturedModalRect(-16, -16 + (size - 6) * count, 0, 32, 144, 60);
+ count++;
+ }
+ }
+ count = 0;
+ for(Curse curse: Curse.getCurseList())
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ mc.renderEngine.bindTexture(new ResourceLocation(Variables.MODID, "textures/gui/curses" + curse.getTexturePack() + ".png"));
+ int tag = curse.getTextureID();
+ GL11.glPushMatrix();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glScalef(0.45f, 0.45f, 0.0f);
+ drawTexturedModalRect(28, 18 + (size + 26) * count, tag % size * size, tag / size * size, size, size);
+ GL11.glPopMatrix();
+ count++;
+ }
+ count = 0;
+ size = 16;
+ for(Curse curse: Curse.getCurseList())
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ int tag = curse.getID();
+ mc.fontRenderer.drawStringWithShadow(curse.getName().split(":")[1], 30, 11 + (size + 10) * count, 16777215);
+ if (tagCache.getInteger(curse.getName()) == 2){
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GL11.glColor4f(1f, 1f, 1f, 0.5f);
+ drawTexturedModalRect(95, 7 + (size + 10) * count, 3 * size, 0, size, size);
+ GL11.glPopMatrix();
+ }
+ count++;
+ }
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1f, 1f, 1f, 1.0f);
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ count = 0;
+ size = 16;
+ if (tagCache.getFloat("BlueHeart") > 0){
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 0 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlueHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
+ }
+ count++;
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ if (tagCache.getFloat("BlackHeart") > 0){
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 1 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlackHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
+ }
+ count++;
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ if (tagCache.getFloat("WhiteHeart") > 0)
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 2 * size, 1 * size, size, size);
+ GL11.glPopMatrix();
+ }
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6d/f044cd31afea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6d/f044cd31afea001411cee0f8f86532a4
new file mode 100644
index 0000000..e1fef46
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6d/f044cd31afea001411cee0f8f86532a4
@@ -0,0 +1,180 @@
+/*
+ * Mod made by DarkKnight during the Modjam 3
+ * It's an awesome mod
+ * I love me! :D
+ */
+package darkknight.jewelrycraft;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.gen.structure.MapGenStructureIO;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.oredict.OreDictionary;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.Mod.EventHandler;
+import cpw.mods.fml.common.Mod.Instance;
+import cpw.mods.fml.common.ModMetadata;
+import cpw.mods.fml.common.SidedProxy;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
+import cpw.mods.fml.common.registry.EntityRegistry;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.client.gui.GuiHandler;
+import darkknight.jewelrycraft.commands.JewelrycraftCommands;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.damage.DamageSourceList;
+import darkknight.jewelrycraft.effects.EffectsList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.entities.EntityList;
+import darkknight.jewelrycraft.events.BlockEventHandler;
+import darkknight.jewelrycraft.events.BucketHandler;
+import darkknight.jewelrycraft.events.EntityEventHandler;
+import darkknight.jewelrycraft.events.EventCommonHandler;
+import darkknight.jewelrycraft.events.KeyBindings;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.network.PacketClearColorCache;
+import darkknight.jewelrycraft.network.PacketHandler;
+import darkknight.jewelrycraft.network.PacketKeyPressEvent;
+import darkknight.jewelrycraft.network.PacketRequestLiquidData;
+import darkknight.jewelrycraft.network.PacketRequestPlayerInfo;
+import darkknight.jewelrycraft.network.PacketRequestSetSlot;
+import darkknight.jewelrycraft.network.PacketSendServerPlayersInfo;
+import darkknight.jewelrycraft.network.PacketSendLiquidData;
+import darkknight.jewelrycraft.network.PacketSendClientPlayerInfo;
+import darkknight.jewelrycraft.proxy.CommonProxy;
+import darkknight.jewelrycraft.recipes.CraftingRecipes;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.Variables;
+import darkknight.jewelrycraft.worldGen.Generation;
+import darkknight.jewelrycraft.worldGen.village.ComponentJewelry;
+import darkknight.jewelrycraft.worldGen.village.JCTrades;
+import darkknight.jewelrycraft.worldGen.village.VillageJewelryHandler;
+
+@Mod (modid = Variables.MODID, name = Variables.MODNAME, version = Variables.VERSION, guiFactory = Variables.CONFIG_GUI, acceptedMinecraftVersions = "[1.7.10,1.8)", canBeDeactivated = true)
+public class JewelrycraftMod
+{
+ @Instance (Variables.MODID)
+ public static JewelrycraftMod instance;
+
+ @SidedProxy (clientSide = Variables.CLIENT_PROXY, serverSide = Variables.SERVER_PROXY)
+ public static CommonProxy proxy;
+ public static final Logger logger = Logger.getLogger("Jewelrycraft");
+ public static File dir;
+
+ public static CreativeTabs jewelrycraft = new CreativeTabs(Variables.MODID){
+ @Override
+ public Item getTabIconItem()
+ {
+ return Item.getItemFromBlock(BlockList.jewelCraftingTable);
+ }
+ };
+
+ public static CreativeTabs liquids = new CreativeTabLiquids("Liquids");
+ public static NBTTagCompound saveData = new NBTTagCompound();
+ public static NBTTagCompound clientData = new NBTTagCompound();
+ public static File liquidsConf;
+ public static SimpleNetworkWrapper netWrapper;
+ public static boolean fancyRender;
+ List<String> authorList = new ArrayList<String>();
+
+ /**
+ * Pre initialization of mod stuff.
+ *
+ * @param e FMLPreInitializationEvent
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ @EventHandler
+ public void preInit(FMLPreInitializationEvent e) throws IOException
+ {
+ ModMetadata metadata = e.getModMetadata();
+ dir = e.getModConfigurationDirectory();
+
+ ConfigHandler.INSTANCE.loadConfig(e);
+ BlockList.preInit(e);
+ ItemList.preInit(e);
+ CraftingRecipes.preInit(e);
+ CurseList.preInit(e);
+ PacketHandler.preInit(e);
+ EntityList.preInit(e);
+
+ proxy.preInit();
+
+ OreDictionary.registerOre("ingotShadow", new ItemStack(ItemList.shadowIngot));
+ OreDictionary.registerOre("oreShadow", new ItemStack(BlockList.shadowOre));
+ VillagerRegistry.instance().registerVillagerId(3000);
+ VillagerRegistry.instance().registerVillageTradeHandler(3000, new JCTrades());
+ VillagerRegistry.instance().registerVillageCreationHandler(new VillageJewelryHandler());
+ try{
+ MapGenStructureIO.func_143031_a(ComponentJewelry.class, Variables.MODID + ":Jewelry");
+ }
+ catch(Throwable e2){
+ logger.severe("Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.7.10");
+ }
+ MinecraftForge.EVENT_BUS.register(new EntityEventHandler());
+ MinecraftForge.EVENT_BUS.register(new BlockEventHandler());
+ MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
+ FMLCommonHandler.instance().bus().register(new EventCommonHandler());
+ BucketHandler.INSTANCE.buckets.put(BlockList.moltenMetal, ItemList.bucket);
+
+ authorList.add("OnyxDarkKnight");
+ authorList.add("bspkrs");
+ authorList.add("domi1819");
+ metadata.autogenerated = false;
+ metadata.authorList = authorList;
+ metadata.url = "https://github.com/sor1n/Jewelrycraft";
+ }
+
+ /**
+ * Initializes the world generation and key bindings.
+ *
+ * @param e FMLInitializationEvent
+ */
+ @EventHandler
+ public void init(FMLInitializationEvent e)
+ {
+ GameRegistry.registerWorldGenerator(new Generation(), 0);
+ if (FMLCommonHandler.instance().getSide() == Side.CLIENT) FMLCommonHandler.instance().bus().register(new KeyBindings());
+ new GuiHandler();
+ FMLCommonHandler.instance().bus().register(ConfigHandler.INSTANCE);
+ }
+
+ /**
+ * Post initialization of metals, modifiers and others.
+ *
+ * @param e FMLPostInitializationEvent
+ */
+ @EventHandler
+ public void postInit(FMLPostInitializationEvent e)
+ {
+ JewelrycraftUtil.addMetals();
+ JewelrycraftUtil.jamcrafters();
+ EffectsList.postInit(e);
+ DamageSourceList.postInit(e);
+ proxy.postInit();
+ }
+
+ @Mod.EventHandler
+ public void serverLoad(FMLServerStartingEvent event)
+ {
+ event.registerServerCommand(new JewelrycraftCommands());
+ }
+
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6e/00835d83fde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6e/00835d83fde40014174fe663e69b8422
deleted file mode 100644
index e1e37b4..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6e/00835d83fde40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- public static Item goldifiedObject;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- goldifiedObject = new ItemGoldObject().setUnlocalizedName(Variables.MODID + ".goldObject");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6e/a0449c8093e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6e/a0449c8093e3001412c4c4819c88e86b
deleted file mode 100644
index 6377c0b..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6e/a0449c8093e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,84 +0,0 @@
-package darkknight.jewelrycraft.tileentity;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.NetworkManager;
-import net.minecraft.network.Packet;
-import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
-import net.minecraft.tileentity.TileEntity;
-
-public class TileEntityMidasTouch extends TileEntity
-{
- public Entity target;
-
- public TileEntityMidasTouch()
- {}
-
- public void setEntity(Entity ent)
- {
- target = ent;
- }
-
- @Override
- public void writeToNBT(NBTTagCompound nbt)
- {
- super.writeToNBT(nbt);
- if (target != null){
- int id = EntityList.getEntityID(target);
- NBTTagCompound tag = new NBTTagCompound();
- target.writeToNBT(tag);
- nbt.setInteger("entityID", id);
- nbt.setTag("entity", tag);
- }
- System.out.println("Write: " + nbt);
- }
-
- /**
- * @param nbt
- */
- @Override
- public void readFromNBT(NBTTagCompound nbt)
- {
- super.readFromNBT(nbt);
- System.out.println("Read: " + nbt);
- NBTTagCompound en = (NBTTagCompound)nbt.getTag("entity");
- int entityID = nbt.getInteger("entityID");
- EntityLivingBase entity = (EntityLivingBase)EntityList.createEntityByID(entityID, worldObj);
- entity.readFromNBT(en);
- target = entity;
- }
-
- /**
- *
- */
- @Override
- public void updateEntity()
- {
- super.updateEntity();
- // System.out.println(target);
- }
-
- /**
- * @return
- */
- @Override
- public Packet getDescriptionPacket()
- {
- NBTTagCompound nbttagcompound = new NBTTagCompound();
- writeToNBT(nbttagcompound);
- return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbttagcompound);
- }
-
- /**
- * @param net
- * @param packet
- */
- @Override
- public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet)
- {
- readFromNBT(packet.func_148857_g());
- worldObj.func_147479_m(xCoord, yCoord, zCoord);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6f/504fd1d374e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6f/504fd1d374e70014115de2bb951f0adf
deleted file mode 100644
index cd8b754..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/6f/504fd1d374e70014115de2bb951f0adf
+++ /dev/null
@@ -1,63 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.ItemRenderer;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.client.renderer.texture.TextureManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.World;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.util.Variables;
-
-public class CursePentagram extends Curse
-{
- ResourceLocation curse = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
- public CursePentagram(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- }
-
- public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
- {
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- Tessellator tessellator = Tessellator.instance;
- TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
- texturemanager.bindTexture(curse);
- GL11.glScalef(0.1F, 0.1F, 0.1F);
- GL11.glTranslatef(1F, 12F, 1F);
- GL11.glRotatef(90F, 1F, 0F, 0F);
- float f = 0.00390625F;
- float f1 = 0.00390625F;
- int x = 0;
- int y = 0;
- int u = 0;
- int v = 0;
- int width = 32;
- int height = 32;
- tessellator.startDrawingQuads();
- tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
- tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
- tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
- tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
- tessellator.draw();
- GL11.glPopMatrix();
- }
-
- public String getDescription()
- {
- return "The Dark Lord has misterious ways of showing you his love.";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7/10543334ffe40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7/10543334ffe40014174fe663e69b8422
deleted file mode 100644
index a60c79e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7/10543334ffe40014174fe663e69b8422
+++ /dev/null
@@ -1,51 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.item.ItemList;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && player.inventory.getCurrentItem() == null){
- world.setBlock(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), BlockList.midasTouchBlock, 0, 2);
- TileEntityMidasTouch midasTouchVictim = new TileEntityMidasTouch();
- midasTouchVictim.setEntity(target);
- world.setTileEntity(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), midasTouchVictim);
- target.setDead();
- }
- }
-
- @Override
- public void action(World world, EntityPlayer player)
- {
- if(player.inventory.getCurrentItem() != null){
- int index = player.inventory.currentItem;
- ItemStack item = player.inventory.getCurrentItem();
- ItemStack result = new ItemStack(ItemList.goldObj, item.stackSize, item.getItemDamage());
- JewelryNBT.addItem(result, item);
- player.inventory.setInventorySlotContents(index, result);
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c2/b0c9916cfde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7/a00c8e49afea001411cee0f8f86532a4
index a42a1f3..a42a1f3 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c2/b0c9916cfde40014174fe663e69b8422
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7/a00c8e49afea001411cee0f8f86532a4
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7/b0a6aed396ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7/b0a6aed396ea001411cee0f8f86532a4
new file mode 100644
index 0000000..7a88497
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7/b0a6aed396ea001411cee0f8f86532a4
@@ -0,0 +1,116 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glColor3f(1F, 0F, 0F);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_DST_COLOR);
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/70/b0cef28997ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/70/b0cef28997ea001411cee0f8f86532a4
new file mode 100644
index 0000000..d82a468
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/70/b0cef28997ea001411cee0f8f86532a4
@@ -0,0 +1,66 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CursePentagram extends Curse
+{
+ float rot = 0F;
+
+ public CursePentagram(String name, int txtID, String pack)
+ {
+ super(name, txtID, pack);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ @Override
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+// GL11.glColor4f(1F, 1F, 1F, 0.3F);
+// GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "The Dark Lord has misterious ways of showing you his love.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/71/60061e9571e300141084bb8bfb075c08 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/71/60061e9571e300141084bb8bfb075c08
deleted file mode 100644
index fb394c0..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/71/60061e9571e300141084bb8bfb075c08
+++ /dev/null
@@ -1,72 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidRegistry;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.tileentity.TileEntityAltar;
-import darkknight.jewelrycraft.tileentity.TileEntityBlockShadow;
-import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
-import darkknight.jewelrycraft.tileentity.TileEntityHandPedestal;
-import darkknight.jewelrycraft.tileentity.TileEntityJewelrsCraftingTable;
-import darkknight.jewelrycraft.tileentity.TileEntityMolder;
-import darkknight.jewelrycraft.tileentity.TileEntityShadowEye;
-import darkknight.jewelrycraft.tileentity.TileEntityShadowHand;
-import darkknight.jewelrycraft.tileentity.TileEntitySmelter;
-import darkknight.jewelrycraft.util.Variables;
-
-public class BlockList
-{
- public static Block shadowOre, smelter, molder, displayer, jewelCraftingTable, shadowBlock, shadowEye, jewelAltar, handPedestal, shadowHand, midasTouchBlock;
- public static BlockMoltenMetal moltenMetal;
- public static Fluid moltenMetalFluid;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- shadowOre = new BlockJCOre().setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockTextureName(Variables.MODID + ":oreShadow").setBlockName(Variables.MODID + ".oreShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- smelter = new BlockSmelter().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".smelter").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molder = new BlockMolder(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".molder").setCreativeTab(JewelrycraftMod.jewelrycraft);
- displayer = new BlockDisplayer(Material.iron).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypeMetal).setBlockName(Variables.MODID + ".displayer").setCreativeTab(JewelrycraftMod.jewelrycraft);
- jewelCraftingTable = new BlockJewelrsCraftingTable(Material.rock).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".jewelCraftingTable").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowBlock = new BlockShadow().setHardness(5.0F).setResistance(7.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":blockShadow").setBlockName(Variables.MODID + ".blockShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- jewelAltar = new BlockJewelAltar().setHardness(5.0F).setResistance(2.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":altar").setBlockName(Variables.MODID + ".altar").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowEye = new BlockShadowEye().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowEye").setCreativeTab(JewelrycraftMod.jewelrycraft);
- handPedestal = new BlockHandPedestal(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".handPedestal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowHand = new BlockShadowHand(Material.rock).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowHand").setCreativeTab(JewelrycraftMod.jewelrycraft).setBlockUnbreakable();
- midasTouchBlock = new BlockMidasTouch(Material.iron).setHardness(3.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setBlockName(Variables.MODID + ".midasTouchBlock").setCreativeTab(JewelrycraftMod.jewelrycraft);
-
- GameRegistry.registerBlock(shadowOre, "shadowOre");
- GameRegistry.registerBlock(shadowBlock, "shadowBlock");
- GameRegistry.registerBlock(smelter, "Smelter");
- GameRegistry.registerBlock(molder, "Molder");
- GameRegistry.registerBlock(jewelCraftingTable, "jewelCraftingTable");
- GameRegistry.registerBlock(displayer, "Displayer");
- GameRegistry.registerBlock(jewelAltar, "Altar");
- GameRegistry.registerBlock(shadowEye, "Shadow Eye");
- GameRegistry.registerBlock(handPedestal, "Stone Bricks Pedestal");
- GameRegistry.registerBlock(shadowHand, "Shadow Hand");
- GameRegistry.registerTileEntity(TileEntitySmelter.class, Variables.MODID + ":smelter");
- GameRegistry.registerTileEntity(TileEntityMolder.class, Variables.MODID + ":molder");
- GameRegistry.registerTileEntity(TileEntityJewelrsCraftingTable.class, Variables.MODID + ":table");
- GameRegistry.registerTileEntity(TileEntityDisplayer.class, Variables.MODID + ":displayer");
- GameRegistry.registerTileEntity(TileEntityBlockShadow.class, Variables.MODID + ":blockShadow");
- GameRegistry.registerTileEntity(TileEntityAltar.class, Variables.MODID + ":altar");
- GameRegistry.registerTileEntity(TileEntityShadowEye.class, Variables.MODID + ":shadowEye");
- GameRegistry.registerTileEntity(TileEntityHandPedestal.class, Variables.MODID + ":handPedestal");
- GameRegistry.registerTileEntity(TileEntityShadowHand.class, Variables.MODID + ":shadowHand");
- moltenMetalFluid = new Fluid("metal.molten").setLuminosity(15).setDensity(3000).setTemperature(2000).setViscosity(6000);
- if (!FluidRegistry.registerFluid(moltenMetalFluid)) moltenMetalFluid = FluidRegistry.getFluid("metal.molten");
- moltenMetal = new BlockMoltenMetal(moltenMetalFluid, Material.lava);
- GameRegistry.registerBlock(moltenMetal, "moltenMetalLiquid");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/71/c0574f9791e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/71/c0574f9791e3001417b2e384bf7c3702
deleted file mode 100644
index 5e6d882..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/71/c0574f9791e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,25 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(1F, 1.0F, 0.0F);
- RenderManager.instance.getEntityRenderObject(midas.target).doRender(midas.target, 0D, 0D, 0D, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/72/1087a1e902e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/72/1087a1e902e50014174fe663e69b8422
deleted file mode 100644
index 9afe44f..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/72/1087a1e902e50014174fe663e69b8422
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
-// else return Block.getBlockFromItem(item.getItem()).getIcon(6, 6);
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/72/c0e5f1d298e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/72/c0e5f1d298e3001412c4c4819c88e86b
deleted file mode 100644
index 2c50af8..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/72/c0e5f1d298e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,27 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
-// System.out.println(midas.target.rotationYaw);
- GL11.glRotatef(midas.target.rotationPitch, 0.0F, 1.0F, 0.0F);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, midas.target.posX - RenderManager.instance.renderPosX, midas.target.posY - RenderManager.instance.renderPosY, midas.target.posZ - RenderManager.instance.renderPosZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/72/d04b715902e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/72/d04b715902e50014174fe663e69b8422
deleted file mode 100644
index f13e940..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/72/d04b715902e50014174fe663e69b8422
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else return Block.getBlockFromItem(item.getItem()).getIcon(0, 0);
- else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/73/902cfdee91e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/73/902cfdee91e3001417b2e384bf7c3702
deleted file mode 100644
index e64f163..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/73/902cfdee91e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,26 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.getEntityRenderObject(midas.target).doRender(midas.target, te.xCoord - Minecraft.getMinecraft().thePlayer.posX, te.yCoord - Minecraft.getMinecraft().thePlayer.posY, te.zCoord - Minecraft.getMinecraft().thePlayer.posZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/73/9073412cb3ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/73/9073412cb3ea001411cee0f8f86532a4
new file mode 100644
index 0000000..968e9e3
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/73/9073412cb3ea001411cee0f8f86532a4
@@ -0,0 +1,32 @@
+package darkknight.jewelrycraft.item.render;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BraceletRender extends TileEntitySpecialRenderer
+{
+ public ModelBracelet bracelet = new ModelBracelet();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Bracelet.png");
+
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ }
+
+ public void doRender(Entity entity, double x, double y, double z, float f, float g)
+ {
+ GL11.glPushMatrix();
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+ System.out.println((float)x + " " + (float)z);
+ if ((int)z != 16777215) bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ GL11.glTranslatef(0F, 3F, 0F);
+ if ((int)x != 16777215) bracelet.render(entity, 0F, 0F, 0F, (float)x, (float)y, 1.0F);
+ GL11.glPopMatrix();
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/75/20e44257d6ea00141eeebc0fa9e0653a b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/75/20e44257d6ea00141eeebc0fa9e0653a
new file mode 100644
index 0000000..f03f54b
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/75/20e44257d6ea00141eeebc0fa9e0653a
@@ -0,0 +1,204 @@
+package darkknight.jewelrycraft.client.gui;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiTextField;
+import net.minecraft.client.gui.inventory.GuiContainer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL12;
+import darkknight.jewelrycraft.JewelrycraftMod;
+import darkknight.jewelrycraft.client.gui.container.ContainerJewelryModifier;
+import darkknight.jewelrycraft.network.PacketRequestSetSlot;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+
+public class GuiJewelryModifier extends GuiContainer
+{
+ private ResourceLocation texture;
+ private GuiButton addItems;
+ private GuiTextField searchField, pages;
+ private boolean clicked;
+ private int page = 1, maxPages = 1, selectedX = 0, selectedY = 0, selectedPage = 0;
+ private ItemStack selectedItem;
+ private ArrayList<ItemStack> selectedItems = new ArrayList<ItemStack>();
+ private List<Map<Integer, Map<Integer, Integer>>> selectedItemsPos = new ArrayList<Map<Integer, Map<Integer, Integer>>>();
+ ContainerJewelryModifier jMod;
+
+ public GuiJewelryModifier(ContainerJewelryModifier containerJewelryTab, ResourceLocation texture)
+ {
+ super(containerJewelryTab);
+ xSize = 211;
+ ySize = 247;
+ jMod = containerJewelryTab;
+ this.maxPages = JewelrycraftUtil.objects.size() / 48 + 1;
+ this.texture = texture;
+ }
+
+ @Override
+ public void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY)
+ {
+ GL11.glColor3f(1, 1, 1);
+ Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
+ drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
+ if (selectedX != 0 && selectedY != 0 && page == selectedPage) drawTexturedModalRect(selectedX, selectedY, 211, 0, 18, 18);
+ for(Map items: selectedItemsPos){
+ for(Object itemPage: items.keySet()){
+ if (page == (Integer)itemPage) for(Object x: ((Map)items.get(itemPage)).keySet())
+ drawTexturedModalRect((int)x, (int)((Map)items.get(itemPage)).get(x), 211, 0, 18, 18);
+ }
+ }
+ this.searchField.drawTextBox();
+ this.pages.drawTextBox();
+ }
+
+ @Override
+ public void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
+ {
+ int i = 0;
+ for(ItemStack item: JewelrycraftUtil.objects){
+ if (this.searchField.getText() == "" || item.getDisplayName().toLowerCase().contains(this.searchField.getText().toLowerCase())){
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glColor3f(1F, 1F, 1F);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL12.GL_RESCALE_NORMAL);
+ if (i >= (page - 1) * 48 && i < page * 48) itemRender.renderItemAndEffectIntoGUI(this.fontRendererObj, this.mc.getTextureManager(), item, 88 + 20 * (i % 6), 7 + 17 * (i / 6) - 136 * (page - 1));
+ GL11.glDisable(GL11.GL_LIGHTING);
+ i++;
+ }
+ }
+ }
+
+ @Override
+ protected void keyTyped(char character, int key)
+ {
+ if (this.searchField.textboxKeyTyped(character, key)){
+ int items = 0;
+ for(ItemStack item: JewelrycraftUtil.objects)
+ if (item.getDisplayName().toLowerCase().contains(this.searchField.getText().toLowerCase())) items++;
+ maxPages = items / 48 + 1;
+ page = 1;
+ this.pages.setText(page + "/" + maxPages);
+ }else super.keyTyped(character, key);
+ }
+
+ protected void mouseClicked(int x, int y, int id)
+ {
+ super.mouseClicked(x, y, id);
+ if (x >= this.searchField.xPosition && x <= this.searchField.xPosition + this.searchField.width && y >= this.searchField.yPosition && y <= this.searchField.yPosition + this.searchField.height){
+ this.searchField.setText("");
+ this.searchField.setFocused(true);
+ maxPages = JewelrycraftUtil.objects.size() / 48 + 1;
+ }else this.searchField.setFocused(false);
+ for(Object button: this.buttonList){
+ if (((GuiButton)button).id < 3 && ((GuiButton)button).mousePressed(mc, x, y)){
+ if (((GuiButton)button).id < 2){
+ this.selectedItems.removeAll(selectedItems);
+ this.selectedItemsPos.removeAll(selectedItemsPos);
+ }else{
+ this.selectedX = 0;
+ this.selectedY = 0;
+ this.selectedItem = null;
+ }
+ ((GuiButton)buttonList.get(0)).enabled = true;
+ ((GuiButton)buttonList.get(1)).enabled = true;
+ ((GuiButton)buttonList.get(2)).enabled = true;
+ ((GuiButton)button).enabled = false;
+ }
+ }
+ int i = 0;
+ for(ItemStack item: JewelrycraftUtil.objects){
+ if (this.searchField.getText() == "" || item.getDisplayName().toLowerCase().contains(this.searchField.getText().toLowerCase())){
+ if (i >= (page - 1) * 48 && i < page * 48 && x >= this.guiLeft + 88 + 20 * (i % 6) && x < this.guiLeft + 108 + 20 * (i % 6) && y >= this.guiTop + 9 + 17 * (i / 6) - 136 * (page - 1) && y < this.guiTop + 25 + 17 * (i / 6) - 136 * (page - 1)){
+ if (!((GuiButton)buttonList.get(0)).enabled || !((GuiButton)buttonList.get(1)).enabled){
+ this.selectedItem = item;
+ this.selectedX = this.guiLeft + 87 + 20 * (i % 6);
+ this.selectedY = this.guiTop + 6 + 17 * (i / 6) - 136 * (page - 1);
+ this.selectedPage = page;
+ }else if (!((GuiButton)buttonList.get(2)).enabled){
+ Map<Integer, Map<Integer, Integer>> itemPage = new HashMap<Integer, Map<Integer, Integer>>();
+ Map<Integer, Integer> pos = new HashMap<Integer, Integer>();
+ pos.put(this.guiLeft + 87 + 20 * (i % 6), this.guiTop + 6 + 17 * (i / 6) - 136 * (page - 1));
+ itemPage.put(page, pos);
+ if (!this.selectedItems.contains(item)){
+ this.selectedItems.add(item);
+ this.selectedItemsPos.add(itemPage);
+ }else{
+ this.selectedItems.remove(item);
+ this.selectedItemsPos.remove(itemPage);
+ }
+ }
+ }
+ i++;
+ }
+ }
+ if (((GuiButton)buttonList.get(4)).mousePressed(mc, x, y) && page > 1) page--;
+ if (((GuiButton)buttonList.get(5)).mousePressed(mc, x, y) && page < maxPages) page++;
+ if (jMod.modInv.getStackInSlot(36) != null){
+ ItemStack targetItem = jMod.modInv.getStackInSlot(36).copy();
+ if (((GuiButton)buttonList.get(3)).mousePressed(mc, x, y) && !((GuiButton)buttonList.get(0)).enabled){
+ JewelryNBT.addIngotColor(targetItem, 16777215);
+ JewelryNBT.addMetal(targetItem, new ItemStack(Item.getItemById(0), 0, 0));
+ JewelryNBT.addMetal(targetItem, this.selectedItem);
+ JewelrycraftMod.netWrapper.sendToServer(new PacketRequestSetSlot(targetItem));
+ }
+ if (((GuiButton)buttonList.get(3)).mousePressed(mc, x, y) && !((GuiButton)buttonList.get(1)).enabled){
+ JewelryNBT.addGemColor(targetItem, 16777215);
+ JewelryNBT.addGem(targetItem, new ItemStack(Item.getItemById(0), 0, 0));
+ JewelryNBT.addGem(targetItem, this.selectedItem);
+ JewelrycraftMod.netWrapper.sendToServer(new PacketRequestSetSlot(targetItem));
+ }
+ if (((GuiButton)buttonList.get(3)).mousePressed(mc, x, y) && !((GuiButton)buttonList.get(2)).enabled){
+ JewelryNBT.addModifiers(targetItem, selectedItems);
+ JewelrycraftMod.netWrapper.sendToServer(new PacketRequestSetSlot(targetItem));
+ }
+ }
+ this.pages.setText(page + "/" + maxPages);
+ }
+
+ @Override
+ public void initGui()
+ {
+ super.initGui();
+ this.searchField = new GuiTextField(this.fontRendererObj, this.guiLeft + 89, this.guiTop + 148, 115, this.fontRendererObj.FONT_HEIGHT + 3);
+ this.searchField.setMaxStringLength(15);
+ this.searchField.setTextColor(16777215);
+ this.searchField.setVisible(true);
+ this.searchField.setCanLoseFocus(true);
+ this.pages = new GuiTextField(this.fontRendererObj, this.guiLeft + 20, this.guiTop + 146, 50, this.fontRendererObj.FONT_HEIGHT + 3);
+ this.pages.setMaxStringLength(15);
+ this.pages.setTextColor(16777215);
+ this.pages.setVisible(true);
+ this.pages.setText(page + "/" + maxPages);
+ this.buttonList.add(new GuiButton(0, this.guiLeft + 17, this.guiTop + 30, 52, 20, "Metal"));
+ this.buttonList.add(new GuiButton(1, this.guiLeft + 17, this.guiTop + 52, 52, 20, "Gem"));
+ this.buttonList.add(new GuiButton(2, this.guiLeft + 17, this.guiTop + 74, 52, 20, "Modifiers"));
+ this.buttonList.add(new GuiButton(3, this.guiLeft + 17, this.guiTop + 96, 52, 20, "Add Items"));
+ this.buttonList.add(new GuiButton(4, this.guiLeft + 5, this.guiTop + 142, 13, 20, "<<"));
+ this.buttonList.add(new GuiButton(5, this.guiLeft + 73, this.guiTop + 142, 13, 20, ">>"));
+ ((GuiButton)buttonList.get(0)).enabled = false;
+ }
+
+ public void drawScreen(int x, int y, float z)
+ {
+ super.drawScreen(x, y, z);
+ int i = 0;
+ List<String> list = new ArrayList<String>();
+ for(ItemStack item: JewelrycraftUtil.objects){
+ if (this.searchField.getText() == "" || item.getDisplayName().toLowerCase().contains(this.searchField.getText().toLowerCase())){
+ if (i >= (page - 1) * 48 && i < page * 48 && x >= this.guiLeft + 88 + 20 * (i % 6) && x < this.guiLeft + 108 + 20 * (i % 6) && y >= this.guiTop + 9 + 17 * (i / 6) - 136 * (page - 1) && y < this.guiTop + 25 + 17 * (i / 6) - 136 * (page - 1)){
+ list.add(item.getDisplayName());
+ if (item.getTooltip(mc.thePlayer, mc.gameSettings.advancedItemTooltips) != null) this.renderToolTip(item, x, y);
+ else this.drawHoveringText(list, x, y, this.fontRendererObj);
+ }
+ i++;
+ }
+ }
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/75/60834d1d9ce3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/75/60834d1d9ce3001412c4c4819c88e86b
deleted file mode 100644
index 973f460..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/75/60834d1d9ce3001412c4c4819c88e86b
+++ /dev/null
@@ -1,26 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glTranslatef(0.5F, 0.0F, 0.5F);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, midas.xCoord - RenderManager.instance.renderPosX, midas.yCoord - RenderManager.instance.renderPosY, midas.zCoord - RenderManager.instance.renderPosZ, midas.target.rotationYaw, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/76/304649cf95ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/76/304649cf95ea001411cee0f8f86532a4
new file mode 100644
index 0000000..76b8baf
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/76/304649cf95ea001411cee0f8f86532a4
@@ -0,0 +1,111 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.07f, 0.07f, 0.07f);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/76/40fb0f9585ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/76/40fb0f9585ea001411cee0f8f86532a4
new file mode 100644
index 0000000..452f586
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/76/40fb0f9585ea001411cee0f8f86532a4
@@ -0,0 +1,22 @@
+package darkknight.jewelrycraft.util;
+
+import net.minecraft.util.ResourceLocation;
+
+public class Variables
+{
+ public static final String MODID = "jewelrycraft2";
+ public static final String MODNAME = "Jewelrycraft 2";
+ public static final String VERSION = "1.0";
+ public static final String PACKET_CHANNEL = "jewelrycraft2";
+
+ public static final String CONFIG_GUI = "darkknight.jewelrycraft.config.ConfigGuiFactory";
+ public static final String CLIENT_PROXY = "darkknight.jewelrycraft.proxy.ClientProxy";
+ public static final String SERVER_PROXY = "darkknight.jewelrycraft.proxy.CommonProxy";
+
+ public static final int MAX_CURSES = 10;
+ public static final ResourceLocation PEDESTAL_TEXTURE = new ResourceLocation(Variables.MODID, "textures/tileentities/BricksPedestal.png");
+ public static final ResourceLocation SHADOW_HAND_TEXTURE = new ResourceLocation(Variables.MODID, "textures/tileentities/ShadowHand.png");
+ public static final ResourceLocation CURSES_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
+ public static final ResourceLocation VILLAGER_TEXTURE = new ResourceLocation(Variables.MODID, "textures/entities/jeweler.png");
+ public static final ResourceLocation MISC_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/hearts.png");
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/78/90636f1ffde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/78/90636f1ffde40014174fe663e69b8422
deleted file mode 100644
index 3293158..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/78/90636f1ffde40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static Item goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/79/70b22b2507e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/79/e054ac7884ea001411cee0f8f86532a4
index 20da581..932ec61 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/79/70b22b2507e50014174fe663e69b8422
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/79/e054ac7884ea001411cee0f8f86532a4
@@ -7,6 +7,7 @@ import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
+import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.VillagerRegistry;
import darkknight.jewelrycraft.block.BlockList;
import darkknight.jewelrycraft.client.InventoryTabVanilla;
@@ -52,10 +53,8 @@ public class ClientProxy extends CommonProxy
@Override
public void preInit()
{
- ResourceLocation pedestalResourceLocation = new ResourceLocation(Variables.MODID, "textures/tileentities/BricksPedestal.png");
- TileEntityHandPedestalRender pedestalRender = new TileEntityHandPedestalRender(new ModelHandPedestal(pedestalResourceLocation), pedestalResourceLocation);
- ResourceLocation shadowResourceLocation = new ResourceLocation(Variables.MODID, "textures/tileentities/ShadowHand.png");
- TileEntityShadowHandRender shadowHandRender = new TileEntityShadowHandRender(new ModelShadowHand(shadowResourceLocation), shadowResourceLocation);
+ TileEntityHandPedestalRender pedestalRender = new TileEntityHandPedestalRender(new ModelHandPedestal(Variables.PEDESTAL_TEXTURE), Variables.PEDESTAL_TEXTURE);
+ TileEntityShadowHandRender shadowHandRender = new TileEntityShadowHandRender(new ModelShadowHand(Variables.SHADOW_HAND_TEXTURE), Variables.SHADOW_HAND_TEXTURE);
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmelter.class, new TileEntitySmelterRender());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMolder.class, new TileEntityMolderRender());
@@ -71,20 +70,19 @@ public class ClientProxy extends CommonProxy
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.smelter), new ItemRender(new TileEntitySmelterRender(), new TileEntitySmelter(), new ModelSmelter()));
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.molder), new ItemRender(new TileEntityMolderRender(), new TileEntityMolder(), new ModelMolder()));
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.shadowEye), new ItemRender(new TileEntityShadowEyeRender(), new TileEntityShadowEye(), new ModelShadowEye()));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.handPedestal), new ItemRender(pedestalRender, new TileEntityHandPedestal(), new ModelHandPedestal(pedestalResourceLocation)));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.shadowHand), new ItemRender(shadowHandRender, new TileEntityShadowHand(), new ModelShadowHand(shadowResourceLocation)));
+ MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.handPedestal), new ItemRender(pedestalRender, new TileEntityHandPedestal(), new ModelHandPedestal(Variables.PEDESTAL_TEXTURE)));
+ MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.shadowHand), new ItemRender(shadowHandRender, new TileEntityShadowHand(), new ModelShadowHand(Variables.SHADOW_HAND_TEXTURE)));
MinecraftForgeClient.registerItemRenderer(ItemList.goldObj, new ItemRender());
VillagerRegistry.instance().registerVillagerSkin(3000, new ResourceLocation(Variables.MODID, "textures/entities/jeweler.png"));
RenderingRegistry.registerEntityRenderingHandler(EntityHeart.class, new HeartRender(new ModelHeart(), 0.25F));
RenderingRegistry.registerEntityRenderingHandler(EntityHalfHeart.class, new HeartRender(new ModelHalfHeart(), 0.25F));
-
+
TabRegistry.registerTab(new InventoryTabVanilla());
TabRegistry.registerTab(new TabJewelry());
MinecraftForge.EVENT_BUS.register(new TabRegistry());
MinecraftForge.EVENT_BUS.register(new PlayerRenderHandler());
- ResourceLocation jeweleryTexture = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
MinecraftForge.EVENT_BUS.register(new ScreenHandler(Minecraft.getMinecraft(), jeweleryTexture));
}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7a/30bcf87f94e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7a/30bcf87f94e3001412c4c4819c88e86b
deleted file mode 100644
index 22da1c4..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7a/30bcf87f94e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,71 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
- TileEntity tile = world.getTileEntity(x, y, z);
- this.setBlockBounds((float)((TileEntityMidasTouch)tile).target.boundingBox.minX, (float)((TileEntityMidasTouch)tile).target.boundingBox.minY, (float)((TileEntityMidasTouch)tile).target.boundingBox.minZ, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxX, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxY, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxZ);
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7a/402c65f927e500141c50bd6848c69dc6 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7a/402c65f927e500141c50bd6848c69dc6
deleted file mode 100644
index 21961ed..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7a/402c65f927e500141c50bd6848c69dc6
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public boolean hasEffect(ItemStack item)
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) return item.getIconIndex();
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7a/8029efd19de3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7a/8029efd19de3001412c4c4819c88e86b
deleted file mode 100644
index 3361ee3..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7a/8029efd19de3001412c4c4819c88e86b
+++ /dev/null
@@ -1,77 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidRegistry;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.tileentity.TileEntityAltar;
-import darkknight.jewelrycraft.tileentity.TileEntityBlockShadow;
-import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
-import darkknight.jewelrycraft.tileentity.TileEntityHandPedestal;
-import darkknight.jewelrycraft.tileentity.TileEntityJewelrsCraftingTable;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-import darkknight.jewelrycraft.tileentity.TileEntityMolder;
-import darkknight.jewelrycraft.tileentity.TileEntityShadowEye;
-import darkknight.jewelrycraft.tileentity.TileEntityShadowHand;
-import darkknight.jewelrycraft.tileentity.TileEntitySmelter;
-import darkknight.jewelrycraft.util.Variables;
-
-public class BlockList
-{
- public static Block shadowOre, smelter, molder, displayer, jewelCraftingTable, shadowBlock, shadowEye, jewelAltar, handPedestal, shadowHand, midasTouchBlock;
- public static BlockMoltenMetal moltenMetal;
- public static Fluid moltenMetalFluid;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- shadowOre = new BlockJCOre().setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockTextureName(Variables.MODID + ":oreShadow").setBlockName(Variables.MODID + ".oreShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- smelter = new BlockSmelter().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".smelter").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molder = new BlockMolder(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".molder").setCreativeTab(JewelrycraftMod.jewelrycraft);
- displayer = new BlockDisplayer(Material.iron).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypeMetal).setBlockName(Variables.MODID + ".displayer").setCreativeTab(JewelrycraftMod.jewelrycraft);
- jewelCraftingTable = new BlockJewelrsCraftingTable(Material.rock).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".jewelCraftingTable").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowBlock = new BlockShadow().setHardness(5.0F).setResistance(7.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":blockShadow").setBlockName(Variables.MODID + ".blockShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- jewelAltar = new BlockJewelAltar().setHardness(5.0F).setResistance(2.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":altar").setBlockName(Variables.MODID + ".altar").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowEye = new BlockShadowEye().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowEye").setCreativeTab(JewelrycraftMod.jewelrycraft);
- handPedestal = new BlockHandPedestal(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".handPedestal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowHand = new BlockShadowHand(Material.rock).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowHand").setCreativeTab(JewelrycraftMod.jewelrycraft).setBlockUnbreakable();
- midasTouchBlock = new BlockMidasTouch(Material.iron).setHardness(3.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setBlockName(Variables.MODID + ".midasTouchBlock").setCreativeTab(JewelrycraftMod.jewelrycraft);
-
- GameRegistry.registerBlock(shadowOre, "shadowOre");
- GameRegistry.registerBlock(shadowBlock, "shadowBlock");
- GameRegistry.registerBlock(smelter, "Smelter");
- GameRegistry.registerBlock(molder, "Molder");
- GameRegistry.registerBlock(jewelCraftingTable, "jewelCraftingTable");
- GameRegistry.registerBlock(displayer, "Displayer");
- GameRegistry.registerBlock(jewelAltar, "Altar");
- GameRegistry.registerBlock(shadowEye, "Shadow Eye");
- GameRegistry.registerBlock(handPedestal, "Stone Bricks Pedestal");
- GameRegistry.registerBlock(shadowHand, "Shadow Hand");
- GameRegistry.registerBlock(midasTouchBlock, "Midas Touch Block");
-
- GameRegistry.registerTileEntity(TileEntitySmelter.class, Variables.MODID + ":smelter");
- GameRegistry.registerTileEntity(TileEntityMolder.class, Variables.MODID + ":molder");
- GameRegistry.registerTileEntity(TileEntityJewelrsCraftingTable.class, Variables.MODID + ":table");
- GameRegistry.registerTileEntity(TileEntityDisplayer.class, Variables.MODID + ":displayer");
- GameRegistry.registerTileEntity(TileEntityBlockShadow.class, Variables.MODID + ":blockShadow");
- GameRegistry.registerTileEntity(TileEntityAltar.class, Variables.MODID + ":altar");
- GameRegistry.registerTileEntity(TileEntityShadowEye.class, Variables.MODID + ":shadowEye");
- GameRegistry.registerTileEntity(TileEntityHandPedestal.class, Variables.MODID + ":handPedestal");
- GameRegistry.registerTileEntity(TileEntityShadowHand.class, Variables.MODID + ":shadowHand");
- GameRegistry.registerTileEntity(TileEntityMidasTouch.class, Variables.MODID + ":midsaTouch");
-
- moltenMetalFluid = new Fluid("metal.molten").setLuminosity(15).setDensity(3000).setTemperature(2000).setViscosity(6000);
- if (!FluidRegistry.registerFluid(moltenMetalFluid)) moltenMetalFluid = FluidRegistry.getFluid("metal.molten");
- moltenMetal = new BlockMoltenMetal(moltenMetalFluid, Material.lava);
- GameRegistry.registerBlock(moltenMetal, "moltenMetalLiquid");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7a/f072972997ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7a/f072972997ea001411cee0f8f86532a4
new file mode 100644
index 0000000..538e883
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7a/f072972997ea001411cee0f8f86532a4
@@ -0,0 +1,116 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+// GL11.glEnable(GL11.GL_BLEND);
+// GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+// GL11.glColor3f(1F, 0F, 0F);
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7b/504da4b747e700141e05cdbaeb682437 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7b/504da4b747e700141e05cdbaeb682437
deleted file mode 100644
index 7c5a8fb..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7b/504da4b747e700141e05cdbaeb682437
+++ /dev/null
@@ -1,128 +0,0 @@
-package darkknight.jewelrycraft.events;
-
-import java.util.Iterator;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import darkknight.jewelrycraft.curses.CurseList;
-import darkknight.jewelrycraft.entities.renders.RenderHelper;
-import darkknight.jewelrycraft.item.render.BraceletRender;
-import darkknight.jewelrycraft.item.render.EarringsRender;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.model.ModelBracelet;
-import darkknight.jewelrycraft.util.JewelryNBT;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
-
-public class PlayerRenderHandler
-{
- MaskRender mask = new MaskRender();
- EarringsRender earrings = new EarringsRender();
- BraceletRender bracelet = new BraceletRender();
-// public static String[] infamyCache = new String[]{};
- public static NBTTagCompound playersInfo = new NBTTagCompound();
-
- @SubscribeEvent
- public void renderScreen(RenderPlayerEvent.Specials.Post event)
- {
- ModelBiped main = event.renderer.modelBipedMain;
- Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
- if (playersInfo != null){
- while (players.hasNext()){
- EntityPlayer player = players.next();
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(1.6f, 1.6f, 1.6f);
- GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- GL11.glPopMatrix();
- }
- if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(0.07f, 0.07f, 0.07f);
- GL11.glTranslatef(0.0F, 3.0F, -2.0F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- earrings.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- GL11.glPopMatrix();
- }
- for(int i = 10; i <= 13; i++)
- if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
- if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
- if (i / 12 == 1){
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- System.out.println(JewelryNBT.ingotColor(item));
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
- }else{
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- System.out.println(JewelryNBT.ingotColor(item));
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- }
- GL11.glPopMatrix();
- }
- }
- }
- }
-
- /**
- * @param string
- * @return
- */
- private boolean checkPlayerInfamy(String string)
- {
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
- if(playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
-// for(int i = 0; i < infamyCache.length; i++)
-// if (infamyCache[i].equals(string)) return true;
- return false;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7b/70dd987a96ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7b/70dd987a96ea001411cee0f8f86532a4
new file mode 100644
index 0000000..88d2c0f
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7b/70dd987a96ea001411cee0f8f86532a4
@@ -0,0 +1,114 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ GL11.glColor4f(0, 1, 1, 1);
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7c/206da33e92ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7c/206da33e92ea001411cee0f8f86532a4
new file mode 100644
index 0000000..b8e8da2
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7c/206da33e92ea001411cee0f8f86532a4
@@ -0,0 +1,184 @@
+package darkknight.jewelrycraft.model;
+
+import java.awt.Color;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import org.lwjgl.opengl.GL11;
+
+/**
+ * ModelBiped - Either Mojang or a mod author Created using Tabula 4.1.1
+ */
+public class ModelBracelet extends ModelBase
+{
+ public ModelRenderer metal1;
+ public ModelRenderer metal2;
+ public ModelRenderer metal3;
+ public ModelRenderer metal4;
+ public ModelRenderer gem1;
+ public ModelRenderer gem2;
+ public ModelRenderer gem3;
+ public ModelRenderer gem4;
+ public ModelRenderer gem5;
+ public ModelRenderer gem6;
+ public ModelRenderer gem7;
+ public ModelRenderer gem8;
+ public ModelRenderer gem9;
+
+ public ModelBracelet()
+ {
+ this.textureWidth = 16;
+ this.textureHeight = 16;
+ this.metal4 = new ModelRenderer(this, 0, 8);
+ this.metal4.setRotationPoint(-5.0F, 12.0F, -2.0F);
+ this.metal4.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4, 0.0F);
+ this.gem4 = new ModelRenderer(this, 0, 0);
+ this.gem4.setRotationPoint(-3.0F, 12.8F, -3.5F);
+ this.gem4.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.setRotateAngle(gem4, 0.0F, 0.008901179185171082F, 0.0F);
+ this.gem3 = new ModelRenderer(this, 0, 0);
+ this.gem3.setRotationPoint(-4.8F, 12.2F, -3.5F);
+ this.gem3.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem2 = new ModelRenderer(this, 0, 0);
+ this.gem2.setRotationPoint(-1.5F, 12.8F, -3.5F);
+ this.gem2.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem1 = new ModelRenderer(this, 0, 0);
+ this.gem1.setRotationPoint(0.3F, 12.2F, -3.5F);
+ this.gem1.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.metal1 = new ModelRenderer(this, 0, 8);
+ this.metal1.setRotationPoint(-5.0F, 12.0F, -3.0F);
+ this.metal1.addBox(0.0F, 0.0F, 0.0F, 6, 2, 1, 0.0F);
+ this.gem6 = new ModelRenderer(this, 0, 0);
+ this.gem6.setRotationPoint(-4.3F, 12.7F, -3.5F);
+ this.gem6.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
+ this.gem7 = new ModelRenderer(this, 0, 0);
+ this.gem7.setRotationPoint(-3.8F, 12.7F, -3.5F);
+ this.gem7.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem8 = new ModelRenderer(this, 0, 0);
+ this.gem8.setRotationPoint(-0.2F, 12.7F, -3.5F);
+ this.gem8.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
+ this.metal2 = new ModelRenderer(this, 0, 8);
+ this.metal2.setRotationPoint(-5.0F, 12.0F, 2.0F);
+ this.metal2.addBox(0.0F, 0.0F, 0.0F, 6, 2, 1, 0.0F);
+ this.gem5 = new ModelRenderer(this, 0, 0);
+ this.gem5.setRotationPoint(-2.5F, 12.3F, -3.5F);
+ this.gem5.addBox(0.0F, 0.0F, 0.0F, 2, 3, 1, 0.0F);
+ this.metal3 = new ModelRenderer(this, 0, 8);
+ this.metal3.setRotationPoint(0.0F, 12.0F, -2.0F);
+ this.metal3.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4, 0.0F);
+ this.gem9 = new ModelRenderer(this, 0, 0);
+ this.gem9.setRotationPoint(-0.7F, 12.7F, -3.5F);
+ this.gem9.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ }
+
+ @Override
+ public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
+ {
+ GL11.glDisable(GL11.GL_LIGHTING);
+ if ((int)f3 != -1){
+ int ingotColor = (int)f3;
+ int red = (ingotColor >> 16) & 0xff;
+ int green = (ingotColor >> 8) & 0xff;
+ int blue = ingotColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ this.metal1.render(f5);
+ this.metal2.render(f5);
+ this.metal3.render(f5);
+ this.metal4.render(f5);
+ }
+ if ((int)f4 != -1){
+ int gemColor = (int)f4;
+ int red = gemColor >> 16 & 0xff;
+ int green = gemColor >> 8 & 0xff;
+ int blue = gemColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE_MINUS_DST_COLOR);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem4.offsetX, this.gem4.offsetY, this.gem4.offsetZ);
+ GL11.glTranslatef(this.gem4.rotationPointX * f5, this.gem4.rotationPointY * f5, this.gem4.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem4.offsetX, -this.gem4.offsetY, -this.gem4.offsetZ);
+ GL11.glTranslatef(-this.gem4.rotationPointX * f5, -this.gem4.rotationPointY * f5, -this.gem4.rotationPointZ * f5);
+ this.gem4.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem3.offsetX, this.gem3.offsetY, this.gem3.offsetZ);
+ GL11.glTranslatef(this.gem3.rotationPointX * f5, this.gem3.rotationPointY * f5, this.gem3.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem3.offsetX, -this.gem3.offsetY, -this.gem3.offsetZ);
+ GL11.glTranslatef(-this.gem3.rotationPointX * f5, -this.gem3.rotationPointY * f5, -this.gem3.rotationPointZ * f5);
+ this.gem3.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem2.offsetX, this.gem2.offsetY, this.gem2.offsetZ);
+ GL11.glTranslatef(this.gem2.rotationPointX * f5, this.gem2.rotationPointY * f5, this.gem2.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem2.offsetX, -this.gem2.offsetY, -this.gem2.offsetZ);
+ GL11.glTranslatef(-this.gem2.rotationPointX * f5, -this.gem2.rotationPointY * f5, -this.gem2.rotationPointZ * f5);
+ this.gem2.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem1.offsetX, this.gem1.offsetY, this.gem1.offsetZ);
+ GL11.glTranslatef(this.gem1.rotationPointX * f5, this.gem1.rotationPointY * f5, this.gem1.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem1.offsetX, -this.gem1.offsetY, -this.gem1.offsetZ);
+ GL11.glTranslatef(-this.gem1.rotationPointX * f5, -this.gem1.rotationPointY * f5, -this.gem1.rotationPointZ * f5);
+ this.gem1.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem6.offsetX, this.gem6.offsetY, this.gem6.offsetZ);
+ GL11.glTranslatef(this.gem6.rotationPointX * f5, this.gem6.rotationPointY * f5, this.gem6.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem6.offsetX, -this.gem6.offsetY, -this.gem6.offsetZ);
+ GL11.glTranslatef(-this.gem6.rotationPointX * f5, -this.gem6.rotationPointY * f5, -this.gem6.rotationPointZ * f5);
+ this.gem6.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem7.offsetX, this.gem7.offsetY, this.gem7.offsetZ);
+ GL11.glTranslatef(this.gem7.rotationPointX * f5, this.gem7.rotationPointY * f5, this.gem7.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem7.offsetX, -this.gem7.offsetY, -this.gem7.offsetZ);
+ GL11.glTranslatef(-this.gem7.rotationPointX * f5, -this.gem7.rotationPointY * f5, -this.gem7.rotationPointZ * f5);
+ this.gem7.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem8.offsetX, this.gem8.offsetY, this.gem8.offsetZ);
+ GL11.glTranslatef(this.gem8.rotationPointX * f5, this.gem8.rotationPointY * f5, this.gem8.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem8.offsetX, -this.gem8.offsetY, -this.gem8.offsetZ);
+ GL11.glTranslatef(-this.gem8.rotationPointX * f5, -this.gem8.rotationPointY * f5, -this.gem8.rotationPointZ * f5);
+ this.gem8.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem5.offsetX, this.gem5.offsetY, this.gem5.offsetZ);
+ GL11.glTranslatef(this.gem5.rotationPointX * f5, this.gem5.rotationPointY * f5, this.gem5.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem5.offsetX, -this.gem5.offsetY, -this.gem5.offsetZ);
+ GL11.glTranslatef(-this.gem5.rotationPointX * f5, -this.gem5.rotationPointY * f5, -this.gem5.rotationPointZ * f5);
+ this.gem5.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem9.offsetX, this.gem9.offsetY, this.gem9.offsetZ);
+ GL11.glTranslatef(this.gem9.rotationPointX * f5, this.gem9.rotationPointY * f5, this.gem9.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem9.offsetX, -this.gem9.offsetY, -this.gem9.offsetZ);
+ GL11.glTranslatef(-this.gem9.rotationPointX * f5, -this.gem9.rotationPointY * f5, -this.gem9.rotationPointZ * f5);
+ this.gem9.render(f5);
+ GL11.glPopMatrix();
+ GL11.glDisable(GL11.GL_BLEND);
+ }
+ GL11.glEnable(GL11.GL_LIGHTING);
+ }
+
+ /**
+ * This is a helper function from Tabula to set the rotation of model parts
+ */
+ public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z)
+ {
+ modelRenderer.rotateAngleX = x;
+ modelRenderer.rotateAngleY = y;
+ modelRenderer.rotateAngleZ = z;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7c/f0a9cd9e96ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7c/f0a9cd9e96ea001411cee0f8f86532a4
new file mode 100644
index 0000000..2453150
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7c/f0a9cd9e96ea001411cee0f8f86532a4
@@ -0,0 +1,116 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glColor3f(0F, 1F, 1F);
+ GL11.glDisable(GL11.GL_BLEND);
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7d/b0ad63acfde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7d/b0ad63acfde40014174fe663e69b8422
deleted file mode 100644
index 7f0dc41..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7d/b0ad63acfde40014174fe663e69b8422
+++ /dev/null
@@ -1,46 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.StatCollector;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public abstract class ItemGoldObject extends Item
-{
- public ItemGoldObject()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- if (JewelryNBT.gem(stack) != null) return this.getIconIndex(JewelryNBT.gem(stack));
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return (StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3e/70b5b24de0e50014109ec019d2f6c0dc b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7d/e0f61197b3ea001411cee0f8f86532a4
index cdfa90f..8b87de0 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/3e/70b5b24de0e50014109ec019d2f6c0dc
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7d/e0f61197b3ea001411cee0f8f86532a4
@@ -8,6 +8,7 @@ import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
+import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IIcon;
@@ -47,11 +48,13 @@ public class ItemGoldObj extends Item
public String getItemStackDisplayName(ItemStack stack)
{
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
+ return "Golden " + ((Item.getItemById(Integer.valueOf(stack.getTagCompound().getTag("target").toString().split(",")[0].substring(4).replace("s", ""))) != null && stack != null && JewelryNBT.item(stack) != null) ? JewelryNBT.item(stack).getDisplayName() : "Object");
}
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
{
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Shiny, but useless :(");
+ if (displayInfo)
+ if(JewelryNBT.item(stack).getItem() instanceof ItemFood) list.add(EnumChatFormatting.DARK_PURPLE + "It's made of solid gold. How are you suppose to eat this?");
+ else list.add(EnumChatFormatting.DARK_PURPLE + "Shiny, but useless :(");
}
}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7e/6079eceaafea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7e/6079eceaafea001411cee0f8f86532a4
new file mode 100644
index 0000000..cedf978
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7e/6079eceaafea001411cee0f8f86532a4
@@ -0,0 +1,26 @@
+/**
+ *
+ */
+package darkknight.jewelrycraft.events;
+
+import net.minecraftforge.common.MinecraftForge;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.util.Variables;
+
+public class EventList
+{
+ public static void preInit(FMLPreInitializationEvent e)
+ {
+
+ MinecraftForge.EVENT_BUS.register(new EntityEventHandler());
+ MinecraftForge.EVENT_BUS.register(new BlockEventHandler());
+ MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
+ FMLCommonHandler.instance().bus().register(new EventCommonHandler());
+ BucketHandler.INSTANCE.buckets.put(BlockList.moltenMetal, ItemList.bucket);
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7e/70e0fae86be70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7e/70e0fae86be70014115de2bb951f0adf
deleted file mode 100644
index a2c482f..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7e/70e0fae86be70014115de2bb951f0adf
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.curses;
-
-/**
- * @author Sorin
- *
- */
-public class CursePentagram
-{
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7e/80d136b994e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7e/80d136b994e3001412c4c4819c88e86b
deleted file mode 100644
index 50fa890..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7e/80d136b994e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,72 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
- TileEntity tile = world.getTileEntity(x, y, z);
- if(((TileEntityMidasTouch)tile).target != null)
- this.setBlockBounds((float)((TileEntityMidasTouch)tile).target.boundingBox.minX, (float)((TileEntityMidasTouch)tile).target.boundingBox.minY, (float)((TileEntityMidasTouch)tile).target.boundingBox.minZ, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxX, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxY, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxZ);
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7f/1085f39501e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7f/1085f39501e50014174fe663e69b8422
deleted file mode 100644
index 8aa7aeb..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7f/1085f39501e50014174fe663e69b8422
+++ /dev/null
@@ -1,53 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.item.ItemList;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && player.inventory.getCurrentItem() == null){
- world.setBlock(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), BlockList.midasTouchBlock, 0, 2);
- TileEntityMidasTouch midasTouchVictim = new TileEntityMidasTouch();
- midasTouchVictim.setEntity(target);
- world.setTileEntity(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), midasTouchVictim);
- target.setDead();
- }
- }
-
- @Override
- public void action(World world, EntityPlayer player)
- {
- ItemStack curItem = player.inventory.getCurrentItem();
- if(curItem != null && curItem.getItem() != ItemList.goldObj && Block.getBlockFromItem(curItem.getItem()) == null){
- int index = player.inventory.currentItem;
- ItemStack item = curItem;
- ItemStack result = new ItemStack(ItemList.goldObj, item.stackSize, item.getItemDamage());
- JewelryNBT.addItem(result, item);
- player.inventory.setInventorySlotContents(index, result);
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7f/10e9952ffde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7f/10e9952ffde40014174fe663e69b8422
deleted file mode 100644
index 07bb2b6..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/7f/10e9952ffde40014174fe663e69b8422
+++ /dev/null
@@ -1,46 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.StatCollector;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public abstract class ItemGoldObject extends Item
-{
- public ItemGoldifiedObject()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- if (JewelryNBT.gem(stack) != null) return this.getIconIndex(JewelryNBT.gem(stack));
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return (StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/80/100f40e4aeea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/80/100f40e4aeea001411cee0f8f86532a4
new file mode 100644
index 0000000..32d2014
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/80/100f40e4aeea001411cee0f8f86532a4
@@ -0,0 +1,12 @@
+/**
+ *
+ */
+package darkknight.jewelrycraft.entities;
+
+/**
+ * @author Sorin
+ *
+ */
+public class EntityRegistry
+{
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/80/c002ba7395e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/80/c002ba7395e3001412c4c4819c88e86b
deleted file mode 100644
index 83bdfc7..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/80/c002ba7395e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,74 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
- TileEntity tile = world.getTileEntity(x, y, z);
- if(((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target.height);
- this.setBlockBounds(0F, 0F, 0F, 1F, 1F, 1F);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/902f83c06ae70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/80/e068543a93ea001411cee0f8f86532a4
index 0d71b5f..4915ecf 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/12/902f83c06ae70014115de2bb951f0adf
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/80/e068543a93ea001411cee0f8f86532a4
@@ -1,59 +1,42 @@
package darkknight.jewelrycraft.events;
import java.util.Iterator;
-import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.RenderPlayerEvent;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
import darkknight.jewelrycraft.curses.CurseList;
import darkknight.jewelrycraft.entities.renders.RenderHelper;
import darkknight.jewelrycraft.item.render.BraceletRender;
import darkknight.jewelrycraft.item.render.EarringsRender;
-import darkknight.jewelrycraft.item.render.MaskRender;
import darkknight.jewelrycraft.model.ModelBracelet;
import darkknight.jewelrycraft.util.JewelryNBT;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
public class PlayerRenderHandler
{
- MaskRender mask = new MaskRender();
EarringsRender earrings = new EarringsRender();
BraceletRender bracelet = new BraceletRender();
-// public static String[] infamyCache = new String[]{};
public static NBTTagCompound playersInfo = new NBTTagCompound();
@SubscribeEvent
public void renderScreen(RenderPlayerEvent.Specials.Post event)
{
ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
if (playersInfo != null){
while (players.hasNext()){
EntityPlayer player = players.next();
NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(1.6f, 1.6f, 1.6f);
- GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- GL11.glPopMatrix();
- }
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
@@ -82,23 +65,36 @@ public class PlayerRenderHandler
ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
GL11.glPushMatrix();
GL11.glColor4f(1, 1, 1, 1);
- GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
- if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
+ float size = 0.055F;
if (i / 12 == 1){
+// GL11.glTranslatef(0F, -(12-i)*0.1F, 0F);
+ float sizeY=(13-i)*0.055F;
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F)
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * sizeY, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * sizeY, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
int gemColor = -1;
int ingotColor = -1;
if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
}else{
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F)
+ GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
int gemColor = -1;
int ingotColor = -1;
if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
@@ -118,7 +114,7 @@ public class PlayerRenderHandler
private boolean checkPlayerInfamy(String string)
{
NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
- if(playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
return false;
}
}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/81/703d9e3297ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/81/703d9e3297ea001411cee0f8f86532a4
new file mode 100644
index 0000000..6415ea5
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/81/703d9e3297ea001411cee0f8f86532a4
@@ -0,0 +1,115 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/82/9020848ffce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/82/9020848ffce40014174fe663e69b8422
deleted file mode 100644
index 3293158..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/82/9020848ffce40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static Item goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/84/6009ab0a97ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/84/6009ab0a97ea001411cee0f8f86532a4
new file mode 100644
index 0000000..bc6814e
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/84/6009ab0a97ea001411cee0f8f86532a4
@@ -0,0 +1,116 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);
+ GL11.glColor3f(1F, 0F, 0F);
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/84/60fb889a96ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/84/60fb889a96ea001411cee0f8f86532a4
new file mode 100644
index 0000000..2ebf169
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/84/60fb889a96ea001411cee0f8f86532a4
@@ -0,0 +1,114 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ GL11.glColor3f(0F, 1F, 1F);
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/84/c0cd51bc92ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/84/c0cd51bc92ea001411cee0f8f86532a4
new file mode 100644
index 0000000..15b6be4
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/84/c0cd51bc92ea001411cee0f8f86532a4
@@ -0,0 +1,29 @@
+package darkknight.jewelrycraft.item.render;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BraceletRender extends TileEntitySpecialRenderer
+{
+ public ModelBracelet bracelet = new ModelBracelet();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Bracelet.png");
+
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ }
+
+ public void doRender(Entity entity, double x, double y, double z, float f, float g)
+ {
+ GL11.glPushMatrix();
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+ bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ GL11.glPopMatrix();
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/87/003f191173e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/85/b0cdcc6786ea001411cee0f8f86532a4
index 5964039..ad80ec8 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/87/003f191173e70014115de2bb951f0adf
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/85/b0cdcc6786ea001411cee0f8f86532a4
@@ -19,10 +19,10 @@ import darkknight.jewelrycraft.util.JewelrycraftUtil;
import darkknight.jewelrycraft.util.PlayerUtils;
import darkknight.jewelrycraft.util.Variables;
-public class CursePentagram extends Curse
+public class CurseInfamy extends Curse
{
MaskRender mask = new MaskRender();
- public CursePentagram(int id, String name, int text)
+ public CurseInfamy(int id, String name, int text)
{
super(id, name, text);
}
@@ -30,6 +30,15 @@ public class CursePentagram extends Curse
@Override
public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
{
+ if (rand.nextInt(5) == 0 && !world.isRemote && !(target instanceof EntityMob) && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && target.canAttackWithItem()){
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
+ if (playerInfo.getFloat("BlackHeart") < 20F) playerInfo.setFloat("BlackHeart", playerInfo.getFloat("BlackHeart") + 1.0F);
+ if (player.getMaxHealth() >= 3F){
+ player.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(player.getMaxHealth() - 1.0F);
+ player.setHealth(player.getHealth() - 1.0F);
+ }
+ JewelrycraftUtil.addCursePoints(player, 10);
+ }
}
public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
@@ -52,6 +61,6 @@ public class CursePentagram extends Curse
public String getDescription()
{
- return "The Dark Lord has misterious ways of showing you his love.";
+ return "What have you done?!";
}
}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/86/b024f95597ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/86/b024f95597ea001411cee0f8f86532a4
new file mode 100644
index 0000000..a8f6900
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/86/b024f95597ea001411cee0f8f86532a4
@@ -0,0 +1,65 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CursePentagram extends Curse
+{
+ float rot = 0F;
+
+ public CursePentagram(String name, int txtID, String pack)
+ {
+ super(name, txtID, pack);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ @Override
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "The Dark Lord has misterious ways of showing you his love.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/87/307f88d486ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/87/307f88d486ea001411cee0f8f86532a4
new file mode 100644
index 0000000..e33f7d5
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/87/307f88d486ea001411cee0f8f86532a4
@@ -0,0 +1,94 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockCompressed;
+import net.minecraft.block.BlockPressurePlate;
+import net.minecraft.block.BlockPressurePlateWeighted;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemArmor;
+import net.minecraft.item.ItemAxe;
+import net.minecraft.item.ItemHoe;
+import net.minecraft.item.ItemPickaxe;
+import net.minecraft.item.ItemSpade;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.ItemSword;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+
+public class CurseMidasTouch extends Curse
+{
+ public CurseMidasTouch(int id, String name, int txtID, int packID)
+ {
+ super(id, name, txtID, packID);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {
+ if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && player.inventory.getCurrentItem() == null){
+ world.setBlock(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), BlockList.midasTouchBlock, 0, 2);
+ TileEntityMidasTouch midasTouchVictim = new TileEntityMidasTouch();
+ midasTouchVictim.setEntity(target);
+ world.setTileEntity(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), midasTouchVictim);
+ target.setDead();
+ }
+ }
+
+ @Override
+ public void action(World world, EntityPlayer player)
+ {
+ ItemStack curItem = player.inventory.getCurrentItem();
+ if(curItem != null && curItem.getItem() != ItemList.goldObj && !isGoldenObject(curItem.getItem())){
+ int index = player.inventory.currentItem;
+ ItemStack item = curItem;
+ ItemStack result = new ItemStack(ItemList.goldObj, item.stackSize, item.getItemDamage());
+ JewelryNBT.addItem(result, item);
+ if(changeItem(curItem) != null) result = changeItem(curItem);
+ player.inventory.setInventorySlotContents(index, result);
+ }
+ }
+
+ public ItemStack changeItem(ItemStack currItem)
+ {
+ if(currItem.getItem() instanceof ItemSword) return new ItemStack(Items.golden_sword, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemSpade) return new ItemStack(Items.golden_shovel, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemPickaxe) return new ItemStack(Items.golden_pickaxe, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemAxe) return new ItemStack(Items.golden_axe, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemHoe) return new ItemStack(Items.golden_hoe, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemArmor && ((ItemArmor)currItem.getItem()).armorType == 0) return new ItemStack(Items.golden_helmet, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemArmor && ((ItemArmor)currItem.getItem()).armorType == 1) return new ItemStack(Items.golden_chestplate, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemArmor && ((ItemArmor)currItem.getItem()).armorType == 2) return new ItemStack(Items.golden_leggings, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemArmor && ((ItemArmor)currItem.getItem()).armorType == 3) return new ItemStack(Items.golden_boots, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem().getUnlocalizedName().toLowerCase().contains("horsearmor")) return new ItemStack(Items.golden_horse_armor, currItem.stackSize, 0);
+ else if(currItem.getItem().getUnlocalizedName().toLowerCase().contains("nugget") || currItem.getItem().getItemStackDisplayName(currItem).toLowerCase().contains(" nugget") || currItem.getItem().getItemStackDisplayName(currItem).toLowerCase().contains("nugget ")) return new ItemStack(Items.gold_nugget, currItem.stackSize, 0);
+ else if(currItem.getItem().getUnlocalizedName().toLowerCase().contains("ingot") || currItem.getItem().getItemStackDisplayName(currItem).toLowerCase().contains(" ingot") || currItem.getItem().getItemStackDisplayName(currItem).toLowerCase().contains("ingot ")) return new ItemStack(Items.gold_ingot, currItem.stackSize, 0);
+ else if(Block.getBlockFromItem(currItem.getItem()) instanceof BlockPressurePlate || Block.getBlockFromItem(currItem.getItem()) instanceof BlockPressurePlateWeighted) return new ItemStack(Blocks.light_weighted_pressure_plate, currItem.stackSize, 0);
+ else if(Block.getBlockFromItem(currItem.getItem()) instanceof BlockCompressed) return new ItemStack(Blocks.gold_block, currItem.stackSize, 0);
+ return null;
+ }
+
+ public boolean isGoldenObject(Item item)
+ {
+ return item.equals(Items.gold_ingot) || item.equals(Items.gold_nugget) || item.equals(Items.golden_helmet) || item.equals(Items.golden_chestplate) ||
+ item.equals(Items.golden_leggings) || item.equals(Items.golden_boots) || item.equals(Items.golden_sword) || item.equals(Items.golden_shovel) ||
+ item.equals(Items.golden_pickaxe) || item.equals(Items.golden_axe) || item.equals(Items.golden_hoe) || item.equals(Items.golden_horse_armor) ||
+ Block.getBlockFromItem(item).equals(Blocks.gold_block) || Block.getBlockFromItem(item).equals(Blocks.light_weighted_pressure_plate);
+ }
+
+ public String getDescription()
+ {
+ return "Be careful what you wish for...";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/88/20688e9587ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/88/20688e9587ea001411cee0f8f86532a4
new file mode 100644
index 0000000..1fe3955
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/88/20688e9587ea001411cee0f8f86532a4
@@ -0,0 +1,22 @@
+package darkknight.jewelrycraft.util;
+
+import net.minecraft.util.ResourceLocation;
+
+public class Variables
+{
+ public static final String MODID = "jewelrycraft2";
+ public static final String MODNAME = "Jewelrycraft 2";
+ public static final String VERSION = "1.0";
+ public static final String PACKET_CHANNEL = "jewelrycraft2";
+
+ public static final String CONFIG_GUI = "darkknight.jewelrycraft.config.ConfigGuiFactory";
+ public static final String CLIENT_PROXY = "darkknight.jewelrycraft.proxy.ClientProxy";
+ public static final String SERVER_PROXY = "darkknight.jewelrycraft.proxy.CommonProxy";
+
+ public static final int MAX_CURSES = 10;
+ public static final ResourceLocation PEDESTAL_TEXTURE = new ResourceLocation(Variables.MODID, "textures/tileentities/BricksPedestal.png");
+ public static final ResourceLocation SHADOW_HAND_TEXTURE = new ResourceLocation(Variables.MODID, "textures/tileentities/ShadowHand.png");
+ public static final ResourceLocation CURSES_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/curses0.png");
+ public static final ResourceLocation VILLAGER_TEXTURE = new ResourceLocation(Variables.MODID, "textures/entities/jeweler.png");
+ public static final ResourceLocation MISC_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/hearts.png");
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/88/6046ea82b1ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/88/6046ea82b1ea001411cee0f8f86532a4
new file mode 100644
index 0000000..ab073fa
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/88/6046ea82b1ea001411cee0f8f86532a4
@@ -0,0 +1,263 @@
+package darkknight.jewelrycraft.tileentity.renders;
+
+import java.awt.Color;
+import java.util.HashMap;
+import java.util.List;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.entity.RenderManager;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelDisplayer;
+import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
+import darkknight.jewelrycraft.util.Variables;
+
+public class TileEntityDisplayerRender extends TileEntitySpecialRenderer
+{
+ ModelDisplayer displayer = new ModelDisplayer();
+ String texture = "textures/tileentities/Displayer.png";
+ HashMap<EnumChatFormatting, Integer> colors = new HashMap<EnumChatFormatting, Integer>(){
+ {
+ put(EnumChatFormatting.AQUA, 5636095);
+ put(EnumChatFormatting.BLACK, 0);
+ put(EnumChatFormatting.BLUE, 5592575);
+ put(EnumChatFormatting.DARK_AQUA, 43690);
+ put(EnumChatFormatting.DARK_BLUE, 170);
+ put(EnumChatFormatting.DARK_GRAY, 5592405);
+ put(EnumChatFormatting.DARK_GREEN, 43520);
+ put(EnumChatFormatting.DARK_PURPLE, 11141290);
+ put(EnumChatFormatting.DARK_RED, 11141120);
+ put(EnumChatFormatting.GOLD, 16755200);
+ put(EnumChatFormatting.GRAY, 11184810);
+ put(EnumChatFormatting.GREEN, 5635925);
+ put(EnumChatFormatting.LIGHT_PURPLE, 16733695);
+ put(EnumChatFormatting.RED, 16733525);
+ put(EnumChatFormatting.WHITE, 16777215);
+ put(EnumChatFormatting.YELLOW, 16777045);
+ }
+ };
+
+ /**
+ * @param te
+ * @param x
+ * @param y
+ * @param z
+ * @param scale
+ */
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ GL11.glPushMatrix();
+ GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
+ TileEntityDisplayer disp = (TileEntityDisplayer)te;
+ ResourceLocation blockTexture = new ResourceLocation(Variables.MODID, texture);
+ Minecraft.getMinecraft().renderEngine.bindTexture(blockTexture);
+ GL11.glPushMatrix();
+ GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
+ displayer.render((Entity)null, disp.ringTranslation1, disp.ringTranslation2, disp.ringTranslation3, 0.0F, 0.0F, 0.0625F);
+ try{
+ int block = disp.getBlockMetadata();
+ if (disp != null && disp.hasObject && disp.object != null && disp.object.getItem() != null && disp.object != new ItemStack(Item.getItemById(0), 0, 0)){
+ int ind = -3;
+ GL11.glPushMatrix();
+ EntityItem entityitem = new EntityItem(te.getWorldObj(), 0.0D, 0.0D, 0.0D, disp.object);
+ entityitem.hoverStart = 0.0F;
+ disp.object.stackSize = 1;
+ GL11.glRotatef(180F, 1F, 0F, 0F);
+ GL11.glTranslatef(0.0F, -0.6F + disp.ringTranslation1 / 5, 0F);
+ GL11.glRotatef(disp.rotAngle, 0F, 1F, 0F);
+ if (RenderManager.instance.options.fancyGraphics) RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
+ else{
+ GL11.glRotatef(180F, 0F, 1F, 0F);
+ RenderManager.instance.options.fancyGraphics = true;
+ int i = 15728880;
+ int j = i % 65536;
+ int k = i / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, j / 1.0F, k / 1.0F);
+ RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
+ RenderManager.instance.options.fancyGraphics = false;
+ }
+ EntityPlayer player = te.getWorldObj().getClosestPlayer(te.xCoord, te.yCoord, te.zCoord, 5D);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ if (player != null) renderLabel(disp.object.getDisplayName(), 0F, -0.171F * ind, 0F, block, disp, colors.get(disp.object.getRarity().rarityColor));
+ GL11.glPopMatrix();
+ ind++;
+ if (player != null && disp.quantity > 1){
+ GL11.glPushMatrix();
+ renderLabel("x" + Integer.toString(disp.quantity), 0F, -0.171F * ind, 0F, block, disp, Color.GRAY.getRGB());
+ GL11.glPopMatrix();
+ ind++;
+ }
+ if (disp.object.getItem() != Items.map && player != null && disp.object.getTooltip(player, true) != null){
+ List tooltips = disp.object.getTooltip(player, true);
+ if (disp.infoIndex + 5 > tooltips.size()) disp.infoIndex = 1;
+ if (tooltips.size() < 5) for(int i = 1; i < tooltips.size(); i++){
+ String tooltip = tooltips.get(i).toString();
+ RenderManager.instance.getFontRenderer();
+ if (tooltip != ""){
+ GL11.glPushMatrix();
+ renderLabel(tooltip, 0F, -0.171F * ind, 0F, block, disp, Color.GRAY.getRGB());
+ GL11.glPopMatrix();
+ ind++;
+ }
+ }
+ else for(int i = disp.infoIndex; i < disp.infoIndex + 5; i++){
+ String tooltip = tooltips.get(i).toString();
+ RenderManager.instance.getFontRenderer();
+ if (tooltip != ""){
+ GL11.glPushMatrix();
+ renderLabel(tooltip, 0F, -0.171F * ind, 0F, block, disp, Color.GRAY.getRGB());
+ GL11.glPopMatrix();
+ ind++;
+ }
+ }
+ }
+ }
+ }
+ catch(Exception e){}
+ GL11.glPopMatrix();
+ GL11.glPopMatrix();
+ }
+
+ /**
+ * @param par2Str
+ * @param x
+ * @param y
+ * @param z
+ * @param metadata
+ * @param te
+ * @param color
+ */
+ protected void renderLabel(String par2Str, double x, double y, double z, int metadata, TileEntity te, int color)
+ {
+ FontRenderer fontrenderer = RenderManager.instance.getFontRenderer();
+ float var14 = 0.01266667F * 1.5F;
+ float var17 = 0.015F;
+ GL11.glRotatef(180F, 0F, 0F, 1F);
+ if (metadata == 0) GL11.glRotatef(0F, 0F, 1F, 0F);
+ else if (metadata == 1) GL11.glRotatef(270F, 0F, 1F, 0F);
+ else if (metadata == 2) GL11.glRotatef(180F, 0F, 1F, 0F);
+ else if (metadata == 3) GL11.glRotatef(90F, 0F, 1F, 0F);
+ GL11.glTranslatef((float)x, (float)y, (float)z + 0.45F);
+ GL11.glScalef(-0.015F, -var14, 0.015F);
+ GL11.glPushMatrix();
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ Tessellator tessellator = Tessellator.instance;
+ GL11.glDisable(GL11.GL_TEXTURE_2D);
+ int j = fontrenderer.getStringWidth(par2Str) / 2;
+ tessellator.startDrawingQuads();
+ tessellator.setColorRGBA_F(0.0F, 0.2F, 0.2F, 0.9F);
+ tessellator.addVertex(-33.333 - 0, 0D, 0.1D);
+ tessellator.addVertex(-33.333 - 0, 9D, 0.1D);
+ tessellator.addVertex(33.333 + 0, 9D, 0.1D);
+ tessellator.addVertex(33.333 + 0, 0D, 0.1D);
+ tessellator.draw();
+ if (fontrenderer.getStringWidth(par2Str) / 2 > 20) var17 = 0.9F / fontrenderer.getStringWidth(par2Str);
+ else var17 = var14;
+ int red = color >> 16 & 0xFF;
+ int green = color >> 8 & 0xFF;
+ int blue = color & 0xFF;
+ GL11.glTranslatef((float)x + 1f, (float)y + 1f, (float)z);
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_TEXTURE_2D);
+ GL11.glScalef(var17 * 70F, 1F, 0F);
+ int i = 15728880;
+ int t = i % 65536;
+ int k = i / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, t / 1.0F, k / 1.0F);
+ fontrenderer.drawString(par2Str.replaceFirst("§0", "§r").replaceFirst("§1", "§r").replaceFirst("§2", "§r").replaceFirst("§3", "§r").replaceFirst("§4", "§r").replaceFirst("§5", "§r").replaceFirst("§6", "§r").replaceFirst("§7", "§r").replaceFirst("§8", "§r").replaceFirst("§9", "§r").replaceFirst("§a", "§r").replaceFirst("§b", "§r").replaceFirst("§c", "§r").replaceFirst("§d", "§r").replaceFirst("§e", "§r").replaceFirst("§f", "§r"), -j, 0, 65536 * (red > 170 ? red - 170 : 0) + 256 * (green > 170 ? green - 170 : 0) + (blue > 170 ? blue - 170 : 0));
+ GL11.glPopMatrix();
+ GL11.glTranslatef((float)x - 1f, (float)y - 1f, (float)z - 1F);
+ GL11.glScalef(var17 * 70F, 1F, 0F);
+ fontrenderer.drawString(par2Str, -j, 0, color);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glPopMatrix();
+ }
+
+ /**
+ * @param str
+ * @param color
+ */
+ public void replaceEnumEnchValues(String str, int color)
+ {
+ if (str.contains("§0")){
+ color = Color.BLACK.getRGB();
+ str.replace("§0", "");
+ }
+ if (str.contains("§1")){
+ color = 85;
+ str.replace("§1", "");
+ }
+ if (str.contains("§2")){
+ color = 17920;
+ str.replace("§2", "");
+ }
+ if (str.contains("§3")){
+ color = 1336183;
+ str.replace("§3", "");
+ }
+ if (str.contains("§4")){
+ color = 4587520;
+ str.replace("§4", "");
+ }
+ if (str.contains("§5")){
+ color = 5701759;
+ str.replace("§5", "");
+ }
+ if (str.contains("§6")){
+ color = 16762880;
+ str.replace("§6", "");
+ }
+ if (str.contains("§7")){
+ color = Color.GRAY.getRGB();
+ str.replace("§7", "");
+ }
+ if (str.contains("§8")){
+ color = Color.DARK_GRAY.getRGB();
+ str.replace("§8", "");
+ }
+ if (str.contains("§9")){
+ color = Color.BLUE.getRGB();
+ str.replace("§9", "");
+ }
+ if (str.contains("§a")){
+ color = Color.GREEN.getRGB();
+ str.replace("§a", "");
+ }
+ if (str.contains("§b")){
+ color = Color.CYAN.getRGB();
+ str.replace("§b", "");
+ }
+ if (str.contains("§c")){
+ color = Color.RED.getRGB();
+ str.replace("§c", "");
+ }
+ if (str.contains("§d")){
+ color = 11665663;
+ str.replace("§d", "");
+ }
+ if (str.contains("§e")){
+ color = Color.YELLOW.getRGB();
+ str.replace("§e", "");
+ }
+ if (str.contains("§f")){
+ color = Color.WHITE.getRGB();
+ str.replace("§f", "");
+ }
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/88/e0c7328592ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/88/e0c7328592ea001411cee0f8f86532a4
new file mode 100644
index 0000000..1e2a9da
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/88/e0c7328592ea001411cee0f8f86532a4
@@ -0,0 +1,280 @@
+package darkknight.jewelrycraft.model;
+
+import java.awt.Color;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import org.lwjgl.opengl.GL11;
+
+/**
+ * ModelBiped - Either Mojang or a mod author Created using Tabula 4.1.1
+ */
+public class ModelBracelet extends ModelBase
+{
+ public ModelRenderer metal1;
+ public ModelRenderer metal2;
+ public ModelRenderer metal3;
+ public ModelRenderer metal4;
+ public ModelRenderer gem1;
+ public ModelRenderer gem2;
+ public ModelRenderer gem3;
+ public ModelRenderer gem4;
+ public ModelRenderer gem5;
+ public ModelRenderer gem6;
+ public ModelRenderer gem7;
+ public ModelRenderer gem8;
+ public ModelRenderer gem9;
+
+ public ModelBracelet()
+ {
+ this.textureWidth = 16;
+ this.textureHeight = 16;
+ this.metal4 = new ModelRenderer(this, 0, 8);
+ this.metal4.setRotationPoint(-5.0F, 12.0F, -2.0F);
+ this.metal4.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4, 0.0F);
+ this.gem4 = new ModelRenderer(this, 0, 0);
+ this.gem4.setRotationPoint(-3.0F, 12.8F, -3.5F);
+ this.gem4.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.setRotateAngle(gem4, 0.0F, 0.008901179185171082F, 0.0F);
+ this.gem3 = new ModelRenderer(this, 0, 0);
+ this.gem3.setRotationPoint(-4.8F, 12.2F, -3.5F);
+ this.gem3.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem2 = new ModelRenderer(this, 0, 0);
+ this.gem2.setRotationPoint(-1.5F, 12.8F, -3.5F);
+ this.gem2.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem1 = new ModelRenderer(this, 0, 0);
+ this.gem1.setRotationPoint(0.3F, 12.2F, -3.5F);
+ this.gem1.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.metal1 = new ModelRenderer(this, 0, 8);
+ this.metal1.setRotationPoint(-5.0F, 12.0F, -3.0F);
+ this.metal1.addBox(0.0F, 0.0F, 0.0F, 6, 2, 1, 0.0F);
+ this.gem6 = new ModelRenderer(this, 0, 0);
+ this.gem6.setRotationPoint(-4.3F, 12.7F, -3.5F);
+ this.gem6.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
+ this.gem7 = new ModelRenderer(this, 0, 0);
+ this.gem7.setRotationPoint(-3.8F, 12.7F, -3.5F);
+ this.gem7.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem8 = new ModelRenderer(this, 0, 0);
+ this.gem8.setRotationPoint(-0.2F, 12.7F, -3.5F);
+ this.gem8.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
+ this.metal2 = new ModelRenderer(this, 0, 8);
+ this.metal2.setRotationPoint(-5.0F, 12.0F, 2.0F);
+ this.metal2.addBox(0.0F, 0.0F, 0.0F, 6, 2, 1, 0.0F);
+ this.gem5 = new ModelRenderer(this, 0, 0);
+ this.gem5.setRotationPoint(-2.5F, 12.3F, -3.5F);
+ this.gem5.addBox(0.0F, 0.0F, 0.0F, 2, 3, 1, 0.0F);
+ this.metal3 = new ModelRenderer(this, 0, 8);
+ this.metal3.setRotationPoint(0.0F, 12.0F, -2.0F);
+ this.metal3.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4, 0.0F);
+ this.gem9 = new ModelRenderer(this, 0, 0);
+ this.gem9.setRotationPoint(-0.7F, 12.7F, -3.5F);
+ this.gem9.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ }
+
+ @Override
+ public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
+ {
+ GL11.glDisable(GL11.GL_LIGHTING);
+ if ((int)f3 != -1){
+ int ingotColor = (int)f3;
+ int red = (ingotColor >> 16) & 0xff;
+ int green = (ingotColor >> 8) & 0xff;
+ int blue = ingotColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ this.metal1.render(f5);
+ this.metal2.render(f5);
+ this.metal3.render(f5);
+ this.metal4.render(f5);
+ }
+ if ((int)f4 != -1){
+ int gemColor = (int)f4;
+ int red = gemColor >> 16 & 0xff;
+ int green = gemColor >> 8 & 0xff;
+ int blue = gemColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE_MINUS_DST_COLOR);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem4.offsetX, this.gem4.offsetY, this.gem4.offsetZ);
+ GL11.glTranslatef(this.gem4.rotationPointX * f5, this.gem4.rotationPointY * f5, this.gem4.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem4.offsetX, -this.gem4.offsetY, -this.gem4.offsetZ);
+ GL11.glTranslatef(-this.gem4.rotationPointX * f5, -this.gem4.rotationPointY * f5, -this.gem4.rotationPointZ * f5);
+ this.gem4.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem3.offsetX, this.gem3.offsetY, this.gem3.offsetZ);
+ GL11.glTranslatef(this.gem3.rotationPointX * f5, this.gem3.rotationPointY * f5, this.gem3.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem3.offsetX, -this.gem3.offsetY, -this.gem3.offsetZ);
+ GL11.glTranslatef(-this.gem3.rotationPointX * f5, -this.gem3.rotationPointY * f5, -this.gem3.rotationPointZ * f5);
+ this.gem3.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem2.offsetX, this.gem2.offsetY, this.gem2.offsetZ);
+ GL11.glTranslatef(this.gem2.rotationPointX * f5, this.gem2.rotationPointY * f5, this.gem2.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem2.offsetX, -this.gem2.offsetY, -this.gem2.offsetZ);
+ GL11.glTranslatef(-this.gem2.rotationPointX * f5, -this.gem2.rotationPointY * f5, -this.gem2.rotationPointZ * f5);
+ this.gem2.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem1.offsetX, this.gem1.offsetY, this.gem1.offsetZ);
+ GL11.glTranslatef(this.gem1.rotationPointX * f5, this.gem1.rotationPointY * f5, this.gem1.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem1.offsetX, -this.gem1.offsetY, -this.gem1.offsetZ);
+ GL11.glTranslatef(-this.gem1.rotationPointX * f5, -this.gem1.rotationPointY * f5, -this.gem1.rotationPointZ * f5);
+ this.gem1.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem6.offsetX, this.gem6.offsetY, this.gem6.offsetZ);
+ GL11.glTranslatef(this.gem6.rotationPointX * f5, this.gem6.rotationPointY * f5, this.gem6.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem6.offsetX, -this.gem6.offsetY, -this.gem6.offsetZ);
+ GL11.glTranslatef(-this.gem6.rotationPointX * f5, -this.gem6.rotationPointY * f5, -this.gem6.rotationPointZ * f5);
+ this.gem6.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem7.offsetX, this.gem7.offsetY, this.gem7.offsetZ);
+ GL11.glTranslatef(this.gem7.rotationPointX * f5, this.gem7.rotationPointY * f5, this.gem7.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem7.offsetX, -this.gem7.offsetY, -this.gem7.offsetZ);
+ GL11.glTranslatef(-this.gem7.rotationPointX * f5, -this.gem7.rotationPointY * f5, -this.gem7.rotationPointZ * f5);
+ this.gem7.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem8.offsetX, this.gem8.offsetY, this.gem8.offsetZ);
+ GL11.glTranslatef(this.gem8.rotationPointX * f5, this.gem8.rotationPointY * f5, this.gem8.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem8.offsetX, -this.gem8.offsetY, -this.gem8.offsetZ);
+ GL11.glTranslatef(-this.gem8.rotationPointX * f5, -this.gem8.rotationPointY * f5, -this.gem8.rotationPointZ * f5);
+ this.gem8.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem5.offsetX, this.gem5.offsetY, this.gem5.offsetZ);
+ GL11.glTranslatef(this.gem5.rotationPointX * f5, this.gem5.rotationPointY * f5, this.gem5.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem5.offsetX, -this.gem5.offsetY, -this.gem5.offsetZ);
+ GL11.glTranslatef(-this.gem5.rotationPointX * f5, -this.gem5.rotationPointY * f5, -this.gem5.rotationPointZ * f5);
+ this.gem5.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem9.offsetX, this.gem9.offsetY, this.gem9.offsetZ);
+ GL11.glTranslatef(this.gem9.rotationPointX * f5, this.gem9.rotationPointY * f5, this.gem9.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem9.offsetX, -this.gem9.offsetY, -this.gem9.offsetZ);
+ GL11.glTranslatef(-this.gem9.rotationPointX * f5, -this.gem9.rotationPointY * f5, -this.gem9.rotationPointZ * f5);
+ this.gem9.render(f5);
+ GL11.glPopMatrix();
+ GL11.glDisable(GL11.GL_BLEND);
+ }
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glTranslatef(0F, 3.5F, 0F);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ if ((int)f3 != -1){
+ int ingotColor = (int)f3;
+ int red = (ingotColor >> 16) & 0xff;
+ int green = (ingotColor >> 8) & 0xff;
+ int blue = ingotColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ this.metal1.render(f5);
+ this.metal2.render(f5);
+ this.metal3.render(f5);
+ this.metal4.render(f5);
+ }
+ if ((int)f4 != -1){
+ int gemColor = (int)f4;
+ int red = gemColor >> 16 & 0xff;
+ int green = gemColor >> 8 & 0xff;
+ int blue = gemColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE_MINUS_DST_COLOR);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem4.offsetX, this.gem4.offsetY, this.gem4.offsetZ);
+ GL11.glTranslatef(this.gem4.rotationPointX * f5, this.gem4.rotationPointY * f5, this.gem4.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem4.offsetX, -this.gem4.offsetY, -this.gem4.offsetZ);
+ GL11.glTranslatef(-this.gem4.rotationPointX * f5, -this.gem4.rotationPointY * f5, -this.gem4.rotationPointZ * f5);
+ this.gem4.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem3.offsetX, this.gem3.offsetY, this.gem3.offsetZ);
+ GL11.glTranslatef(this.gem3.rotationPointX * f5, this.gem3.rotationPointY * f5, this.gem3.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem3.offsetX, -this.gem3.offsetY, -this.gem3.offsetZ);
+ GL11.glTranslatef(-this.gem3.rotationPointX * f5, -this.gem3.rotationPointY * f5, -this.gem3.rotationPointZ * f5);
+ this.gem3.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem2.offsetX, this.gem2.offsetY, this.gem2.offsetZ);
+ GL11.glTranslatef(this.gem2.rotationPointX * f5, this.gem2.rotationPointY * f5, this.gem2.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem2.offsetX, -this.gem2.offsetY, -this.gem2.offsetZ);
+ GL11.glTranslatef(-this.gem2.rotationPointX * f5, -this.gem2.rotationPointY * f5, -this.gem2.rotationPointZ * f5);
+ this.gem2.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem1.offsetX, this.gem1.offsetY, this.gem1.offsetZ);
+ GL11.glTranslatef(this.gem1.rotationPointX * f5, this.gem1.rotationPointY * f5, this.gem1.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem1.offsetX, -this.gem1.offsetY, -this.gem1.offsetZ);
+ GL11.glTranslatef(-this.gem1.rotationPointX * f5, -this.gem1.rotationPointY * f5, -this.gem1.rotationPointZ * f5);
+ this.gem1.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem6.offsetX, this.gem6.offsetY, this.gem6.offsetZ);
+ GL11.glTranslatef(this.gem6.rotationPointX * f5, this.gem6.rotationPointY * f5, this.gem6.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem6.offsetX, -this.gem6.offsetY, -this.gem6.offsetZ);
+ GL11.glTranslatef(-this.gem6.rotationPointX * f5, -this.gem6.rotationPointY * f5, -this.gem6.rotationPointZ * f5);
+ this.gem6.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem7.offsetX, this.gem7.offsetY, this.gem7.offsetZ);
+ GL11.glTranslatef(this.gem7.rotationPointX * f5, this.gem7.rotationPointY * f5, this.gem7.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem7.offsetX, -this.gem7.offsetY, -this.gem7.offsetZ);
+ GL11.glTranslatef(-this.gem7.rotationPointX * f5, -this.gem7.rotationPointY * f5, -this.gem7.rotationPointZ * f5);
+ this.gem7.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem8.offsetX, this.gem8.offsetY, this.gem8.offsetZ);
+ GL11.glTranslatef(this.gem8.rotationPointX * f5, this.gem8.rotationPointY * f5, this.gem8.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem8.offsetX, -this.gem8.offsetY, -this.gem8.offsetZ);
+ GL11.glTranslatef(-this.gem8.rotationPointX * f5, -this.gem8.rotationPointY * f5, -this.gem8.rotationPointZ * f5);
+ this.gem8.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem5.offsetX, this.gem5.offsetY, this.gem5.offsetZ);
+ GL11.glTranslatef(this.gem5.rotationPointX * f5, this.gem5.rotationPointY * f5, this.gem5.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem5.offsetX, -this.gem5.offsetY, -this.gem5.offsetZ);
+ GL11.glTranslatef(-this.gem5.rotationPointX * f5, -this.gem5.rotationPointY * f5, -this.gem5.rotationPointZ * f5);
+ this.gem5.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem9.offsetX, this.gem9.offsetY, this.gem9.offsetZ);
+ GL11.glTranslatef(this.gem9.rotationPointX * f5, this.gem9.rotationPointY * f5, this.gem9.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem9.offsetX, -this.gem9.offsetY, -this.gem9.offsetZ);
+ GL11.glTranslatef(-this.gem9.rotationPointX * f5, -this.gem9.rotationPointY * f5, -this.gem9.rotationPointZ * f5);
+ this.gem9.render(f5);
+ GL11.glPopMatrix();
+ GL11.glDisable(GL11.GL_BLEND);
+ }
+ GL11.glEnable(GL11.GL_LIGHTING);
+ }
+
+ /**
+ * This is a helper function from Tabula to set the rotation of model parts
+ */
+ public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z)
+ {
+ modelRenderer.rotateAngleX = x;
+ modelRenderer.rotateAngleY = y;
+ modelRenderer.rotateAngleZ = z;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/403c226486ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/403c226486ea001411cee0f8f86532a4
new file mode 100644
index 0000000..a2a6da7
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/403c226486ea001411cee0f8f86532a4
@@ -0,0 +1,94 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockCompressed;
+import net.minecraft.block.BlockPressurePlate;
+import net.minecraft.block.BlockPressurePlateWeighted;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemArmor;
+import net.minecraft.item.ItemAxe;
+import net.minecraft.item.ItemHoe;
+import net.minecraft.item.ItemPickaxe;
+import net.minecraft.item.ItemSpade;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.ItemSword;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+
+public class CurseMidasTouch extends Curse
+{
+ public CurseMidasTouch(int id, String name, int text)
+ {
+ super(id, name, text);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {
+ if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && player.inventory.getCurrentItem() == null){
+ world.setBlock(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), BlockList.midasTouchBlock, 0, 2);
+ TileEntityMidasTouch midasTouchVictim = new TileEntityMidasTouch();
+ midasTouchVictim.setEntity(target);
+ world.setTileEntity(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), midasTouchVictim);
+ target.setDead();
+ }
+ }
+
+ @Override
+ public void action(World world, EntityPlayer player)
+ {
+ ItemStack curItem = player.inventory.getCurrentItem();
+ if(curItem != null && curItem.getItem() != ItemList.goldObj && !isGoldenObject(curItem.getItem())){
+ int index = player.inventory.currentItem;
+ ItemStack item = curItem;
+ ItemStack result = new ItemStack(ItemList.goldObj, item.stackSize, item.getItemDamage());
+ JewelryNBT.addItem(result, item);
+ if(changeItem(curItem) != null) result = changeItem(curItem);
+ player.inventory.setInventorySlotContents(index, result);
+ }
+ }
+
+ public ItemStack changeItem(ItemStack currItem)
+ {
+ if(currItem.getItem() instanceof ItemSword) return new ItemStack(Items.golden_sword, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemSpade) return new ItemStack(Items.golden_shovel, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemPickaxe) return new ItemStack(Items.golden_pickaxe, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemAxe) return new ItemStack(Items.golden_axe, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemHoe) return new ItemStack(Items.golden_hoe, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemArmor && ((ItemArmor)currItem.getItem()).armorType == 0) return new ItemStack(Items.golden_helmet, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemArmor && ((ItemArmor)currItem.getItem()).armorType == 1) return new ItemStack(Items.golden_chestplate, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemArmor && ((ItemArmor)currItem.getItem()).armorType == 2) return new ItemStack(Items.golden_leggings, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemArmor && ((ItemArmor)currItem.getItem()).armorType == 3) return new ItemStack(Items.golden_boots, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem().getUnlocalizedName().toLowerCase().contains("horsearmor")) return new ItemStack(Items.golden_horse_armor, currItem.stackSize, 0);
+ else if(currItem.getItem().getUnlocalizedName().toLowerCase().contains("nugget") || currItem.getItem().getItemStackDisplayName(currItem).toLowerCase().contains(" nugget") || currItem.getItem().getItemStackDisplayName(currItem).toLowerCase().contains("nugget ")) return new ItemStack(Items.gold_nugget, currItem.stackSize, 0);
+ else if(currItem.getItem().getUnlocalizedName().toLowerCase().contains("ingot") || currItem.getItem().getItemStackDisplayName(currItem).toLowerCase().contains(" ingot") || currItem.getItem().getItemStackDisplayName(currItem).toLowerCase().contains("ingot ")) return new ItemStack(Items.gold_ingot, currItem.stackSize, 0);
+ else if(Block.getBlockFromItem(currItem.getItem()) instanceof BlockPressurePlate || Block.getBlockFromItem(currItem.getItem()) instanceof BlockPressurePlateWeighted) return new ItemStack(Blocks.light_weighted_pressure_plate, currItem.stackSize, 0);
+ else if(Block.getBlockFromItem(currItem.getItem()) instanceof BlockCompressed) return new ItemStack(Blocks.gold_block, currItem.stackSize, 0);
+ return null;
+ }
+
+ public boolean isGoldenObject(Item item)
+ {
+ return item.equals(Items.gold_ingot) || item.equals(Items.gold_nugget) || item.equals(Items.golden_helmet) || item.equals(Items.golden_chestplate) ||
+ item.equals(Items.golden_leggings) || item.equals(Items.golden_boots) || item.equals(Items.golden_sword) || item.equals(Items.golden_shovel) ||
+ item.equals(Items.golden_pickaxe) || item.equals(Items.golden_axe) || item.equals(Items.golden_hoe) || item.equals(Items.golden_horse_armor) ||
+ Block.getBlockFromItem(item).equals(Blocks.gold_block) || Block.getBlockFromItem(item).equals(Blocks.light_weighted_pressure_plate);
+ }
+
+ public String getDescription()
+ {
+ return "Be careful what you wish for...";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/8044082ffce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/8044082ffce40014174fe663e69b8422
deleted file mode 100644
index b9560c1..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/8044082ffce40014174fe663e69b8422
+++ /dev/null
@@ -1,37 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && player.inventory.getCurrentItem() == null){
- world.setBlock(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), BlockList.midasTouchBlock, 0, 2);
- TileEntityMidasTouch midasTouchVictim = new TileEntityMidasTouch();
- midasTouchVictim.setEntity(target);
- world.setTileEntity(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), midasTouchVictim);
- target.setDead();
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/b0b1a2f395ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/b0b1a2f395ea001411cee0f8f86532a4
new file mode 100644
index 0000000..f982789
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/b0b1a2f395ea001411cee0f8f86532a4
@@ -0,0 +1,113 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glTranslatef(0.0F, 3.0F, -2.0F);
+ GL11.glScalef(0.07f, 0.07f, 0.07f);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/f01e505a95e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/f01e505a95e3001412c4c4819c88e86b
deleted file mode 100644
index 0b7f8e6..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/f01e505a95e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,74 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
- TileEntity tile = world.getTileEntity(x, y, z);
- if(((TileEntityMidasTouch)tile).target != null){
- System.out.println(this.getBlockBoundsMinY());
- this.setBlockBounds(0F, 0F, 0F, 1F, 1F, 1F);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/f02ac1bf92ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/f02ac1bf92ea001411cee0f8f86532a4
new file mode 100644
index 0000000..d2c7119
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/89/f02ac1bf92ea001411cee0f8f86532a4
@@ -0,0 +1,280 @@
+package darkknight.jewelrycraft.model;
+
+import java.awt.Color;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import org.lwjgl.opengl.GL11;
+
+/**
+ * ModelBiped - Either Mojang or a mod author Created using Tabula 4.1.1
+ */
+public class ModelBracelet extends ModelBase
+{
+ public ModelRenderer metal1;
+ public ModelRenderer metal2;
+ public ModelRenderer metal3;
+ public ModelRenderer metal4;
+ public ModelRenderer gem1;
+ public ModelRenderer gem2;
+ public ModelRenderer gem3;
+ public ModelRenderer gem4;
+ public ModelRenderer gem5;
+ public ModelRenderer gem6;
+ public ModelRenderer gem7;
+ public ModelRenderer gem8;
+ public ModelRenderer gem9;
+
+ public ModelBracelet()
+ {
+ this.textureWidth = 16;
+ this.textureHeight = 16;
+ this.metal4 = new ModelRenderer(this, 0, 8);
+ this.metal4.setRotationPoint(-5.0F, 12.0F, -2.0F);
+ this.metal4.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4, 0.0F);
+ this.gem4 = new ModelRenderer(this, 0, 0);
+ this.gem4.setRotationPoint(-3.0F, 12.8F, -3.5F);
+ this.gem4.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.setRotateAngle(gem4, 0.0F, 0.008901179185171082F, 0.0F);
+ this.gem3 = new ModelRenderer(this, 0, 0);
+ this.gem3.setRotationPoint(-4.8F, 12.2F, -3.5F);
+ this.gem3.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem2 = new ModelRenderer(this, 0, 0);
+ this.gem2.setRotationPoint(-1.5F, 12.8F, -3.5F);
+ this.gem2.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem1 = new ModelRenderer(this, 0, 0);
+ this.gem1.setRotationPoint(0.3F, 12.2F, -3.5F);
+ this.gem1.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.metal1 = new ModelRenderer(this, 0, 8);
+ this.metal1.setRotationPoint(-5.0F, 12.0F, -3.0F);
+ this.metal1.addBox(0.0F, 0.0F, 0.0F, 6, 2, 1, 0.0F);
+ this.gem6 = new ModelRenderer(this, 0, 0);
+ this.gem6.setRotationPoint(-4.3F, 12.7F, -3.5F);
+ this.gem6.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
+ this.gem7 = new ModelRenderer(this, 0, 0);
+ this.gem7.setRotationPoint(-3.8F, 12.7F, -3.5F);
+ this.gem7.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem8 = new ModelRenderer(this, 0, 0);
+ this.gem8.setRotationPoint(-0.2F, 12.7F, -3.5F);
+ this.gem8.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
+ this.metal2 = new ModelRenderer(this, 0, 8);
+ this.metal2.setRotationPoint(-5.0F, 12.0F, 2.0F);
+ this.metal2.addBox(0.0F, 0.0F, 0.0F, 6, 2, 1, 0.0F);
+ this.gem5 = new ModelRenderer(this, 0, 0);
+ this.gem5.setRotationPoint(-2.5F, 12.3F, -3.5F);
+ this.gem5.addBox(0.0F, 0.0F, 0.0F, 2, 3, 1, 0.0F);
+ this.metal3 = new ModelRenderer(this, 0, 8);
+ this.metal3.setRotationPoint(0.0F, 12.0F, -2.0F);
+ this.metal3.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4, 0.0F);
+ this.gem9 = new ModelRenderer(this, 0, 0);
+ this.gem9.setRotationPoint(-0.7F, 12.7F, -3.5F);
+ this.gem9.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ }
+
+ @Override
+ public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
+ {
+ GL11.glDisable(GL11.GL_LIGHTING);
+ if ((int)f3 != -1){
+ int ingotColor = (int)f3;
+ int red = (ingotColor >> 16) & 0xff;
+ int green = (ingotColor >> 8) & 0xff;
+ int blue = ingotColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ this.metal1.render(f5);
+ this.metal2.render(f5);
+ this.metal3.render(f5);
+ this.metal4.render(f5);
+ }
+ if ((int)f4 != -1){
+ int gemColor = (int)f4;
+ int red = gemColor >> 16 & 0xff;
+ int green = gemColor >> 8 & 0xff;
+ int blue = gemColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE_MINUS_DST_COLOR);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem4.offsetX, this.gem4.offsetY, this.gem4.offsetZ);
+ GL11.glTranslatef(this.gem4.rotationPointX * f5, this.gem4.rotationPointY * f5, this.gem4.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem4.offsetX, -this.gem4.offsetY, -this.gem4.offsetZ);
+ GL11.glTranslatef(-this.gem4.rotationPointX * f5, -this.gem4.rotationPointY * f5, -this.gem4.rotationPointZ * f5);
+ this.gem4.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem3.offsetX, this.gem3.offsetY, this.gem3.offsetZ);
+ GL11.glTranslatef(this.gem3.rotationPointX * f5, this.gem3.rotationPointY * f5, this.gem3.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem3.offsetX, -this.gem3.offsetY, -this.gem3.offsetZ);
+ GL11.glTranslatef(-this.gem3.rotationPointX * f5, -this.gem3.rotationPointY * f5, -this.gem3.rotationPointZ * f5);
+ this.gem3.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem2.offsetX, this.gem2.offsetY, this.gem2.offsetZ);
+ GL11.glTranslatef(this.gem2.rotationPointX * f5, this.gem2.rotationPointY * f5, this.gem2.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem2.offsetX, -this.gem2.offsetY, -this.gem2.offsetZ);
+ GL11.glTranslatef(-this.gem2.rotationPointX * f5, -this.gem2.rotationPointY * f5, -this.gem2.rotationPointZ * f5);
+ this.gem2.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem1.offsetX, this.gem1.offsetY, this.gem1.offsetZ);
+ GL11.glTranslatef(this.gem1.rotationPointX * f5, this.gem1.rotationPointY * f5, this.gem1.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem1.offsetX, -this.gem1.offsetY, -this.gem1.offsetZ);
+ GL11.glTranslatef(-this.gem1.rotationPointX * f5, -this.gem1.rotationPointY * f5, -this.gem1.rotationPointZ * f5);
+ this.gem1.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem6.offsetX, this.gem6.offsetY, this.gem6.offsetZ);
+ GL11.glTranslatef(this.gem6.rotationPointX * f5, this.gem6.rotationPointY * f5, this.gem6.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem6.offsetX, -this.gem6.offsetY, -this.gem6.offsetZ);
+ GL11.glTranslatef(-this.gem6.rotationPointX * f5, -this.gem6.rotationPointY * f5, -this.gem6.rotationPointZ * f5);
+ this.gem6.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem7.offsetX, this.gem7.offsetY, this.gem7.offsetZ);
+ GL11.glTranslatef(this.gem7.rotationPointX * f5, this.gem7.rotationPointY * f5, this.gem7.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem7.offsetX, -this.gem7.offsetY, -this.gem7.offsetZ);
+ GL11.glTranslatef(-this.gem7.rotationPointX * f5, -this.gem7.rotationPointY * f5, -this.gem7.rotationPointZ * f5);
+ this.gem7.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem8.offsetX, this.gem8.offsetY, this.gem8.offsetZ);
+ GL11.glTranslatef(this.gem8.rotationPointX * f5, this.gem8.rotationPointY * f5, this.gem8.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem8.offsetX, -this.gem8.offsetY, -this.gem8.offsetZ);
+ GL11.glTranslatef(-this.gem8.rotationPointX * f5, -this.gem8.rotationPointY * f5, -this.gem8.rotationPointZ * f5);
+ this.gem8.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem5.offsetX, this.gem5.offsetY, this.gem5.offsetZ);
+ GL11.glTranslatef(this.gem5.rotationPointX * f5, this.gem5.rotationPointY * f5, this.gem5.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem5.offsetX, -this.gem5.offsetY, -this.gem5.offsetZ);
+ GL11.glTranslatef(-this.gem5.rotationPointX * f5, -this.gem5.rotationPointY * f5, -this.gem5.rotationPointZ * f5);
+ this.gem5.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem9.offsetX, this.gem9.offsetY, this.gem9.offsetZ);
+ GL11.glTranslatef(this.gem9.rotationPointX * f5, this.gem9.rotationPointY * f5, this.gem9.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem9.offsetX, -this.gem9.offsetY, -this.gem9.offsetZ);
+ GL11.glTranslatef(-this.gem9.rotationPointX * f5, -this.gem9.rotationPointY * f5, -this.gem9.rotationPointZ * f5);
+ this.gem9.render(f5);
+ GL11.glPopMatrix();
+ GL11.glDisable(GL11.GL_BLEND);
+ }
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glTranslatef(0F, 6.5F, 0F);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ if ((int)f3 != -1){
+ int ingotColor = (int)f3;
+ int red = (ingotColor >> 16) & 0xff;
+ int green = (ingotColor >> 8) & 0xff;
+ int blue = ingotColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ this.metal1.render(f5);
+ this.metal2.render(f5);
+ this.metal3.render(f5);
+ this.metal4.render(f5);
+ }
+ if ((int)f4 != -1){
+ int gemColor = (int)f4;
+ int red = gemColor >> 16 & 0xff;
+ int green = gemColor >> 8 & 0xff;
+ int blue = gemColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE_MINUS_DST_COLOR);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem4.offsetX, this.gem4.offsetY, this.gem4.offsetZ);
+ GL11.glTranslatef(this.gem4.rotationPointX * f5, this.gem4.rotationPointY * f5, this.gem4.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem4.offsetX, -this.gem4.offsetY, -this.gem4.offsetZ);
+ GL11.glTranslatef(-this.gem4.rotationPointX * f5, -this.gem4.rotationPointY * f5, -this.gem4.rotationPointZ * f5);
+ this.gem4.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem3.offsetX, this.gem3.offsetY, this.gem3.offsetZ);
+ GL11.glTranslatef(this.gem3.rotationPointX * f5, this.gem3.rotationPointY * f5, this.gem3.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem3.offsetX, -this.gem3.offsetY, -this.gem3.offsetZ);
+ GL11.glTranslatef(-this.gem3.rotationPointX * f5, -this.gem3.rotationPointY * f5, -this.gem3.rotationPointZ * f5);
+ this.gem3.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem2.offsetX, this.gem2.offsetY, this.gem2.offsetZ);
+ GL11.glTranslatef(this.gem2.rotationPointX * f5, this.gem2.rotationPointY * f5, this.gem2.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem2.offsetX, -this.gem2.offsetY, -this.gem2.offsetZ);
+ GL11.glTranslatef(-this.gem2.rotationPointX * f5, -this.gem2.rotationPointY * f5, -this.gem2.rotationPointZ * f5);
+ this.gem2.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem1.offsetX, this.gem1.offsetY, this.gem1.offsetZ);
+ GL11.glTranslatef(this.gem1.rotationPointX * f5, this.gem1.rotationPointY * f5, this.gem1.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem1.offsetX, -this.gem1.offsetY, -this.gem1.offsetZ);
+ GL11.glTranslatef(-this.gem1.rotationPointX * f5, -this.gem1.rotationPointY * f5, -this.gem1.rotationPointZ * f5);
+ this.gem1.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem6.offsetX, this.gem6.offsetY, this.gem6.offsetZ);
+ GL11.glTranslatef(this.gem6.rotationPointX * f5, this.gem6.rotationPointY * f5, this.gem6.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem6.offsetX, -this.gem6.offsetY, -this.gem6.offsetZ);
+ GL11.glTranslatef(-this.gem6.rotationPointX * f5, -this.gem6.rotationPointY * f5, -this.gem6.rotationPointZ * f5);
+ this.gem6.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem7.offsetX, this.gem7.offsetY, this.gem7.offsetZ);
+ GL11.glTranslatef(this.gem7.rotationPointX * f5, this.gem7.rotationPointY * f5, this.gem7.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem7.offsetX, -this.gem7.offsetY, -this.gem7.offsetZ);
+ GL11.glTranslatef(-this.gem7.rotationPointX * f5, -this.gem7.rotationPointY * f5, -this.gem7.rotationPointZ * f5);
+ this.gem7.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem8.offsetX, this.gem8.offsetY, this.gem8.offsetZ);
+ GL11.glTranslatef(this.gem8.rotationPointX * f5, this.gem8.rotationPointY * f5, this.gem8.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem8.offsetX, -this.gem8.offsetY, -this.gem8.offsetZ);
+ GL11.glTranslatef(-this.gem8.rotationPointX * f5, -this.gem8.rotationPointY * f5, -this.gem8.rotationPointZ * f5);
+ this.gem8.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem5.offsetX, this.gem5.offsetY, this.gem5.offsetZ);
+ GL11.glTranslatef(this.gem5.rotationPointX * f5, this.gem5.rotationPointY * f5, this.gem5.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem5.offsetX, -this.gem5.offsetY, -this.gem5.offsetZ);
+ GL11.glTranslatef(-this.gem5.rotationPointX * f5, -this.gem5.rotationPointY * f5, -this.gem5.rotationPointZ * f5);
+ this.gem5.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem9.offsetX, this.gem9.offsetY, this.gem9.offsetZ);
+ GL11.glTranslatef(this.gem9.rotationPointX * f5, this.gem9.rotationPointY * f5, this.gem9.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem9.offsetX, -this.gem9.offsetY, -this.gem9.offsetZ);
+ GL11.glTranslatef(-this.gem9.rotationPointX * f5, -this.gem9.rotationPointY * f5, -this.gem9.rotationPointZ * f5);
+ this.gem9.render(f5);
+ GL11.glPopMatrix();
+ GL11.glDisable(GL11.GL_BLEND);
+ }
+ GL11.glEnable(GL11.GL_LIGHTING);
+ }
+
+ /**
+ * This is a helper function from Tabula to set the rotation of model parts
+ */
+ public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z)
+ {
+ modelRenderer.rotateAngleX = x;
+ modelRenderer.rotateAngleY = y;
+ modelRenderer.rotateAngleZ = z;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8a/90fa117a8de3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8a/90fa117a8de3001417b2e384bf7c3702
deleted file mode 100644
index ac90f3b..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8a/90fa117a8de3001417b2e384bf7c3702
+++ /dev/null
@@ -1,35 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart)){
- world.setBlock((int)target.posX, (int)target.posY, (int)target.posZ, BlockList.midasTouchBlock, 0, 2);
- ((EntityLiving)target).hurtTime = 0;
- TileEntity midasTouchVictim = new TileEntityMidasTouch(target);
- world.setTileEntity((int)target.posX, (int)target.posY, (int)target.posZ, midasTouchVictim);
- target.setDead();
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8a/e058c2a396e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8a/e058c2a396e3001412c4c4819c88e86b
deleted file mode 100644
index 97531da..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8a/e058c2a396e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,36 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart)){
- world.setBlock((int)target.posX, (int)target.posY, (int)target.posZ, BlockList.midasTouchBlock, 0, 2);
- TileEntityMidasTouch midasTouchVictim = new TileEntityMidasTouch();
- midasTouchVictim.setEntity(target);
- world.setTileEntity((int)target.posX, (int)target.posY, (int)target.posZ, midasTouchVictim);
- target.setDead();
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8b/907ae04292ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8b/907ae04292ea001411cee0f8f86532a4
new file mode 100644
index 0000000..7f15b3a
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8b/907ae04292ea001411cee0f8f86532a4
@@ -0,0 +1,280 @@
+package darkknight.jewelrycraft.model;
+
+import java.awt.Color;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import org.lwjgl.opengl.GL11;
+
+/**
+ * ModelBiped - Either Mojang or a mod author Created using Tabula 4.1.1
+ */
+public class ModelBracelet extends ModelBase
+{
+ public ModelRenderer metal1;
+ public ModelRenderer metal2;
+ public ModelRenderer metal3;
+ public ModelRenderer metal4;
+ public ModelRenderer gem1;
+ public ModelRenderer gem2;
+ public ModelRenderer gem3;
+ public ModelRenderer gem4;
+ public ModelRenderer gem5;
+ public ModelRenderer gem6;
+ public ModelRenderer gem7;
+ public ModelRenderer gem8;
+ public ModelRenderer gem9;
+
+ public ModelBracelet()
+ {
+ this.textureWidth = 16;
+ this.textureHeight = 16;
+ this.metal4 = new ModelRenderer(this, 0, 8);
+ this.metal4.setRotationPoint(-5.0F, 12.0F, -2.0F);
+ this.metal4.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4, 0.0F);
+ this.gem4 = new ModelRenderer(this, 0, 0);
+ this.gem4.setRotationPoint(-3.0F, 12.8F, -3.5F);
+ this.gem4.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.setRotateAngle(gem4, 0.0F, 0.008901179185171082F, 0.0F);
+ this.gem3 = new ModelRenderer(this, 0, 0);
+ this.gem3.setRotationPoint(-4.8F, 12.2F, -3.5F);
+ this.gem3.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem2 = new ModelRenderer(this, 0, 0);
+ this.gem2.setRotationPoint(-1.5F, 12.8F, -3.5F);
+ this.gem2.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem1 = new ModelRenderer(this, 0, 0);
+ this.gem1.setRotationPoint(0.3F, 12.2F, -3.5F);
+ this.gem1.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.metal1 = new ModelRenderer(this, 0, 8);
+ this.metal1.setRotationPoint(-5.0F, 12.0F, -3.0F);
+ this.metal1.addBox(0.0F, 0.0F, 0.0F, 6, 2, 1, 0.0F);
+ this.gem6 = new ModelRenderer(this, 0, 0);
+ this.gem6.setRotationPoint(-4.3F, 12.7F, -3.5F);
+ this.gem6.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
+ this.gem7 = new ModelRenderer(this, 0, 0);
+ this.gem7.setRotationPoint(-3.8F, 12.7F, -3.5F);
+ this.gem7.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ this.gem8 = new ModelRenderer(this, 0, 0);
+ this.gem8.setRotationPoint(-0.2F, 12.7F, -3.5F);
+ this.gem8.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
+ this.metal2 = new ModelRenderer(this, 0, 8);
+ this.metal2.setRotationPoint(-5.0F, 12.0F, 2.0F);
+ this.metal2.addBox(0.0F, 0.0F, 0.0F, 6, 2, 1, 0.0F);
+ this.gem5 = new ModelRenderer(this, 0, 0);
+ this.gem5.setRotationPoint(-2.5F, 12.3F, -3.5F);
+ this.gem5.addBox(0.0F, 0.0F, 0.0F, 2, 3, 1, 0.0F);
+ this.metal3 = new ModelRenderer(this, 0, 8);
+ this.metal3.setRotationPoint(0.0F, 12.0F, -2.0F);
+ this.metal3.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4, 0.0F);
+ this.gem9 = new ModelRenderer(this, 0, 0);
+ this.gem9.setRotationPoint(-0.7F, 12.7F, -3.5F);
+ this.gem9.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
+ }
+
+ @Override
+ public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
+ {
+ GL11.glDisable(GL11.GL_LIGHTING);
+ if ((int)f3 != -1){
+ int ingotColor = (int)f3;
+ int red = (ingotColor >> 16) & 0xff;
+ int green = (ingotColor >> 8) & 0xff;
+ int blue = ingotColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ this.metal1.render(f5);
+ this.metal2.render(f5);
+ this.metal3.render(f5);
+ this.metal4.render(f5);
+ }
+ if ((int)f4 != -1){
+ int gemColor = (int)f4;
+ int red = gemColor >> 16 & 0xff;
+ int green = gemColor >> 8 & 0xff;
+ int blue = gemColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE_MINUS_DST_COLOR);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem4.offsetX, this.gem4.offsetY, this.gem4.offsetZ);
+ GL11.glTranslatef(this.gem4.rotationPointX * f5, this.gem4.rotationPointY * f5, this.gem4.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem4.offsetX, -this.gem4.offsetY, -this.gem4.offsetZ);
+ GL11.glTranslatef(-this.gem4.rotationPointX * f5, -this.gem4.rotationPointY * f5, -this.gem4.rotationPointZ * f5);
+ this.gem4.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem3.offsetX, this.gem3.offsetY, this.gem3.offsetZ);
+ GL11.glTranslatef(this.gem3.rotationPointX * f5, this.gem3.rotationPointY * f5, this.gem3.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem3.offsetX, -this.gem3.offsetY, -this.gem3.offsetZ);
+ GL11.glTranslatef(-this.gem3.rotationPointX * f5, -this.gem3.rotationPointY * f5, -this.gem3.rotationPointZ * f5);
+ this.gem3.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem2.offsetX, this.gem2.offsetY, this.gem2.offsetZ);
+ GL11.glTranslatef(this.gem2.rotationPointX * f5, this.gem2.rotationPointY * f5, this.gem2.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem2.offsetX, -this.gem2.offsetY, -this.gem2.offsetZ);
+ GL11.glTranslatef(-this.gem2.rotationPointX * f5, -this.gem2.rotationPointY * f5, -this.gem2.rotationPointZ * f5);
+ this.gem2.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem1.offsetX, this.gem1.offsetY, this.gem1.offsetZ);
+ GL11.glTranslatef(this.gem1.rotationPointX * f5, this.gem1.rotationPointY * f5, this.gem1.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem1.offsetX, -this.gem1.offsetY, -this.gem1.offsetZ);
+ GL11.glTranslatef(-this.gem1.rotationPointX * f5, -this.gem1.rotationPointY * f5, -this.gem1.rotationPointZ * f5);
+ this.gem1.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem6.offsetX, this.gem6.offsetY, this.gem6.offsetZ);
+ GL11.glTranslatef(this.gem6.rotationPointX * f5, this.gem6.rotationPointY * f5, this.gem6.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem6.offsetX, -this.gem6.offsetY, -this.gem6.offsetZ);
+ GL11.glTranslatef(-this.gem6.rotationPointX * f5, -this.gem6.rotationPointY * f5, -this.gem6.rotationPointZ * f5);
+ this.gem6.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem7.offsetX, this.gem7.offsetY, this.gem7.offsetZ);
+ GL11.glTranslatef(this.gem7.rotationPointX * f5, this.gem7.rotationPointY * f5, this.gem7.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem7.offsetX, -this.gem7.offsetY, -this.gem7.offsetZ);
+ GL11.glTranslatef(-this.gem7.rotationPointX * f5, -this.gem7.rotationPointY * f5, -this.gem7.rotationPointZ * f5);
+ this.gem7.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem8.offsetX, this.gem8.offsetY, this.gem8.offsetZ);
+ GL11.glTranslatef(this.gem8.rotationPointX * f5, this.gem8.rotationPointY * f5, this.gem8.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem8.offsetX, -this.gem8.offsetY, -this.gem8.offsetZ);
+ GL11.glTranslatef(-this.gem8.rotationPointX * f5, -this.gem8.rotationPointY * f5, -this.gem8.rotationPointZ * f5);
+ this.gem8.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem5.offsetX, this.gem5.offsetY, this.gem5.offsetZ);
+ GL11.glTranslatef(this.gem5.rotationPointX * f5, this.gem5.rotationPointY * f5, this.gem5.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem5.offsetX, -this.gem5.offsetY, -this.gem5.offsetZ);
+ GL11.glTranslatef(-this.gem5.rotationPointX * f5, -this.gem5.rotationPointY * f5, -this.gem5.rotationPointZ * f5);
+ this.gem5.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem9.offsetX, this.gem9.offsetY, this.gem9.offsetZ);
+ GL11.glTranslatef(this.gem9.rotationPointX * f5, this.gem9.rotationPointY * f5, this.gem9.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem9.offsetX, -this.gem9.offsetY, -this.gem9.offsetZ);
+ GL11.glTranslatef(-this.gem9.rotationPointX * f5, -this.gem9.rotationPointY * f5, -this.gem9.rotationPointZ * f5);
+ this.gem9.render(f5);
+ GL11.glPopMatrix();
+ GL11.glDisable(GL11.GL_BLEND);
+ }
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glTranslatef(0F, 0.5F, 0F);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ if ((int)f3 != -1){
+ int ingotColor = (int)f3;
+ int red = (ingotColor >> 16) & 0xff;
+ int green = (ingotColor >> 8) & 0xff;
+ int blue = ingotColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ this.metal1.render(f5);
+ this.metal2.render(f5);
+ this.metal3.render(f5);
+ this.metal4.render(f5);
+ }
+ if ((int)f4 != -1){
+ int gemColor = (int)f4;
+ int red = gemColor >> 16 & 0xff;
+ int green = gemColor >> 8 & 0xff;
+ int blue = gemColor & 0xff;
+ GL11.glColor3f((float)red / 255, (float)green / 255, (float)blue / 255);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE_MINUS_DST_COLOR);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem4.offsetX, this.gem4.offsetY, this.gem4.offsetZ);
+ GL11.glTranslatef(this.gem4.rotationPointX * f5, this.gem4.rotationPointY * f5, this.gem4.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem4.offsetX, -this.gem4.offsetY, -this.gem4.offsetZ);
+ GL11.glTranslatef(-this.gem4.rotationPointX * f5, -this.gem4.rotationPointY * f5, -this.gem4.rotationPointZ * f5);
+ this.gem4.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem3.offsetX, this.gem3.offsetY, this.gem3.offsetZ);
+ GL11.glTranslatef(this.gem3.rotationPointX * f5, this.gem3.rotationPointY * f5, this.gem3.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem3.offsetX, -this.gem3.offsetY, -this.gem3.offsetZ);
+ GL11.glTranslatef(-this.gem3.rotationPointX * f5, -this.gem3.rotationPointY * f5, -this.gem3.rotationPointZ * f5);
+ this.gem3.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem2.offsetX, this.gem2.offsetY, this.gem2.offsetZ);
+ GL11.glTranslatef(this.gem2.rotationPointX * f5, this.gem2.rotationPointY * f5, this.gem2.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem2.offsetX, -this.gem2.offsetY, -this.gem2.offsetZ);
+ GL11.glTranslatef(-this.gem2.rotationPointX * f5, -this.gem2.rotationPointY * f5, -this.gem2.rotationPointZ * f5);
+ this.gem2.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem1.offsetX, this.gem1.offsetY, this.gem1.offsetZ);
+ GL11.glTranslatef(this.gem1.rotationPointX * f5, this.gem1.rotationPointY * f5, this.gem1.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem1.offsetX, -this.gem1.offsetY, -this.gem1.offsetZ);
+ GL11.glTranslatef(-this.gem1.rotationPointX * f5, -this.gem1.rotationPointY * f5, -this.gem1.rotationPointZ * f5);
+ this.gem1.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem6.offsetX, this.gem6.offsetY, this.gem6.offsetZ);
+ GL11.glTranslatef(this.gem6.rotationPointX * f5, this.gem6.rotationPointY * f5, this.gem6.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem6.offsetX, -this.gem6.offsetY, -this.gem6.offsetZ);
+ GL11.glTranslatef(-this.gem6.rotationPointX * f5, -this.gem6.rotationPointY * f5, -this.gem6.rotationPointZ * f5);
+ this.gem6.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem7.offsetX, this.gem7.offsetY, this.gem7.offsetZ);
+ GL11.glTranslatef(this.gem7.rotationPointX * f5, this.gem7.rotationPointY * f5, this.gem7.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem7.offsetX, -this.gem7.offsetY, -this.gem7.offsetZ);
+ GL11.glTranslatef(-this.gem7.rotationPointX * f5, -this.gem7.rotationPointY * f5, -this.gem7.rotationPointZ * f5);
+ this.gem7.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem8.offsetX, this.gem8.offsetY, this.gem8.offsetZ);
+ GL11.glTranslatef(this.gem8.rotationPointX * f5, this.gem8.rotationPointY * f5, this.gem8.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem8.offsetX, -this.gem8.offsetY, -this.gem8.offsetZ);
+ GL11.glTranslatef(-this.gem8.rotationPointX * f5, -this.gem8.rotationPointY * f5, -this.gem8.rotationPointZ * f5);
+ this.gem8.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem5.offsetX, this.gem5.offsetY, this.gem5.offsetZ);
+ GL11.glTranslatef(this.gem5.rotationPointX * f5, this.gem5.rotationPointY * f5, this.gem5.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem5.offsetX, -this.gem5.offsetY, -this.gem5.offsetZ);
+ GL11.glTranslatef(-this.gem5.rotationPointX * f5, -this.gem5.rotationPointY * f5, -this.gem5.rotationPointZ * f5);
+ this.gem5.render(f5);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.gem9.offsetX, this.gem9.offsetY, this.gem9.offsetZ);
+ GL11.glTranslatef(this.gem9.rotationPointX * f5, this.gem9.rotationPointY * f5, this.gem9.rotationPointZ * f5);
+ GL11.glScaled(0.5D, 0.5D, 0.5D);
+ GL11.glTranslatef(-this.gem9.offsetX, -this.gem9.offsetY, -this.gem9.offsetZ);
+ GL11.glTranslatef(-this.gem9.rotationPointX * f5, -this.gem9.rotationPointY * f5, -this.gem9.rotationPointZ * f5);
+ this.gem9.render(f5);
+ GL11.glPopMatrix();
+ GL11.glDisable(GL11.GL_BLEND);
+ }
+ GL11.glEnable(GL11.GL_LIGHTING);
+ }
+
+ /**
+ * This is a helper function from Tabula to set the rotation of model parts
+ */
+ public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z)
+ {
+ modelRenderer.rotateAngleX = x;
+ modelRenderer.rotateAngleY = y;
+ modelRenderer.rotateAngleZ = z;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8e/3038bcc698ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8e/3038bcc698ea001411cee0f8f86532a4
new file mode 100644
index 0000000..40249b4
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8e/3038bcc698ea001411cee0f8f86532a4
@@ -0,0 +1,140 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+ float rot = 0F;
+
+ @SubscribeEvent
+ public void renderHand(RenderHandEvent event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-15F, -15F, -15F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8f/c0af41a774e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8f/c0af41a774e70014115de2bb951f0adf
deleted file mode 100644
index bf00345..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8f/c0af41a774e70014115de2bb951f0adf
+++ /dev/null
@@ -1,61 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.ItemRenderer;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.client.renderer.texture.TextureManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.World;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.util.Variables;
-
-public class CursePentagram extends Curse
-{
- ResourceLocation curse = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
- public CursePentagram(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- }
-
- public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
- {
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- Tessellator tessellator = Tessellator.instance;
- TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
- texturemanager.bindTexture(curse);
- GL11.glScalef(0.7F, 0.7F, 0.7F);
- float f = 0.00390625F;
- float f1 = 0.00390625F;
- int x = 0;
- int y = 0;
- int u = 0;
- int v = 0;
- int width = 32;
- int height = 32;
- tessellator.startDrawingQuads();
- tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
- tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
- tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
- tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
- tessellator.draw();
- GL11.glPopMatrix();
- }
-
- public String getDescription()
- {
- return "The Dark Lord has misterious ways of showing you his love.";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8f/e0ba42a391e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8f/e0ba42a391e3001417b2e384bf7c3702
deleted file mode 100644
index 76a6c42..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/8f/e0ba42a391e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,25 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(0.8F, 1.0F, 0.0F);
- RenderManager.instance.getEntityRenderObject(midas.target).doRender(midas.target, 0D, 0D, 0D, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/90/402cdd4674e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/90/402cdd4674e70014115de2bb951f0adf
deleted file mode 100644
index 090ac7a..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/90/402cdd4674e70014115de2bb951f0adf
+++ /dev/null
@@ -1,62 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.ItemRenderer;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.client.renderer.texture.TextureManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.World;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.util.Variables;
-
-public class CursePentagram extends Curse
-{
- ResourceLocation curse = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
- public CursePentagram(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- }
-
- public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
- {
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- Tessellator tessellator = Tessellator.instance;
- ItemStack itemStack = new ItemStack(Items.apple);
- TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
-// texturemanager.bindTexture(texturemanager.getResourceLocation(itemStack.getItemSpriteNumber()));
- texturemanager.bindTexture(curse);
- float f = 0.00390625F;
- float f1 = 0.00390625F;
- int x = 0;
- int y = 0;
- int u = 0;
- int v = 0;
- int width = 32;
- int height = 32;
- tessellator.startDrawingQuads();
- tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
- tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
- tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
- tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
- tessellator.draw();
- GL11.glPopMatrix();
- }
-
- public String getDescription()
- {
- return "The Dark Lord has misterious ways of showing you his love.";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/90/e0c2b692fce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/90/e0c2b692fce40014174fe663e69b8422
deleted file mode 100644
index 0e3b4b8..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/90/e0c2b692fce40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static Item goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldifiedObject().setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft).setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/91/90b5ab67fee40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/91/90b5ab67fee40014174fe663e69b8422
deleted file mode 100644
index 8db0b73..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/91/90b5ab67fee40014174fe663e69b8422
+++ /dev/null
@@ -1,759 +0,0 @@
-package darkknight.jewelrycraft.util;
-
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-
-public class JewelryNBT
-{
- // TODO NBT Tag Adding
- public static void addItem(ItemStack item, ItemStack target)
- {
- if (target != null){
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound targetNBT = new NBTTagCompound();
- target.writeToNBT(targetNBT);
- itemStackData.setTag("target", targetNBT);
- }
- }
-
- /**
- * @param item The item you want to add the NBT data on
- * @param metal The metal you want to add on the item
- */
- public static void addMetal(ItemStack item, ItemStack metal)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound ingotNBT = new NBTTagCompound();
- metal.writeToNBT(ingotNBT);
- itemStackData.setTag("ingot", ingotNBT);
- }
-
- /**
- * @param item The item you want to add the NBT data on
- * @param gem The gem you want to add on the item
- */
- public static void addGem(ItemStack item, ItemStack gem)
- {
- if (gem != null){
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound gemNBT = new NBTTagCompound();
- gem.writeToNBT(gemNBT);
- itemStackData.setTag("gem", gemNBT);
- }
- }
-
- /**
- * @param item The item you want to add the NBT data on
- * @param modifier The modifier you want to add on the item
- */
- public static void addModifiers(ItemStack item, ArrayList<ItemStack> modifier)
- {
- if (modifier != null){
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- for(int i = 0; i < modifier.size(); i++){
- NBTTagCompound modifierNBT = new NBTTagCompound();
- modifier.get(i).writeToNBT(modifierNBT);
- itemStackData.setTag("modifier" + i, modifierNBT);
- }
- itemStackData.setInteger("modifierSize", modifier.size());
- }
- }
-
- /**
- * @param item The item you want to add the NBT data on
- * @param entity The entity to add on the item
- */
- public static void addEntity(ItemStack item, EntityLivingBase entity)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound entityNBT = new NBTTagCompound();
- entity.writeToNBT(entityNBT);
- itemStackData.setTag("entity", entityNBT);
- }
-
- /**
- * @param item
- * @param entity
- */
- public static void addEntityID(ItemStack item, EntityLivingBase entity)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound entityNBT = new NBTTagCompound();
- int id = EntityList.getEntityID(entity);
- entityNBT.setInteger("entityID", id);
- itemStackData.setTag("entityID", entityNBT);
- }
-
- /**
- * @param item
- * @param x
- * @param y
- * @param z
- */
- public static void addCoordonates(ItemStack item, double x, double y, double z)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound coords = new NBTTagCompound();
- coords.setDouble("x", x);
- coords.setDouble("y", y);
- coords.setDouble("z", z);
- itemStackData.setTag("x", coords);
- itemStackData.setTag("y", coords);
- itemStackData.setTag("z", coords);
- }
-
- /**
- * @param item
- * @param world
- * @param x
- * @param y
- * @param z
- */
- public static void addTileEntityBlock(ItemStack item, World world, int x, int y, int z)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound tileNBT = new NBTTagCompound();
- NBTTagCompound block = new NBTTagCompound();
- world.getTileEntity(x, y, z).writeToNBT(tileNBT);
- itemStackData.setTag("tile", tileNBT);
- block.setInteger("blockID", Block.getIdFromBlock(world.getBlock(x, y, z)));
- block.setInteger("metadata", world.getBlockMetadata(x, y, z));
- block.setInteger("blockX", x);
- block.setInteger("blockY", y);
- block.setInteger("blockZ", z);
- itemStackData.setTag("metadata", block);
- itemStackData.setTag("blockID", block);
- itemStackData.setTag("blockX", block);
- itemStackData.setTag("blockY", block);
- itemStackData.setTag("blockZ", block);
- }
-
- /**
- * @param item
- * @param block
- * @param metadata
- */
- public static void addBlock(ItemStack item, int block, int metadata)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound blockNBT = new NBTTagCompound();
- blockNBT.setInteger("blockID", block);
- itemStackData.setTag("blockID", blockNBT);
- blockNBT.setInteger("metadata", metadata);
- itemStackData.setTag("metadata", blockNBT);
- }
-
- /**
- * @param item
- * @param x
- * @param y
- * @param z
- */
- public static void addBlockCoordonates(ItemStack item, int x, int y, int z)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound coords = new NBTTagCompound();
- coords.setInteger("blockX", x);
- coords.setInteger("blockY", y);
- coords.setInteger("blockZ", z);
- itemStackData.setTag("blockX", coords);
- itemStackData.setTag("blockY", coords);
- itemStackData.setTag("blockZ", coords);
- }
-
- /**
- * @param item
- * @param x
- * @param y
- * @param z
- * @param dim
- * @param name
- */
- public static void addCoordonatesAndDimension(ItemStack item, double x, double y, double z, int dim, String name)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound coords = new NBTTagCompound();
- coords.setDouble("x", x);
- coords.setDouble("y", y);
- coords.setDouble("z", z);
- coords.setInteger("dimension", dim);
- coords.setString("dimName", name);
- itemStackData.setTag("x", coords);
- itemStackData.setTag("y", coords);
- itemStackData.setTag("z", coords);
- itemStackData.setTag("dimension", coords);
- itemStackData.setTag("dimName", coords);
- }
-
- /**
- * @param item
- */
- public static void addFakeEnchantment(ItemStack item)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- itemStackData.setTag("ench", new NBTTagList());
- }
-
- /**
- * @param item
- * @param color
- */
- public static void addIngotColor(ItemStack item, int color)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound colors = new NBTTagCompound();
- colors.setInteger("ingotColor", color);
- itemStackData.setTag("ingotColor", colors);
- }
-
- // TODO
- /**
- * @param item
- * @param color
- */
- public static void addGemColor(ItemStack item, int color)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound colors = new NBTTagCompound();
- colors.setInteger("gemColor", color);
- itemStackData.setTag("gemColor", colors);
- }
-
- /**
- * @param item
- * @param list
- */
- @SuppressWarnings ("rawtypes")
- public static void addEntities(ItemStack item, List list)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound entityNBT = new NBTTagCompound();
- for(int i = 0; i < list.size(); i++)
- ((EntityLivingBase)list.get(i)).writeToNBT(entityNBT);
- itemStackData.setTag("entities", entityNBT);
- }
-
- // TODO NBT Tag Removing
- /**
- * @param item
- * @param tag
- */
- public static void removeNBT(ItemStack item, String tag)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- itemStackData.removeTag(tag);
- }
-
- /**
- * @param item
- */
- public static void removeEntity(ItemStack item)
- {
- JewelryNBT.removeNBT(item, "entityID");
- JewelryNBT.removeNBT(item, "entity");
- JewelryNBT.removeNBT(item, "ench");
- }
-
- /**
- * @param item
- */
- public static void removeBlock(ItemStack item)
- {
- JewelryNBT.removeNBT(item, "blockID");
- JewelryNBT.removeNBT(item, "metadata");
- JewelryNBT.removeNBT(item, "tile");
- JewelryNBT.removeNBT(item, "blockX");
- JewelryNBT.removeNBT(item, "blockY");
- JewelryNBT.removeNBT(item, "blockZ");
- }
-
- // TODO NTB Tag Checking
- /**
- * @param item
- * @param tag
- * @return
- */
- public static boolean hasTag(ItemStack item, String tag)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- if (itemStackData.hasKey(tag)) return true;
- return false;
- }
-
- /**
- * @param stack
- * @param gem
- * @return
- */
- public static boolean isGemX(ItemStack stack, ItemStack gem)
- {
- if (gem(stack) != null && gem(stack).getItem() == gem.getItem() && gem(stack).getItemDamage() == gem.getItemDamage()) return true;
- return false;
- }
-
- /**
- * @param stack
- * @param modifier
- * @return
- */
- public static boolean doesModifierExist(ItemStack stack, ItemStack modifier)
- {
- if (modifier(stack) != null){
- ArrayList<ItemStack> list = modifier(stack);
- for(int i = 0; i < list.size(); i++)
- if (list.get(i).getItem() == modifier.getItem() && list.get(i).getItemDamage() == modifier.getItemDamage()) return true;
- }
- return false;
- }
-
- public static int modifierSize(ItemStack stack, ItemStack modifier)
- {
- if (modifier(stack) != null){
- ArrayList<ItemStack> list = modifier(stack);
- for(int i = 0; i < list.size(); i++)
- if (list.get(i).getItem() == modifier.getItem() && list.get(i).getItemDamage() == modifier.getItemDamage()) return list.get(i).stackSize;
- }
- return -1;
- }
-
- public static int numberOfModifiers(ItemStack stack)
- {
- if (modifier(stack) != null) return modifier(stack).size();
- return -1;
- }
-
- /**
- * @param stack
- * @param ingot
- * @return
- */
- public static boolean isIngotX(ItemStack stack, ItemStack ingot)
- {
- if (ingot(stack) != null && ingot(stack).getItem() == ingot.getItem() && ingot(stack).getItemDamage() == ingot.getItemDamage()) return true;
- return false;
- }
-
- /**
- * @param stack
- * @param player
- * @param entity
- * @return
- */
- public static boolean isEntityX(ItemStack stack, EntityPlayer player, EntityLivingBase entity)
- {
- if (entity != null && entity instanceof EntityLivingBase && entity(stack, player) != null && entity(stack, player).equals(entity)) return true;
- return false;
- }
-
- /**
- * @param stack
- * @param dimName
- * @return
- */
- public static boolean isDimNameX(ItemStack stack, String dimName)
- {
- if (ingot(stack) != null && dimName(stack).equals(dimName)) return true;
- return false;
- }
-
- /**
- * @param stack
- * @param dimension
- * @return
- */
- public static boolean isDimensionX(ItemStack stack, int dimension)
- {
- if (dimension(stack) != -2 && dimension(stack) == dimension) return true;
- return false;
- }
-
- // TODO Return components based on NBT
- /**
- * @param stack
- * @return
- */
- public static ItemStack gem(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() && stack.getTagCompound().hasKey("gem")){
- NBTTagCompound jewelNBT = (NBTTagCompound)stack.getTagCompound().getTag("gem");
- ItemStack gem = new ItemStack(Item.getItemById(0), 0, 0);
- gem.readFromNBT(jewelNBT);
- return gem;
- }
- return null;
- }
-
- /**
- * @param stack
- * @return
- */
- public static ArrayList<ItemStack> modifier(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound()){
- int size = stack.getTagCompound().getInteger("modifierSize");
- ArrayList<ItemStack> list = new ArrayList<ItemStack>();
- for(int i = 0; i < size; i++){
- ItemStack modifier = new ItemStack(Item.getItemById(0), 0, 0);
- NBTTagCompound modifierNBT = (NBTTagCompound)stack.getTagCompound().getTag("modifier" + i);
- modifier.readFromNBT(modifierNBT);
- list.add(modifier);
- }
- return list;
- }
- return null;
- }
-
- /**
- * @param stack
- * @return
- */
- public static ItemStack ingot(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() && stack.getTagCompound().hasKey("ingot")){
- NBTTagCompound ingotNBT = (NBTTagCompound)stack.getTagCompound().getTag("ingot");
- ItemStack ingot = new ItemStack(Item.getItemById(0), 0, 0);
- ingot.readFromNBT(ingotNBT);
- return ingot;
- }
- return null;
- }
-
- /**
- * @param stack
- * @param player
- * @return
- */
- public static EntityLivingBase entity(ItemStack stack, EntityPlayer player)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("entityID") && stack.getTagCompound().hasKey("entity")){
- NBTTagCompound enID = (NBTTagCompound)stack.getTagCompound().getTag("entityID");
- NBTTagCompound en = (NBTTagCompound)stack.getTagCompound().getTag("entity");
- int entityID = 0;
- entityID = enID.getInteger("entityID");
- EntityLivingBase entity = (EntityLivingBase)EntityList.createEntityByID(entityID, player.worldObj);
- if (entity != null && entity instanceof EntityLivingBase){
- entity.readFromNBT(en);
- return entity;
- }else return null;
- }
- return null;
- }
-
- /**
- * @param stack
- * @return
- */
- public static TileEntity tileEntity(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("tile")){
- NBTTagCompound tileNBT = (NBTTagCompound)stack.getTagCompound().getTag("tile");
- TileEntity tile = TileEntity.createAndLoadEntity(tileNBT);
- if (tile != null && tile instanceof TileEntity){
- tile.readFromNBT(tileNBT);
- return tile;
- }else return null;
- }
- return null;
- }
-
- /**
- * @param stack
- * @return
- */
- public static String dimName(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() && stack.getTagCompound().hasKey("dimName")){
- NBTTagCompound dim = (NBTTagCompound)stack.getTagCompound().getTag("dimName");
- String name = dim.getString("dimName");
- return name;
- }
- return null;
- }
-
- /**
- * @param stack
- * @return
- */
- public static String modeName(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() && stack.getTagCompound().hasKey("mode")){
- NBTTagCompound dim = (NBTTagCompound)stack.getTagCompound().getTag("mode");
- String name = dim.getString("mode");
- return name;
- }
- return null;
- }
-
- /**
- * @param stack
- * @return
- */
- public static int dimension(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() && stack.getTagCompound().hasKey("dimension")){
- NBTTagCompound dim = (NBTTagCompound)stack.getTagCompound().getTag("dimension");
- int dimension = dim.getInteger("dimension");
- return dimension;
- }
- return -2;
- }
-
- /**
- * @param stack
- * @return
- */
- public static int blockCoordX(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("blockX")){
- NBTTagCompound x = (NBTTagCompound)stack.getTagCompound().getTag("blockX");
- int posX = x.getInteger("blockX");
- return posX;
- }
- return -1;
- }
-
- /**
- * @param stack
- * @return
- */
- public static int blockCoordY(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("blockY")){
- NBTTagCompound y = (NBTTagCompound)stack.getTagCompound().getTag("blockY");
- int posY = y.getInteger("blockY");
- return posY;
- }
- return -1;
- }
-
- /**
- * @param stack
- * @return
- */
- public static int blockCoordZ(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("blockZ")){
- NBTTagCompound z = (NBTTagCompound)stack.getTagCompound().getTag("blockZ");
- int posZ = z.getInteger("blockZ");
- return posZ;
- }
- return -1;
- }
-
- /**
- * @param stack
- * @return
- */
- public static int blockID(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("blockID")){
- NBTTagCompound blockID = (NBTTagCompound)stack.getTagCompound().getTag("blockID");
- int blockId = blockID.getInteger("blockID");
- return blockId;
- }
- return -1;
- }
-
- /**
- * @param stack
- * @return
- */
- public static int blockMetadata(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("metadata")){
- NBTTagCompound metadataNBT = (NBTTagCompound)stack.getTagCompound().getTag("metadata");
- int metadata = metadataNBT.getInteger("metadata");
- return metadata;
- }
- return -1;
- }
-
- /**
- * @param stack
- * @return
- */
- public static double playerPosX(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("x")){
- NBTTagCompound x = (NBTTagCompound)stack.getTagCompound().getTag("x");
- double posX = x.getDouble("x");
- return posX;
- }
- return -1;
- }
-
- /**
- * @param stack
- * @return
- */
- public static double playerPosY(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("y")){
- NBTTagCompound y = (NBTTagCompound)stack.getTagCompound().getTag("y");
- double posY = y.getDouble("y");
- return posY;
- }
- return -1;
- }
-
- /**
- * @param stack
- * @return
- */
- public static double playerPosZ(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("z")){
- NBTTagCompound z = (NBTTagCompound)stack.getTagCompound().getTag("z");
- double posZ = z.getDouble("z");
- return posZ;
- }
- return -1;
- }
-
- /**
- * @param stack
- * @return
- */
- public static int ingotColor(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() && stack.getTagCompound().hasKey("ingotColor")){
- NBTTagCompound colors = (NBTTagCompound)stack.getTagCompound().getTag("ingotColor");
- int color = colors.getInteger("ingotColor");
- return color;
- }
- return 16777215;
- }
-
- // TODO
- /**
- * @param stack
- * @return
- */
- public static int gemColor(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() && stack.getTagCompound().hasKey("gemColor")){
- NBTTagCompound colors = (NBTTagCompound)stack.getTagCompound().getTag("gemColor");
- int color = colors.getInteger("gemColor");
- return color;
- }
- return 16777215;
- }
-
- /**
- * @param stack
- * @param player
- * @return
- */
- @SuppressWarnings ({"rawtypes", "unchecked", "null"})
- public static List entities(ItemStack stack, EntityPlayer player)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("entities")){
- NBTTagCompound enID = (NBTTagCompound)stack.getTagCompound().getTag("entitiesID");
- List list = null;
- int[] entityID;
- EntityLivingBase entity;
- entityID = enID.getIntArray("entitiesID");
- for(int element: entityID){
- entity = (EntityLivingBase)EntityList.createEntityByID(element, player.worldObj);
- list.add(entity);
- }
- return list;
- }
- return null;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/91/c02252cb92ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/91/c02252cb92ea001411cee0f8f86532a4
new file mode 100644
index 0000000..e412b64
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/91/c02252cb92ea001411cee0f8f86532a4
@@ -0,0 +1,30 @@
+package darkknight.jewelrycraft.item.render;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BraceletRender extends TileEntitySpecialRenderer
+{
+ public ModelBracelet bracelet = new ModelBracelet();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Bracelet.png");
+
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ }
+
+ public void doRender(Entity entity, double x, double y, double z, float f, float g)
+ {
+ GL11.glPushMatrix();
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+ bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ bracelet.render(entity, 0F, 4F, 0F, (float)z, f, 1.0F);
+ GL11.glPopMatrix();
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/93/1066a4a395e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/93/1066a4a395e3001412c4c4819c88e86b
deleted file mode 100644
index 9246875..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/93/1066a4a395e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,74 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
- TileEntity tile = world.getTileEntity(x, y, z);
- if(((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target.height);
- this.setBlockBounds(0F, 0F, 0F, 1F, ((TileEntityMidasTouch)tile).target.height, 1F);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/94/00e861e202e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/94/00e861e202e50014174fe663e69b8422
deleted file mode 100644
index 0ec3a93..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/94/00e861e202e50014174fe663e69b8422
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else return Block.getBlockFromItem(item.getItem()).getIcon(6, 6);
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/94/9018c447fde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/94/9018c447fde40014174fe663e69b8422
deleted file mode 100644
index 3f459b0..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/94/9018c447fde40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- public static Item goldifiedObject;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/95/1062bc07fee40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/95/1062bc07fee40014174fe663e69b8422
deleted file mode 100644
index 686d7ce..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/95/1062bc07fee40014174fe663e69b8422
+++ /dev/null
@@ -1,48 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.item.ItemList;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && player.inventory.getCurrentItem() == null){
- world.setBlock(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), BlockList.midasTouchBlock, 0, 2);
- TileEntityMidasTouch midasTouchVictim = new TileEntityMidasTouch();
- midasTouchVictim.setEntity(target);
- world.setTileEntity(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), midasTouchVictim);
- target.setDead();
- }
- }
-
- @Override
- public void action(World world, EntityPlayer player)
- {
- if(player.inventory.getCurrentItem() != null){
- int index = player.inventory.currentItem;
- ItemStack item = player.inventory.getCurrentItem();
- player.inventory.setInventorySlotContents(index, new ItemStack(ItemList.goldifiedObject, item.stackSize, item.getItemDamage()));
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/95/108f49d2afea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/95/108f49d2afea001411cee0f8f86532a4
new file mode 100644
index 0000000..dedc485
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/95/108f49d2afea001411cee0f8f86532a4
@@ -0,0 +1,179 @@
+/*
+ * Mod made by DarkKnight during the Modjam 3
+ * It's an awesome mod
+ * I love me! :D
+ */
+package darkknight.jewelrycraft;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.gen.structure.MapGenStructureIO;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.oredict.OreDictionary;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.Mod.EventHandler;
+import cpw.mods.fml.common.Mod.Instance;
+import cpw.mods.fml.common.ModMetadata;
+import cpw.mods.fml.common.SidedProxy;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
+import cpw.mods.fml.common.registry.EntityRegistry;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.client.gui.GuiHandler;
+import darkknight.jewelrycraft.commands.JewelrycraftCommands;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.damage.DamageSourceList;
+import darkknight.jewelrycraft.effects.EffectsList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.entities.EntityList;
+import darkknight.jewelrycraft.events.BlockEventHandler;
+import darkknight.jewelrycraft.events.BucketHandler;
+import darkknight.jewelrycraft.events.EntityEventHandler;
+import darkknight.jewelrycraft.events.EventCommonHandler;
+import darkknight.jewelrycraft.events.KeyBindings;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.network.PacketClearColorCache;
+import darkknight.jewelrycraft.network.PacketHandler;
+import darkknight.jewelrycraft.network.PacketKeyPressEvent;
+import darkknight.jewelrycraft.network.PacketRequestLiquidData;
+import darkknight.jewelrycraft.network.PacketRequestPlayerInfo;
+import darkknight.jewelrycraft.network.PacketRequestSetSlot;
+import darkknight.jewelrycraft.network.PacketSendServerPlayersInfo;
+import darkknight.jewelrycraft.network.PacketSendLiquidData;
+import darkknight.jewelrycraft.network.PacketSendClientPlayerInfo;
+import darkknight.jewelrycraft.proxy.CommonProxy;
+import darkknight.jewelrycraft.recipes.CraftingRecipes;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.Variables;
+import darkknight.jewelrycraft.worldGen.Generation;
+import darkknight.jewelrycraft.worldGen.village.ComponentJewelry;
+import darkknight.jewelrycraft.worldGen.village.JCTrades;
+import darkknight.jewelrycraft.worldGen.village.VillageJewelryHandler;
+
+@Mod (modid = Variables.MODID, name = Variables.MODNAME, version = Variables.VERSION, guiFactory = Variables.CONFIG_GUI, acceptedMinecraftVersions = "[1.7.10,1.8)", canBeDeactivated = true)
+public class JewelrycraftMod
+{
+ @Instance (Variables.MODID)
+ public static JewelrycraftMod instance;
+
+ @SidedProxy (clientSide = Variables.CLIENT_PROXY, serverSide = Variables.SERVER_PROXY)
+ public static CommonProxy proxy;
+ public static final Logger logger = Logger.getLogger("Jewelrycraft");
+ public static File dir;
+
+ public static CreativeTabs jewelrycraft = new CreativeTabs(Variables.MODID){
+ @Override
+ public Item getTabIconItem()
+ {
+ return Item.getItemFromBlock(BlockList.jewelCraftingTable);
+ }
+ };
+
+ public static CreativeTabs liquids = new CreativeTabLiquids("Liquids");
+ public static NBTTagCompound saveData = new NBTTagCompound();
+ public static NBTTagCompound clientData = new NBTTagCompound();
+ public static File liquidsConf;
+ public static SimpleNetworkWrapper netWrapper;
+ public static boolean fancyRender;
+ List<String> authorList = new ArrayList<String>();
+
+ /**
+ * Pre initialization of mod stuff.
+ *
+ * @param e FMLPreInitializationEvent
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ @EventHandler
+ public void preInit(FMLPreInitializationEvent e) throws IOException
+ {
+ ModMetadata metadata = e.getModMetadata();
+ dir = e.getModConfigurationDirectory();
+
+ ConfigHandler.INSTANCE.loadConfig(e);
+ BlockList.preInit(e);
+ ItemList.preInit(e);
+ CraftingRecipes.preInit(e);
+ CurseList.preInit(e);
+ PacketHandler.preInit(e);
+ EntityList.preInit(e);
+
+ proxy.preInit();
+
+ VillagerRegistry.instance().registerVillagerId(3000);
+ VillagerRegistry.instance().registerVillageTradeHandler(3000, new JCTrades());
+ VillagerRegistry.instance().registerVillageCreationHandler(new VillageJewelryHandler());
+ try{
+ MapGenStructureIO.func_143031_a(ComponentJewelry.class, Variables.MODID + ":Jewelry");
+ }
+ catch(Throwable e2){
+ logger.severe("Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.7.10");
+ }
+
+ MinecraftForge.EVENT_BUS.register(new EntityEventHandler());
+ MinecraftForge.EVENT_BUS.register(new BlockEventHandler());
+ MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
+ FMLCommonHandler.instance().bus().register(new EventCommonHandler());
+ BucketHandler.INSTANCE.buckets.put(BlockList.moltenMetal, ItemList.bucket);
+
+ authorList.add("OnyxDarkKnight");
+ authorList.add("bspkrs");
+ authorList.add("domi1819");
+ metadata.autogenerated = false;
+ metadata.authorList = authorList;
+ metadata.url = "https://github.com/sor1n/Jewelrycraft";
+ }
+
+ /**
+ * Initializes the world generation and key bindings.
+ *
+ * @param e FMLInitializationEvent
+ */
+ @EventHandler
+ public void init(FMLInitializationEvent e)
+ {
+ GameRegistry.registerWorldGenerator(new Generation(), 0);
+ if (FMLCommonHandler.instance().getSide() == Side.CLIENT) FMLCommonHandler.instance().bus().register(new KeyBindings());
+ new GuiHandler();
+ FMLCommonHandler.instance().bus().register(ConfigHandler.INSTANCE);
+ }
+
+ /**
+ * Post initialization of metals, modifiers and others.
+ *
+ * @param e FMLPostInitializationEvent
+ */
+ @EventHandler
+ public void postInit(FMLPostInitializationEvent e)
+ {
+ JewelrycraftUtil.addMetals();
+ JewelrycraftUtil.jamcrafters();
+ EffectsList.postInit(e);
+ DamageSourceList.postInit(e);
+ proxy.postInit();
+ }
+
+ @Mod.EventHandler
+ public void serverLoad(FMLServerStartingEvent event)
+ {
+ event.registerServerCommand(new JewelrycraftCommands());
+ }
+
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/96/009ea381fde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/96/009ea381fde40014174fe663e69b8422
deleted file mode 100644
index 6d209fe..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/96/009ea381fde40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- public static Item goldifiedObject;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
-// thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
-// shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
-// molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
-// clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
-// ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
-// necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
-// bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
-// earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
-// crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
-// guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
-// bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
-// metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
-// jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldObject().setUnlocalizedName(Variables.MODID + ".goldObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/97/20872ad186ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/97/20872ad186ea001411cee0f8f86532a4
new file mode 100644
index 0000000..72c06c7
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/97/20872ad186ea001411cee0f8f86532a4
@@ -0,0 +1,62 @@
+/**
+ *
+ */
+package darkknight.jewelrycraft.curses;
+
+import java.util.ArrayList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.item.EntityXPOrb;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class CurseRabbitsPaw extends Curse
+{
+ public CurseRabbitsPaw(int id, String name, int txtID, int packID)
+ {
+ super(id, name, txtID, packID);
+ }
+
+ @Override
+ public void entityDropItems(EntityPlayer player, Entity target, ArrayList<EntityItem> drops)
+ {
+ for(EntityItem item: drops){
+ ItemStack drop = item.getEntityItem().copy();
+ drop.stackSize = this.rand.nextInt(4);
+ if (drop.stackSize > 0) target.entityDropItem(drop, 0.5F);
+ }
+ }
+
+ public void entityDeathAction(World world, EntityLivingBase target, EntityPlayer player)
+ {
+ String[] types = {"Red", "Blue", "White", "Black"};
+ String type = types[rand.nextInt(4)];
+ if (rand.nextInt(3) == 0){
+ if (type == "White"){
+ EntityHeart h = new EntityHalfHeart(world);
+ h.setType(type);
+ h.setLocationAndAngles(target.posX, target.posY, target.posZ, MathHelper.wrapAngleTo180_float(rand.nextFloat() * 360.0F), 0.0F);
+ world.spawnEntityInWorld(h);
+ }else{
+ for(int i = 1; i <= 1 + rand.nextInt(1 + (int)(target.getMaxHealth() / 20)); i++){
+ EntityHeart[] hearts = {new EntityHeart(world), new EntityHalfHeart(world)};
+ EntityHeart h = hearts[rand.nextInt(2)];
+ h.setType(type);
+ h.setLocationAndAngles(target.posX, target.posY, target.posZ, MathHelper.wrapAngleTo180_float(rand.nextFloat() * 360.0F), 0.0F);
+ world.spawnEntityInWorld(h);
+ }
+ }
+ }
+ if (rand.nextInt(3) == 0) world.spawnEntityInWorld(new EntityXPOrb(world, target.posX, target.posY, target.posZ, 1 + rand.nextInt(40)));
+ }
+
+ public String getDescription()
+ {
+ return "The Dark One is giving you a gift. Don't lose it.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/97/20ee800597e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/97/20ee800597e3001412c4c4819c88e86b
deleted file mode 100644
index 0a30812..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/97/20ee800597e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,75 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target.getCollisionBorderSize());
- this.setBlockBounds(0F, 0F, 0F, 1F, ((TileEntityMidasTouch)tile).target.height, 1F);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/97/a0b6bcf374e300141084bb8bfb075c08 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/97/a0b6bcf374e300141084bb8bfb075c08
deleted file mode 100644
index 9687636..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/97/a0b6bcf374e300141084bb8bfb075c08
+++ /dev/null
@@ -1,37 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.monster.EntityMob;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart)){
- world.setBlock((int)target.posX, (int)target.posY, (int)target.posZ, BlockList.midasTouchBlock, 0, 2);
- TileEntity midasTouchVictim = new TileEntityMidasTouch(target);
- world.setTileEntity((int)target.posX, (int)target.posY, (int)target.posZ, midasTouchVictim);
- target.setDead();
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/98/403c0a6287ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/98/403c0a6287ea001411cee0f8f86532a4
new file mode 100644
index 0000000..979d986
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/98/403c0a6287ea001411cee0f8f86532a4
@@ -0,0 +1,97 @@
+package darkknight.jewelrycraft.events;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.gui.GuiChat;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderGameOverlayEvent;
+import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.util.Variables;
+
+public class ScreenHandler extends Gui
+{
+ private Minecraft mc;
+ public static NBTTagCompound tagCache = null;
+ public static int cooldown;
+
+ public ScreenHandler(Minecraft mc)
+ {
+ super();
+ this.mc = mc;
+ }
+
+ @SubscribeEvent
+ public void renderScreen(RenderGameOverlayEvent event)
+ {
+ if (event.isCancelable() || event.type != ElementType.ALL || tagCache == null) return;
+ if (!mc.gameSettings.showDebugInfo && !(mc.currentScreen instanceof GuiChat)){
+ int count = 0;
+ int size = 32;
+ ScaledResolution resolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
+ if (tagCache.hasKey("cursePoints") && tagCache.getInteger("cursePoints") > 0){
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ for(Curse curse: Curse.getCurseList()){
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ drawTexturedModalRect(-16, -16 + (size - 6) * count, 0, 32, 144, 60);
+ count++;
+ }
+ }
+ count = 0;
+ for(Curse curse: Curse.getCurseList())
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ mc.renderEngine.bindTexture(new ResourceLocation(Variables.MODID, "textures/gui/curses" + curse.getTexturePack() + ".png"));
+ int tag = curse.getTextureID();
+ GL11.glPushMatrix();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glScalef(0.45f, 0.45f, 0.0f);
+ drawTexturedModalRect(28, 18 + (size + 26) * count, tag % size * size, tag / size * size, size, size);
+ GL11.glPopMatrix();
+ count++;
+ }
+ count = 0;
+ size = 16;
+ for(Curse curse: Curse.getCurseList())
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ mc.fontRenderer.drawStringWithShadow(curse.getName().split(":")[1], 30, 11 + (size + 10) * count, 16777215);
+ if (tagCache.getInteger(curse.getName()) == 2){
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GL11.glColor4f(1f, 1f, 1f, 0.5f);
+ drawTexturedModalRect(95, 7 + (size + 10) * count, 3 * size, 0, size, size);
+ GL11.glPopMatrix();
+ }
+ count++;
+ }
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1f, 1f, 1f, 1.0f);
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ count = 0;
+ size = 16;
+ if (tagCache.getFloat("BlueHeart") > 0){
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 0 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlueHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
+ }
+ count++;
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ if (tagCache.getFloat("BlackHeart") > 0){
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 1 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlackHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
+ }
+ count++;
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ if (tagCache.getFloat("WhiteHeart") > 0)
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 2 * size, 1 * size, size, size);
+ GL11.glPopMatrix();
+ }
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9a/50f79109fce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9a/50f79109fce40014174fe663e69b8422
deleted file mode 100644
index bcf52b4..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9a/50f79109fce40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.*;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static Item goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9b/b01a029f86ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9b/b01a029f86ea001411cee0f8f86532a4
new file mode 100644
index 0000000..c081504
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9b/b01a029f86ea001411cee0f8f86532a4
@@ -0,0 +1,137 @@
+package darkknight.jewelrycraft.curses;
+
+import java.util.ArrayList;
+import java.util.Random;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+
+public class Curse
+{
+ protected int id, texturepack, textureID;
+ protected String name, description;
+ protected Random rand = new Random();
+ private static ArrayList<Curse> curses = new ArrayList<Curse>();
+ public static ArrayList<Curse> availableCurses = new ArrayList<Curse>();
+
+ /**
+ * @param id the ID of the curse
+ * @param name the name of the curse
+ * @param texturepack the ID of the pack the texture is located in
+ */
+ protected Curse(int id, String name, int txtID, int texturepack)
+ {
+ this.id = id;
+ this.name = name;
+ this.texturepack = texturepack;
+ this.textureID = txtID;
+ curses.add(this);
+ availableCurses.add(this);
+ }
+
+ /**
+ * @return the name of the curse
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * @return the description of the curse
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public Curse setDescription(String desc)
+ {
+ description = desc;
+ return this;
+ }
+
+ /**
+ * @return the curse ID
+ */
+ public int getID()
+ {
+ return id;
+ }
+
+ /**
+ * @return the texture pack ID
+ */
+ public int getTexturePack()
+ {
+ return texturepack;
+ }
+
+ /**
+ * @return the texture ID
+ */
+ public int getTextureID()
+ {
+ return textureID;
+ }
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void action(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void playerDeathAction(World world, EntityPlayer player)
+ {}
+
+ public void entityDeathAction(World world, EntityLivingBase target, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void respawnAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ public void entityDropItems(EntityPlayer player, Entity target, ArrayList<EntityItem> drops)
+ {}
+
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {}
+
+ public boolean itemToss()
+ {
+ return false;
+ }
+
+ /**
+ * @return
+ */
+ public static ArrayList<Curse> getCurseList()
+ {
+ return curses;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9c/009ded5190e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9c/009ded5190e3001417b2e384bf7c3702
deleted file mode 100644
index 7f38eec..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9c/009ded5190e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,82 +0,0 @@
-package darkknight.jewelrycraft.tileentity;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.NetworkManager;
-import net.minecraft.network.Packet;
-import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
-import net.minecraft.tileentity.TileEntity;
-
-public class TileEntityMidasTouch extends TileEntity
-{
- public Entity target;
-
- public TileEntityMidasTouch(Entity target)
- {
- this.target = target;
- }
-
- /**
- * @param nbt
- */
- @Override
- public void writeToNBT(NBTTagCompound nbt)
- {
- super.writeToNBT(nbt);
- NBTTagCompound tag = new NBTTagCompound();
- target.writeToNBT(tag);
- int id = EntityList.getEntityID(target);
- nbt.setInteger("entityID", id);
- nbt.setTag("entity", tag);
- }
-
- /**
- * @param nbt
- */
- @Override
- public void readFromNBT(NBTTagCompound nbt)
- {
- super.readFromNBT(nbt);
- if (nbt.hasKey("entityID") && nbt.hasKey("entity")){
- NBTTagCompound en = (NBTTagCompound)nbt.getTag("entity");
- int entityID = nbt.getInteger("entityID");
- EntityLivingBase entity = (EntityLivingBase)EntityList.createEntityByID(entityID, worldObj);
- entity.readFromNBT(en);
- target = entity;
- }
- }
-
- /**
- *
- */
- @Override
- public void updateEntity()
- {
- super.updateEntity();
-// System.out.println(target);
- }
-
- /**
- * @return
- */
- @Override
- public Packet getDescriptionPacket()
- {
- NBTTagCompound nbttagcompound = new NBTTagCompound();
- writeToNBT(nbttagcompound);
- return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbttagcompound);
- }
-
- /**
- * @param net
- * @param packet
- */
- @Override
- public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet)
- {
- readFromNBT(packet.func_148857_g());
- worldObj.func_147479_m(xCoord, yCoord, zCoord);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9c/6077fb309be3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9c/6077fb309be3001412c4c4819c88e86b
deleted file mode 100644
index 92f5ffa..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9c/6077fb309be3001412c4c4819c88e86b
+++ /dev/null
@@ -1,96 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.ArrayList;
-import java.util.Random;
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-import darkknight.jewelrycraft.tileentity.TileEntityMolder;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- @Override
- public void breakBlock(World world, int i, int j, int k, Block par5, int par6)
- {
- TileEntityMidasTouch te = (TileEntityMidasTouch)world.getTileEntity(i, j, k);
- if (te.target != null) dropItem(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, new ItemStack(Items.gold_nugget, (int)(te.target.width * te.target.height), 0));
-// world.removeTileEntity(i, j, k);
- System.out.println("drop");
- super.breakBlock(world, i, j, k, par5, par6);
- }
-
- public void dropItem(World world, double x, double y, double z, ItemStack stack)
- {
- EntityItem entityitem = new EntityItem(world, x + 0.5D, y + 0.5D, z + 0.5D, stack);
- entityitem.motionX = 0;
- entityitem.motionZ = 0;
- entityitem.motionY = 0.11000000298023224D;
- world.spawnEntityInWorld(entityitem);
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null) this.setBlockBounds(0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0F, 0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2, ((TileEntityMidasTouch)tile).target.height, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2);
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9d/00cb774c9ce3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9d/00cb774c9ce3001412c4c4819c88e86b
deleted file mode 100644
index 782ca64..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9d/00cb774c9ce3001412c4c4819c88e86b
+++ /dev/null
@@ -1,33 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- EntityLiving target = ((EntityLiving)midas.target);
- target.hurtTime = 0;
- float yaw = target.prevRotationYawHead + (target.rotationYawHead - target.prevRotationYawHead);
- float yawOffset = target.prevRenderYawOffset + (target.renderYawOffset - target.prevRenderYawOffset);
- float pitch = target.prevRotationPitch + (target.rotationPitch - target.prevRotationPitch);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glTranslatef(0.5F, 0.0F, 0.5F);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, 0D, 0D, 0D, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9d/50ed421e04e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9d/50ed421e04e50014174fe663e69b8422
deleted file mode 100644
index 2f7ec63..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9d/50ed421e04e50014174fe663e69b8422
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else return Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1);
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9d/60c0b9e2b2ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9d/60c0b9e2b2ea001411cee0f8f86532a4
new file mode 100644
index 0000000..3fbf051
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9d/60c0b9e2b2ea001411cee0f8f86532a4
@@ -0,0 +1,121 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ if ((playerInfo.hasKey("ext10") || playerInfo.hasKey("ext11")) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+ }
+ if ((playerInfo.hasKey("ext12") || playerInfo.hasKey("ext13")) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+ }
+
+ float rot = 0F;
+
+ @SubscribeEvent
+ public void renderHand(RenderHandEvent event)
+ {
+ if (playersInfo != null){
+ EntityPlayer player = Minecraft.getMinecraft().thePlayer;
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && playerInfo.getInteger("cursePoints") > 0) curse.playerHandRender(player, event);
+ }
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9d/80673fdbfae40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9d/80673fdbfae40014174fe663e69b8422
deleted file mode 100644
index b59c9e4..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9d/80673fdbfae40014174fe663e69b8422
+++ /dev/null
@@ -1,62 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import javax.imageio.ImageIO;
-import net.minecraft.block.Block;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.texture.TextureManager;
-import net.minecraft.client.resources.IResourceManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.StatCollector;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.effects.ModifierEffects;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public abstract class ItemGoldifiedObject extends Item
-{
- public ItemGoldifiedObject()
- {
- super();
- }
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- if (JewelryNBT.ingot(stack) != null && Item.getIdFromItem(JewelryNBT.ingot(stack).getItem()) > 0) return JewelryNBT.ingot(stack).getDisplayName().replace("Ingot", " ").trim() + " " + ("" + StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
- return ("" + StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
-
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9e/30028abb98ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9e/30028abb98ea001411cee0f8f86532a4
new file mode 100644
index 0000000..c9d2560
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9e/30028abb98ea001411cee0f8f86532a4
@@ -0,0 +1,140 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+ float rot = 0F;
+
+ @SubscribeEvent
+ public void renderHand(RenderHandEvent event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-1F, -15F, -1F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9e/30320ac0fde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9e/30320ac0fde40014174fe663e69b8422
deleted file mode 100644
index 5305900..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9e/30320ac0fde40014174fe663e69b8422
+++ /dev/null
@@ -1,161 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Random;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.passive.EntityVillager;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.potion.Potion;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.village.MerchantRecipe;
-import net.minecraft.village.MerchantRecipeList;
-import org.lwjgl.input.Keyboard;
-import cpw.mods.fml.common.FMLCommonHandler;
-import cpw.mods.fml.relauncher.ReflectionHelper;
-import cpw.mods.fml.relauncher.Side;
-import darkknight.jewelrycraft.util.JewelrycraftUtil;
-import darkknight.jewelrycraft.util.PlayerUtils;
-
-public class ItemThiefGloves extends Item
-{
- public Random rand = new Random();
-
- public ItemThiefGloves()
- {
- setCreativeTab(CreativeTabs.tabTools);
- setMaxStackSize(1);
- setMaxDamage(10);
- }
-
- /**
- * @param stack
- * @param player
- * @param entity
- * @return
- */
- @Override
- public boolean itemInteractionForEntity(ItemStack stack, EntityPlayer player, EntityLivingBase entity)
- {
- if (entity instanceof EntityVillager){
- EntityVillager villager = (EntityVillager)entity;
- int wealth = (Integer)ReflectionHelper.getPrivateValue(EntityVillager.class, villager, "wealth", "field_70956_bz");
- MerchantRecipeList buyingList = (MerchantRecipeList)ReflectionHelper.getPrivateValue(EntityVillager.class, villager, "buyingList", "field_70963_i");
- int chance = 5;
- boolean areOtherVillagersAround = false, canTheySeeYou = false;
- AxisAlignedBB axisalignedbb = villager.boundingBox.expand(4.0D, 4.0D, 4.0D);
- List entities = villager.worldObj.getEntitiesWithinAABBExcludingEntity(villager, axisalignedbb);
- for(Object s: entities)
- if (s instanceof EntityVillager){
- areOtherVillagersAround = true;
- chance += rand.nextInt(2);
- if (((EntityVillager)s).canEntityBeSeen(player)){
- chance += 2;
- canTheySeeYou = true;
- }
- }
- if (villager.canEntityBeSeen(player)) chance += 5;
- if (player.isPotionActive(Potion.invisibility)) chance -= 0.8 * chance;
- if (player.capabilities.isCreativeMode) chance = 1;
- int steal = rand.nextInt(chance);
- if (steal == 0){
- villager.dropItem(Items.emerald, wealth);
- ReflectionHelper.setPrivateValue(EntityVillager.class, villager, 0, "wealth", "field_70956_bz");
- }
- if (buyingList != null){
- Iterator<?> iterator = buyingList.iterator();
- if (steal == 0){
- while (iterator.hasNext()){
- MerchantRecipe recipe = (MerchantRecipe)iterator.next();
- int toolUses = (Integer)ReflectionHelper.getPrivateValue(MerchantRecipe.class, recipe, "toolUses", "field_77400_d");
- int quantity;
- if (recipe.getItemToSell().isStackable()) quantity = recipe.getItemToSell().stackSize * (7 - toolUses);
- else quantity = recipe.getItemToSell().stackSize;
- ItemStack s = new ItemStack(recipe.getItemToSell().getItem(), quantity, recipe.getItemToSell().getItemDamage());
- s.setTagCompound(recipe.getItemToSell().getTagCompound());
- if (player.inventory.addItemStackToInventory(s)) ;
- else villager.entityDropItem(s, 0);
- if (!player.capabilities.isCreativeMode) JewelrycraftUtil.addCursePoints(player, 5);
- player.addChatMessage(new ChatComponentText("Villager #" + villager.getProfession() + ": Hmmm... I seem to have lost my " + s.getDisplayName() + "!"));
- stack.damageItem(1, player);
- }
- buyingList.clear();
- ReflectionHelper.setPrivateValue(EntityVillager.class, villager, 300, "timeUntilReset", "field_70961_j");
- ReflectionHelper.setPrivateValue(EntityVillager.class, villager, true, "needsInitilization", "field_70959_by");
- player.addChatMessage(new ChatComponentText("You hear a faint whisper in your ear: "));
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_PURPLE + "Those who steal but don't get caught get rewarded and do not."));
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_PURPLE + "Embrace the path you have gone, for the darkness will not"));
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_PURPLE + "dwell on."));
- }else{
- stack.damageItem(1, player);
- if (!player.capabilities.isCreativeMode) JewelrycraftUtil.addCursePoints(player, 25);
- if (player.isPotionActive(Potion.invisibility)){
- player.addChatMessage(new ChatComponentText("Villager #" + villager.getProfession() + " sensed a strange presence around him, making him cling on to his items. You didn't get anything."));
- }
- else{
- if (areOtherVillagersAround){
- if (!canTheySeeYou){
- player.addChatMessage(new ChatComponentText("As he was passing by, a random villager caught you trying to steal from Villager #" + villager.getProfession() + "."));
- player.addChatMessage(new ChatComponentText("Villager #" + villager.getProfession() + " curses you for the attempt."));
- return true;
- }
- else{
- player.addChatMessage(new ChatComponentText("A villager nearby saw you trying to steal from Villager #" + villager.getProfession() + "."));
- player.addChatMessage(new ChatComponentText("Villager #" + villager.getProfession() + " curses you for the attempt."));
- return true;
- }
- }else{
- player.addChatMessage(new ChatComponentText("Villager #" + villager.getProfession() + " caught you trying to steal from him."));
- player.addChatMessage(new ChatComponentText("Villager #" + villager.getProfession() + " curses you for the attempt."));
- return true;
- }
- }
- }
- }
- return true;
- }else return super.itemInteractionForEntity(stack, player, entity);
- }
-
- /**
- * @param stack
- * @param player
- * @param list
- * @param par4
- */
- @Override
- @SuppressWarnings ("unchecked")
- public void addInformation(ItemStack stack, EntityPlayer player, @SuppressWarnings ("rawtypes") List list, boolean par4)
- {
- if (!shouldAddAdditionalInfo()) list.add(EnumChatFormatting.GRAY + additionalInfoInstructions());
- else{
- list.add(EnumChatFormatting.GRAY + "Right click with the gloves,");
- list.add(EnumChatFormatting.GRAY + "while sneaking, on a villager");
- list.add(EnumChatFormatting.GRAY + "to steal his stuff.");
- }
- }
-
- /**
- * @return
- */
- public static boolean shouldAddAdditionalInfo()
- {
- if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) return true;
- return false;
- }
-
- /**
- * @return
- */
- public static String additionalInfoInstructions()
- {
- String message = "\247oPress \247b<SHIFT>\2477\247o for more information.";
- return message;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9e/403b2d4afbe40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9e/403b2d4afbe40014174fe663e69b8422
deleted file mode 100644
index 8ea2641..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9e/403b2d4afbe40014174fe663e69b8422
+++ /dev/null
@@ -1,61 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import javax.imageio.ImageIO;
-import net.minecraft.block.Block;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.texture.TextureManager;
-import net.minecraft.client.resources.IResourceManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.StatCollector;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.effects.ModifierEffects;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public abstract class ItemGoldifiedObject extends Item
-{
- public ItemGoldifiedObject()
- {
- super();
- }
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return (StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
-
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ae/d0d0f67107e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9e/70481ab2b3ea001411cee0f8f86532a4
index fb62f3d..1507884 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ae/d0d0f67107e50014174fe663e69b8422
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9e/70481ab2b3ea001411cee0f8f86532a4
@@ -7,7 +7,9 @@ import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
import net.minecraft.item.Item;
+import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IIcon;
@@ -42,20 +44,18 @@ public class ItemGoldObj extends Item
{
ItemStack item = JewelryNBT.item(stack);
if (item != null) return item.getIconIndex();
- return itemIcon;
+ return new ItemStack(Blocks.end_portal).getIconIndex();
}
public String getItemStackDisplayName(ItemStack stack)
{
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
+ return "Golden " + ((Item.getItemById(Integer.valueOf(stack.getTagCompound().getTag("target").toString().split(",")[0].substring(4).replace("s", ""))) != null && stack != null && JewelryNBT.item(stack) != null) ? JewelryNBT.item(stack).getDisplayName() : "Object");
}
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
{
- if (displayInfo){
-// ItemStack item = JewelryNBT.item(stack);
-// if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
+ if (displayInfo)
+ if(JewelryNBT.item(stack).getItem() instanceof ItemFood) list.add(EnumChatFormatting.DARK_PURPLE + "It's made of solid gold. How are you suppose to eat this?");
+ else list.add(EnumChatFormatting.DARK_PURPLE + "Shiny, but useless :(");
}
}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9e/904d6c6392e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9e/904d6c6392e3001417b2e384bf7c3702
deleted file mode 100644
index 089799a..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9e/904d6c6392e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,27 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, 0D, 0D, 0D, 0F, 1F);
-// RenderManager.instance.getEntityRenderObject(midas.target).doRender(midas.target, midas.target.posX - Minecraft.getMinecraft().thePlayer.posX, midas.target.posY - Minecraft.getMinecraft().thePlayer.posY, midas.target.posZ - Minecraft.getMinecraft().thePlayer.posZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9f/10132f5697e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9f/10132f5697e3001412c4c4819c88e86b
deleted file mode 100644
index 48775e1..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9f/10132f5697e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,75 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target.width);
- this.setBlockBounds(0F, 0F, 0F, ((TileEntityMidasTouch)tile).target.width, ((TileEntityMidasTouch)tile).target.height, ((TileEntityMidasTouch)tile).target.width);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9f/d0d7417947e700141e05cdbaeb682437 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9f/d0d7417947e700141e05cdbaeb682437
deleted file mode 100644
index 05b2c1e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/9f/d0d7417947e700141e05cdbaeb682437
+++ /dev/null
@@ -1,126 +0,0 @@
-package darkknight.jewelrycraft.events;
-
-import java.util.Iterator;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import darkknight.jewelrycraft.curses.CurseList;
-import darkknight.jewelrycraft.entities.renders.RenderHelper;
-import darkknight.jewelrycraft.item.render.BraceletRender;
-import darkknight.jewelrycraft.item.render.EarringsRender;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.model.ModelBracelet;
-import darkknight.jewelrycraft.util.JewelryNBT;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
-
-public class PlayerRenderHandler
-{
- MaskRender mask = new MaskRender();
- EarringsRender earrings = new EarringsRender();
- BraceletRender bracelet = new BraceletRender();
-// public static String[] infamyCache = new String[]{};
- public static NBTTagCompound playersInfo = new NBTTagCompound();
-
- @SubscribeEvent
- public void renderScreen(RenderPlayerEvent.Specials.Post event)
- {
- ModelBiped main = event.renderer.modelBipedMain;
- Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
- if (playersInfo != null){
- while (players.hasNext()){
- EntityPlayer player = players.next();
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(1.6f, 1.6f, 1.6f);
- GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- GL11.glPopMatrix();
- }
- if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(0.07f, 0.07f, 0.07f);
- GL11.glTranslatef(0.0F, 3.0F, -2.0F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- earrings.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- GL11.glPopMatrix();
- }
- for(int i = 10; i <= 13; i++)
- if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
- if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
- if (i / 12 == 1){
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
- }else{
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- }
- GL11.glPopMatrix();
- }
- }
- }
- }
-
- /**
- * @param string
- * @return
- */
- private boolean checkPlayerInfamy(String string)
- {
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
- if(playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
-// for(int i = 0; i < infamyCache.length; i++)
-// if (infamyCache[i].equals(string)) return true;
- return false;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a/8044e5d790e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a/8044e5d790e3001417b2e384bf7c3702
deleted file mode 100644
index bc8f775..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a/8044e5d790e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,82 +0,0 @@
-package darkknight.jewelrycraft.tileentity;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.NetworkManager;
-import net.minecraft.network.Packet;
-import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
-import net.minecraft.tileentity.TileEntity;
-
-public class TileEntityMidasTouch extends TileEntity
-{
- public Entity target;
-
- public TileEntityMidasTouch()
- {}
-
- public void setEntity(Entity ent)
- {
- target = ent;
- }
-
- @Override
- public void writeToNBT(NBTTagCompound nbt)
- {
- super.writeToNBT(nbt);
- if (target != null){
- int id = EntityList.getEntityID(target);
- NBTTagCompound tag = new NBTTagCompound();
- target.writeToNBT(tag);
- nbt.setInteger("entityID", id);
- nbt.setTag("entity", tag);
- }
- }
-
- /**
- * @param nbt
- */
- @Override
- public void readFromNBT(NBTTagCompound nbt)
- {
- super.readFromNBT(nbt);
- NBTTagCompound en = (NBTTagCompound)nbt.getTag("entity");
- int entityID = nbt.getInteger("entityID");
- EntityLivingBase entity = (EntityLivingBase)EntityList.createEntityByID(entityID, worldObj);
- entity.readFromNBT(en);
- target = entity;
- }
-
- /**
- *
- */
- @Override
- public void updateEntity()
- {
- super.updateEntity();
- // System.out.println(target);
- }
-
- /**
- * @return
- */
- @Override
- public Packet getDescriptionPacket()
- {
- NBTTagCompound nbttagcompound = new NBTTagCompound();
- writeToNBT(nbttagcompound);
- return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbttagcompound);
- }
-
- /**
- * @param net
- * @param packet
- */
- @Override
- public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet)
- {
- readFromNBT(packet.func_148857_g());
- worldObj.func_147479_m(xCoord, yCoord, zCoord);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a0/40594fd502e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a0/40594fd502e50014174fe663e69b8422
deleted file mode 100644
index f6be9b5..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a0/40594fd502e50014174fe663e69b8422
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else return Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(6);
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a0/a088aa6692e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a0/a088aa6692e3001417b2e384bf7c3702
deleted file mode 100644
index 14219fd..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a0/a088aa6692e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,27 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, 0D, 0D, 0D, 1F, 1F);
-// RenderManager.instance.getEntityRenderObject(midas.target).doRender(midas.target, midas.target.posX - Minecraft.getMinecraft().thePlayer.posX, midas.target.posY - Minecraft.getMinecraft().thePlayer.posY, midas.target.posZ - Minecraft.getMinecraft().thePlayer.posZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a2/50ed3e1bb0ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a2/50ed3e1bb0ea001411cee0f8f86532a4
new file mode 100644
index 0000000..7c7b2ee
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a2/50ed3e1bb0ea001411cee0f8f86532a4
@@ -0,0 +1,160 @@
+/*
+ * Mod made by DarkKnight during the Modjam 3
+ * It's an awesome mod
+ * I love me! :D
+ */
+package darkknight.jewelrycraft;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.gen.structure.MapGenStructureIO;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.oredict.OreDictionary;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.Mod.EventHandler;
+import cpw.mods.fml.common.Mod.Instance;
+import cpw.mods.fml.common.ModMetadata;
+import cpw.mods.fml.common.SidedProxy;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
+import cpw.mods.fml.common.registry.EntityRegistry;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.client.gui.GuiHandler;
+import darkknight.jewelrycraft.commands.JewelrycraftCommands;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.damage.DamageSourceList;
+import darkknight.jewelrycraft.effects.EffectsList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.entities.EntityList;
+import darkknight.jewelrycraft.events.BlockEventHandler;
+import darkknight.jewelrycraft.events.BucketHandler;
+import darkknight.jewelrycraft.events.EntityEventHandler;
+import darkknight.jewelrycraft.events.EventCommonHandler;
+import darkknight.jewelrycraft.events.EventList;
+import darkknight.jewelrycraft.events.KeyBindings;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.network.PacketClearColorCache;
+import darkknight.jewelrycraft.network.PacketHandler;
+import darkknight.jewelrycraft.network.PacketKeyPressEvent;
+import darkknight.jewelrycraft.network.PacketRequestLiquidData;
+import darkknight.jewelrycraft.network.PacketRequestPlayerInfo;
+import darkknight.jewelrycraft.network.PacketRequestSetSlot;
+import darkknight.jewelrycraft.network.PacketSendServerPlayersInfo;
+import darkknight.jewelrycraft.network.PacketSendLiquidData;
+import darkknight.jewelrycraft.network.PacketSendClientPlayerInfo;
+import darkknight.jewelrycraft.proxy.CommonProxy;
+import darkknight.jewelrycraft.recipes.CraftingRecipes;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.Variables;
+import darkknight.jewelrycraft.worldGen.Generation;
+import darkknight.jewelrycraft.worldGen.village.ComponentJewelry;
+import darkknight.jewelrycraft.worldGen.village.JCTrades;
+import darkknight.jewelrycraft.worldGen.village.VillageJewelryHandler;
+
+@Mod (modid = Variables.MODID, name = Variables.MODNAME, version = Variables.VERSION, guiFactory = Variables.CONFIG_GUI, acceptedMinecraftVersions = "[1.7.10,1.8)", canBeDeactivated = true)
+public class JewelrycraftMod
+{
+ @Instance (Variables.MODID)
+ public static JewelrycraftMod instance;
+ @SidedProxy (clientSide = Variables.CLIENT_PROXY, serverSide = Variables.SERVER_PROXY)
+ public static CommonProxy proxy;
+ public static final Logger logger = Logger.getLogger("Jewelrycraft");
+ public static File dir;
+ public static CreativeTabs jewelrycraft = new CreativeTabs(Variables.MODID){
+ @Override
+ public Item getTabIconItem()
+ {
+ return Item.getItemFromBlock(BlockList.jewelCraftingTable);
+ }
+ };
+ public static CreativeTabs liquids = new CreativeTabLiquids("Liquids");
+ public static NBTTagCompound saveData = new NBTTagCompound();
+ public static NBTTagCompound clientData = new NBTTagCompound();
+ public static File liquidsConf;
+ public static SimpleNetworkWrapper netWrapper;
+ public static boolean fancyRender;
+ List<String> authorList = new ArrayList<String>();
+
+ /**
+ * Pre initialization of mod stuff.
+ *
+ * @param e FMLPreInitializationEvent
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ @EventHandler
+ public void preInit(FMLPreInitializationEvent e) throws IOException
+ {
+ ModMetadata metadata = e.getModMetadata();
+ dir = e.getModConfigurationDirectory();
+ ConfigHandler.INSTANCE.loadConfig(e);
+ BlockList.preInit(e);
+ ItemList.preInit(e);
+ CraftingRecipes.preInit(e);
+ CurseList.preInit(e);
+ PacketHandler.preInit(e);
+ EntityList.preInit(e);
+ VillagerRegistry.instance().registerVillagerId(3000);
+ VillagerRegistry.instance().registerVillageTradeHandler(3000, new JCTrades());
+ VillagerRegistry.instance().registerVillageCreationHandler(new VillageJewelryHandler());
+ try{
+ MapGenStructureIO.func_143031_a(ComponentJewelry.class, Variables.MODID + ":Jewelry");
+ }
+ catch(Throwable e2){
+ logger.severe("Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.7.10");
+ }
+ EventList.preInit(e);
+ proxy.preInit();
+ authorList.add("OnyxDarkKnight");
+ authorList.add("bspkrs");
+ authorList.add("domi1819");
+ metadata.autogenerated = false;
+ metadata.authorList = authorList;
+ metadata.url = "https://github.com/sor1n/Jewelrycraft";
+ }
+
+ /**
+ * Initializes the world generation and key bindings.
+ *
+ * @param e FMLInitializationEvent
+ */
+ @EventHandler
+ public void init(FMLInitializationEvent e)
+ {
+ EventList.init(e);
+ }
+
+ /**
+ * Post initialization of metals, modifiers and others.
+ *
+ * @param e FMLPostInitializationEvent
+ */
+ @EventHandler
+ public void postInit(FMLPostInitializationEvent e)
+ {
+ EventList.postInit(e);
+ }
+
+ @Mod.EventHandler
+ public void serverLoad(FMLServerStartingEvent event)
+ {
+ event.registerServerCommand(new JewelrycraftCommands());
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a2/e04fcd7287ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a2/e04fcd7287ea001411cee0f8f86532a4
new file mode 100644
index 0000000..1748816
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a2/e04fcd7287ea001411cee0f8f86532a4
@@ -0,0 +1,94 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockCompressed;
+import net.minecraft.block.BlockPressurePlate;
+import net.minecraft.block.BlockPressurePlateWeighted;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemArmor;
+import net.minecraft.item.ItemAxe;
+import net.minecraft.item.ItemHoe;
+import net.minecraft.item.ItemPickaxe;
+import net.minecraft.item.ItemSpade;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.ItemSword;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+
+public class CurseMidasTouch extends Curse
+{
+ public CurseMidasTouch(String name, int txtID, int packID)
+ {
+ super(name, txtID, packID);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {
+ if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && player.inventory.getCurrentItem() == null){
+ world.setBlock(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), BlockList.midasTouchBlock, 0, 2);
+ TileEntityMidasTouch midasTouchVictim = new TileEntityMidasTouch();
+ midasTouchVictim.setEntity(target);
+ world.setTileEntity(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), midasTouchVictim);
+ target.setDead();
+ }
+ }
+
+ @Override
+ public void action(World world, EntityPlayer player)
+ {
+ ItemStack curItem = player.inventory.getCurrentItem();
+ if(curItem != null && curItem.getItem() != ItemList.goldObj && !isGoldenObject(curItem.getItem())){
+ int index = player.inventory.currentItem;
+ ItemStack item = curItem;
+ ItemStack result = new ItemStack(ItemList.goldObj, item.stackSize, item.getItemDamage());
+ JewelryNBT.addItem(result, item);
+ if(changeItem(curItem) != null) result = changeItem(curItem);
+ player.inventory.setInventorySlotContents(index, result);
+ }
+ }
+
+ public ItemStack changeItem(ItemStack currItem)
+ {
+ if(currItem.getItem() instanceof ItemSword) return new ItemStack(Items.golden_sword, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemSpade) return new ItemStack(Items.golden_shovel, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemPickaxe) return new ItemStack(Items.golden_pickaxe, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemAxe) return new ItemStack(Items.golden_axe, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemHoe) return new ItemStack(Items.golden_hoe, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemArmor && ((ItemArmor)currItem.getItem()).armorType == 0) return new ItemStack(Items.golden_helmet, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemArmor && ((ItemArmor)currItem.getItem()).armorType == 1) return new ItemStack(Items.golden_chestplate, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemArmor && ((ItemArmor)currItem.getItem()).armorType == 2) return new ItemStack(Items.golden_leggings, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem() instanceof ItemArmor && ((ItemArmor)currItem.getItem()).armorType == 3) return new ItemStack(Items.golden_boots, currItem.stackSize, currItem.getItemDamage());
+ else if(currItem.getItem().getUnlocalizedName().toLowerCase().contains("horsearmor")) return new ItemStack(Items.golden_horse_armor, currItem.stackSize, 0);
+ else if(currItem.getItem().getUnlocalizedName().toLowerCase().contains("nugget") || currItem.getItem().getItemStackDisplayName(currItem).toLowerCase().contains(" nugget") || currItem.getItem().getItemStackDisplayName(currItem).toLowerCase().contains("nugget ")) return new ItemStack(Items.gold_nugget, currItem.stackSize, 0);
+ else if(currItem.getItem().getUnlocalizedName().toLowerCase().contains("ingot") || currItem.getItem().getItemStackDisplayName(currItem).toLowerCase().contains(" ingot") || currItem.getItem().getItemStackDisplayName(currItem).toLowerCase().contains("ingot ")) return new ItemStack(Items.gold_ingot, currItem.stackSize, 0);
+ else if(Block.getBlockFromItem(currItem.getItem()) instanceof BlockPressurePlate || Block.getBlockFromItem(currItem.getItem()) instanceof BlockPressurePlateWeighted) return new ItemStack(Blocks.light_weighted_pressure_plate, currItem.stackSize, 0);
+ else if(Block.getBlockFromItem(currItem.getItem()) instanceof BlockCompressed) return new ItemStack(Blocks.gold_block, currItem.stackSize, 0);
+ return null;
+ }
+
+ public boolean isGoldenObject(Item item)
+ {
+ return item.equals(Items.gold_ingot) || item.equals(Items.gold_nugget) || item.equals(Items.golden_helmet) || item.equals(Items.golden_chestplate) ||
+ item.equals(Items.golden_leggings) || item.equals(Items.golden_boots) || item.equals(Items.golden_sword) || item.equals(Items.golden_shovel) ||
+ item.equals(Items.golden_pickaxe) || item.equals(Items.golden_axe) || item.equals(Items.golden_hoe) || item.equals(Items.golden_horse_armor) ||
+ Block.getBlockFromItem(item).equals(Blocks.gold_block) || Block.getBlockFromItem(item).equals(Blocks.light_weighted_pressure_plate);
+ }
+
+ public String getDescription()
+ {
+ return "Be careful what you wish for...";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a4/3011827398ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a4/3011827398ea001411cee0f8f86532a4
new file mode 100644
index 0000000..e99c4bc
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a4/3011827398ea001411cee0f8f86532a4
@@ -0,0 +1,139 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+ float rot = 0F;
+
+ public void renderHand(RenderHandEvent event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a4/3073a9c599ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a4/3073a9c599ea001411cee0f8f86532a4
new file mode 100644
index 0000000..fd2a27b
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a4/3073a9c599ea001411cee0f8f86532a4
@@ -0,0 +1,132 @@
+package darkknight.jewelrycraft.curses;
+
+import java.util.ArrayList;
+import java.util.Random;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+
+public class Curse
+{
+ protected int textureID;
+ protected String name, description, texturePackName;
+ protected Random rand = new Random();
+ private static ArrayList<Curse> curses = new ArrayList<Curse>();
+ public static ArrayList<Curse> availableCurses = new ArrayList<Curse>();
+
+ /**
+ * @param id the ID of the curse
+ * @param name the name of the curse
+ * @param texturepack the ID of the pack the texture is located in
+ */
+ protected Curse(String name, int txtID, String texturepack)
+ {
+ this.name = name;
+ this.texturePackName = texturepack;
+ this.textureID = txtID;
+ curses.add(this);
+ availableCurses.add(this);
+ }
+
+ /**
+ * @return the name of the curse
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * @return the description of the curse
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public Curse setDescription(String desc)
+ {
+ description = desc;
+ return this;
+ }
+
+ /**
+ * @return the texture pack ID
+ */
+ public String getTexturePack()
+ {
+ return texturePackName;
+ }
+
+ /**
+ * @return the texture ID
+ */
+ public int getTextureID()
+ {
+ return textureID;
+ }
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void action(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void playerDeathAction(World world, EntityPlayer player)
+ {}
+
+ public void entityDeathAction(World world, EntityLivingBase target, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void respawnAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ public void entityDropItems(EntityPlayer player, Entity target, ArrayList<EntityItem> drops)
+ {}
+
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {}
+
+ public void playerHandRender(EntityPlayer player, RenderHandEvent event)
+ {}
+
+ public boolean itemToss()
+ {
+ return false;
+ }
+
+ /**
+ * @return
+ */
+ public static ArrayList<Curse> getCurseList()
+ {
+ return curses;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a4/502b9fa69ce3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a4/502b9fa69ce3001412c4c4819c88e86b
deleted file mode 100644
index f0737fb..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a4/502b9fa69ce3001412c4c4819c88e86b
+++ /dev/null
@@ -1,33 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- EntityLiving target = ((EntityLiving)midas.target);
- target.hurtTime = 0;
- float yaw = target.prevRotationYawHead + (target.rotationYawHead - target.prevRotationYawHead);
- float yawOffset = target.prevRenderYawOffset + (target.renderYawOffset - target.prevRenderYawOffset);
- float pitch = target.prevRotationPitch + (target.rotationPitch - target.prevRotationPitch);
-// GL11.glRotatef(yawOffset, 0, -1, 0);
-// GL11.glRotatef(yaw - 90, 0, 1, 0);
-// GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glTranslatef(0.5F, 0.0F, 0.5F);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(target, midas.xCoord - RenderManager.instance.renderPosX, midas.yCoord - RenderManager.instance.renderPosY, midas.zCoord - RenderManager.instance.renderPosZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a5/80728a19fde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a5/80728a19fde40014174fe663e69b8422
deleted file mode 100644
index 5199975..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a5/80728a19fde40014174fe663e69b8422
+++ /dev/null
@@ -1,50 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.StatCollector;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public abstract class ItemGoldifiedObject extends Item
-{
- public ItemGoldifiedObject()
- {}
-
- public ItemGoldifiedObject(Material mat)
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- if (JewelryNBT.gem(stack) != null) return this.getIconIndex(JewelryNBT.gem(stack));
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return (StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a7/b09d7740fce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a7/b09d7740fce40014174fe663e69b8422
deleted file mode 100644
index a781774..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a7/b09d7740fce40014174fe663e69b8422
+++ /dev/null
@@ -1,67 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import javax.imageio.ImageIO;
-import net.minecraft.block.Block;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.texture.TextureManager;
-import net.minecraft.client.resources.IResourceManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.StatCollector;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.effects.ModifierEffects;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public abstract class ItemGoldifiedObject extends Item
-{
- public ItemGoldifiedObject()
- {
- }
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- if (JewelryNBT.gem(stack) != null) return this.getIconIndex(JewelryNBT.gem(stack));
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return (StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
-
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a8/00bcf92d8ee3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a8/00bcf92d8ee3001417b2e384bf7c3702
deleted file mode 100644
index 55d81d5..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a8/00bcf92d8ee3001417b2e384bf7c3702
+++ /dev/null
@@ -1,25 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glColor4f(1F, 0.0F, 1.0F, 0.3F);
- GL11.glTranslatef(0.5F, 0.0F, 0.5F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- RenderManager.instance.renderEntityStatic(midas.target, 1F, false);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a8/20e62f5486ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a8/20e62f5486ea001411cee0f8f86532a4
new file mode 100644
index 0000000..e31db02
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a8/20e62f5486ea001411cee0f8f86532a4
@@ -0,0 +1,38 @@
+package darkknight.jewelrycraft.curses;
+
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CurseList
+{
+ public static Curse rotten;
+ public static Curse flaming;
+ public static Curse blind;
+ public static Curse greed;
+ public static Curse infamy;
+ public static Curse midasTouch;
+ public static Curse rabbitsPaw;
+ public static Curse pentagram;
+ public static Curse vampireHunger;
+ public static Curse humbleBundle;
+ public static Curse deathsTouch;
+ public static Curse antichrist;
+ public static Curse moneyEqualsPower;
+
+ public static void preInit(FMLPreInitializationEvent e)
+ {
+ rotten = new CurseRottenHeart(0, Variables.MODNAME + ":" + "Rotten Heart", 0);
+ flaming = new CurseFlamingSoul(1, Variables.MODNAME + ":" + "Flaming Soul", 0);
+ greed = new CurseGreed(2, Variables.MODNAME + ":" + "Greed", 0);
+ blind = new CurseBlind(3, Variables.MODNAME + ":" + "Blind", 0);
+ infamy = new CurseInfamy(4, Variables.MODNAME + ":" + "Infamy", 0);
+ midasTouch = new CurseMidasTouch(5, Variables.MODNAME + ":" + "Midas Touch", 0);
+ rabbitsPaw = new CurseRabbitsPaw(6, Variables.MODNAME + ":" + "Rabbit's Paw", 0);
+ pentagram = new CursePentagram(7, Variables.MODNAME + ":" + "Pentagram", 0);
+// vampireHunger = new CurseMidasTouch(8, Variables.MODNAME + ":" + "Vampire Hunger", 0);
+// humbleBundle = new CurseMidasTouch(9, Variables.MODNAME + ":" + "Humble Bundle", 0);
+// deathsTouch = new CurseMidasTouch(10, Variables.MODNAME + ":" + "Deaths Touch", 0);
+// antichrist = new CurseMidasTouch(11, Variables.MODNAME + ":" + "Antichrist", 0);
+// moneyEqualsPower = new CurseMidasTouch(12, Variables.MODNAME + ":" + "Money Equals Power", 0);
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a8/f0c56a6887ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a8/f0c56a6887ea001411cee0f8f86532a4
new file mode 100644
index 0000000..fdca3e0
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a8/f0c56a6887ea001411cee0f8f86532a4
@@ -0,0 +1,60 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CursePentagram extends Curse
+{
+ float rot = 0F;
+
+ public CursePentagram(String name, int txtID, int packID)
+ {
+ super(name, txtID, packID);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(Variables.CURSES_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "The Dark Lord has misterious ways of showing you his love.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a9/30408fedfbe40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a9/30408fedfbe40014174fe663e69b8422
deleted file mode 100644
index d970f43..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a9/30408fedfbe40014174fe663e69b8422
+++ /dev/null
@@ -1,64 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.*;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static Item goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a9/906a5c63fce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a9/906a5c63fce40014174fe663e69b8422
deleted file mode 100644
index bcf52b4..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/a9/906a5c63fce40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.*;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static Item goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/aa/2006adf198e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/aa/2006adf198e3001412c4c4819c88e86b
deleted file mode 100644
index ef542a7..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/aa/2006adf198e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,27 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
-// System.out.println(midas.target.rotationYaw);
-// GL11.glRotatef(, 0.0F, 1.0F, 0.0F);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, midas.target.posX - RenderManager.instance.renderPosX, midas.target.posY - RenderManager.instance.renderPosY, midas.target.posZ - RenderManager.instance.renderPosZ, midas.target.rotationYaw, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ac/00104ff947e700141e05cdbaeb682437 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ac/00104ff947e700141e05cdbaeb682437
deleted file mode 100644
index e728502..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ac/00104ff947e700141e05cdbaeb682437
+++ /dev/null
@@ -1,127 +0,0 @@
-package darkknight.jewelrycraft.events;
-
-import java.util.Iterator;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import darkknight.jewelrycraft.curses.CurseList;
-import darkknight.jewelrycraft.entities.renders.RenderHelper;
-import darkknight.jewelrycraft.item.render.BraceletRender;
-import darkknight.jewelrycraft.item.render.EarringsRender;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.model.ModelBracelet;
-import darkknight.jewelrycraft.util.JewelryNBT;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
-
-public class PlayerRenderHandler
-{
- MaskRender mask = new MaskRender();
- EarringsRender earrings = new EarringsRender();
- BraceletRender bracelet = new BraceletRender();
-// public static String[] infamyCache = new String[]{};
- public static NBTTagCompound playersInfo = new NBTTagCompound();
-
- @SubscribeEvent
- public void renderScreen(RenderPlayerEvent.Specials.Post event)
- {
- ModelBiped main = event.renderer.modelBipedMain;
- Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
- if (playersInfo != null){
- while (players.hasNext()){
- EntityPlayer player = players.next();
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(1.6f, 1.6f, 1.6f);
- GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- GL11.glPopMatrix();
- }
- if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(0.07f, 0.07f, 0.07f);
- GL11.glTranslatef(0.0F, 3.0F, -2.0F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- earrings.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- GL11.glPopMatrix();
- }
- for(int i = 10; i <= 13; i++)
- if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
- if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
- if (i / 12 == 1){
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
- }else{
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
-// System.out.println(playersInfo);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- }
- GL11.glPopMatrix();
- }
- }
- }
- }
-
- /**
- * @param string
- * @return
- */
- private boolean checkPlayerInfamy(String string)
- {
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
- if(playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
-// for(int i = 0; i < infamyCache.length; i++)
-// if (infamyCache[i].equals(string)) return true;
- return false;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ac/a0a9345b87ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ac/a0a9345b87ea001411cee0f8f86532a4
new file mode 100644
index 0000000..6c979e9
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ac/a0a9345b87ea001411cee0f8f86532a4
@@ -0,0 +1,128 @@
+package darkknight.jewelrycraft.curses;
+
+import java.util.ArrayList;
+import java.util.Random;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+
+public class Curse
+{
+ protected int texturepack, textureID;
+ protected String name, description;
+ protected Random rand = new Random();
+ private static ArrayList<Curse> curses = new ArrayList<Curse>();
+ public static ArrayList<Curse> availableCurses = new ArrayList<Curse>();
+
+ /**
+ * @param id the ID of the curse
+ * @param name the name of the curse
+ * @param texturepack the ID of the pack the texture is located in
+ */
+ protected Curse(String name, int txtID, int texturepack)
+ {
+ this.name = name;
+ this.texturepack = texturepack;
+ this.textureID = txtID;
+ curses.add(this);
+ availableCurses.add(this);
+ }
+
+ /**
+ * @return the name of the curse
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * @return the description of the curse
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public Curse setDescription(String desc)
+ {
+ description = desc;
+ return this;
+ }
+
+ /**
+ * @return the texture pack ID
+ */
+ public int getTexturePack()
+ {
+ return texturepack;
+ }
+
+ /**
+ * @return the texture ID
+ */
+ public int getTextureID()
+ {
+ return textureID;
+ }
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void action(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void playerDeathAction(World world, EntityPlayer player)
+ {}
+
+ public void entityDeathAction(World world, EntityLivingBase target, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void respawnAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ public void entityDropItems(EntityPlayer player, Entity target, ArrayList<EntityItem> drops)
+ {}
+
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {}
+
+ public boolean itemToss()
+ {
+ return false;
+ }
+
+ /**
+ * @return
+ */
+ public static ArrayList<Curse> getCurseList()
+ {
+ return curses;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/004937966be70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/004937966be70014115de2bb951f0adf
deleted file mode 100644
index 30a9d0c..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/004937966be70014115de2bb951f0adf
+++ /dev/null
@@ -1,123 +0,0 @@
-package darkknight.jewelrycraft.events;
-
-import java.util.Iterator;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import darkknight.jewelrycraft.curses.CurseList;
-import darkknight.jewelrycraft.entities.renders.RenderHelper;
-import darkknight.jewelrycraft.item.render.BraceletRender;
-import darkknight.jewelrycraft.item.render.EarringsRender;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.model.ModelBracelet;
-import darkknight.jewelrycraft.util.JewelryNBT;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
-
-public class PlayerRenderHandler
-{
- MaskRender mask = new MaskRender();
- EarringsRender earrings = new EarringsRender();
- BraceletRender bracelet = new BraceletRender();
- public static NBTTagCompound playersInfo = new NBTTagCompound();
-
- @SubscribeEvent
- public void renderScreen(RenderPlayerEvent.Specials.Post event)
- {
- ModelBiped main = event.renderer.modelBipedMain;
- Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
- if (playersInfo != null){
- while (players.hasNext()){
- EntityPlayer player = players.next();
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(1.6f, 1.6f, 1.6f);
- GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- GL11.glPopMatrix();
- }
- if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(0.07f, 0.07f, 0.07f);
- GL11.glTranslatef(0.0F, 3.0F, -2.0F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- earrings.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- GL11.glPopMatrix();
- }
- for(int i = 10; i <= 13; i++)
- if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
- if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
- if (i / 12 == 1){
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
- }else{
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- }
- GL11.glPopMatrix();
- }
- }
- }
- }
-
- /**
- * @param string
- * @return
- */
- private boolean checkPlayerInfamy(String string)
- {
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
- if(playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
- return false;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/4031063499e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/4031063499e3001412c4c4819c88e86b
deleted file mode 100644
index ef542a7..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/4031063499e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,27 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
-// System.out.println(midas.target.rotationYaw);
-// GL11.glRotatef(, 0.0F, 1.0F, 0.0F);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, midas.target.posX - RenderManager.instance.renderPosX, midas.target.posY - RenderManager.instance.renderPosY, midas.target.posZ - RenderManager.instance.renderPosZ, midas.target.rotationYaw, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/705d0e479ae3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/705d0e479ae3001412c4c4819c88e86b
deleted file mode 100644
index f558f5e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/705d0e479ae3001412c4c4819c88e86b
+++ /dev/null
@@ -1,87 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.ArrayList;
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- @Override
- public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune)
- {
- ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
-
- int count = quantityDropped(metadata, fortune, world.rand);
- TileEntity tile = world.getTileEntity(x, y, z);
- if (tile != null && ((TileEntityMidasTouch)tile).target != null)
- ret.add(new ItemStack(Items.gold_nugget, (int)(((TileEntityMidasTouch)tile).target.width*((TileEntityMidasTouch)tile).target.height), 0));
-
- return ret;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null) this.setBlockBounds(0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0F, 0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2, ((TileEntityMidasTouch)tile).target.height, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2);
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/9087c735b0ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/9087c735b0ea001411cee0f8f86532a4
new file mode 100644
index 0000000..66fc1d0
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/9087c735b0ea001411cee0f8f86532a4
@@ -0,0 +1,131 @@
+/*
+ * Mod made by DarkKnight during the Modjam 3
+ * It's an awesome mod
+ * I love me! :D
+ */
+package darkknight.jewelrycraft;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.Item;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.gen.structure.MapGenStructureIO;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.Mod.EventHandler;
+import cpw.mods.fml.common.Mod.Instance;
+import cpw.mods.fml.common.ModMetadata;
+import cpw.mods.fml.common.SidedProxy;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.commands.JewelrycraftCommands;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.EntityList;
+import darkknight.jewelrycraft.events.EventList;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.network.PacketHandler;
+import darkknight.jewelrycraft.proxy.CommonProxy;
+import darkknight.jewelrycraft.recipes.CraftingRecipes;
+import darkknight.jewelrycraft.util.Variables;
+import darkknight.jewelrycraft.worldGen.village.ComponentJewelry;
+import darkknight.jewelrycraft.worldGen.village.JCTrades;
+import darkknight.jewelrycraft.worldGen.village.VillageJewelryHandler;
+
+@Mod (modid = Variables.MODID, name = Variables.MODNAME, version = Variables.VERSION, guiFactory = Variables.CONFIG_GUI, acceptedMinecraftVersions = "[1.7.10,1.8)", canBeDeactivated = true)
+public class JewelrycraftMod
+{
+ @Instance (Variables.MODID)
+ public static JewelrycraftMod instance;
+ @SidedProxy (clientSide = Variables.CLIENT_PROXY, serverSide = Variables.SERVER_PROXY)
+ public static CommonProxy proxy;
+ public static final Logger logger = Logger.getLogger("Jewelrycraft");
+ public static File dir;
+ public static CreativeTabs jewelrycraft = new CreativeTabs(Variables.MODID){
+ @Override
+ public Item getTabIconItem()
+ {
+ return Item.getItemFromBlock(BlockList.jewelCraftingTable);
+ }
+ };
+ public static CreativeTabs liquids = new CreativeTabLiquids("Liquids");
+ public static NBTTagCompound saveData = new NBTTagCompound();
+ public static NBTTagCompound clientData = new NBTTagCompound();
+ public static File liquidsConf;
+ public static SimpleNetworkWrapper netWrapper;
+ public static boolean fancyRender;
+ List<String> authorList = new ArrayList<String>();
+
+ /**
+ * Pre initialization of mod stuff.
+ *
+ * @param e FMLPreInitializationEvent
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ @EventHandler
+ public void preInit(FMLPreInitializationEvent e) throws IOException
+ {
+ ModMetadata metadata = e.getModMetadata();
+ dir = e.getModConfigurationDirectory();
+ ConfigHandler.INSTANCE.loadConfig(e);
+ BlockList.preInit(e);
+ ItemList.preInit(e);
+ CraftingRecipes.preInit(e);
+ CurseList.preInit(e);
+ PacketHandler.preInit(e);
+ EntityList.preInit(e);
+ VillagerRegistry.instance().registerVillagerId(3000);
+ VillagerRegistry.instance().registerVillageTradeHandler(3000, new JCTrades());
+ VillagerRegistry.instance().registerVillageCreationHandler(new VillageJewelryHandler());
+ try{
+ MapGenStructureIO.func_143031_a(ComponentJewelry.class, Variables.MODID + ":Jewelry");
+ }
+ catch(Throwable e2){
+ logger.severe("Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.7.10");
+ }
+ EventList.preInit(e);
+ proxy.preInit();
+ authorList.add("OnyxDarkKnight");
+ authorList.add("bspkrs");
+ authorList.add("domi1819");
+ metadata.autogenerated = false;
+ metadata.authorList = authorList;
+ metadata.url = "https://github.com/sor1n/Jewelrycraft";
+ }
+
+ /**
+ * Initializes the world generation and key bindings.
+ *
+ * @param e FMLInitializationEvent
+ */
+ @EventHandler
+ public void init(FMLInitializationEvent e)
+ {
+ EventList.init(e);
+ }
+
+ /**
+ * Post initialization of metals, modifiers and others.
+ *
+ * @param e FMLPostInitializationEvent
+ */
+ @EventHandler
+ public void postInit(FMLPostInitializationEvent e)
+ {
+ EventList.postInit(e);
+ }
+
+ @Mod.EventHandler
+ public void serverLoad(FMLServerStartingEvent event)
+ {
+ event.registerServerCommand(new JewelrycraftCommands());
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/a067720cb2ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/a067720cb2ea001411cee0f8f86532a4
new file mode 100644
index 0000000..4b0c516
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ad/a067720cb2ea001411cee0f8f86532a4
@@ -0,0 +1,31 @@
+package darkknight.jewelrycraft.item.render;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BraceletRender extends TileEntitySpecialRenderer
+{
+ public ModelBracelet bracelet = new ModelBracelet();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Bracelet.png");
+
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ }
+
+ public void doRender(Entity entity, double x, double y, double z, float f, float g)
+ {
+ GL11.glPushMatrix();
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+ bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ GL11.glTranslatef(0F, 3F, 0F);
+ bracelet.render(entity, 0F, 0F, 0F, (float)x, (float)y, 1.0F);
+ GL11.glPopMatrix();
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ae/204f8c71adea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ae/204f8c71adea001411cee0f8f86532a4
new file mode 100644
index 0000000..7455ce8
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ae/204f8c71adea001411cee0f8f86532a4
@@ -0,0 +1,21 @@
+package darkknight.jewelrycraft.util;
+
+import net.minecraft.util.ResourceLocation;
+
+public class Variables
+{
+ public static final String MODID = "jewelrycraft2";
+ public static final String MODNAME = "Jewelrycraft 2";
+ public static final String VERSION = "1.0";
+ public static final String PACKET_CHANNEL = "jewelrycraft2";
+
+ public static final String CONFIG_GUI = "darkknight.jewelrycraft.config.ConfigGuiFactory";
+ public static final String CLIENT_PROXY = "darkknight.jewelrycraft.proxy.ClientProxy";
+ public static final String SERVER_PROXY = "darkknight.jewelrycraft.proxy.CommonProxy";
+
+ public static final int MAX_CURSES = 10;
+ public static final ResourceLocation PEDESTAL_TEXTURE = new ResourceLocation(Variables.MODID, "textures/tileentities/BricksPedestal.png");
+ public static final ResourceLocation SHADOW_HAND_TEXTURE = new ResourceLocation(Variables.MODID, "textures/tileentities/ShadowHand.png");
+ public static final ResourceLocation VILLAGER_TEXTURE = new ResourceLocation(Variables.MODID, "textures/entities/jeweler.png");
+ public static final ResourceLocation MISC_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/hearts.png");
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ae/60b40fee99ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ae/60b40fee99ea001411cee0f8f86532a4
new file mode 100644
index 0000000..c141d68
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ae/60b40fee99ea001411cee0f8f86532a4
@@ -0,0 +1,132 @@
+package darkknight.jewelrycraft.curses;
+
+import java.util.ArrayList;
+import java.util.Random;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+
+public class Curse
+{
+ protected int textureID;
+ protected String name, description, texturePackName;
+ protected Random rand = new Random();
+ private static ArrayList<Curse> curses = new ArrayList<Curse>();
+ public static ArrayList<Curse> availableCurses = new ArrayList<Curse>();
+
+ /**
+ * @param id the ID of the curse
+ * @param name the name of the curse
+ * @param texturepack the ID of the pack the texture is located in
+ */
+ protected Curse(String name, int txtID, String texturepack)
+ {
+ this.name = name;
+ this.texturePackName = texturepack;
+ this.textureID = txtID;
+ curses.add(this);
+ availableCurses.add(this);
+ }
+
+ /**
+ * @return the name of the curse
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * @return the description of the curse
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public Curse setDescription(String desc)
+ {
+ description = desc;
+ return this;
+ }
+
+ /**
+ * @return the texture pack ID
+ */
+ public String getTexturePack()
+ {
+ return texturePackName;
+ }
+
+ /**
+ * @return the texture ID
+ */
+ public int getTextureID()
+ {
+ return textureID;
+ }
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void action(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void playerDeathAction(World world, EntityPlayer player)
+ {}
+
+ public void entityDeathAction(World world, EntityLivingBase target, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void respawnAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ public void entityDropItems(EntityPlayer player, Entity target, ArrayList<EntityItem> drops)
+ {}
+
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {}
+
+ public void playerHandRender(RenderHandEvent event)
+ {}
+
+ public boolean itemToss()
+ {
+ return false;
+ }
+
+ /**
+ * @return
+ */
+ public static ArrayList<Curse> getCurseList()
+ {
+ return curses;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/af/e06aaecd74e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/af/e06aaecd74e70014115de2bb951f0adf
deleted file mode 100644
index a67f108..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/af/e06aaecd74e70014115de2bb951f0adf
+++ /dev/null
@@ -1,63 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.ItemRenderer;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.client.renderer.texture.TextureManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.World;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.util.Variables;
-
-public class CursePentagram extends Curse
-{
- ResourceLocation curse = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
- public CursePentagram(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- }
-
- public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
- {
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- Tessellator tessellator = Tessellator.instance;
- TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
- texturemanager.bindTexture(curse);
-// GL11.glScalef(0.1F, 0.1F, 0.1F);
- GL11.glTranslatef(1F, 2F, 1F);
- GL11.glRotatef(90F, 1F, 0F, 0F);
- float f = 0.00390625F;
- float f1 = 0.00390625F;
- int x = 0;
- int y = 0;
- int u = 0;
- int v = 0;
- int width = 32;
- int height = 32;
- tessellator.startDrawingQuads();
- tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
- tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
- tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
- tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
- tessellator.draw();
- GL11.glPopMatrix();
- }
-
- public String getDescription()
- {
- return "The Dark Lord has misterious ways of showing you his love.";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/000c08e404e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/000c08e404e50014174fe663e69b8422
deleted file mode 100644
index c4c5777..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/000c08e404e50014174fe663e69b8422
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
-// System.out.println(Block.getBlockFromItem(item.getItem()) + " " + item.getIconIndex());
- if (item != null)return item.getIconIndex();
- else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/80218fae95ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/80218fae95ea001411cee0f8f86532a4
new file mode 100644
index 0000000..cc1914d
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/80218fae95ea001411cee0f8f86532a4
@@ -0,0 +1,113 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
+ float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
+ float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ GL11.glRotatef(yawOffset, 0, -1, 0);
+ GL11.glRotatef(yaw - 90, 0, 1, 0);
+ GL11.glRotatef(pitch, 0, 0, -1);
+ GL11.glRotatef(90F, 0, 1F, 0F);
+ RenderHelper.translateToHeadLevel(player);
+ GL11.glScalef(0.07f, 0.07f, 0.07f);
+ GL11.glTranslatef(0.0F, 3.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/90e8344505e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/90e8344505e50014174fe663e69b8422
deleted file mode 100644
index 9c2e86f..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/90e8344505e50014174fe663e69b8422
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
-// System.out.println(Block.getBlockFromItem(item.getItem()) + " " + item.getIconIndex());
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getIconIndex();
- else{
-// System.out.println(Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1));
- return Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1);
- }
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/90ee5d8397ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/90ee5d8397ea001411cee0f8f86532a4
new file mode 100644
index 0000000..5de5263
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/90ee5d8397ea001411cee0f8f86532a4
@@ -0,0 +1,66 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CursePentagram extends Curse
+{
+ float rot = 0F;
+
+ public CursePentagram(String name, int txtID, String pack)
+ {
+ super(name, txtID, pack);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ @Override
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+// GL11.glColor4f(1F, 1F, 1F, 0.3F);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "The Dark Lord has misterious ways of showing you his love.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/d0e487bc85ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/d0e487bc85ea001411cee0f8f86532a4
new file mode 100644
index 0000000..51e38e7
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b/d0e487bc85ea001411cee0f8f86532a4
@@ -0,0 +1,22 @@
+package darkknight.jewelrycraft.util;
+
+import net.minecraft.util.ResourceLocation;
+
+public class Variables
+{
+ public static final String MODID = "jewelrycraft2";
+ public static final String MODNAME = "Jewelrycraft 2";
+ public static final String VERSION = "1.0";
+ public static final String PACKET_CHANNEL = "jewelrycraft2";
+
+ public static final String CONFIG_GUI = "darkknight.jewelrycraft.config.ConfigGuiFactory";
+ public static final String CLIENT_PROXY = "darkknight.jewelrycraft.proxy.ClientProxy";
+ public static final String SERVER_PROXY = "darkknight.jewelrycraft.proxy.CommonProxy";
+
+ public static final int MAX_CURSES = 10;
+ public static final ResourceLocation PEDESTAL_TEXTURE = new ResourceLocation(Variables.MODID, "textures/tileentities/BricksPedestal.png");
+ public static final ResourceLocation SHADOW_HAND_TEXTURE = new ResourceLocation(Variables.MODID, "textures/tileentities/ShadowHand.png");
+// public static final ResourceLocation CURSES_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
+ public static final ResourceLocation VILLAGER_TEXTURE = new ResourceLocation(Variables.MODID, "textures/entities/jeweler.png");
+ public static final ResourceLocation MISC_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/hearts.png");
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b0/305eddda88ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b0/305eddda88ea001411cee0f8f86532a4
new file mode 100644
index 0000000..417a185
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b0/305eddda88ea001411cee0f8f86532a4
@@ -0,0 +1,63 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CursePentagram extends Curse
+{
+ float rot = 0F;
+
+ public CursePentagram(String name, int txtID, String pack)
+ {
+ super(name, txtID, pack);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ @Override
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Post event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, -15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "The Dark Lord has misterious ways of showing you his love.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b0/40ae81ce86ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b0/40ae81ce86ea001411cee0f8f86532a4
new file mode 100644
index 0000000..81474dc
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b0/40ae81ce86ea001411cee0f8f86532a4
@@ -0,0 +1,38 @@
+package darkknight.jewelrycraft.curses;
+
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CurseList
+{
+ public static Curse rotten;
+ public static Curse flaming;
+ public static Curse blind;
+ public static Curse greed;
+ public static Curse infamy;
+ public static Curse midasTouch;
+ public static Curse rabbitsPaw;
+ public static Curse pentagram;
+ public static Curse vampireHunger;
+ public static Curse humbleBundle;
+ public static Curse deathsTouch;
+ public static Curse antichrist;
+ public static Curse moneyEqualsPower;
+
+ public static void preInit(FMLPreInitializationEvent e)
+ {
+ rotten = new CurseRottenHeart(0, Variables.MODNAME + ":" + "Rotten Heart", 0, 0);
+ flaming = new CurseFlamingSoul(1, Variables.MODNAME + ":" + "Flaming Soul", 1, 0);
+ greed = new CurseGreed(2, Variables.MODNAME + ":" + "Greed", 2, 0);
+ blind = new CurseBlind(3, Variables.MODNAME + ":" + "Blind", 3, 0);
+ infamy = new CurseInfamy(4, Variables.MODNAME + ":" + "Infamy", 4, 0);
+ midasTouch = new CurseMidasTouch(5, Variables.MODNAME + ":" + "Midas Touch", 5, 0);
+ rabbitsPaw = new CurseRabbitsPaw(6, Variables.MODNAME + ":" + "Rabbit's Paw", 6, 0);
+ pentagram = new CursePentagram(7, Variables.MODNAME + ":" + "Pentagram", 7, 0);
+// vampireHunger = new CurseMidasTouch(8, Variables.MODNAME + ":" + "Vampire Hunger", 8, 0);
+// humbleBundle = new CurseMidasTouch(9, Variables.MODNAME + ":" + "Humble Bundle", 9, 0);
+// deathsTouch = new CurseMidasTouch(10, Variables.MODNAME + ":" + "Deaths Touch", 10, 0);
+// antichrist = new CurseMidasTouch(11, Variables.MODNAME + ":" + "Antichrist", 11, 0);
+// moneyEqualsPower = new CurseMidasTouch(12, Variables.MODNAME + ":" + "Money Equals Power", 12, 0);
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b0/c0347e0403e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b0/c0347e0403e50014174fe663e69b8422
deleted file mode 100644
index 6a6f566..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b0/c0347e0403e50014174fe663e69b8422
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
-// else return Block.getBlockFromItem(item.getItem()).getIcon(6, 6);
- }else return itemIcon;
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b1/e0e1250efde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b1/e0e1250efde40014174fe663e69b8422
deleted file mode 100644
index a499d75..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b1/e0e1250efde40014174fe663e69b8422
+++ /dev/null
@@ -1,46 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.StatCollector;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public abstract class ItemGoldifiedObject extends Item
-{
- public ItemGoldifiedObject()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- if (JewelryNBT.gem(stack) != null) return this.getIconIndex(JewelryNBT.gem(stack));
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return (StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b2/20cba1de86ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b2/20cba1de86ea001411cee0f8f86532a4
new file mode 100644
index 0000000..36d070d
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b2/20cba1de86ea001411cee0f8f86532a4
@@ -0,0 +1,30 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.world.World;
+
+public class CurseGreed extends Curse
+{
+ public CurseGreed(int id, String name, int txtID, int packID)
+ {
+ super(id, name, txtID, packID);
+ }
+
+ @Override
+ public void action(World world, EntityPlayer player)
+ {
+ }
+
+ @Override
+ public boolean itemToss()
+ {
+ return true;
+ }
+
+ public String getDescription()
+ {
+ return "You might need that later";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b2/a0f5943b87ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b2/a0f5943b87ea001411cee0f8f86532a4
new file mode 100644
index 0000000..452f586
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b2/a0f5943b87ea001411cee0f8f86532a4
@@ -0,0 +1,22 @@
+package darkknight.jewelrycraft.util;
+
+import net.minecraft.util.ResourceLocation;
+
+public class Variables
+{
+ public static final String MODID = "jewelrycraft2";
+ public static final String MODNAME = "Jewelrycraft 2";
+ public static final String VERSION = "1.0";
+ public static final String PACKET_CHANNEL = "jewelrycraft2";
+
+ public static final String CONFIG_GUI = "darkknight.jewelrycraft.config.ConfigGuiFactory";
+ public static final String CLIENT_PROXY = "darkknight.jewelrycraft.proxy.ClientProxy";
+ public static final String SERVER_PROXY = "darkknight.jewelrycraft.proxy.CommonProxy";
+
+ public static final int MAX_CURSES = 10;
+ public static final ResourceLocation PEDESTAL_TEXTURE = new ResourceLocation(Variables.MODID, "textures/tileentities/BricksPedestal.png");
+ public static final ResourceLocation SHADOW_HAND_TEXTURE = new ResourceLocation(Variables.MODID, "textures/tileentities/ShadowHand.png");
+ public static final ResourceLocation CURSES_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
+ public static final ResourceLocation VILLAGER_TEXTURE = new ResourceLocation(Variables.MODID, "textures/entities/jeweler.png");
+ public static final ResourceLocation MISC_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/hearts.png");
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b3/80253a9b9ce3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b3/80253a9b9ce3001412c4c4819c88e86b
deleted file mode 100644
index c0e1327..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b3/80253a9b9ce3001412c4c4819c88e86b
+++ /dev/null
@@ -1,33 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- EntityLiving target = ((EntityLiving)midas.target);
- target.hurtTime = 0;
- float yaw = target.prevRotationYawHead + (target.rotationYawHead - target.prevRotationYawHead);
- float yawOffset = target.prevRenderYawOffset + (target.renderYawOffset - target.prevRenderYawOffset);
- float pitch = target.prevRotationPitch + (target.rotationPitch - target.prevRotationPitch);
- GL11.glRotatef(yawOffset, 0, -1, 0);
-// GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glTranslatef(0.5F, 0.0F, 0.5F);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(target, midas.xCoord - RenderManager.instance.renderPosX, midas.yCoord - RenderManager.instance.renderPosY, midas.zCoord - RenderManager.instance.renderPosZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b3/d00f578784ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b3/d00f578784ea001411cee0f8f86532a4
new file mode 100644
index 0000000..0e95b8e
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b3/d00f578784ea001411cee0f8f86532a4
@@ -0,0 +1,20 @@
+package darkknight.jewelrycraft.util;
+
+import net.minecraft.util.ResourceLocation;
+
+public class Variables
+{
+ public static final String MODID = "jewelrycraft2";
+ public static final String MODNAME = "Jewelrycraft 2";
+ public static final String VERSION = "1.0";
+ public static final String PACKET_CHANNEL = "jewelrycraft2";
+
+ public static final String CONFIG_GUI = "darkknight.jewelrycraft.config.ConfigGuiFactory";
+ public static final String CLIENT_PROXY = "darkknight.jewelrycraft.proxy.ClientProxy";
+ public static final String SERVER_PROXY = "darkknight.jewelrycraft.proxy.CommonProxy";
+
+ public static final int MAX_CURSES = 10;
+ public static final ResourceLocation PEDESTAL_TEXTURE = new ResourceLocation(Variables.MODID, "textures/tileentities/BricksPedestal.png");
+ public static final ResourceLocation SHADOW_HAND_TEXTURE = new ResourceLocation(Variables.MODID, "textures/tileentities/ShadowHand.png");
+ public static final ResourceLocation CURSES_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b3/d0ac8fe598e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b3/d0ac8fe598e3001412c4c4819c88e86b
deleted file mode 100644
index 784d37e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b3/d0ac8fe598e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,27 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
-// System.out.println(midas.target.rotationYaw);
- GL11.glRotatef(midas.target.rotationYaw, 0.0F, 1.0F, 0.0F);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, midas.target.posX - RenderManager.instance.renderPosX, midas.target.posY - RenderManager.instance.renderPosY, midas.target.posZ - RenderManager.instance.renderPosZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b4/106c1b7185ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b4/106c1b7185ea001411cee0f8f86532a4
new file mode 100644
index 0000000..355cd8c
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b4/106c1b7185ea001411cee0f8f86532a4
@@ -0,0 +1,100 @@
+package darkknight.jewelrycraft.events;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.gui.GuiChat;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderGameOverlayEvent;
+import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.util.Variables;
+
+public class ScreenHandler extends Gui
+{
+ private Minecraft mc;
+ public static NBTTagCompound tagCache = null;
+ public static int cooldown;
+ static ResourceLocation texture;
+
+ public ScreenHandler(Minecraft mc, ResourceLocation tex)
+ {
+ super();
+ this.mc = mc;
+ texture = tex;
+ }
+
+ @SubscribeEvent
+ public void renderScreen(RenderGameOverlayEvent event)
+ {
+ if (event.isCancelable() || event.type != ElementType.ALL || tagCache == null) return;
+ if (!mc.gameSettings.showDebugInfo && !(mc.currentScreen instanceof GuiChat)){
+ int count = 0;
+ int size = 32;
+ ScaledResolution resolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
+ if (tagCache.hasKey("cursePoints") && tagCache.getInteger("cursePoints") > 0){
+ mc.renderEngine.bindTexture(Variables.HEARTS_TEXTURE);
+ for(Curse curse: Curse.getCurseList()){
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ drawTexturedModalRect(-16, -16 + (size - 6) * count, 0, 32, 144, 60);
+ count++;
+ }
+ }
+ mc.renderEngine.bindTexture(texture);
+ count = 0;
+ for(Curse curse: Curse.getCurseList())
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ int tag = curse.getID();
+ GL11.glPushMatrix();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glScalef(0.45f, 0.45f, 0.0f);
+ drawTexturedModalRect(28, 18 + (size + 26) * count, tag % size * size, tag / size * size, size, size);
+ GL11.glPopMatrix();
+ count++;
+ }
+ count = 0;
+ size = 16;
+ for(Curse curse: Curse.getCurseList())
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ int tag = curse.getID();
+ mc.fontRenderer.drawStringWithShadow(curse.getName().split(":")[1], 30, 11 + (size + 10) * count, 16777215);
+ if (tagCache.getInteger(curse.getName()) == 2){
+ mc.renderEngine.bindTexture(Variables.HEARTS_TEXTURE);
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GL11.glColor4f(1f, 1f, 1f, 0.5f);
+ drawTexturedModalRect(95, 7 + (size + 10) * count, 3 * size, 0, size, size);
+ GL11.glPopMatrix();
+ }
+ count++;
+ }
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1f, 1f, 1f, 1.0f);
+ mc.renderEngine.bindTexture(Variables.HEARTS_TEXTURE);
+ count = 0;
+ size = 16;
+ if (tagCache.getFloat("BlueHeart") > 0){
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 0 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlueHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
+ }
+ count++;
+ mc.renderEngine.bindTexture(Variables.HEARTS_TEXTURE);
+ if (tagCache.getFloat("BlackHeart") > 0){
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 1 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlackHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
+ }
+ count++;
+ mc.renderEngine.bindTexture(Variables.HEARTS_TEXTURE);
+ if (tagCache.getFloat("WhiteHeart") > 0)
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 2 * size, 1 * size, size, size);
+ GL11.glPopMatrix();
+ }
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b4/c067553a97e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b4/c067553a97e3001412c4c4819c88e86b
deleted file mode 100644
index 953b34c..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b4/c067553a97e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,75 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target.ySize);
- this.setBlockBounds(0F, 0F, 0F, 1F, ((TileEntityMidasTouch)tile).target.height, 1F);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b4/c0d7994c88ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b4/c0d7994c88ea001411cee0f8f86532a4
new file mode 100644
index 0000000..41ba443
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b4/c0d7994c88ea001411cee0f8f86532a4
@@ -0,0 +1,62 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CursePentagram extends Curse
+{
+ float rot = 0F;
+ public static final ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+
+ public CursePentagram(String name, int txtID, String pack)
+ {
+ super(name, txtID, pack);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "The Dark Lord has misterious ways of showing you his love.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b5/20d8e0a4b0ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b5/20d8e0a4b0ea001411cee0f8f86532a4
new file mode 100644
index 0000000..a0085f3
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b5/20d8e0a4b0ea001411cee0f8f86532a4
@@ -0,0 +1,76 @@
+package darkknight.jewelrycraft.block;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.oredict.OreDictionary;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.registry.GameRegistry;
+import darkknight.jewelrycraft.JewelrycraftMod;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.tileentity.TileEntityAltar;
+import darkknight.jewelrycraft.tileentity.TileEntityBlockShadow;
+import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
+import darkknight.jewelrycraft.tileentity.TileEntityHandPedestal;
+import darkknight.jewelrycraft.tileentity.TileEntityJewelrsCraftingTable;
+import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
+import darkknight.jewelrycraft.tileentity.TileEntityMolder;
+import darkknight.jewelrycraft.tileentity.TileEntityShadowEye;
+import darkknight.jewelrycraft.tileentity.TileEntityShadowHand;
+import darkknight.jewelrycraft.tileentity.TileEntitySmelter;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BlockList
+{
+ public static Block shadowOre, smelter, molder, displayer, jewelCraftingTable, shadowBlock, shadowEye, jewelAltar, handPedestal, shadowHand, midasTouchBlock;
+ public static BlockMoltenMetal moltenMetal;
+ public static Fluid moltenMetalFluid;
+ private static boolean isInitialized = false;
+
+ public static void preInit(FMLPreInitializationEvent e)
+ {
+ shadowOre = new BlockJCOre().setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockTextureName(Variables.MODID + ":oreShadow").setBlockName(Variables.MODID + ".oreShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ smelter = new BlockSmelter().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".smelter").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ molder = new BlockMolder(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".molder").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ displayer = new BlockDisplayer(Material.iron).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypeMetal).setBlockName(Variables.MODID + ".displayer").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ jewelCraftingTable = new BlockJewelrsCraftingTable(Material.rock).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".jewelCraftingTable").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ shadowBlock = new BlockShadow().setHardness(5.0F).setResistance(7.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":blockShadow").setBlockName(Variables.MODID + ".blockShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ jewelAltar = new BlockJewelAltar().setHardness(5.0F).setResistance(2.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":altar").setBlockName(Variables.MODID + ".altar").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ shadowEye = new BlockShadowEye().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowEye").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ handPedestal = new BlockHandPedestal(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".handPedestal").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ shadowHand = new BlockShadowHand(Material.rock).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowHand").setCreativeTab(JewelrycraftMod.jewelrycraft).setBlockUnbreakable();
+ midasTouchBlock = new BlockMidasTouch(Material.iron).setHardness(3.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setBlockName(Variables.MODID + ".midasTouchBlock");
+ moltenMetalFluid = new Fluid("metal.molten").setLuminosity(15).setDensity(3000).setTemperature(2000).setViscosity(6000);
+ if (!FluidRegistry.registerFluid(moltenMetalFluid)) moltenMetalFluid = FluidRegistry.getFluid("metal.molten");
+ moltenMetal = new BlockMoltenMetal(moltenMetalFluid, Material.lava);
+
+ GameRegistry.registerBlock(shadowOre, "shadowOre");
+ GameRegistry.registerBlock(shadowBlock, "shadowBlock");
+ GameRegistry.registerBlock(smelter, "Smelter");
+ GameRegistry.registerBlock(molder, "Molder");
+ GameRegistry.registerBlock(jewelCraftingTable, "jewelCraftingTable");
+ GameRegistry.registerBlock(displayer, "Displayer");
+ GameRegistry.registerBlock(jewelAltar, "Altar");
+ GameRegistry.registerBlock(shadowEye, "Shadow Eye");
+ GameRegistry.registerBlock(handPedestal, "Stone Bricks Pedestal");
+ GameRegistry.registerBlock(shadowHand, "Shadow Hand");
+ GameRegistry.registerBlock(midasTouchBlock, "Midas Touch Block");
+ GameRegistry.registerBlock(moltenMetal, "moltenMetalLiquid");
+
+ GameRegistry.registerTileEntity(TileEntitySmelter.class, Variables.MODID + ":smelter");
+ GameRegistry.registerTileEntity(TileEntityMolder.class, Variables.MODID + ":molder");
+ GameRegistry.registerTileEntity(TileEntityJewelrsCraftingTable.class, Variables.MODID + ":table");
+ GameRegistry.registerTileEntity(TileEntityDisplayer.class, Variables.MODID + ":displayer");
+ GameRegistry.registerTileEntity(TileEntityBlockShadow.class, Variables.MODID + ":blockShadow");
+ GameRegistry.registerTileEntity(TileEntityAltar.class, Variables.MODID + ":altar");
+ GameRegistry.registerTileEntity(TileEntityShadowEye.class, Variables.MODID + ":shadowEye");
+ GameRegistry.registerTileEntity(TileEntityHandPedestal.class, Variables.MODID + ":handPedestal");
+ GameRegistry.registerTileEntity(TileEntityShadowHand.class, Variables.MODID + ":shadowHand");
+ GameRegistry.registerTileEntity(TileEntityMidasTouch.class, Variables.MODID + ":midsaTouch");
+
+ OreDictionary.registerOre("ingotShadow", new ItemStack(ItemList.shadowIngot));
+ OreDictionary.registerOre("oreShadow", new ItemStack(BlockList.shadowOre));
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b5/a02d9af974e300141084bb8bfb075c08 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b5/a02d9af974e300141084bb8bfb075c08
deleted file mode 100644
index ed9e210..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b5/a02d9af974e300141084bb8bfb075c08
+++ /dev/null
@@ -1,37 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.monster.EntityMob;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart)){
- world.setBlock((int)target.posX, (int)target.posY, (int)target.posZ, BlockList.midasTouchBlock, 0, 2);
- TileEntity midasTouchVictim = new TileEntityMidasTouch(target);
- world.setTileEntity((int)target.posX, (int)target.posY, (int)target.posZ, midasTouchVictim);
-// target.setDead();
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b6/50e569a4aeea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b6/50e569a4aeea001411cee0f8f86532a4
new file mode 100644
index 0000000..47b4170
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b6/50e569a4aeea001411cee0f8f86532a4
@@ -0,0 +1,24 @@
+package darkknight.jewelrycraft.network;
+
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.JewelrycraftMod;
+import darkknight.jewelrycraft.util.Variables;
+
+public class PacketHandler
+{
+
+ public void preInit(FMLPreInitializationEvent e)
+ {
+ JewelrycraftMod.netWrapper = NetworkRegistry.INSTANCE.newSimpleChannel(Variables.MODID);
+ JewelrycraftMod.netWrapper.registerMessage(PacketRequestLiquidData.class, PacketRequestLiquidData.class, 0, Side.SERVER);
+ JewelrycraftMod.netWrapper.registerMessage(PacketSendLiquidData.class, PacketSendLiquidData.class, 1, Side.CLIENT);
+ JewelrycraftMod.netWrapper.registerMessage(PacketClearColorCache.class, PacketClearColorCache.class, 2, Side.CLIENT);
+ JewelrycraftMod.netWrapper.registerMessage(PacketKeyPressEvent.class, PacketKeyPressEvent.class, 3, Side.SERVER);
+ JewelrycraftMod.netWrapper.registerMessage(PacketRequestPlayerInfo.class, PacketRequestPlayerInfo.class, 4, Side.SERVER);
+ JewelrycraftMod.netWrapper.registerMessage(PacketSendClientPlayerInfo.class, PacketSendClientPlayerInfo.class, 5, Side.CLIENT);
+ JewelrycraftMod.netWrapper.registerMessage(PacketSendServerPlayersInfo.class, PacketSendServerPlayersInfo.class, 6, Side.CLIENT);
+ JewelrycraftMod.netWrapper.registerMessage(PacketRequestSetSlot.class, PacketRequestSetSlot.class, 7, Side.SERVER);
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b6/602b567104e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b6/602b567104e50014174fe663e69b8422
deleted file mode 100644
index 302a721..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b6/602b567104e50014174fe663e69b8422
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
-// System.out.println(item.getItem().getIconIndex(JewelryNBT.item(stack)));
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else{
-// System.out.println(Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1));
- return Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1);
- }
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b7/701f73bd96ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b7/701f73bd96ea001411cee0f8f86532a4
new file mode 100644
index 0000000..21d6c9d
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b7/701f73bd96ea001411cee0f8f86532a4
@@ -0,0 +1,115 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glColor3f(0F, 1F, 1F);
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b7/70fcef5db0ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b7/70fcef5db0ea001411cee0f8f86532a4
new file mode 100644
index 0000000..f8b75f7
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b7/70fcef5db0ea001411cee0f8f86532a4
@@ -0,0 +1,12 @@
+/**
+ *
+ */
+package darkknight.jewelrycraft.worldGen.village;
+
+/**
+ * @author Sorin
+ *
+ */
+public class VillageHandler
+{
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b7/e0b972a8fce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b7/e0b972a8fce40014174fe663e69b8422
deleted file mode 100644
index a781774..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b7/e0b972a8fce40014174fe663e69b8422
+++ /dev/null
@@ -1,67 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import javax.imageio.ImageIO;
-import net.minecraft.block.Block;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.texture.TextureManager;
-import net.minecraft.client.resources.IResourceManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.StatCollector;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.effects.ModifierEffects;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public abstract class ItemGoldifiedObject extends Item
-{
- public ItemGoldifiedObject()
- {
- }
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- if (JewelryNBT.gem(stack) != null) return this.getIconIndex(JewelryNBT.gem(stack));
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return (StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
-
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b8/e0ea3a7199ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b8/e0ea3a7199ea001411cee0f8f86532a4
new file mode 100644
index 0000000..f46bf69
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b8/e0ea3a7199ea001411cee0f8f86532a4
@@ -0,0 +1,128 @@
+package darkknight.jewelrycraft.curses;
+
+import java.util.ArrayList;
+import java.util.Random;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+
+public class Curse
+{
+ protected int textureID;
+ protected String name, description, texturePackName;
+ protected Random rand = new Random();
+ private static ArrayList<Curse> curses = new ArrayList<Curse>();
+ public static ArrayList<Curse> availableCurses = new ArrayList<Curse>();
+
+ /**
+ * @param id the ID of the curse
+ * @param name the name of the curse
+ * @param texturepack the ID of the pack the texture is located in
+ */
+ protected Curse(String name, int txtID, String texturepack)
+ {
+ this.name = name;
+ this.texturePackName = texturepack;
+ this.textureID = txtID;
+ curses.add(this);
+ availableCurses.add(this);
+ }
+
+ /**
+ * @return the name of the curse
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * @return the description of the curse
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public Curse setDescription(String desc)
+ {
+ description = desc;
+ return this;
+ }
+
+ /**
+ * @return the texture pack ID
+ */
+ public String getTexturePack()
+ {
+ return texturePackName;
+ }
+
+ /**
+ * @return the texture ID
+ */
+ public int getTextureID()
+ {
+ return textureID;
+ }
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void action(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void playerDeathAction(World world, EntityPlayer player)
+ {}
+
+ public void entityDeathAction(World world, EntityLivingBase target, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void respawnAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ public void entityDropItems(EntityPlayer player, Entity target, ArrayList<EntityItem> drops)
+ {}
+
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {}
+
+ public boolean itemToss()
+ {
+ return false;
+ }
+
+ /**
+ * @return
+ */
+ public static ArrayList<Curse> getCurseList()
+ {
+ return curses;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b9/003e90f5fce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b9/003e90f5fce40014174fe663e69b8422
deleted file mode 100644
index 3293158..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b9/003e90f5fce40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static Item goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/43/30263c9474e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b9/20cdd23d86ea001411cee0f8f86532a4
index 8251ee5..b5cba7c 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/43/30263c9474e70014115de2bb951f0adf
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b9/20cdd23d86ea001411cee0f8f86532a4
@@ -1,24 +1,19 @@
package darkknight.jewelrycraft.curses;
import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderPlayerEvent;
import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.item.render.MaskRender;
import darkknight.jewelrycraft.util.Variables;
public class CursePentagram extends Curse
{
- ResourceLocation curse = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
+ float rot = 0F;
+
public CursePentagram(int id, String name, int text)
{
super(id, name, text);
@@ -26,8 +21,7 @@ public class CursePentagram extends Curse
@Override
public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- }
+ {}
public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
{
@@ -35,12 +29,18 @@ public class CursePentagram extends Curse
GL11.glColor4f(1, 1, 1, 1);
Tessellator tessellator = Tessellator.instance;
TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
- texturemanager.bindTexture(curse);
+ texturemanager.bindTexture(Variables.CURSES_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
float f = 0.00390625F;
float f1 = 0.00390625F;
int x = 0;
int y = 0;
- int u = 0;
+ int u = 32 * 7;
int v = 0;
int width = 32;
int height = 32;
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b9/4057874afde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b9/4057874afde40014174fe663e69b8422
deleted file mode 100644
index d17def9..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b9/4057874afde40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- public static Item goldifiedObject;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldObject().setUnlocalizedName(Variables.MODID + ".goldObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b9/60396614fde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b9/60396614fde40014174fe663e69b8422
deleted file mode 100644
index 3293158..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b9/60396614fde40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static Item goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b9/706877bc92e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b9/706877bc92e3001417b2e384bf7c3702
deleted file mode 100644
index 79a0c23..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/b9/706877bc92e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,27 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
-// RenderManager.instance.renderEntityWithPosYaw(midas.target, 2D, 0D, 0D, 1F, 1F);
- RenderManager.instance.getEntityRenderObject(midas.target).doRender(midas.target, midas.target.posX - RenderManager.instance.renderPosX, midas.target.posY - RenderManager.instance.renderPosY, midas.target.posZ - RenderManager.instance.renderPosZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bb/10dd91b3fce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bb/10dd91b3fce40014174fe663e69b8422
deleted file mode 100644
index 62c96d7..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bb/10dd91b3fce40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static ItemGoldifiedObject goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = (ItemGoldifiedObject)new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bb/a064cf8efee40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bb/a064cf8efee40014174fe663e69b8422
deleted file mode 100644
index 7b48afc..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bb/a064cf8efee40014174fe663e69b8422
+++ /dev/null
@@ -1,48 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.item.ItemList;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && player.inventory.getCurrentItem() == null){
- world.setBlock(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), BlockList.midasTouchBlock, 0, 2);
- TileEntityMidasTouch midasTouchVictim = new TileEntityMidasTouch();
- midasTouchVictim.setEntity(target);
- world.setTileEntity(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), midasTouchVictim);
- target.setDead();
- }
- }
-
- @Override
- public void action(World world, EntityPlayer player)
- {
- if(player.inventory.getCurrentItem() != null){
- int index = player.inventory.currentItem;
- ItemStack item = player.inventory.getCurrentItem();
- player.inventory.setInventorySlotContents(index, new ItemStack(ItemList.goldObj, item.stackSize, item.getItemDamage()));
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bc/30816beb3de700141e05cdbaeb682437 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bc/30816beb3de700141e05cdbaeb682437
deleted file mode 100644
index 3ff5ed4..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bc/30816beb3de700141e05cdbaeb682437
+++ /dev/null
@@ -1,122 +0,0 @@
-package darkknight.jewelrycraft.events;
-
-import java.util.Iterator;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import darkknight.jewelrycraft.entities.renders.RenderHelper;
-import darkknight.jewelrycraft.item.render.BraceletRender;
-import darkknight.jewelrycraft.item.render.EarringsRender;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.model.ModelBracelet;
-import darkknight.jewelrycraft.util.JewelryNBT;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
-
-public class PlayerRenderHandler
-{
- MaskRender mask = new MaskRender();
- EarringsRender earrings = new EarringsRender();
- BraceletRender bracelet = new BraceletRender();
- public static String[] infamyCache = new String[]{};
-
- @SubscribeEvent
- public void renderScreen(RenderPlayerEvent.Specials.Post event)
- {
- ModelBiped main = event.renderer.modelBipedMain;
- Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
- if (infamyCache != null){
- while (players.hasNext()){
- EntityPlayer player = players.next();
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(1.6f, 1.6f, 1.6f);
- GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- GL11.glPopMatrix();
- }
- if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(0.07f, 0.07f, 0.07f);
- GL11.glTranslatef(0.0F, 3.0F, -2.0F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- earrings.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- GL11.glPopMatrix();
- }
- for(int i = 10; i <= 13; i++)
- if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
- if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
- if (i / 12 == 1){
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
- }else{
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- }
- GL11.glPopMatrix();
- }
- }
- }
- }
-
- /**
- * @param string
- * @return
- */
- private boolean checkPlayerInfamy(String string)
- {
- for(int i = 0; i < infamyCache.length; i++)
- if (infamyCache[i].equals(string)) return true;
- return false;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bc/8027385d97ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bc/8027385d97ea001411cee0f8f86532a4
new file mode 100644
index 0000000..f7a557c
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bc/8027385d97ea001411cee0f8f86532a4
@@ -0,0 +1,66 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CursePentagram extends Curse
+{
+ float rot = 0F;
+
+ public CursePentagram(String name, int txtID, String pack)
+ {
+ super(name, txtID, pack);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ @Override
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ GL11.glColor4f(1F, 1F, 1F, 0.3F);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "The Dark Lord has misterious ways of showing you his love.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bc/a042836db0ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bc/a042836db0ea001411cee0f8f86532a4
new file mode 100644
index 0000000..e92f0a4
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bc/a042836db0ea001411cee0f8f86532a4
@@ -0,0 +1,27 @@
+/**
+ *
+ */
+package darkknight.jewelrycraft.worldGen.village;
+
+import java.io.IOException;
+import net.minecraft.world.gen.structure.MapGenStructureIO;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+import darkknight.jewelrycraft.JewelrycraftMod;
+import darkknight.jewelrycraft.util.Variables;
+
+public class VillageHandler
+{
+ public void preInit(FMLPreInitializationEvent e) throws IOException
+ {
+ VillagerRegistry.instance().registerVillagerId(3000);
+ VillagerRegistry.instance().registerVillageTradeHandler(3000, new JCTrades());
+ VillagerRegistry.instance().registerVillageCreationHandler(new VillageJewelryHandler());
+ try{
+ MapGenStructureIO.func_143031_a(ComponentJewelry.class, Variables.MODID + ":Jewelry");
+ }
+ catch(Throwable e2){
+ JewelrycraftMod.logger.severe("Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.7.10");
+ }
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bf/208d91aafae40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bf/208d91aafae40014174fe663e69b8422
deleted file mode 100644
index 78287bf..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/bf/208d91aafae40014174fe663e69b8422
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-/**
- * @author Sorin
- *
- */
-public class ItemGoldifiedObject
-{
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c/70125005fde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c/70125005fde40014174fe663e69b8422
deleted file mode 100644
index e497953..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c/70125005fde40014174fe663e69b8422
+++ /dev/null
@@ -1,46 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.StatCollector;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public abstract class ItemGoldifiedObject extends Item
-{
- public ItemGoldifiedObject()
- {}
-
-// public boolean requiresMultipleRenderPasses()
-// {
-// return true;
-// }
-//
-// @SideOnly (Side.CLIENT)
-// public int getColorFromItemStack(ItemStack stack, int pass)
-// {
-// return 0xffff00;
-// }
-//
-// @Override
-// public IIcon getIcon(ItemStack stack, int pass)
-// {
-// if (JewelryNBT.gem(stack) != null) return this.getIconIndex(JewelryNBT.gem(stack));
-// return itemIcon;
-// }
-//
-// public String getItemStackDisplayName(ItemStack stack)
-// {
-// return (StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
-// }
-//
-// public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
-// {
-// if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
-// }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c/e08d97b398ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c/e08d97b398ea001411cee0f8f86532a4
new file mode 100644
index 0000000..e695204
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c/e08d97b398ea001411cee0f8f86532a4
@@ -0,0 +1,140 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+ float rot = 0F;
+
+ @SubscribeEvent
+ public void renderHand(RenderHandEvent event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-1F, -1F, -1F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c0/804ee2aa87ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c0/804ee2aa87ea001411cee0f8f86532a4
new file mode 100644
index 0000000..1332aaf
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c0/804ee2aa87ea001411cee0f8f86532a4
@@ -0,0 +1,62 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CursePentagram extends Curse
+{
+ float rot = 0F;
+ public static final ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+
+ public CursePentagram(String name, int txtID, String pack)
+ {
+ super(name, txtID, pack);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(Variables.CURSES_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "The Dark Lord has misterious ways of showing you his love.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c0/902e10a698e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c0/902e10a698e3001412c4c4819c88e86b
deleted file mode 100644
index a58d4e1..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c0/902e10a698e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,26 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
-// GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, midas.target.posX - RenderManager.instance.renderPosX, midas.target.posY - RenderManager.instance.renderPosY, midas.target.posZ - RenderManager.instance.renderPosZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c0/a02202f990e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c0/a02202f990e3001417b2e384bf7c3702
deleted file mode 100644
index cd64227..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c0/a02202f990e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,25 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glColor3f(1F, 0.0F, 1.0F);
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- RenderManager.instance.renderEntityStatic(midas.target, 1F, false);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c1/000e0f74fde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c1/000e0f74fde40014174fe663e69b8422
deleted file mode 100644
index 72283da..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c1/000e0f74fde40014174fe663e69b8422
+++ /dev/null
@@ -1,79 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidRegistry;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.tileentity.TileEntityAltar;
-import darkknight.jewelrycraft.tileentity.TileEntityBlockShadow;
-import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
-import darkknight.jewelrycraft.tileentity.TileEntityHandPedestal;
-import darkknight.jewelrycraft.tileentity.TileEntityJewelrsCraftingTable;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-import darkknight.jewelrycraft.tileentity.TileEntityMolder;
-import darkknight.jewelrycraft.tileentity.TileEntityShadowEye;
-import darkknight.jewelrycraft.tileentity.TileEntityShadowHand;
-import darkknight.jewelrycraft.tileentity.TileEntitySmelter;
-import darkknight.jewelrycraft.util.Variables;
-
-public class BlockList
-{
- public static Block shadowOre, smelter, molder, displayer, jewelCraftingTable, shadowBlock, shadowEye, jewelAltar, handPedestal, shadowHand, midasTouchBlock, bloi;
- public static BlockMoltenMetal moltenMetal;
- public static Fluid moltenMetalFluid;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- shadowOre = new BlockJCOre().setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockTextureName(Variables.MODID + ":oreShadow").setBlockName(Variables.MODID + ".oreShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- smelter = new BlockSmelter().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".smelter").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molder = new BlockMolder(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".molder").setCreativeTab(JewelrycraftMod.jewelrycraft);
- displayer = new BlockDisplayer(Material.iron).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypeMetal).setBlockName(Variables.MODID + ".displayer").setCreativeTab(JewelrycraftMod.jewelrycraft);
- jewelCraftingTable = new BlockJewelrsCraftingTable(Material.rock).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".jewelCraftingTable").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowBlock = new BlockShadow().setHardness(5.0F).setResistance(7.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":blockShadow").setBlockName(Variables.MODID + ".blockShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- jewelAltar = new BlockJewelAltar().setHardness(5.0F).setResistance(2.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":altar").setBlockName(Variables.MODID + ".altar").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowEye = new BlockShadowEye().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowEye").setCreativeTab(JewelrycraftMod.jewelrycraft);
- handPedestal = new BlockHandPedestal(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".handPedestal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowHand = new BlockShadowHand(Material.rock).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowHand").setCreativeTab(JewelrycraftMod.jewelrycraft).setBlockUnbreakable();
- midasTouchBlock = new BlockMidasTouch(Material.iron).setHardness(3.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setBlockName(Variables.MODID + ".midasTouchBlock");
- bloi = new Block(Material.iron).setHardness(3.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setBlockName(Variables.MODID + ".midasTouchBlock");
-
-
- GameRegistry.registerBlock(shadowOre, "shadowOre");
- GameRegistry.registerBlock(shadowBlock, "shadowBlock");
- GameRegistry.registerBlock(smelter, "Smelter");
- GameRegistry.registerBlock(molder, "Molder");
- GameRegistry.registerBlock(jewelCraftingTable, "jewelCraftingTable");
- GameRegistry.registerBlock(displayer, "Displayer");
- GameRegistry.registerBlock(jewelAltar, "Altar");
- GameRegistry.registerBlock(shadowEye, "Shadow Eye");
- GameRegistry.registerBlock(handPedestal, "Stone Bricks Pedestal");
- GameRegistry.registerBlock(shadowHand, "Shadow Hand");
- GameRegistry.registerBlock(midasTouchBlock, "Midas Touch Block");
-
- GameRegistry.registerTileEntity(TileEntitySmelter.class, Variables.MODID + ":smelter");
- GameRegistry.registerTileEntity(TileEntityMolder.class, Variables.MODID + ":molder");
- GameRegistry.registerTileEntity(TileEntityJewelrsCraftingTable.class, Variables.MODID + ":table");
- GameRegistry.registerTileEntity(TileEntityDisplayer.class, Variables.MODID + ":displayer");
- GameRegistry.registerTileEntity(TileEntityBlockShadow.class, Variables.MODID + ":blockShadow");
- GameRegistry.registerTileEntity(TileEntityAltar.class, Variables.MODID + ":altar");
- GameRegistry.registerTileEntity(TileEntityShadowEye.class, Variables.MODID + ":shadowEye");
- GameRegistry.registerTileEntity(TileEntityHandPedestal.class, Variables.MODID + ":handPedestal");
- GameRegistry.registerTileEntity(TileEntityShadowHand.class, Variables.MODID + ":shadowHand");
- GameRegistry.registerTileEntity(TileEntityMidasTouch.class, Variables.MODID + ":midsaTouch");
-
- moltenMetalFluid = new Fluid("metal.molten").setLuminosity(15).setDensity(3000).setTemperature(2000).setViscosity(6000);
- if (!FluidRegistry.registerFluid(moltenMetalFluid)) moltenMetalFluid = FluidRegistry.getFluid("metal.molten");
- moltenMetal = new BlockMoltenMetal(moltenMetalFluid, Material.lava);
- GameRegistry.registerBlock(moltenMetal, "moltenMetalLiquid");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c1/f04127e586ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c1/f04127e586ea001411cee0f8f86532a4
new file mode 100644
index 0000000..12cab58
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c1/f04127e586ea001411cee0f8f86532a4
@@ -0,0 +1,25 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.world.World;
+
+public class CurseRottenHeart extends Curse
+{
+ public CurseRottenHeart(int id, String name, int txtID, int packID)
+ {
+ super(id, name, txtID, packID);
+ }
+
+ @Override
+ public void action(World world, EntityPlayer player)
+ {
+ if (!player.isPotionActive(Potion.poison) || player.getActivePotionEffect(Potion.poison).getDuration() < 30) player.addPotionEffect(new PotionEffect(Potion.poison.id, 80));
+ }
+
+ public String getDescription()
+ {
+ return "Your heart slowly rots inside";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c2/a0107643fce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c2/a0107643fce40014174fe663e69b8422
deleted file mode 100644
index 49637bd..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c2/a0107643fce40014174fe663e69b8422
+++ /dev/null
@@ -1,67 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import javax.imageio.ImageIO;
-import net.minecraft.block.Block;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.texture.TextureManager;
-import net.minecraft.client.resources.IResourceManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.StatCollector;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.effects.ModifierEffects;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public abstract class ItemGoldifiedObject
-{
- public ItemGoldifiedObject()
- {
- }
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- if (JewelryNBT.gem(stack) != null) return this.getIconIndex(JewelryNBT.gem(stack));
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return (StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
-
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c3/30c6932ffde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c3/30c6932ffde40014174fe663e69b8422
deleted file mode 100644
index 07bb2b6..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c3/30c6932ffde40014174fe663e69b8422
+++ /dev/null
@@ -1,46 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.StatCollector;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public abstract class ItemGoldObject extends Item
-{
- public ItemGoldifiedObject()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- if (JewelryNBT.gem(stack) != null) return this.getIconIndex(JewelryNBT.gem(stack));
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return (StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c4/10491e1095e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c4/10491e1095e3001412c4c4819c88e86b
deleted file mode 100644
index b23d77d..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c4/10491e1095e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,74 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
- TileEntity tile = world.getTileEntity(x, y, z);
- if(((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target.boundingBox.calculateXOffset(((TileEntityMidasTouch)tile).target.boundingBox, 0f));
- this.setBlockBounds((float)((TileEntityMidasTouch)tile).target.boundingBox.minX, (float)((TileEntityMidasTouch)tile).target.boundingBox.minY, (float)((TileEntityMidasTouch)tile).target.boundingBox.minZ, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxX, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxY, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxZ);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c4/40aec02197e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c4/40aec02197e3001412c4c4819c88e86b
deleted file mode 100644
index 833c904..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c4/40aec02197e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,75 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target.myEntitySize);
- this.setBlockBounds(0F, 0F, 0F, 1F, ((TileEntityMidasTouch)tile).target.height, 1F);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c4/701ec417b0ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c4/701ec417b0ea001411cee0f8f86532a4
new file mode 100644
index 0000000..ce591c4
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c4/701ec417b0ea001411cee0f8f86532a4
@@ -0,0 +1,52 @@
+/**
+ *
+ */
+package darkknight.jewelrycraft.events;
+
+import net.minecraftforge.common.MinecraftForge;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.client.gui.GuiHandler;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.damage.DamageSourceList;
+import darkknight.jewelrycraft.effects.EffectsList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.Variables;
+import darkknight.jewelrycraft.worldGen.Generation;
+
+public class EventList
+{
+ public static void preInit(FMLPreInitializationEvent e)
+ {
+ MinecraftForge.EVENT_BUS.register(new EntityEventHandler());
+ MinecraftForge.EVENT_BUS.register(new BlockEventHandler());
+ MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
+ FMLCommonHandler.instance().bus().register(new EventCommonHandler());
+ BucketHandler.INSTANCE.buckets.put(BlockList.moltenMetal, ItemList.bucket);
+ }
+
+ public static void init(FMLInitializationEvent e)
+ {
+ GameRegistry.registerWorldGenerator(new Generation(), 0);
+ if (FMLCommonHandler.instance().getSide() == Side.CLIENT) FMLCommonHandler.instance().bus().register(new KeyBindings());
+ new GuiHandler();
+ FMLCommonHandler.instance().bus().register(ConfigHandler.INSTANCE);
+ }
+
+ public static void postInit(FMLPostInitializationEvent e)
+ {
+ JewelrycraftUtil.addMetals();
+ JewelrycraftUtil.jamcrafters();
+ EffectsList.postInit(e);
+ DamageSourceList.postInit(e);
+ proxy.postInit();
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c4/d0a333fafbe40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c4/d0a333fafbe40014174fe663e69b8422
deleted file mode 100644
index a72948e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c4/d0a333fafbe40014174fe663e69b8422
+++ /dev/null
@@ -1,64 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.*;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static ItemGoldifiedObject goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c6/90bc489493e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c6/90bc489493e3001412c4c4819c88e86b
deleted file mode 100644
index c6df60c..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c6/90bc489493e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,81 +0,0 @@
-package darkknight.jewelrycraft.tileentity;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.NetworkManager;
-import net.minecraft.network.Packet;
-import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
-import net.minecraft.tileentity.TileEntity;
-
-public class TileEntityMidasTouch extends TileEntity
-{
- public Entity target;
-
- public TileEntityMidasTouch()
- {}
-
- public void setEntity(Entity ent)
- {
- target = ent;
- }
-
- @Override
- public void writeToNBT(NBTTagCompound nbt)
- {
- super.writeToNBT(nbt);
- if (target != null){
- int id = EntityList.getEntityID(target);
- NBTTagCompound tag = new NBTTagCompound();
- target.writeToNBT(tag);
- nbt.setInteger("entityID", id);
- nbt.setTag("entity", tag);
- }
- }
-
- /**
- * @param nbt
- */
- @Override
- public void readFromNBT(NBTTagCompound nbt)
- {
- super.readFromNBT(nbt);
- NBTTagCompound en = (NBTTagCompound)nbt.getTag("entity");
- int entityID = nbt.getInteger("entityID");
- EntityLivingBase entity = (EntityLivingBase)EntityList.createEntityByID(entityID, worldObj);
- entity.readFromNBT(en);
- target = entity;
- }
-
- /**
- *
- */
- @Override
- public void updateEntity()
- {
- super.updateEntity();
- }
-
- /**
- * @return
- */
- @Override
- public Packet getDescriptionPacket()
- {
- NBTTagCompound nbttagcompound = new NBTTagCompound();
- writeToNBT(nbttagcompound);
- return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbttagcompound);
- }
-
- /**
- * @param net
- * @param packet
- */
- @Override
- public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet)
- {
- readFromNBT(packet.func_148857_g());
- worldObj.func_147479_m(xCoord, yCoord, zCoord);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c8/40c3ebde71e300141084bb8bfb075c08 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c8/40c3ebde71e300141084bb8bfb075c08
deleted file mode 100644
index 89a05e0..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c8/40c3ebde71e300141084bb8bfb075c08
+++ /dev/null
@@ -1,38 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.SharedMonsterAttributes;
-import net.minecraft.entity.monster.EntityMob;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.damage.DamageSourceList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.util.JewelrycraftUtil;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && !(target instanceof EntityMob) && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart)){
- target.setDead();
- world.setBlock(target.posX, target.posY, target.posZ, BlockList.midasTouchBlock, 0, 2);
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/0091fdd79ce3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/0091fdd79ce3001412c4c4819c88e86b
deleted file mode 100644
index 81589a5..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/0091fdd79ce3001412c4c4819c88e86b
+++ /dev/null
@@ -1,96 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.ArrayList;
-import java.util.Random;
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-import darkknight.jewelrycraft.tileentity.TileEntityMolder;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 0;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- @Override
- public void breakBlock(World world, int i, int j, int k, Block par5, int par6)
- {
- TileEntityMidasTouch te = (TileEntityMidasTouch)world.getTileEntity(i, j, k);
- if (te.target != null) dropItem(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, new ItemStack(Items.gold_nugget, (int)(te.target.width * te.target.height * 100), 0));
-// world.removeTileEntity(i, j, k);
- System.out.println("drop");
- super.breakBlock(world, i, j, k, par5, par6);
- }
-
- public void dropItem(World world, double x, double y, double z, ItemStack stack)
- {
- EntityItem entityitem = new EntityItem(world, x + 0.5D, y + 0.5D, z + 0.5D, stack);
- entityitem.motionX = 0;
- entityitem.motionZ = 0;
- entityitem.motionY = 0.11000000298023224D;
- world.spawnEntityInWorld(entityitem);
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null) this.setBlockBounds(0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0F, 0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2, ((TileEntityMidasTouch)tile).target.height, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2);
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/1032154385ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/1032154385ea001411cee0f8f86532a4
new file mode 100644
index 0000000..214125e
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/1032154385ea001411cee0f8f86532a4
@@ -0,0 +1,100 @@
+package darkknight.jewelrycraft.events;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.gui.GuiChat;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderGameOverlayEvent;
+import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.util.Variables;
+
+public class ScreenHandler extends Gui
+{
+ private Minecraft mc;
+ public static NBTTagCompound tagCache = null;
+ public static int cooldown;
+ static ResourceLocation texture;
+
+ public ScreenHandler(Minecraft mc, ResourceLocation tex)
+ {
+ super();
+ this.mc = mc;
+ texture = tex;
+ }
+
+ @SubscribeEvent
+ public void renderScreen(RenderGameOverlayEvent event)
+ {
+ if (event.isCancelable() || event.type != ElementType.ALL || tagCache == null) return;
+ if (!mc.gameSettings.showDebugInfo && !(mc.currentScreen instanceof GuiChat)){
+ int count = 0;
+ int size = 32;
+ ScaledResolution resolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
+ if (tagCache.hasKey("cursePoints") && tagCache.getInteger("cursePoints") > 0){
+ mc.renderEngine.bindTexture(Variables.HEARTS_TEXTURE);
+ for(Curse curse: Curse.getCurseList()){
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ drawTexturedModalRect(-16, -16 + (size - 6) * count, 0, 32, 144, 60);
+ count++;
+ }
+ }
+ mc.renderEngine.bindTexture(texture);
+ count = 0;
+ for(Curse curse: Curse.getCurseList())
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ int tag = curse.getID();
+ GL11.glPushMatrix();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glScalef(0.45f, 0.45f, 0.0f);
+ drawTexturedModalRect(28, 18 + (size + 26) * count, tag % size * size, tag / size * size, size, size);
+ GL11.glPopMatrix();
+ count++;
+ }
+ count = 0;
+ size = 16;
+ for(Curse curse: Curse.getCurseList())
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ int tag = curse.getID();
+ mc.fontRenderer.drawStringWithShadow(curse.getName().split(":")[1], 30, 11 + (size + 10) * count, 16777215);
+ if (tagCache.getInteger(curse.getName()) == 2){
+ mc.renderEngine.bindTexture(hearts);
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GL11.glColor4f(1f, 1f, 1f, 0.5f);
+ drawTexturedModalRect(95, 7 + (size + 10) * count, 3 * size, 0, size, size);
+ GL11.glPopMatrix();
+ }
+ count++;
+ }
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1f, 1f, 1f, 1.0f);
+ mc.renderEngine.bindTexture(hearts);
+ count = 0;
+ size = 16;
+ if (tagCache.getFloat("BlueHeart") > 0){
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 0 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlueHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
+ }
+ count++;
+ mc.renderEngine.bindTexture(hearts);
+ if (tagCache.getFloat("BlackHeart") > 0){
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 1 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlackHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
+ }
+ count++;
+ mc.renderEngine.bindTexture(hearts);
+ if (tagCache.getFloat("WhiteHeart") > 0)
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 2 * size, 1 * size, size, size);
+ GL11.glPopMatrix();
+ }
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/80e3852ffde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/80e3852ffde40014174fe663e69b8422
deleted file mode 100644
index a499d75..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/80e3852ffde40014174fe663e69b8422
+++ /dev/null
@@ -1,46 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.StatCollector;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public abstract class ItemGoldifiedObject extends Item
-{
- public ItemGoldifiedObject()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- if (JewelryNBT.gem(stack) != null) return this.getIconIndex(JewelryNBT.gem(stack));
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return (StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/a03c4cbb97e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/a03c4cbb97e3001412c4c4819c88e86b
deleted file mode 100644
index c7e9a98..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/a03c4cbb97e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,75 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target.width);
- this.setBlockBounds(1f - ((TileEntityMidasTouch)tile).target.width/2, 0F, 1f -((TileEntityMidasTouch)tile).target.width/2, 1f +((TileEntityMidasTouch)tile).target.width/2, ((TileEntityMidasTouch)tile).target.height, 1f +((TileEntityMidasTouch)tile).target.width/2);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/c09e66a3b1ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/c09e66a3b1ea001411cee0f8f86532a4
new file mode 100644
index 0000000..ab073fa
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/c9/c09e66a3b1ea001411cee0f8f86532a4
@@ -0,0 +1,263 @@
+package darkknight.jewelrycraft.tileentity.renders;
+
+import java.awt.Color;
+import java.util.HashMap;
+import java.util.List;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.entity.RenderManager;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelDisplayer;
+import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
+import darkknight.jewelrycraft.util.Variables;
+
+public class TileEntityDisplayerRender extends TileEntitySpecialRenderer
+{
+ ModelDisplayer displayer = new ModelDisplayer();
+ String texture = "textures/tileentities/Displayer.png";
+ HashMap<EnumChatFormatting, Integer> colors = new HashMap<EnumChatFormatting, Integer>(){
+ {
+ put(EnumChatFormatting.AQUA, 5636095);
+ put(EnumChatFormatting.BLACK, 0);
+ put(EnumChatFormatting.BLUE, 5592575);
+ put(EnumChatFormatting.DARK_AQUA, 43690);
+ put(EnumChatFormatting.DARK_BLUE, 170);
+ put(EnumChatFormatting.DARK_GRAY, 5592405);
+ put(EnumChatFormatting.DARK_GREEN, 43520);
+ put(EnumChatFormatting.DARK_PURPLE, 11141290);
+ put(EnumChatFormatting.DARK_RED, 11141120);
+ put(EnumChatFormatting.GOLD, 16755200);
+ put(EnumChatFormatting.GRAY, 11184810);
+ put(EnumChatFormatting.GREEN, 5635925);
+ put(EnumChatFormatting.LIGHT_PURPLE, 16733695);
+ put(EnumChatFormatting.RED, 16733525);
+ put(EnumChatFormatting.WHITE, 16777215);
+ put(EnumChatFormatting.YELLOW, 16777045);
+ }
+ };
+
+ /**
+ * @param te
+ * @param x
+ * @param y
+ * @param z
+ * @param scale
+ */
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ GL11.glPushMatrix();
+ GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
+ TileEntityDisplayer disp = (TileEntityDisplayer)te;
+ ResourceLocation blockTexture = new ResourceLocation(Variables.MODID, texture);
+ Minecraft.getMinecraft().renderEngine.bindTexture(blockTexture);
+ GL11.glPushMatrix();
+ GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
+ displayer.render((Entity)null, disp.ringTranslation1, disp.ringTranslation2, disp.ringTranslation3, 0.0F, 0.0F, 0.0625F);
+ try{
+ int block = disp.getBlockMetadata();
+ if (disp != null && disp.hasObject && disp.object != null && disp.object.getItem() != null && disp.object != new ItemStack(Item.getItemById(0), 0, 0)){
+ int ind = -3;
+ GL11.glPushMatrix();
+ EntityItem entityitem = new EntityItem(te.getWorldObj(), 0.0D, 0.0D, 0.0D, disp.object);
+ entityitem.hoverStart = 0.0F;
+ disp.object.stackSize = 1;
+ GL11.glRotatef(180F, 1F, 0F, 0F);
+ GL11.glTranslatef(0.0F, -0.6F + disp.ringTranslation1 / 5, 0F);
+ GL11.glRotatef(disp.rotAngle, 0F, 1F, 0F);
+ if (RenderManager.instance.options.fancyGraphics) RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
+ else{
+ GL11.glRotatef(180F, 0F, 1F, 0F);
+ RenderManager.instance.options.fancyGraphics = true;
+ int i = 15728880;
+ int j = i % 65536;
+ int k = i / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, j / 1.0F, k / 1.0F);
+ RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
+ RenderManager.instance.options.fancyGraphics = false;
+ }
+ EntityPlayer player = te.getWorldObj().getClosestPlayer(te.xCoord, te.yCoord, te.zCoord, 5D);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ if (player != null) renderLabel(disp.object.getDisplayName(), 0F, -0.171F * ind, 0F, block, disp, colors.get(disp.object.getRarity().rarityColor));
+ GL11.glPopMatrix();
+ ind++;
+ if (player != null && disp.quantity > 1){
+ GL11.glPushMatrix();
+ renderLabel("x" + Integer.toString(disp.quantity), 0F, -0.171F * ind, 0F, block, disp, Color.GRAY.getRGB());
+ GL11.glPopMatrix();
+ ind++;
+ }
+ if (disp.object.getItem() != Items.map && player != null && disp.object.getTooltip(player, true) != null){
+ List tooltips = disp.object.getTooltip(player, true);
+ if (disp.infoIndex + 5 > tooltips.size()) disp.infoIndex = 1;
+ if (tooltips.size() < 5) for(int i = 1; i < tooltips.size(); i++){
+ String tooltip = tooltips.get(i).toString();
+ RenderManager.instance.getFontRenderer();
+ if (tooltip != ""){
+ GL11.glPushMatrix();
+ renderLabel(tooltip, 0F, -0.171F * ind, 0F, block, disp, Color.GRAY.getRGB());
+ GL11.glPopMatrix();
+ ind++;
+ }
+ }
+ else for(int i = disp.infoIndex; i < disp.infoIndex + 5; i++){
+ String tooltip = tooltips.get(i).toString();
+ RenderManager.instance.getFontRenderer();
+ if (tooltip != ""){
+ GL11.glPushMatrix();
+ renderLabel(tooltip, 0F, -0.171F * ind, 0F, block, disp, Color.GRAY.getRGB());
+ GL11.glPopMatrix();
+ ind++;
+ }
+ }
+ }
+ }
+ }
+ catch(Exception e){}
+ GL11.glPopMatrix();
+ GL11.glPopMatrix();
+ }
+
+ /**
+ * @param par2Str
+ * @param x
+ * @param y
+ * @param z
+ * @param metadata
+ * @param te
+ * @param color
+ */
+ protected void renderLabel(String par2Str, double x, double y, double z, int metadata, TileEntity te, int color)
+ {
+ FontRenderer fontrenderer = RenderManager.instance.getFontRenderer();
+ float var14 = 0.01266667F * 1.5F;
+ float var17 = 0.015F;
+ GL11.glRotatef(180F, 0F, 0F, 1F);
+ if (metadata == 0) GL11.glRotatef(0F, 0F, 1F, 0F);
+ else if (metadata == 1) GL11.glRotatef(270F, 0F, 1F, 0F);
+ else if (metadata == 2) GL11.glRotatef(180F, 0F, 1F, 0F);
+ else if (metadata == 3) GL11.glRotatef(90F, 0F, 1F, 0F);
+ GL11.glTranslatef((float)x, (float)y, (float)z + 0.45F);
+ GL11.glScalef(-0.015F, -var14, 0.015F);
+ GL11.glPushMatrix();
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ Tessellator tessellator = Tessellator.instance;
+ GL11.glDisable(GL11.GL_TEXTURE_2D);
+ int j = fontrenderer.getStringWidth(par2Str) / 2;
+ tessellator.startDrawingQuads();
+ tessellator.setColorRGBA_F(0.0F, 0.2F, 0.2F, 0.9F);
+ tessellator.addVertex(-33.333 - 0, 0D, 0.1D);
+ tessellator.addVertex(-33.333 - 0, 9D, 0.1D);
+ tessellator.addVertex(33.333 + 0, 9D, 0.1D);
+ tessellator.addVertex(33.333 + 0, 0D, 0.1D);
+ tessellator.draw();
+ if (fontrenderer.getStringWidth(par2Str) / 2 > 20) var17 = 0.9F / fontrenderer.getStringWidth(par2Str);
+ else var17 = var14;
+ int red = color >> 16 & 0xFF;
+ int green = color >> 8 & 0xFF;
+ int blue = color & 0xFF;
+ GL11.glTranslatef((float)x + 1f, (float)y + 1f, (float)z);
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_TEXTURE_2D);
+ GL11.glScalef(var17 * 70F, 1F, 0F);
+ int i = 15728880;
+ int t = i % 65536;
+ int k = i / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, t / 1.0F, k / 1.0F);
+ fontrenderer.drawString(par2Str.replaceFirst("§0", "§r").replaceFirst("§1", "§r").replaceFirst("§2", "§r").replaceFirst("§3", "§r").replaceFirst("§4", "§r").replaceFirst("§5", "§r").replaceFirst("§6", "§r").replaceFirst("§7", "§r").replaceFirst("§8", "§r").replaceFirst("§9", "§r").replaceFirst("§a", "§r").replaceFirst("§b", "§r").replaceFirst("§c", "§r").replaceFirst("§d", "§r").replaceFirst("§e", "§r").replaceFirst("§f", "§r"), -j, 0, 65536 * (red > 170 ? red - 170 : 0) + 256 * (green > 170 ? green - 170 : 0) + (blue > 170 ? blue - 170 : 0));
+ GL11.glPopMatrix();
+ GL11.glTranslatef((float)x - 1f, (float)y - 1f, (float)z - 1F);
+ GL11.glScalef(var17 * 70F, 1F, 0F);
+ fontrenderer.drawString(par2Str, -j, 0, color);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glPopMatrix();
+ }
+
+ /**
+ * @param str
+ * @param color
+ */
+ public void replaceEnumEnchValues(String str, int color)
+ {
+ if (str.contains("§0")){
+ color = Color.BLACK.getRGB();
+ str.replace("§0", "");
+ }
+ if (str.contains("§1")){
+ color = 85;
+ str.replace("§1", "");
+ }
+ if (str.contains("§2")){
+ color = 17920;
+ str.replace("§2", "");
+ }
+ if (str.contains("§3")){
+ color = 1336183;
+ str.replace("§3", "");
+ }
+ if (str.contains("§4")){
+ color = 4587520;
+ str.replace("§4", "");
+ }
+ if (str.contains("§5")){
+ color = 5701759;
+ str.replace("§5", "");
+ }
+ if (str.contains("§6")){
+ color = 16762880;
+ str.replace("§6", "");
+ }
+ if (str.contains("§7")){
+ color = Color.GRAY.getRGB();
+ str.replace("§7", "");
+ }
+ if (str.contains("§8")){
+ color = Color.DARK_GRAY.getRGB();
+ str.replace("§8", "");
+ }
+ if (str.contains("§9")){
+ color = Color.BLUE.getRGB();
+ str.replace("§9", "");
+ }
+ if (str.contains("§a")){
+ color = Color.GREEN.getRGB();
+ str.replace("§a", "");
+ }
+ if (str.contains("§b")){
+ color = Color.CYAN.getRGB();
+ str.replace("§b", "");
+ }
+ if (str.contains("§c")){
+ color = Color.RED.getRGB();
+ str.replace("§c", "");
+ }
+ if (str.contains("§d")){
+ color = 11665663;
+ str.replace("§d", "");
+ }
+ if (str.contains("§e")){
+ color = Color.YELLOW.getRGB();
+ str.replace("§e", "");
+ }
+ if (str.contains("§f")){
+ color = Color.WHITE.getRGB();
+ str.replace("§f", "");
+ }
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/cb/c0a19fa1aeea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/cb/c0a19fa1aeea001411cee0f8f86532a4
new file mode 100644
index 0000000..0ce34d4
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/cb/c0a19fa1aeea001411cee0f8f86532a4
@@ -0,0 +1,197 @@
+/*
+ * Mod made by DarkKnight during the Modjam 3
+ * It's an awesome mod
+ * I love me! :D
+ */
+package darkknight.jewelrycraft;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.gen.structure.MapGenStructureIO;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.oredict.OreDictionary;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.Mod.EventHandler;
+import cpw.mods.fml.common.Mod.Instance;
+import cpw.mods.fml.common.ModMetadata;
+import cpw.mods.fml.common.SidedProxy;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
+import cpw.mods.fml.common.registry.EntityRegistry;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.client.gui.GuiHandler;
+import darkknight.jewelrycraft.commands.JewelrycraftCommands;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.damage.DamageSourceList;
+import darkknight.jewelrycraft.effects.EffectsList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.events.BlockEventHandler;
+import darkknight.jewelrycraft.events.BucketHandler;
+import darkknight.jewelrycraft.events.EntityEventHandler;
+import darkknight.jewelrycraft.events.EventCommonHandler;
+import darkknight.jewelrycraft.events.KeyBindings;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.network.PacketClearColorCache;
+import darkknight.jewelrycraft.network.PacketKeyPressEvent;
+import darkknight.jewelrycraft.network.PacketRequestLiquidData;
+import darkknight.jewelrycraft.network.PacketRequestPlayerInfo;
+import darkknight.jewelrycraft.network.PacketRequestSetSlot;
+import darkknight.jewelrycraft.network.PacketSendServerPlayersInfo;
+import darkknight.jewelrycraft.network.PacketSendLiquidData;
+import darkknight.jewelrycraft.network.PacketSendClientPlayerInfo;
+import darkknight.jewelrycraft.proxy.CommonProxy;
+import darkknight.jewelrycraft.recipes.CraftingRecipes;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.Variables;
+import darkknight.jewelrycraft.worldGen.Generation;
+import darkknight.jewelrycraft.worldGen.village.ComponentJewelry;
+import darkknight.jewelrycraft.worldGen.village.JCTrades;
+import darkknight.jewelrycraft.worldGen.village.VillageJewelryHandler;
+
+@Mod (modid = Variables.MODID, name = Variables.MODNAME, version = Variables.VERSION, guiFactory = Variables.CONFIG_GUI, acceptedMinecraftVersions = "[1.7.10,1.8)", canBeDeactivated = true)
+public class JewelrycraftMod
+{
+ @Instance (Variables.MODID)
+ public static JewelrycraftMod instance;
+
+ @SidedProxy (clientSide = Variables.CLIENT_PROXY, serverSide = Variables.SERVER_PROXY)
+ public static CommonProxy proxy;
+ public static final Logger logger = Logger.getLogger("Jewelrycraft");
+ public static File dir;
+
+ public static CreativeTabs jewelrycraft = new CreativeTabs(Variables.MODID){
+ @Override
+ public Item getTabIconItem()
+ {
+ return Item.getItemFromBlock(BlockList.jewelCraftingTable);
+ }
+ };
+
+ public static CreativeTabs liquids = new CreativeTabLiquids("Liquids");
+ public static NBTTagCompound saveData = new NBTTagCompound();
+ public static NBTTagCompound clientData = new NBTTagCompound();
+ public static File liquidsConf;
+ public static SimpleNetworkWrapper netWrapper;
+ public static boolean fancyRender;
+
+ /**
+ * Pre initialization of mod stuff.
+ *
+ * @param e FMLPreInitializationEvent
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ @EventHandler
+ public void preInit(FMLPreInitializationEvent e) throws IOException
+ {
+ ConfigHandler.INSTANCE.loadConfig(e);
+ BlockList.preInit(e);
+ ItemList.preInit(e);
+ CraftingRecipes.preInit(e);
+ CurseList.preInit(e);
+ OreDictionary.registerOre("ingotShadow", new ItemStack(ItemList.shadowIngot));
+ OreDictionary.registerOre("oreShadow", new ItemStack(BlockList.shadowOre));
+ VillagerRegistry.instance().registerVillagerId(3000);
+ VillagerRegistry.instance().registerVillageTradeHandler(3000, new JCTrades());
+ VillagerRegistry.instance().registerVillageCreationHandler(new VillageJewelryHandler());
+ try{
+ MapGenStructureIO.func_143031_a(ComponentJewelry.class, Variables.MODID + ":Jewelry");
+ }
+ catch(Throwable e2){
+ logger.severe("Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.7.10");
+ }
+ MinecraftForge.EVENT_BUS.register(new EntityEventHandler());
+ MinecraftForge.EVENT_BUS.register(new BlockEventHandler());
+ MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
+ FMLCommonHandler.instance().bus().register(new EventCommonHandler());
+ BucketHandler.INSTANCE.buckets.put(BlockList.moltenMetal, ItemList.bucket);
+
+ ModMetadata metadata = e.getModMetadata();
+ List<String> authorList = new ArrayList<String>();
+
+ authorList.add("OnyxDarkKnight");
+ authorList.add("bspkrs");
+ authorList.add("domi1819");
+
+ dir = e.getModConfigurationDirectory();
+ proxy.preInit();
+ netWrapper = NetworkRegistry.INSTANCE.newSimpleChannel(Variables.MODID);
+ netWrapper.registerMessage(PacketRequestLiquidData.class, PacketRequestLiquidData.class, 0, Side.SERVER);
+ netWrapper.registerMessage(PacketSendLiquidData.class, PacketSendLiquidData.class, 1, Side.CLIENT);
+ netWrapper.registerMessage(PacketClearColorCache.class, PacketClearColorCache.class, 2, Side.CLIENT);
+ netWrapper.registerMessage(PacketKeyPressEvent.class, PacketKeyPressEvent.class, 3, Side.SERVER);
+ netWrapper.registerMessage(PacketRequestPlayerInfo.class, PacketRequestPlayerInfo.class, 4, Side.SERVER);
+ netWrapper.registerMessage(PacketSendClientPlayerInfo.class, PacketSendClientPlayerInfo.class, 5, Side.CLIENT);
+ netWrapper.registerMessage(PacketSendServerPlayersInfo.class, PacketSendServerPlayersInfo.class, 6, Side.CLIENT);
+ netWrapper.registerMessage(PacketRequestSetSlot.class, PacketRequestSetSlot.class, 7, Side.SERVER);
+
+ metadata.autogenerated = false;
+ metadata.authorList = authorList;
+ metadata.url = "https://github.com/sor1n/Jewelrycraft";
+
+ createEntity(EntityHeart.class, Variables.MODID + ".Heart", 0xFF0000, 0xFF0000, false);
+ createEntity(EntityHalfHeart.class, Variables.MODID + ".Half-Heart", 0x000000, 0xFF0000, false);
+
+ }
+
+ public void createEntity(Class<? extends Entity> entity, String entityName, int solidColor, int spotColor, boolean hasSpawnEgg)
+ {
+ int randomID = EntityRegistry.findGlobalUniqueEntityId();
+ if(hasSpawnEgg) EntityRegistry.registerGlobalEntityID(entity, entityName, randomID, solidColor, spotColor);
+ else EntityRegistry.registerGlobalEntityID(entity, entityName, randomID);
+ EntityRegistry.registerModEntity(entity, entityName, randomID, this, 40, 3, true);
+ }
+
+ /**
+ * Initializes the world generation and key bindings.
+ *
+ * @param e FMLInitializationEvent
+ */
+ @EventHandler
+ public void init(FMLInitializationEvent e)
+ {
+ GameRegistry.registerWorldGenerator(new Generation(), 0);
+ if (FMLCommonHandler.instance().getSide() == Side.CLIENT) FMLCommonHandler.instance().bus().register(new KeyBindings());
+ new GuiHandler();
+ FMLCommonHandler.instance().bus().register(ConfigHandler.INSTANCE);
+ }
+
+ /**
+ * Post initialization of metals, modifiers and others.
+ *
+ * @param e FMLPostInitializationEvent
+ */
+ @EventHandler
+ public void postInit(FMLPostInitializationEvent e)
+ {
+ JewelrycraftUtil.addMetals();
+ JewelrycraftUtil.jamcrafters();
+ EffectsList.postInit(e);
+ DamageSourceList.postInit(e);
+ proxy.postInit();
+ }
+
+ @Mod.EventHandler
+ public void serverLoad(FMLServerStartingEvent event)
+ {
+ event.registerServerCommand(new JewelrycraftCommands());
+ }
+
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/cc/90bd5dcb47e700141e05cdbaeb682437 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/cc/90bd5dcb47e700141e05cdbaeb682437
deleted file mode 100644
index 31ebcd5..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/cc/90bd5dcb47e700141e05cdbaeb682437
+++ /dev/null
@@ -1,127 +0,0 @@
-package darkknight.jewelrycraft.events;
-
-import java.util.Iterator;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import darkknight.jewelrycraft.curses.CurseList;
-import darkknight.jewelrycraft.entities.renders.RenderHelper;
-import darkknight.jewelrycraft.item.render.BraceletRender;
-import darkknight.jewelrycraft.item.render.EarringsRender;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.model.ModelBracelet;
-import darkknight.jewelrycraft.util.JewelryNBT;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
-
-public class PlayerRenderHandler
-{
- MaskRender mask = new MaskRender();
- EarringsRender earrings = new EarringsRender();
- BraceletRender bracelet = new BraceletRender();
-// public static String[] infamyCache = new String[]{};
- public static NBTTagCompound playersInfo = new NBTTagCompound();
-
- @SubscribeEvent
- public void renderScreen(RenderPlayerEvent.Specials.Post event)
- {
- ModelBiped main = event.renderer.modelBipedMain;
- Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
- if (playersInfo != null){
- while (players.hasNext()){
- EntityPlayer player = players.next();
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(1.6f, 1.6f, 1.6f);
- GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- GL11.glPopMatrix();
- }
- if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(0.07f, 0.07f, 0.07f);
- GL11.glTranslatef(0.0F, 3.0F, -2.0F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- earrings.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- GL11.glPopMatrix();
- }
- for(int i = 10; i <= 13; i++)
- if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
- if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
- if (i / 12 == 1){
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
- }else{
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- System.out.println(playersInfo);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- }
- GL11.glPopMatrix();
- }
- }
- }
- }
-
- /**
- * @param string
- * @return
- */
- private boolean checkPlayerInfamy(String string)
- {
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
- if(playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
-// for(int i = 0; i < infamyCache.length; i++)
-// if (infamyCache[i].equals(string)) return true;
- return false;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/cd/a066fa7271e300141084bb8bfb075c08 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/cd/a066fa7271e300141084bb8bfb075c08
deleted file mode 100644
index e80ad70..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/cd/a066fa7271e300141084bb8bfb075c08
+++ /dev/null
@@ -1,36 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.SharedMonsterAttributes;
-import net.minecraft.entity.monster.EntityMob;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.damage.DamageSourceList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.util.JewelrycraftUtil;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && !(target instanceof EntityMob) && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart)){
- target.setDead();
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/dc/d063631307e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ce/20b26b8f84ea001411cee0f8f86532a4
index 3432c76..885ebed 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/dc/d063631307e50014174fe663e69b8422
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ce/20b26b8f84ea001411cee0f8f86532a4
@@ -7,6 +7,7 @@ import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
+import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.VillagerRegistry;
import darkknight.jewelrycraft.block.BlockList;
import darkknight.jewelrycraft.client.InventoryTabVanilla;
@@ -17,6 +18,7 @@ import darkknight.jewelrycraft.entities.EntityHeart;
import darkknight.jewelrycraft.entities.renders.HeartRender;
import darkknight.jewelrycraft.events.PlayerRenderHandler;
import darkknight.jewelrycraft.events.ScreenHandler;
+import darkknight.jewelrycraft.item.ItemList;
import darkknight.jewelrycraft.item.render.ItemRender;
import darkknight.jewelrycraft.model.ModelDisplayer;
import darkknight.jewelrycraft.model.ModelHalfHeart;
@@ -51,10 +53,8 @@ public class ClientProxy extends CommonProxy
@Override
public void preInit()
{
- ResourceLocation pedestalResourceLocation = new ResourceLocation(Variables.MODID, "textures/tileentities/BricksPedestal.png");
- TileEntityHandPedestalRender pedestalRender = new TileEntityHandPedestalRender(new ModelHandPedestal(pedestalResourceLocation), pedestalResourceLocation);
- ResourceLocation shadowResourceLocation = new ResourceLocation(Variables.MODID, "textures/tileentities/ShadowHand.png");
- TileEntityShadowHandRender shadowHandRender = new TileEntityShadowHandRender(new ModelShadowHand(shadowResourceLocation), shadowResourceLocation);
+ TileEntityHandPedestalRender pedestalRender = new TileEntityHandPedestalRender(new ModelHandPedestal(Variables.PEDESTAL_TEXTURE), Variables.PEDESTAL_TEXTURE);
+ TileEntityShadowHandRender shadowHandRender = new TileEntityShadowHandRender(new ModelShadowHand(Variables.SHADOW_HAND_TEXTURE), Variables.SHADOW_HAND_TEXTURE);
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmelter.class, new TileEntitySmelterRender());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMolder.class, new TileEntityMolderRender());
@@ -70,19 +70,20 @@ public class ClientProxy extends CommonProxy
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.smelter), new ItemRender(new TileEntitySmelterRender(), new TileEntitySmelter(), new ModelSmelter()));
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.molder), new ItemRender(new TileEntityMolderRender(), new TileEntityMolder(), new ModelMolder()));
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.shadowEye), new ItemRender(new TileEntityShadowEyeRender(), new TileEntityShadowEye(), new ModelShadowEye()));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.handPedestal), new ItemRender(pedestalRender, new TileEntityHandPedestal(), new ModelHandPedestal(pedestalResourceLocation)));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.shadowHand), new ItemRender(shadowHandRender, new TileEntityShadowHand(), new ModelShadowHand(shadowResourceLocation)));
+ MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.handPedestal), new ItemRender(pedestalRender, new TileEntityHandPedestal(), new ModelHandPedestal(Variables.PEDESTAL_TEXTURE)));
+ MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.shadowHand), new ItemRender(shadowHandRender, new TileEntityShadowHand(), new ModelShadowHand(Variables.SHADOW_HAND_TEXTURE)));
+ MinecraftForgeClient.registerItemRenderer(ItemList.goldObj, new ItemRender());
+
VillagerRegistry.instance().registerVillagerSkin(3000, new ResourceLocation(Variables.MODID, "textures/entities/jeweler.png"));
RenderingRegistry.registerEntityRenderingHandler(EntityHeart.class, new HeartRender(new ModelHeart(), 0.25F));
RenderingRegistry.registerEntityRenderingHandler(EntityHalfHeart.class, new HeartRender(new ModelHalfHeart(), 0.25F));
-
+
TabRegistry.registerTab(new InventoryTabVanilla());
TabRegistry.registerTab(new TabJewelry());
MinecraftForge.EVENT_BUS.register(new TabRegistry());
MinecraftForge.EVENT_BUS.register(new PlayerRenderHandler());
- ResourceLocation jeweleryTexture = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
- MinecraftForge.EVENT_BUS.register(new ScreenHandler(Minecraft.getMinecraft(), jeweleryTexture));
+ MinecraftForge.EVENT_BUS.register(new ScreenHandler(Minecraft.getMinecraft(), Variables.CURSES_TEXTURE));
}
@Override
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ce/405365adb0ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ce/405365adb0ea001411cee0f8f86532a4
new file mode 100644
index 0000000..a57eb5c
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ce/405365adb0ea001411cee0f8f86532a4
@@ -0,0 +1,64 @@
+package darkknight.jewelrycraft.item;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.oredict.OreDictionary;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.registry.GameRegistry;
+import darkknight.jewelrycraft.JewelrycraftMod;
+import darkknight.jewelrycraft.util.Variables;
+
+public class ItemList
+{
+ public static Item thiefGloves;
+ public static Item shadowIngot;
+ public static Item molds;
+ public static Item clayMolds;
+ public static Item crystal;
+ public static ItemRing ring;
+ public static ItemNecklace necklace;
+ public static ItemBracelet bracelet;
+ public static ItemEarrings earrings;
+ public static Item guide;
+ public static Item jewelryModifier;
+ public static ItemMoltenMetalBucket bucket;
+ public static ItemMoltenMetal metal;
+ public static Item goldObj;
+ private static boolean isInitialized = false;
+
+ /**
+ * @param e
+ */
+ public static void preInit(FMLPreInitializationEvent e)
+ {
+ thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
+ metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
+ jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
+ goldObj = new ItemGoldObj().setUnlocalizedName(Variables.MODID + ".goldObject");
+ GameRegistry.registerItem(thiefGloves, "thiefGloves");
+ GameRegistry.registerItem(shadowIngot, "shadowIngot");
+ GameRegistry.registerItem(molds, "molds");
+ GameRegistry.registerItem(clayMolds, "clayMolds");
+ GameRegistry.registerItem(ring, "ring");
+ GameRegistry.registerItem(necklace, "necklace");
+ GameRegistry.registerItem(bracelet, "bracelet");
+ GameRegistry.registerItem(earrings, "earrings");
+ GameRegistry.registerItem(crystal, "crystal");
+ GameRegistry.registerItem(guide, "guide");
+ GameRegistry.registerItem(bucket, "moltenMetalBucket");
+ GameRegistry.registerItem(metal, "moltenMetal");
+ GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
+ GameRegistry.registerItem(goldObj, "goldObject");
+ OreDictionary.registerOre("ingotShadow", new ItemStack(ItemList.shadowIngot));
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ce/909313c197e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ce/909313c197e3001412c4c4819c88e86b
deleted file mode 100644
index 4567d02..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ce/909313c197e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,75 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target.width);
- this.setBlockBounds(0.5f - ((TileEntityMidasTouch)tile).target.width/2, 0F, 0.5f -((TileEntityMidasTouch)tile).target.width/2, 1f +((TileEntityMidasTouch)tile).target.width/2, ((TileEntityMidasTouch)tile).target.height, 1f +((TileEntityMidasTouch)tile).target.width/2);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/cf/500511a5afea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/cf/500511a5afea001411cee0f8f86532a4
new file mode 100644
index 0000000..696228d
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/cf/500511a5afea001411cee0f8f86532a4
@@ -0,0 +1,178 @@
+/*
+ * Mod made by DarkKnight during the Modjam 3
+ * It's an awesome mod
+ * I love me! :D
+ */
+package darkknight.jewelrycraft;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.gen.structure.MapGenStructureIO;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.oredict.OreDictionary;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.Mod.EventHandler;
+import cpw.mods.fml.common.Mod.Instance;
+import cpw.mods.fml.common.ModMetadata;
+import cpw.mods.fml.common.SidedProxy;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
+import cpw.mods.fml.common.registry.EntityRegistry;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.client.gui.GuiHandler;
+import darkknight.jewelrycraft.commands.JewelrycraftCommands;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.damage.DamageSourceList;
+import darkknight.jewelrycraft.effects.EffectsList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.entities.EntityList;
+import darkknight.jewelrycraft.events.BlockEventHandler;
+import darkknight.jewelrycraft.events.BucketHandler;
+import darkknight.jewelrycraft.events.EntityEventHandler;
+import darkknight.jewelrycraft.events.EventCommonHandler;
+import darkknight.jewelrycraft.events.KeyBindings;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.network.PacketClearColorCache;
+import darkknight.jewelrycraft.network.PacketHandler;
+import darkknight.jewelrycraft.network.PacketKeyPressEvent;
+import darkknight.jewelrycraft.network.PacketRequestLiquidData;
+import darkknight.jewelrycraft.network.PacketRequestPlayerInfo;
+import darkknight.jewelrycraft.network.PacketRequestSetSlot;
+import darkknight.jewelrycraft.network.PacketSendServerPlayersInfo;
+import darkknight.jewelrycraft.network.PacketSendLiquidData;
+import darkknight.jewelrycraft.network.PacketSendClientPlayerInfo;
+import darkknight.jewelrycraft.proxy.CommonProxy;
+import darkknight.jewelrycraft.recipes.CraftingRecipes;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.Variables;
+import darkknight.jewelrycraft.worldGen.Generation;
+import darkknight.jewelrycraft.worldGen.village.ComponentJewelry;
+import darkknight.jewelrycraft.worldGen.village.JCTrades;
+import darkknight.jewelrycraft.worldGen.village.VillageJewelryHandler;
+
+@Mod (modid = Variables.MODID, name = Variables.MODNAME, version = Variables.VERSION, guiFactory = Variables.CONFIG_GUI, acceptedMinecraftVersions = "[1.7.10,1.8)", canBeDeactivated = true)
+public class JewelrycraftMod
+{
+ @Instance (Variables.MODID)
+ public static JewelrycraftMod instance;
+
+ @SidedProxy (clientSide = Variables.CLIENT_PROXY, serverSide = Variables.SERVER_PROXY)
+ public static CommonProxy proxy;
+ public static final Logger logger = Logger.getLogger("Jewelrycraft");
+ public static File dir;
+
+ public static CreativeTabs jewelrycraft = new CreativeTabs(Variables.MODID){
+ @Override
+ public Item getTabIconItem()
+ {
+ return Item.getItemFromBlock(BlockList.jewelCraftingTable);
+ }
+ };
+
+ public static CreativeTabs liquids = new CreativeTabLiquids("Liquids");
+ public static NBTTagCompound saveData = new NBTTagCompound();
+ public static NBTTagCompound clientData = new NBTTagCompound();
+ public static File liquidsConf;
+ public static SimpleNetworkWrapper netWrapper;
+ public static boolean fancyRender;
+ List<String> authorList = new ArrayList<String>();
+
+ /**
+ * Pre initialization of mod stuff.
+ *
+ * @param e FMLPreInitializationEvent
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ @EventHandler
+ public void preInit(FMLPreInitializationEvent e) throws IOException
+ {
+ ModMetadata metadata = e.getModMetadata();
+ dir = e.getModConfigurationDirectory();
+
+ ConfigHandler.INSTANCE.loadConfig(e);
+ BlockList.preInit(e);
+ ItemList.preInit(e);
+ CraftingRecipes.preInit(e);
+ CurseList.preInit(e);
+ PacketHandler.preInit(e);
+ EntityList.preInit(e);
+
+ proxy.preInit();
+
+ VillagerRegistry.instance().registerVillagerId(3000);
+ VillagerRegistry.instance().registerVillageTradeHandler(3000, new JCTrades());
+ VillagerRegistry.instance().registerVillageCreationHandler(new VillageJewelryHandler());
+ try{
+ MapGenStructureIO.func_143031_a(ComponentJewelry.class, Variables.MODID + ":Jewelry");
+ }
+ catch(Throwable e2){
+ logger.severe("Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.7.10");
+ }
+ MinecraftForge.EVENT_BUS.register(new EntityEventHandler());
+ MinecraftForge.EVENT_BUS.register(new BlockEventHandler());
+ MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
+ FMLCommonHandler.instance().bus().register(new EventCommonHandler());
+ BucketHandler.INSTANCE.buckets.put(BlockList.moltenMetal, ItemList.bucket);
+
+ authorList.add("OnyxDarkKnight");
+ authorList.add("bspkrs");
+ authorList.add("domi1819");
+ metadata.autogenerated = false;
+ metadata.authorList = authorList;
+ metadata.url = "https://github.com/sor1n/Jewelrycraft";
+ }
+
+ /**
+ * Initializes the world generation and key bindings.
+ *
+ * @param e FMLInitializationEvent
+ */
+ @EventHandler
+ public void init(FMLInitializationEvent e)
+ {
+ GameRegistry.registerWorldGenerator(new Generation(), 0);
+ if (FMLCommonHandler.instance().getSide() == Side.CLIENT) FMLCommonHandler.instance().bus().register(new KeyBindings());
+ new GuiHandler();
+ FMLCommonHandler.instance().bus().register(ConfigHandler.INSTANCE);
+ }
+
+ /**
+ * Post initialization of metals, modifiers and others.
+ *
+ * @param e FMLPostInitializationEvent
+ */
+ @EventHandler
+ public void postInit(FMLPostInitializationEvent e)
+ {
+ JewelrycraftUtil.addMetals();
+ JewelrycraftUtil.jamcrafters();
+ EffectsList.postInit(e);
+ DamageSourceList.postInit(e);
+ proxy.postInit();
+ }
+
+ @Mod.EventHandler
+ public void serverLoad(FMLServerStartingEvent event)
+ {
+ event.registerServerCommand(new JewelrycraftCommands());
+ }
+
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d/0050b8c588ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d/0050b8c588ea001411cee0f8f86532a4
new file mode 100644
index 0000000..a678584
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d/0050b8c588ea001411cee0f8f86532a4
@@ -0,0 +1,63 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CursePentagram extends Curse
+{
+ float rot = 0F;
+
+ public CursePentagram(String name, int txtID, String pack)
+ {
+ super(name, txtID, pack);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ @Override
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Post event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+// GL11.glTranslatef(-16F, 15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "The Dark Lord has misterious ways of showing you his love.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d/501c43e4aeea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d/501c43e4aeea001411cee0f8f86532a4
new file mode 100644
index 0000000..34cc2ed
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d/501c43e4aeea001411cee0f8f86532a4
@@ -0,0 +1,18 @@
+package darkknight.jewelrycraft.entities;
+
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.JewelrycraftMod;
+import darkknight.jewelrycraft.util.Variables;
+
+public class EntityList
+{
+
+ public static void preInit(FMLPreInitializationEvent e)
+ {
+
+ createEntity(EntityHeart.class, Variables.MODID + ".Heart", 0xFF0000, 0xFF0000, false);
+ createEntity(EntityHalfHeart.class, Variables.MODID + ".Half-Heart", 0x000000, 0xFF0000, false);
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d/70703c0a94ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d/70703c0a94ea001411cee0f8f86532a4
new file mode 100644
index 0000000..907fc62
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d/70703c0a94ea001411cee0f8f86532a4
@@ -0,0 +1,113 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int gemCol = -1;
+ int ingotCol = -1;
+ float size = 0.055F;
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
+ float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
+ float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ GL11.glRotatef(yawOffset, 0, -1, 0);
+ GL11.glRotatef(yaw - 90, 0, 1, 0);
+ GL11.glRotatef(pitch, 0, 0, -1);
+ GL11.glRotatef(90F, 0, 1F, 0F);
+ RenderHelper.translateToHeadLevel(player);
+ GL11.glScalef(0.07f, 0.07f, 0.07f);
+ GL11.glTranslatef(0.0F, 3.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) gemCol = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotCol = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)ingotCol, (float)gemCol, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/102ad27afde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/102ad27afde40014174fe663e69b8422
deleted file mode 100644
index d17def9..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/102ad27afde40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- public static Item goldifiedObject;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldObject().setUnlocalizedName(Variables.MODID + ".goldObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/10b8e31685ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/10b8e31685ea001411cee0f8f86532a4
new file mode 100644
index 0000000..079ab0e
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/10b8e31685ea001411cee0f8f86532a4
@@ -0,0 +1,101 @@
+package darkknight.jewelrycraft.events;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.gui.GuiChat;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderGameOverlayEvent;
+import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
+import net.minecraftforge.event.entity.player.PlayerOpenContainerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.util.Variables;
+
+public class ScreenHandler extends Gui
+{
+ private Minecraft mc;
+ public static NBTTagCompound tagCache = null;
+ public static int cooldown;
+ static ResourceLocation texture;
+
+ public ScreenHandler(Minecraft mc, ResourceLocation tex)
+ {
+ super();
+ this.mc = mc;
+ texture = tex;
+ }
+
+ @SubscribeEvent
+ public void renderScreen(RenderGameOverlayEvent event)
+ {
+ if (event.isCancelable() || event.type != ElementType.ALL || tagCache == null) return;
+ if (!mc.gameSettings.showDebugInfo && !(mc.currentScreen instanceof GuiChat)){
+ int count = 0;
+ int size = 32;
+ ScaledResolution resolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
+ if (tagCache.hasKey("cursePoints") && tagCache.getInteger("cursePoints") > 0){
+ mc.renderEngine.bindTexture(hearts);
+ for(Curse curse: Curse.getCurseList()){
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ drawTexturedModalRect(-16, -16 + (size - 6) * count, 0, 32, 144, 60);
+ count++;
+ }
+ }
+ mc.renderEngine.bindTexture(texture);
+ count = 0;
+ for(Curse curse: Curse.getCurseList())
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ int tag = curse.getID();
+ GL11.glPushMatrix();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glScalef(0.45f, 0.45f, 0.0f);
+ drawTexturedModalRect(28, 18 + (size + 26) * count, tag % size * size, tag / size * size, size, size);
+ GL11.glPopMatrix();
+ count++;
+ }
+ count = 0;
+ size = 16;
+ for(Curse curse: Curse.getCurseList())
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ int tag = curse.getID();
+ mc.fontRenderer.drawStringWithShadow(curse.getName().split(":")[1], 30, 11 + (size + 10) * count, 16777215);
+ if (tagCache.getInteger(curse.getName()) == 2){
+ mc.renderEngine.bindTexture(hearts);
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GL11.glColor4f(1f, 1f, 1f, 0.5f);
+ drawTexturedModalRect(95, 7 + (size + 10) * count, 3 * size, 0, size, size);
+ GL11.glPopMatrix();
+ }
+ count++;
+ }
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1f, 1f, 1f, 1.0f);
+ mc.renderEngine.bindTexture(hearts);
+ count = 0;
+ size = 16;
+ if (tagCache.getFloat("BlueHeart") > 0){
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 0 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlueHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
+ }
+ count++;
+ mc.renderEngine.bindTexture(hearts);
+ if (tagCache.getFloat("BlackHeart") > 0){
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 1 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlackHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
+ }
+ count++;
+ mc.renderEngine.bindTexture(hearts);
+ if (tagCache.getFloat("WhiteHeart") > 0)
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 2 * size, 1 * size, size, size);
+ GL11.glPopMatrix();
+ }
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/203f4a6a07e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/203f4a6a07e50014174fe663e69b8422
deleted file mode 100644
index 34c4920..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/203f4a6a07e50014174fe663e69b8422
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public boolean hasEffect(ItemStack item)
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) return item.getIconIndex();
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/90c5727dfde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/90c5727dfde40014174fe663e69b8422
deleted file mode 100644
index 13859cf..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/90c5727dfde40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- public static Item goldifiedObject;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
-// jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldObject().setUnlocalizedName(Variables.MODID + ".goldObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/a0f6c7b4fde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/a0f6c7b4fde40014174fe663e69b8422
deleted file mode 100644
index e55c31f..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d0/a0f6c7b4fde40014174fe663e69b8422
+++ /dev/null
@@ -1,43 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.StatCollector;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public abstract class ItemGoldObject extends Item
-{
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- if (JewelryNBT.gem(stack) != null) return this.getIconIndex(JewelryNBT.gem(stack));
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return (StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d1/d0592b5d92e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d1/d0592b5d92e3001417b2e384bf7c3702
deleted file mode 100644
index 389aebc..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d1/d0592b5d92e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,27 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
-// RenderManager.instance.render
- RenderManager.instance.getEntityRenderObject(midas.target).doRender(midas.target, RenderManager.instance.renderPosX, midas.target.posY - Minecraft.getMinecraft().thePlayer.posY, midas.target.posZ - Minecraft.getMinecraft().thePlayer.posZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d2/d0f0ec8488ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d2/d0f0ec8488ea001411cee0f8f86532a4
new file mode 100644
index 0000000..9ffd2a3
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d2/d0f0ec8488ea001411cee0f8f86532a4
@@ -0,0 +1,66 @@
+package darkknight.jewelrycraft.curses;
+
+import org.lwjgl.opengl.GL11;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.SharedMonsterAttributes;
+import net.minecraft.entity.monster.EntityMob;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import darkknight.jewelrycraft.damage.DamageSourceList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.MaskRender;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.PlayerUtils;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CurseInfamy extends Curse
+{
+ MaskRender mask = new MaskRender();
+ public CurseInfamy(String name, int txtID, String pack)
+ {
+ super(name, txtID, pack);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {
+ if (rand.nextInt(5) == 0 && !world.isRemote && !(target instanceof EntityMob) && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && target.canAttackWithItem()){
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
+ if (playerInfo.getFloat("BlackHeart") < 20F) playerInfo.setFloat("BlackHeart", playerInfo.getFloat("BlackHeart") + 1.0F);
+ if (player.getMaxHealth() >= 3F){
+ player.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(player.getMaxHealth() - 1.0F);
+ player.setHealth(player.getHealth() - 1.0F);
+ }
+ JewelrycraftUtil.addCursePoints(player, 10);
+ }
+ }
+
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {
+ float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
+ float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
+ float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ GL11.glRotatef(yawOffset, 0, -1, 0);
+ GL11.glRotatef(yaw - 90, 0, 1, 0);
+ GL11.glRotatef(pitch, 0, 0, -1);
+ GL11.glRotatef(90F, 0, 1F, 0F);
+ RenderHelper.translateToHeadLevel(player);
+ GL11.glScalef(1.6f, 1.6f, 1.6f);
+ GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
+ mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "What have you done?!";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d3/10f60dd394e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d3/10f60dd394e3001412c4c4819c88e86b
deleted file mode 100644
index 9c61922..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d3/10f60dd394e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,74 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
- TileEntity tile = world.getTileEntity(x, y, z);
- if(((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target);
- this.setBlockBounds((float)((TileEntityMidasTouch)tile).target.boundingBox.minX, (float)((TileEntityMidasTouch)tile).target.boundingBox.minY, (float)((TileEntityMidasTouch)tile).target.boundingBox.minZ, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxX, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxY, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxZ);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d3/2075207185ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d3/2075207185ea001411cee0f8f86532a4
new file mode 100644
index 0000000..d1274ad
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d3/2075207185ea001411cee0f8f86532a4
@@ -0,0 +1,22 @@
+package darkknight.jewelrycraft.util;
+
+import net.minecraft.util.ResourceLocation;
+
+public class Variables
+{
+ public static final String MODID = "jewelrycraft2";
+ public static final String MODNAME = "Jewelrycraft 2";
+ public static final String VERSION = "1.0";
+ public static final String PACKET_CHANNEL = "jewelrycraft2";
+
+ public static final String CONFIG_GUI = "darkknight.jewelrycraft.config.ConfigGuiFactory";
+ public static final String CLIENT_PROXY = "darkknight.jewelrycraft.proxy.ClientProxy";
+ public static final String SERVER_PROXY = "darkknight.jewelrycraft.proxy.CommonProxy";
+
+ public static final int MAX_CURSES = 10;
+ public static final ResourceLocation PEDESTAL_TEXTURE = new ResourceLocation(Variables.MODID, "textures/tileentities/BricksPedestal.png");
+ public static final ResourceLocation SHADOW_HAND_TEXTURE = new ResourceLocation(Variables.MODID, "textures/tileentities/ShadowHand.png");
+ public static final ResourceLocation CURSES_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
+ public static final ResourceLocation VILLAGER_TEXTURE = new ResourceLocation(Variables.MODID, "textures/entities/jeweler.png");
+ public static final ResourceLocation HEARTS_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/hearts.png");
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d4/601541c896ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d4/601541c896ea001411cee0f8f86532a4
new file mode 100644
index 0000000..7a54a7d
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d4/601541c896ea001411cee0f8f86532a4
@@ -0,0 +1,116 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glColor3f(0F, 1F, 1F);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_DST_COLOR);
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/504bd33404e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/504bd33404e50014174fe663e69b8422
deleted file mode 100644
index 65e863e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/504bd33404e50014174fe663e69b8422
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
-// System.out.println(item.getItem().getIconIndex(JewelryNBT.item(stack)));
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else return Block.getBlockFromItem(item.getItem()).getBlockTextureFromSide(1);
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/70d86f778de3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/70d86f778de3001417b2e384bf7c3702
deleted file mode 100644
index 981b9a5..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/70d86f778de3001417b2e384bf7c3702
+++ /dev/null
@@ -1,38 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.monster.EntityMob;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart)){
- world.setBlock((int)target.posX, (int)target.posY, (int)target.posZ, BlockList.midasTouchBlock, 0, 2);
-
- TileEntity midasTouchVictim = new TileEntityMidasTouch(target);
- world.setTileEntity((int)target.posX, (int)target.posY, (int)target.posZ, midasTouchVictim);
- target.setDead();
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/90909424afea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/90909424afea001411cee0f8f86532a4
new file mode 100644
index 0000000..e2663cf
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/90909424afea001411cee0f8f86532a4
@@ -0,0 +1,181 @@
+/*
+ * Mod made by DarkKnight during the Modjam 3
+ * It's an awesome mod
+ * I love me! :D
+ */
+package darkknight.jewelrycraft;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.gen.structure.MapGenStructureIO;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.oredict.OreDictionary;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.Mod.EventHandler;
+import cpw.mods.fml.common.Mod.Instance;
+import cpw.mods.fml.common.ModMetadata;
+import cpw.mods.fml.common.SidedProxy;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
+import cpw.mods.fml.common.registry.EntityRegistry;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.client.gui.GuiHandler;
+import darkknight.jewelrycraft.commands.JewelrycraftCommands;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.damage.DamageSourceList;
+import darkknight.jewelrycraft.effects.EffectsList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.entities.EntityList;
+import darkknight.jewelrycraft.events.BlockEventHandler;
+import darkknight.jewelrycraft.events.BucketHandler;
+import darkknight.jewelrycraft.events.EntityEventHandler;
+import darkknight.jewelrycraft.events.EventCommonHandler;
+import darkknight.jewelrycraft.events.KeyBindings;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.network.PacketClearColorCache;
+import darkknight.jewelrycraft.network.PacketHandler;
+import darkknight.jewelrycraft.network.PacketKeyPressEvent;
+import darkknight.jewelrycraft.network.PacketRequestLiquidData;
+import darkknight.jewelrycraft.network.PacketRequestPlayerInfo;
+import darkknight.jewelrycraft.network.PacketRequestSetSlot;
+import darkknight.jewelrycraft.network.PacketSendServerPlayersInfo;
+import darkknight.jewelrycraft.network.PacketSendLiquidData;
+import darkknight.jewelrycraft.network.PacketSendClientPlayerInfo;
+import darkknight.jewelrycraft.proxy.CommonProxy;
+import darkknight.jewelrycraft.recipes.CraftingRecipes;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.Variables;
+import darkknight.jewelrycraft.worldGen.Generation;
+import darkknight.jewelrycraft.worldGen.village.ComponentJewelry;
+import darkknight.jewelrycraft.worldGen.village.JCTrades;
+import darkknight.jewelrycraft.worldGen.village.VillageJewelryHandler;
+
+@Mod (modid = Variables.MODID, name = Variables.MODNAME, version = Variables.VERSION, guiFactory = Variables.CONFIG_GUI, acceptedMinecraftVersions = "[1.7.10,1.8)", canBeDeactivated = true)
+public class JewelrycraftMod
+{
+ @Instance (Variables.MODID)
+ public static JewelrycraftMod instance;
+
+ @SidedProxy (clientSide = Variables.CLIENT_PROXY, serverSide = Variables.SERVER_PROXY)
+ public static CommonProxy proxy;
+ public static final Logger logger = Logger.getLogger("Jewelrycraft");
+ public static File dir;
+
+ public static CreativeTabs jewelrycraft = new CreativeTabs(Variables.MODID){
+ @Override
+ public Item getTabIconItem()
+ {
+ return Item.getItemFromBlock(BlockList.jewelCraftingTable);
+ }
+ };
+
+ public static CreativeTabs liquids = new CreativeTabLiquids("Liquids");
+ public static NBTTagCompound saveData = new NBTTagCompound();
+ public static NBTTagCompound clientData = new NBTTagCompound();
+ public static File liquidsConf;
+ public static SimpleNetworkWrapper netWrapper;
+ public static boolean fancyRender;
+
+ /**
+ * Pre initialization of mod stuff.
+ *
+ * @param e FMLPreInitializationEvent
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ @EventHandler
+ public void preInit(FMLPreInitializationEvent e) throws IOException
+ {
+ ConfigHandler.INSTANCE.loadConfig(e);
+ BlockList.preInit(e);
+ ItemList.preInit(e);
+ CraftingRecipes.preInit(e);
+ CurseList.preInit(e);
+ OreDictionary.registerOre("ingotShadow", new ItemStack(ItemList.shadowIngot));
+ OreDictionary.registerOre("oreShadow", new ItemStack(BlockList.shadowOre));
+ VillagerRegistry.instance().registerVillagerId(3000);
+ VillagerRegistry.instance().registerVillageTradeHandler(3000, new JCTrades());
+ VillagerRegistry.instance().registerVillageCreationHandler(new VillageJewelryHandler());
+ try{
+ MapGenStructureIO.func_143031_a(ComponentJewelry.class, Variables.MODID + ":Jewelry");
+ }
+ catch(Throwable e2){
+ logger.severe("Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.7.10");
+ }
+ MinecraftForge.EVENT_BUS.register(new EntityEventHandler());
+ MinecraftForge.EVENT_BUS.register(new BlockEventHandler());
+ MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
+ FMLCommonHandler.instance().bus().register(new EventCommonHandler());
+ BucketHandler.INSTANCE.buckets.put(BlockList.moltenMetal, ItemList.bucket);
+
+ ModMetadata metadata = e.getModMetadata();
+ List<String> authorList = new ArrayList<String>();
+
+ authorList.add("OnyxDarkKnight");
+ authorList.add("bspkrs");
+ authorList.add("domi1819");
+
+ dir = e.getModConfigurationDirectory();
+ proxy.preInit();
+ PacketHandler.preInit(e);
+
+ metadata.autogenerated = false;
+ metadata.authorList = authorList;
+ metadata.url = "https://github.com/sor1n/Jewelrycraft";
+
+ EntityList.preInit(e);
+ }
+
+ /**
+ * Initializes the world generation and key bindings.
+ *
+ * @param e FMLInitializationEvent
+ */
+ @EventHandler
+ public void init(FMLInitializationEvent e)
+ {
+ GameRegistry.registerWorldGenerator(new Generation(), 0);
+ if (FMLCommonHandler.instance().getSide() == Side.CLIENT) FMLCommonHandler.instance().bus().register(new KeyBindings());
+ new GuiHandler();
+ FMLCommonHandler.instance().bus().register(ConfigHandler.INSTANCE);
+ }
+
+ /**
+ * Post initialization of metals, modifiers and others.
+ *
+ * @param e FMLPostInitializationEvent
+ */
+ @EventHandler
+ public void postInit(FMLPostInitializationEvent e)
+ {
+ JewelrycraftUtil.addMetals();
+ JewelrycraftUtil.jamcrafters();
+ EffectsList.postInit(e);
+ DamageSourceList.postInit(e);
+ proxy.postInit();
+ }
+
+ @Mod.EventHandler
+ public void serverLoad(FMLServerStartingEvent event)
+ {
+ event.registerServerCommand(new JewelrycraftCommands());
+ }
+
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/b00062e0ffe40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/b00062e0ffe40014174fe663e69b8422
deleted file mode 100644
index 01f16ca..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/b00062e0ffe40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- public static Item goldObj;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldObj = new ItemGoldObj().setUnlocalizedName(Variables.MODID + ".goldObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldObj, "goldObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/d026faa2cbe6001411c8f2d2b3d65935 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/d026faa2cbe6001411c8f2d2b3d65935
deleted file mode 100644
index e4105c8..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d5/d026faa2cbe6001411c8f2d2b3d65935
+++ /dev/null
@@ -1,24 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import darkknight.jewelrycraft.util.Variables;
-
-public class CurseList
-{
- private static Curse rotten;
- private static Curse flaming;
- private static Curse blind;
- private static Curse greed;
- private static Curse infamy;
- private static Curse midasTouch;
-
- public static void preInit(FMLPreInitializationEvent e)
- {
- rotten = new CurseRottenHeart(0, Variables.MODNAME + ":" + "Rotten Heart", 0);
- flaming = new CurseFlamingSoul(1, Variables.MODNAME + ":" + "Flaming Soul", 0);
- greed = new CurseGreed(2, Variables.MODNAME + ":" + "Greed", 0);
- blind = new CurseBlind(3, Variables.MODNAME + ":" + "Blind", 0);
- infamy = new CurseInfamy(4, Variables.MODNAME + ":" + "Infamy", 0);
- midasTouch = new CurseMidasTouch(5, Variables.MODNAME + ":" + "Midas Touch", 0);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d6/f004df7701e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d6/f004df7701e50014174fe663e69b8422
deleted file mode 100644
index 5210d03..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d6/f004df7701e50014174fe663e69b8422
+++ /dev/null
@@ -1,51 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.item.ItemList;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && player.inventory.getCurrentItem() == null){
- world.setBlock(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), BlockList.midasTouchBlock, 0, 2);
- TileEntityMidasTouch midasTouchVictim = new TileEntityMidasTouch();
- midasTouchVictim.setEntity(target);
- world.setTileEntity(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), midasTouchVictim);
- target.setDead();
- }
- }
-
- @Override
- public void action(World world, EntityPlayer player)
- {
- if(player.inventory.getCurrentItem() != null && player.inventory.getCurrentItem().getItem() != ItemList.goldObj){
- int index = player.inventory.currentItem;
- ItemStack item = player.inventory.getCurrentItem();
- ItemStack result = new ItemStack(ItemList.goldObj, item.stackSize, item.getItemDamage());
- JewelryNBT.addItem(result, item);
- player.inventory.setInventorySlotContents(index, result);
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d7/e01fa45502e60014127dc373d78c1666 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d7/e01fa45502e60014127dc373d78c1666
deleted file mode 100644
index a42a1f3..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d7/e01fa45502e60014127dc373d78c1666
+++ /dev/null
@@ -1,77 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidRegistry;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.tileentity.TileEntityAltar;
-import darkknight.jewelrycraft.tileentity.TileEntityBlockShadow;
-import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
-import darkknight.jewelrycraft.tileentity.TileEntityHandPedestal;
-import darkknight.jewelrycraft.tileentity.TileEntityJewelrsCraftingTable;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-import darkknight.jewelrycraft.tileentity.TileEntityMolder;
-import darkknight.jewelrycraft.tileentity.TileEntityShadowEye;
-import darkknight.jewelrycraft.tileentity.TileEntityShadowHand;
-import darkknight.jewelrycraft.tileentity.TileEntitySmelter;
-import darkknight.jewelrycraft.util.Variables;
-
-public class BlockList
-{
- public static Block shadowOre, smelter, molder, displayer, jewelCraftingTable, shadowBlock, shadowEye, jewelAltar, handPedestal, shadowHand, midasTouchBlock;
- public static BlockMoltenMetal moltenMetal;
- public static Fluid moltenMetalFluid;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- shadowOre = new BlockJCOre().setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockTextureName(Variables.MODID + ":oreShadow").setBlockName(Variables.MODID + ".oreShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- smelter = new BlockSmelter().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".smelter").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molder = new BlockMolder(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".molder").setCreativeTab(JewelrycraftMod.jewelrycraft);
- displayer = new BlockDisplayer(Material.iron).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypeMetal).setBlockName(Variables.MODID + ".displayer").setCreativeTab(JewelrycraftMod.jewelrycraft);
- jewelCraftingTable = new BlockJewelrsCraftingTable(Material.rock).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".jewelCraftingTable").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowBlock = new BlockShadow().setHardness(5.0F).setResistance(7.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":blockShadow").setBlockName(Variables.MODID + ".blockShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- jewelAltar = new BlockJewelAltar().setHardness(5.0F).setResistance(2.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(Variables.MODID + ":altar").setBlockName(Variables.MODID + ".altar").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowEye = new BlockShadowEye().setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowEye").setCreativeTab(JewelrycraftMod.jewelrycraft);
- handPedestal = new BlockHandPedestal(Material.rock).setHardness(5.0F).setResistance(6.0F).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".handPedestal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowHand = new BlockShadowHand(Material.rock).setStepSound(Block.soundTypePiston).setBlockName(Variables.MODID + ".shadowHand").setCreativeTab(JewelrycraftMod.jewelrycraft).setBlockUnbreakable();
- midasTouchBlock = new BlockMidasTouch(Material.iron).setHardness(3.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setBlockName(Variables.MODID + ".midasTouchBlock");
-
- GameRegistry.registerBlock(shadowOre, "shadowOre");
- GameRegistry.registerBlock(shadowBlock, "shadowBlock");
- GameRegistry.registerBlock(smelter, "Smelter");
- GameRegistry.registerBlock(molder, "Molder");
- GameRegistry.registerBlock(jewelCraftingTable, "jewelCraftingTable");
- GameRegistry.registerBlock(displayer, "Displayer");
- GameRegistry.registerBlock(jewelAltar, "Altar");
- GameRegistry.registerBlock(shadowEye, "Shadow Eye");
- GameRegistry.registerBlock(handPedestal, "Stone Bricks Pedestal");
- GameRegistry.registerBlock(shadowHand, "Shadow Hand");
- GameRegistry.registerBlock(midasTouchBlock, "Midas Touch Block");
-
- GameRegistry.registerTileEntity(TileEntitySmelter.class, Variables.MODID + ":smelter");
- GameRegistry.registerTileEntity(TileEntityMolder.class, Variables.MODID + ":molder");
- GameRegistry.registerTileEntity(TileEntityJewelrsCraftingTable.class, Variables.MODID + ":table");
- GameRegistry.registerTileEntity(TileEntityDisplayer.class, Variables.MODID + ":displayer");
- GameRegistry.registerTileEntity(TileEntityBlockShadow.class, Variables.MODID + ":blockShadow");
- GameRegistry.registerTileEntity(TileEntityAltar.class, Variables.MODID + ":altar");
- GameRegistry.registerTileEntity(TileEntityShadowEye.class, Variables.MODID + ":shadowEye");
- GameRegistry.registerTileEntity(TileEntityHandPedestal.class, Variables.MODID + ":handPedestal");
- GameRegistry.registerTileEntity(TileEntityShadowHand.class, Variables.MODID + ":shadowHand");
- GameRegistry.registerTileEntity(TileEntityMidasTouch.class, Variables.MODID + ":midsaTouch");
-
- moltenMetalFluid = new Fluid("metal.molten").setLuminosity(15).setDensity(3000).setTemperature(2000).setViscosity(6000);
- if (!FluidRegistry.registerFluid(moltenMetalFluid)) moltenMetalFluid = FluidRegistry.getFluid("metal.molten");
- moltenMetal = new BlockMoltenMetal(moltenMetalFluid, Material.lava);
- GameRegistry.registerBlock(moltenMetal, "moltenMetalLiquid");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d8/6023bb4999e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d8/6023bb4999e3001412c4c4819c88e86b
deleted file mode 100644
index 522a726..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d8/6023bb4999e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,27 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
-// System.out.println(midas.target.rotationYaw);
-// GL11.glRotatef(, 0.0F, 1.0F, 0.0F);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, midas.xCoord - RenderManager.instance.renderPosX, midas.target.posY - RenderManager.instance.renderPosY, midas.target.posZ - RenderManager.instance.renderPosZ, midas.target.rotationYaw, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d9/b0614a4248e700141e05cdbaeb682437 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d9/b0614a4248e700141e05cdbaeb682437
deleted file mode 100644
index 9c25ad9..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d9/b0614a4248e700141e05cdbaeb682437
+++ /dev/null
@@ -1,127 +0,0 @@
-package darkknight.jewelrycraft.events;
-
-import java.util.Iterator;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import darkknight.jewelrycraft.curses.CurseList;
-import darkknight.jewelrycraft.entities.renders.RenderHelper;
-import darkknight.jewelrycraft.item.render.BraceletRender;
-import darkknight.jewelrycraft.item.render.EarringsRender;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.model.ModelBracelet;
-import darkknight.jewelrycraft.util.JewelryNBT;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
-
-public class PlayerRenderHandler
-{
- MaskRender mask = new MaskRender();
- EarringsRender earrings = new EarringsRender();
- BraceletRender bracelet = new BraceletRender();
-// public static String[] infamyCache = new String[]{};
- public static NBTTagCompound playersInfo = new NBTTagCompound();
-
- @SubscribeEvent
- public void renderScreen(RenderPlayerEvent.Specials.Post event)
- {
- ModelBiped main = event.renderer.modelBipedMain;
- Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
- if (playersInfo != null){
- while (players.hasNext()){
- EntityPlayer player = players.next();
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
-// System.out.println(PlayerUtils.getModPlayerPersistTag(player, Variables.MODID));
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(1.6f, 1.6f, 1.6f);
- GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- GL11.glPopMatrix();
- }
- if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(0.07f, 0.07f, 0.07f);
- GL11.glTranslatef(0.0F, 3.0F, -2.0F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- earrings.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- GL11.glPopMatrix();
- }
- for(int i = 10; i <= 13; i++)
- if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
- if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
- if (i / 12 == 1){
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
- }else{
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- }
- GL11.glPopMatrix();
- }
- }
- }
- }
-
- /**
- * @param string
- * @return
- */
- private boolean checkPlayerInfamy(String string)
- {
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
- if(playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
-// for(int i = 0; i < infamyCache.length; i++)
-// if (infamyCache[i].equals(string)) return true;
- return false;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d9/e0c5a699fde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d9/e0c5a699fde40014174fe663e69b8422
deleted file mode 100644
index a9b0e1a..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/d9/e0c5a699fde40014174fe663e69b8422
+++ /dev/null
@@ -1,164 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Random;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.passive.EntityVillager;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.potion.Potion;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.village.MerchantRecipe;
-import net.minecraft.village.MerchantRecipeList;
-import org.lwjgl.input.Keyboard;
-import cpw.mods.fml.common.FMLCommonHandler;
-import cpw.mods.fml.relauncher.ReflectionHelper;
-import cpw.mods.fml.relauncher.Side;
-import darkknight.jewelrycraft.util.JewelrycraftUtil;
-import darkknight.jewelrycraft.util.PlayerUtils;
-
-public class ItemThiefGloves extends Item
-{
- public Random rand = new Random();
-
- /**
- *
- */
- public ItemThiefGloves()
- {
- setCreativeTab(CreativeTabs.tabTools);
- setMaxStackSize(1);
- setMaxDamage(10);
- }
-
- /**
- * @param stack
- * @param player
- * @param entity
- * @return
- */
- @Override
- public boolean itemInteractionForEntity(ItemStack stack, EntityPlayer player, EntityLivingBase entity)
- {
- if (entity instanceof EntityVillager){
- EntityVillager villager = (EntityVillager)entity;
- int wealth = (Integer)ReflectionHelper.getPrivateValue(EntityVillager.class, villager, "wealth", "field_70956_bz");
- MerchantRecipeList buyingList = (MerchantRecipeList)ReflectionHelper.getPrivateValue(EntityVillager.class, villager, "buyingList", "field_70963_i");
- int chance = 5;
- boolean areOtherVillagersAround = false, canTheySeeYou = false;
- AxisAlignedBB axisalignedbb = villager.boundingBox.expand(4.0D, 4.0D, 4.0D);
- List entities = villager.worldObj.getEntitiesWithinAABBExcludingEntity(villager, axisalignedbb);
- for(Object s: entities)
- if (s instanceof EntityVillager){
- areOtherVillagersAround = true;
- chance += rand.nextInt(2);
- if (((EntityVillager)s).canEntityBeSeen(player)){
- chance += 2;
- canTheySeeYou = true;
- }
- }
- if (villager.canEntityBeSeen(player)) chance += 5;
- if (player.isPotionActive(Potion.invisibility)) chance -= 0.8 * chance;
- if (player.capabilities.isCreativeMode) chance = 1;
- int steal = rand.nextInt(chance);
- if (steal == 0){
- villager.dropItem(Items.emerald, wealth);
- ReflectionHelper.setPrivateValue(EntityVillager.class, villager, 0, "wealth", "field_70956_bz");
- }
- if (buyingList != null){
- Iterator<?> iterator = buyingList.iterator();
- if (steal == 0){
- while (iterator.hasNext()){
- MerchantRecipe recipe = (MerchantRecipe)iterator.next();
- int toolUses = (Integer)ReflectionHelper.getPrivateValue(MerchantRecipe.class, recipe, "toolUses", "field_77400_d");
- int quantity;
- if (recipe.getItemToSell().isStackable()) quantity = recipe.getItemToSell().stackSize * (7 - toolUses);
- else quantity = recipe.getItemToSell().stackSize;
- ItemStack s = new ItemStack(recipe.getItemToSell().getItem(), quantity, recipe.getItemToSell().getItemDamage());
- s.setTagCompound(recipe.getItemToSell().getTagCompound());
- if (player.inventory.addItemStackToInventory(s)) ;
- else villager.entityDropItem(s, 0);
- if (!player.capabilities.isCreativeMode) JewelrycraftUtil.addCursePoints(player, 5);
- player.addChatMessage(new ChatComponentText("Villager #" + villager.getProfession() + ": Hmmm... I seem to have lost my " + s.getDisplayName() + "!"));
- stack.damageItem(1, player);
- }
- buyingList.clear();
- ReflectionHelper.setPrivateValue(EntityVillager.class, villager, 300, "timeUntilReset", "field_70961_j");
- ReflectionHelper.setPrivateValue(EntityVillager.class, villager, true, "needsInitilization", "field_70959_by");
- player.addChatMessage(new ChatComponentText("You hear a faint whisper in your ear: "));
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_PURPLE + "Those who steal but don't get caught get rewarded and do not."));
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_PURPLE + "Embrace the path you have gone, for the darkness will not"));
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_PURPLE + "dwell on."));
- }else{
- stack.damageItem(1, player);
- if (!player.capabilities.isCreativeMode) JewelrycraftUtil.addCursePoints(player, 25);
- if (player.isPotionActive(Potion.invisibility)){
- player.addChatMessage(new ChatComponentText("Villager #" + villager.getProfession() + " sensed a strange presence around him, making him cling on to his items. You didn't get anything."));
- }
- else{
- if (areOtherVillagersAround){
- if (!canTheySeeYou){
- player.addChatMessage(new ChatComponentText("As he was passing by, a random villager caught you trying to steal from Villager #" + villager.getProfession() + "."));
- player.addChatMessage(new ChatComponentText("Villager #" + villager.getProfession() + " curses you for the attempt."));
- return true;
- }
- else{
- player.addChatMessage(new ChatComponentText("A villager nearby saw you trying to steal from Villager #" + villager.getProfession() + "."));
- player.addChatMessage(new ChatComponentText("Villager #" + villager.getProfession() + " curses you for the attempt."));
- return true;
- }
- }else{
- player.addChatMessage(new ChatComponentText("Villager #" + villager.getProfession() + " caught you trying to steal from him."));
- player.addChatMessage(new ChatComponentText("Villager #" + villager.getProfession() + " curses you for the attempt."));
- return true;
- }
- }
- }
- }
- return true;
- }else return super.itemInteractionForEntity(stack, player, entity);
- }
-
- /**
- * @param stack
- * @param player
- * @param list
- * @param par4
- */
- @Override
- @SuppressWarnings ("unchecked")
- public void addInformation(ItemStack stack, EntityPlayer player, @SuppressWarnings ("rawtypes") List list, boolean par4)
- {
- if (!shouldAddAdditionalInfo()) list.add(EnumChatFormatting.GRAY + additionalInfoInstructions());
- else{
- list.add(EnumChatFormatting.GRAY + "Right click with the gloves,");
- list.add(EnumChatFormatting.GRAY + "while sneaking, on a villager");
- list.add(EnumChatFormatting.GRAY + "to steal his stuff.");
- }
- }
-
- /**
- * @return
- */
- public static boolean shouldAddAdditionalInfo()
- {
- if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) return true;
- return false;
- }
-
- /**
- * @return
- */
- public static String additionalInfoInstructions()
- {
- String message = "\247oPress \247b<SHIFT>\2477\247o for more information.";
- return message;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/da/a0ebd00b3de700141e05cdbaeb682437 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/da/a0ebd00b3de700141e05cdbaeb682437
deleted file mode 100644
index b53c27d..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/da/a0ebd00b3de700141e05cdbaeb682437
+++ /dev/null
@@ -1,122 +0,0 @@
-package darkknight.jewelrycraft.events;
-
-import java.util.Iterator;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import darkknight.jewelrycraft.entities.renders.RenderHelper;
-import darkknight.jewelrycraft.item.render.BraceletRender;
-import darkknight.jewelrycraft.item.render.EarringsRender;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.model.ModelBracelet;
-import darkknight.jewelrycraft.util.JewelryNBT;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
-
-public class PlayerRenderHandler
-{
- MaskRender mask = new MaskRender();
- EarringsRender earrings = new EarringsRender();
- BraceletRender bracelet = new BraceletRender();
-// public static String[] infamyCache = new String[]{};
-
- @SubscribeEvent
- public void renderScreen(RenderPlayerEvent.Specials.Post event)
- {
- ModelBiped main = event.renderer.modelBipedMain;
- Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
- if (infamyCache != null){
- while (players.hasNext()){
- EntityPlayer player = players.next();
- NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(1.6f, 1.6f, 1.6f);
- GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- GL11.glPopMatrix();
- }
- if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(0.07f, 0.07f, 0.07f);
- GL11.glTranslatef(0.0F, 3.0F, -2.0F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- earrings.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- GL11.glPopMatrix();
- }
- for(int i = 10; i <= 13; i++)
- if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
- if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
- if (i / 12 == 1){
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
- }else{
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- }
- GL11.glPopMatrix();
- }
- }
- }
- }
-
- /**
- * @param string
- * @return
- */
- private boolean checkPlayerInfamy(String string)
- {
- for(int i = 0; i < infamyCache.length; i++)
- if (infamyCache[i].equals(string)) return true;
- return false;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/605b1c3449e700141e05cdbaeb682437 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/db/50cc9fe591ea001411cee0f8f86532a4
index 05b2c1e..3b161f4 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/11/605b1c3449e700141e05cdbaeb682437
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/db/50cc9fe591ea001411cee0f8f86532a4
@@ -1,59 +1,42 @@
package darkknight.jewelrycraft.events;
import java.util.Iterator;
-import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.RenderPlayerEvent;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
import darkknight.jewelrycraft.curses.CurseList;
import darkknight.jewelrycraft.entities.renders.RenderHelper;
import darkknight.jewelrycraft.item.render.BraceletRender;
import darkknight.jewelrycraft.item.render.EarringsRender;
-import darkknight.jewelrycraft.item.render.MaskRender;
import darkknight.jewelrycraft.model.ModelBracelet;
import darkknight.jewelrycraft.util.JewelryNBT;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
public class PlayerRenderHandler
{
- MaskRender mask = new MaskRender();
EarringsRender earrings = new EarringsRender();
BraceletRender bracelet = new BraceletRender();
-// public static String[] infamyCache = new String[]{};
public static NBTTagCompound playersInfo = new NBTTagCompound();
@SubscribeEvent
public void renderScreen(RenderPlayerEvent.Specials.Post event)
{
ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
if (playersInfo != null){
while (players.hasNext()){
EntityPlayer player = players.next();
NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(1.6f, 1.6f, 1.6f);
- GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- GL11.glPopMatrix();
- }
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
@@ -82,23 +65,37 @@ public class PlayerRenderHandler
ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
GL11.glPushMatrix();
GL11.glColor4f(1, 1, 1, 1);
- GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
- if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
+ float size = 0.055F;
if (i / 12 == 1){
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
+// GL11.glTranslatef(0F, -(12-i)*0.1F, 0F);
+ float sizeY=(13-i)*0.055F;
+ rightArm.postRender(size);
+// if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+// if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F)
+// GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * sizeY, rightArm.rotationPointZ * size);
+// }else{
+// GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * sizeY, rightArm.rotationPointZ * size);
+// if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+// if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+// if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+// }
+// GL11.glScalef(0.05f, 0.03f, 0.05f);
int gemColor = -1;
int ingotColor = -1;
if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
}else{
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F)
+ GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
int gemColor = -1;
int ingotColor = -1;
if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
@@ -118,9 +115,7 @@ public class PlayerRenderHandler
private boolean checkPlayerInfamy(String string)
{
NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
- if(playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
-// for(int i = 0; i < infamyCache.length; i++)
-// if (infamyCache[i].equals(string)) return true;
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
return false;
}
}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/db/60d6c516b2ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/db/60d6c516b2ea001411cee0f8f86532a4
new file mode 100644
index 0000000..f8c4658
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/db/60d6c516b2ea001411cee0f8f86532a4
@@ -0,0 +1,31 @@
+package darkknight.jewelrycraft.item.render;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BraceletRender extends TileEntitySpecialRenderer
+{
+ public ModelBracelet bracelet = new ModelBracelet();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Bracelet.png");
+
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ }
+
+ public void doRender(Entity entity, double x, double y, double z, float f, float g)
+ {
+ GL11.glPushMatrix();
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+ if (z != -1) bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ GL11.glTranslatef(0F, 3F, 0F);
+ if (x != -1) bracelet.render(entity, 0F, 0F, 0F, (float)x, (float)y, 1.0F);
+ GL11.glPopMatrix();
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/dc/00dead5b97ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/dc/00dead5b97ea001411cee0f8f86532a4
new file mode 100644
index 0000000..4956b0d
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/dc/00dead5b97ea001411cee0f8f86532a4
@@ -0,0 +1,66 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CursePentagram extends Curse
+{
+ float rot = 0F;
+
+ public CursePentagram(String name, int txtID, String pack)
+ {
+ super(name, txtID, pack);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ @Override
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ GL11.glColor4f(1F, 1F, 1F, 0.3F);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "The Dark Lord has misterious ways of showing you his love.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/dc/50108b1b96ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/dc/50108b1b96ea001411cee0f8f86532a4
new file mode 100644
index 0000000..0666b45
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/dc/50108b1b96ea001411cee0f8f86532a4
@@ -0,0 +1,113 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.07f, 0.07f, 0.07f);
+ GL11.glTranslatef(0.0F, 1.0F, -1.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/dc/d03b0e77b1ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/dc/d03b0e77b1ea001411cee0f8f86532a4
new file mode 100644
index 0000000..8554473
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/dc/d03b0e77b1ea001411cee0f8f86532a4
@@ -0,0 +1,266 @@
+package darkknight.jewelrycraft.tileentity.renders;
+
+import java.awt.Color;
+import java.util.HashMap;
+import java.util.List;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.client.renderer.RenderHelper;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.entity.RenderManager;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelDisplayer;
+import darkknight.jewelrycraft.tileentity.TileEntityDisplayer;
+import darkknight.jewelrycraft.util.Variables;
+
+public class TileEntityDisplayerRender extends TileEntitySpecialRenderer
+{
+ ModelDisplayer displayer = new ModelDisplayer();
+ String texture = "textures/tileentities/Displayer.png";
+ HashMap<EnumChatFormatting, Integer> colors = new HashMap<EnumChatFormatting, Integer>(){
+ {
+ put(EnumChatFormatting.AQUA, 5636095);
+ put(EnumChatFormatting.BLACK, 0);
+ put(EnumChatFormatting.BLUE, 5592575);
+ put(EnumChatFormatting.DARK_AQUA, 43690);
+ put(EnumChatFormatting.DARK_BLUE, 170);
+ put(EnumChatFormatting.DARK_GRAY, 5592405);
+ put(EnumChatFormatting.DARK_GREEN, 43520);
+ put(EnumChatFormatting.DARK_PURPLE, 11141290);
+ put(EnumChatFormatting.DARK_RED, 11141120);
+ put(EnumChatFormatting.GOLD, 16755200);
+ put(EnumChatFormatting.GRAY, 11184810);
+ put(EnumChatFormatting.GREEN, 5635925);
+ put(EnumChatFormatting.LIGHT_PURPLE, 16733695);
+ put(EnumChatFormatting.RED, 16733525);
+ put(EnumChatFormatting.WHITE, 16777215);
+ put(EnumChatFormatting.YELLOW, 16777045);
+ }
+ };
+
+ /**
+ * @param te
+ * @param x
+ * @param y
+ * @param z
+ * @param scale
+ */
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ GL11.glPushMatrix();
+ GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
+ TileEntityDisplayer disp = (TileEntityDisplayer)te;
+ ResourceLocation blockTexture = new ResourceLocation(Variables.MODID, texture);
+ Minecraft.getMinecraft().renderEngine.bindTexture(blockTexture);
+ GL11.glPushMatrix();
+ GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
+ displayer.render((Entity)null, disp.ringTranslation1, disp.ringTranslation2, disp.ringTranslation3, 0.0F, 0.0F, 0.0625F);
+ RenderHelper.enableStandardItemLighting();
+ try{
+ int block = disp.getBlockMetadata();
+ if (disp != null && disp.hasObject && disp.object != null && disp.object.getItem() != null && disp.object != new ItemStack(Item.getItemById(0), 0, 0)){
+ int ind = -3;
+ GL11.glPushMatrix();
+ EntityItem entityitem = new EntityItem(te.getWorldObj(), 0.0D, 0.0D, 0.0D, disp.object);
+ entityitem.hoverStart = 0.0F;
+ disp.object.stackSize = 1;
+ GL11.glRotatef(180F, 1F, 0F, 0F);
+ GL11.glTranslatef(0.0F, -0.6F + disp.ringTranslation1 / 5, 0F);
+ GL11.glRotatef(disp.rotAngle, 0F, 1F, 0F);
+ if (RenderManager.instance.options.fancyGraphics) RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
+ else{
+ GL11.glRotatef(180F, 0F, 1F, 0F);
+ RenderManager.instance.options.fancyGraphics = true;
+ int i = 15728880;
+ int j = i % 65536;
+ int k = i / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, j / 1.0F, k / 1.0F);
+ RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
+ RenderManager.instance.options.fancyGraphics = false;
+ }
+ EntityPlayer player = te.getWorldObj().getClosestPlayer(te.xCoord, te.yCoord, te.zCoord, 5D);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ if (player != null) renderLabel(disp.object.getDisplayName(), 0F, -0.171F * ind, 0F, block, disp, colors.get(disp.object.getRarity().rarityColor));
+ GL11.glPopMatrix();
+ ind++;
+ if (player != null && disp.quantity > 1){
+ GL11.glPushMatrix();
+ renderLabel("x" + Integer.toString(disp.quantity), 0F, -0.171F * ind, 0F, block, disp, Color.GRAY.getRGB());
+ GL11.glPopMatrix();
+ ind++;
+ }
+ if (disp.object.getItem() != Items.map && player != null && disp.object.getTooltip(player, true) != null){
+ List tooltips = disp.object.getTooltip(player, true);
+ if (disp.infoIndex + 5 > tooltips.size()) disp.infoIndex = 1;
+ if (tooltips.size() < 5) for(int i = 1; i < tooltips.size(); i++){
+ String tooltip = tooltips.get(i).toString();
+ RenderManager.instance.getFontRenderer();
+ if (tooltip != ""){
+ GL11.glPushMatrix();
+ renderLabel(tooltip, 0F, -0.171F * ind, 0F, block, disp, Color.GRAY.getRGB());
+ GL11.glPopMatrix();
+ ind++;
+ }
+ }
+ else for(int i = disp.infoIndex; i < disp.infoIndex + 5; i++){
+ String tooltip = tooltips.get(i).toString();
+ RenderManager.instance.getFontRenderer();
+ if (tooltip != ""){
+ GL11.glPushMatrix();
+ renderLabel(tooltip, 0F, -0.171F * ind, 0F, block, disp, Color.GRAY.getRGB());
+ GL11.glPopMatrix();
+ ind++;
+ }
+ }
+ }
+ }
+ }
+ catch(Exception e){}
+ RenderHelper.disableStandardItemLighting();
+ GL11.glPopMatrix();
+ GL11.glPopMatrix();
+ }
+
+ /**
+ * @param par2Str
+ * @param x
+ * @param y
+ * @param z
+ * @param metadata
+ * @param te
+ * @param color
+ */
+ protected void renderLabel(String par2Str, double x, double y, double z, int metadata, TileEntity te, int color)
+ {
+ FontRenderer fontrenderer = RenderManager.instance.getFontRenderer();
+ float var14 = 0.01266667F * 1.5F;
+ float var17 = 0.015F;
+ GL11.glRotatef(180F, 0F, 0F, 1F);
+ if (metadata == 0) GL11.glRotatef(0F, 0F, 1F, 0F);
+ else if (metadata == 1) GL11.glRotatef(270F, 0F, 1F, 0F);
+ else if (metadata == 2) GL11.glRotatef(180F, 0F, 1F, 0F);
+ else if (metadata == 3) GL11.glRotatef(90F, 0F, 1F, 0F);
+ GL11.glTranslatef((float)x, (float)y, (float)z + 0.45F);
+ GL11.glScalef(-0.015F, -var14, 0.015F);
+ GL11.glPushMatrix();
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ Tessellator tessellator = Tessellator.instance;
+ GL11.glDisable(GL11.GL_TEXTURE_2D);
+ int j = fontrenderer.getStringWidth(par2Str) / 2;
+ tessellator.startDrawingQuads();
+ tessellator.setColorRGBA_F(0.0F, 0.2F, 0.2F, 0.9F);
+ tessellator.addVertex(-33.333 - 0, 0D, 0.1D);
+ tessellator.addVertex(-33.333 - 0, 9D, 0.1D);
+ tessellator.addVertex(33.333 + 0, 9D, 0.1D);
+ tessellator.addVertex(33.333 + 0, 0D, 0.1D);
+ tessellator.draw();
+ if (fontrenderer.getStringWidth(par2Str) / 2 > 20) var17 = 0.9F / fontrenderer.getStringWidth(par2Str);
+ else var17 = var14;
+ int red = color >> 16 & 0xFF;
+ int green = color >> 8 & 0xFF;
+ int blue = color & 0xFF;
+ GL11.glTranslatef((float)x + 1f, (float)y + 1f, (float)z);
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_TEXTURE_2D);
+ GL11.glScalef(var17 * 70F, 1F, 0F);
+ int i = 15728880;
+ int t = i % 65536;
+ int k = i / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, t / 1.0F, k / 1.0F);
+ fontrenderer.drawString(par2Str.replaceFirst("§0", "§r").replaceFirst("§1", "§r").replaceFirst("§2", "§r").replaceFirst("§3", "§r").replaceFirst("§4", "§r").replaceFirst("§5", "§r").replaceFirst("§6", "§r").replaceFirst("§7", "§r").replaceFirst("§8", "§r").replaceFirst("§9", "§r").replaceFirst("§a", "§r").replaceFirst("§b", "§r").replaceFirst("§c", "§r").replaceFirst("§d", "§r").replaceFirst("§e", "§r").replaceFirst("§f", "§r"), -j, 0, 65536 * (red > 170 ? red - 170 : 0) + 256 * (green > 170 ? green - 170 : 0) + (blue > 170 ? blue - 170 : 0));
+ GL11.glPopMatrix();
+ GL11.glTranslatef((float)x - 1f, (float)y - 1f, (float)z - 1F);
+ GL11.glScalef(var17 * 70F, 1F, 0F);
+ fontrenderer.drawString(par2Str, -j, 0, color);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glPopMatrix();
+ }
+
+ /**
+ * @param str
+ * @param color
+ */
+ public void replaceEnumEnchValues(String str, int color)
+ {
+ if (str.contains("§0")){
+ color = Color.BLACK.getRGB();
+ str.replace("§0", "");
+ }
+ if (str.contains("§1")){
+ color = 85;
+ str.replace("§1", "");
+ }
+ if (str.contains("§2")){
+ color = 17920;
+ str.replace("§2", "");
+ }
+ if (str.contains("§3")){
+ color = 1336183;
+ str.replace("§3", "");
+ }
+ if (str.contains("§4")){
+ color = 4587520;
+ str.replace("§4", "");
+ }
+ if (str.contains("§5")){
+ color = 5701759;
+ str.replace("§5", "");
+ }
+ if (str.contains("§6")){
+ color = 16762880;
+ str.replace("§6", "");
+ }
+ if (str.contains("§7")){
+ color = Color.GRAY.getRGB();
+ str.replace("§7", "");
+ }
+ if (str.contains("§8")){
+ color = Color.DARK_GRAY.getRGB();
+ str.replace("§8", "");
+ }
+ if (str.contains("§9")){
+ color = Color.BLUE.getRGB();
+ str.replace("§9", "");
+ }
+ if (str.contains("§a")){
+ color = Color.GREEN.getRGB();
+ str.replace("§a", "");
+ }
+ if (str.contains("§b")){
+ color = Color.CYAN.getRGB();
+ str.replace("§b", "");
+ }
+ if (str.contains("§c")){
+ color = Color.RED.getRGB();
+ str.replace("§c", "");
+ }
+ if (str.contains("§d")){
+ color = 11665663;
+ str.replace("§d", "");
+ }
+ if (str.contains("§e")){
+ color = Color.YELLOW.getRGB();
+ str.replace("§e", "");
+ }
+ if (str.contains("§f")){
+ color = Color.WHITE.getRGB();
+ str.replace("§f", "");
+ }
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/dc/f0768b8386ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/dc/f0768b8386ea001411cee0f8f86532a4
new file mode 100644
index 0000000..cd75e26
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/dc/f0768b8386ea001411cee0f8f86532a4
@@ -0,0 +1,98 @@
+package darkknight.jewelrycraft.events;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.gui.GuiChat;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderGameOverlayEvent;
+import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.util.Variables;
+
+public class ScreenHandler extends Gui
+{
+ private Minecraft mc;
+ public static NBTTagCompound tagCache = null;
+ public static int cooldown;
+
+ public ScreenHandler(Minecraft mc)
+ {
+ super();
+ this.mc = mc;
+ }
+
+ @SubscribeEvent
+ public void renderScreen(RenderGameOverlayEvent event)
+ {
+ if (event.isCancelable() || event.type != ElementType.ALL || tagCache == null) return;
+ if (!mc.gameSettings.showDebugInfo && !(mc.currentScreen instanceof GuiChat)){
+ int count = 0;
+ int size = 32;
+ ScaledResolution resolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
+ if (tagCache.hasKey("cursePoints") && tagCache.getInteger("cursePoints") > 0){
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ for(Curse curse: Curse.getCurseList()){
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ drawTexturedModalRect(-16, -16 + (size - 6) * count, 0, 32, 144, 60);
+ count++;
+ }
+ }
+ count = 0;
+ for(Curse curse: Curse.getCurseList())
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ mc.renderEngine.bindTexture(new ResourceLocation(Variables.MODID, "textures/gui/curses" + curse.getTexturePack() + ".png"));
+ int tag = curse.getID();
+ GL11.glPushMatrix();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glScalef(0.45f, 0.45f, 0.0f);
+ drawTexturedModalRect(28, 18 + (size + 26) * count, tag % size * size, tag / size * size, size, size);
+ GL11.glPopMatrix();
+ count++;
+ }
+ count = 0;
+ size = 16;
+ for(Curse curse: Curse.getCurseList())
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ int tag = curse.getID();
+ mc.fontRenderer.drawStringWithShadow(curse.getName().split(":")[1], 30, 11 + (size + 10) * count, 16777215);
+ if (tagCache.getInteger(curse.getName()) == 2){
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GL11.glColor4f(1f, 1f, 1f, 0.5f);
+ drawTexturedModalRect(95, 7 + (size + 10) * count, 3 * size, 0, size, size);
+ GL11.glPopMatrix();
+ }
+ count++;
+ }
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1f, 1f, 1f, 1.0f);
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ count = 0;
+ size = 16;
+ if (tagCache.getFloat("BlueHeart") > 0){
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 0 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlueHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
+ }
+ count++;
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ if (tagCache.getFloat("BlackHeart") > 0){
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 1 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlackHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
+ }
+ count++;
+ mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
+ if (tagCache.getFloat("WhiteHeart") > 0)
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 2 * size, 1 * size, size, size);
+ GL11.glPopMatrix();
+ }
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/de/8070a46bb0ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/de/8070a46bb0ea001411cee0f8f86532a4
new file mode 100644
index 0000000..da7395c
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/de/8070a46bb0ea001411cee0f8f86532a4
@@ -0,0 +1,130 @@
+/*
+ * Mod made by DarkKnight during the Modjam 3
+ * It's an awesome mod
+ * I love me! :D
+ */
+package darkknight.jewelrycraft;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.Item;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.gen.structure.MapGenStructureIO;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.Mod.EventHandler;
+import cpw.mods.fml.common.Mod.Instance;
+import cpw.mods.fml.common.ModMetadata;
+import cpw.mods.fml.common.SidedProxy;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.commands.JewelrycraftCommands;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.EntityList;
+import darkknight.jewelrycraft.events.EventList;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.network.PacketHandler;
+import darkknight.jewelrycraft.proxy.CommonProxy;
+import darkknight.jewelrycraft.recipes.CraftingRecipes;
+import darkknight.jewelrycraft.util.Variables;
+import darkknight.jewelrycraft.worldGen.village.ComponentJewelry;
+import darkknight.jewelrycraft.worldGen.village.JCTrades;
+import darkknight.jewelrycraft.worldGen.village.VillageJewelryHandler;
+
+@Mod (modid = Variables.MODID, name = Variables.MODNAME, version = Variables.VERSION, guiFactory = Variables.CONFIG_GUI, acceptedMinecraftVersions = "[1.7.10,1.8)", canBeDeactivated = true)
+public class JewelrycraftMod
+{
+ @Instance (Variables.MODID)
+ public static JewelrycraftMod instance;
+ @SidedProxy (clientSide = Variables.CLIENT_PROXY, serverSide = Variables.SERVER_PROXY)
+ public static CommonProxy proxy;
+ public static final Logger logger = Logger.getLogger("Jewelrycraft");
+ public static File dir;
+ public static CreativeTabs jewelrycraft = new CreativeTabs(Variables.MODID){
+ @Override
+ public Item getTabIconItem()
+ {
+ return Item.getItemFromBlock(BlockList.jewelCraftingTable);
+ }
+ };
+ public static CreativeTabs liquids = new CreativeTabLiquids("Liquids");
+ public static NBTTagCompound saveData = new NBTTagCompound();
+ public static NBTTagCompound clientData = new NBTTagCompound();
+ public static File liquidsConf;
+ public static SimpleNetworkWrapper netWrapper;
+ public static boolean fancyRender;
+ List<String> authorList = new ArrayList<String>();
+
+ /**
+ * Pre initialization of mod stuff.
+ *
+ * @param e FMLPreInitializationEvent
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ @EventHandler
+ public void preInit(FMLPreInitializationEvent e) throws IOException
+ {
+ ModMetadata metadata = e.getModMetadata();
+ dir = e.getModConfigurationDirectory();
+ ConfigHandler.INSTANCE.loadConfig(e);
+ BlockList.preInit(e);
+ ItemList.preInit(e);
+ CraftingRecipes.preInit(e);
+ CurseList.preInit(e);
+ PacketHandler.preInit(e);
+ EntityList.preInit(e);
+ VillagerRegistry.instance().registerVillagerId(3000);
+ VillagerRegistry.instance().registerVillageTradeHandler(3000, new JCTrades());
+ VillagerRegistry.instance().registerVillageCreationHandler(new VillageJewelryHandler());
+ try{
+ MapGenStructureIO.func_143031_a(ComponentJewelry.class, Variables.MODID + ":Jewelry");
+ }
+ catch(Throwable e2){
+ logger.severe("Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.7.10");
+ }
+ EventList.preInit(e);
+ authorList.add("OnyxDarkKnight");
+ authorList.add("bspkrs");
+ authorList.add("domi1819");
+ metadata.autogenerated = false;
+ metadata.authorList = authorList;
+ metadata.url = "https://github.com/sor1n/Jewelrycraft";
+ }
+
+ /**
+ * Initializes the world generation and key bindings.
+ *
+ * @param e FMLInitializationEvent
+ */
+ @EventHandler
+ public void init(FMLInitializationEvent e)
+ {
+ EventList.init(e);
+ }
+
+ /**
+ * Post initialization of metals, modifiers and others.
+ *
+ * @param e FMLPostInitializationEvent
+ */
+ @EventHandler
+ public void postInit(FMLPostInitializationEvent e)
+ {
+ EventList.postInit(e);
+ }
+
+ @Mod.EventHandler
+ public void serverLoad(FMLServerStartingEvent event)
+ {
+ event.registerServerCommand(new JewelrycraftCommands());
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/20a9f8c891e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/20a9f8c891e3001417b2e384bf7c3702
deleted file mode 100644
index 3dc5a44..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/20a9f8c891e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,25 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.getEntityRenderObject(midas.target).doRender(midas.target, te.xCoord, 0D, 0D, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/30c6f47f87ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/30c6f47f87ea001411cee0f8f86532a4
new file mode 100644
index 0000000..e28deaf
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/30c6f47f87ea001411cee0f8f86532a4
@@ -0,0 +1,30 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.world.World;
+
+public class CurseGreed extends Curse
+{
+ public CurseGreed(String name, int txtID, int packID)
+ {
+ super(name, txtID, packID);
+ }
+
+ @Override
+ public void action(World world, EntityPlayer player)
+ {
+ }
+
+ @Override
+ public boolean itemToss()
+ {
+ return true;
+ }
+
+ public String getDescription()
+ {
+ return "You might need that later";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/706fd6f390e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/706fd6f390e3001417b2e384bf7c3702
deleted file mode 100644
index 1593dd6..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/706fd6f390e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,25 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glColor4f(1F, 0.0F, 1.0F, 0.3F);
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- RenderManager.instance.renderEntityStatic(midas.target, 1F, false);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/90e9856afce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/90e9856afce40014174fe663e69b8422
deleted file mode 100644
index bcf52b4..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/90e9856afce40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.*;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static Item goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/f0dbfc7597e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/f0dbfc7597e3001412c4c4819c88e86b
deleted file mode 100644
index 0a028cf..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e/f0dbfc7597e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,75 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target.width);
- this.setBlockBounds(1 - ((TileEntityMidasTouch)tile).target.width, 0F, 1 - ((TileEntityMidasTouch)tile).target.width, ((TileEntityMidasTouch)tile).target.width, ((TileEntityMidasTouch)tile).target.height, ((TileEntityMidasTouch)tile).target.width);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e0/1021610993ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e0/1021610993ea001411cee0f8f86532a4
new file mode 100644
index 0000000..f24fde9
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e0/1021610993ea001411cee0f8f86532a4
@@ -0,0 +1,31 @@
+package darkknight.jewelrycraft.item.render;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BraceletRender extends TileEntitySpecialRenderer
+{
+ public ModelBracelet bracelet = new ModelBracelet();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Bracelet.png");
+
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ }
+
+ public void doRender(Entity entity, double x, double y, double z, float f, float g)
+ {
+ GL11.glPushMatrix();
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+ bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ GL11.glTranslatef(0F, 3F, 0F);
+ bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ GL11.glPopMatrix();
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e0/8018db0c86ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e0/8018db0c86ea001411cee0f8f86532a4
new file mode 100644
index 0000000..75b4056
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e0/8018db0c86ea001411cee0f8f86532a4
@@ -0,0 +1,128 @@
+package darkknight.jewelrycraft.curses;
+
+import java.util.ArrayList;
+import java.util.Random;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+
+public class Curse
+{
+ protected int id, texturepack;
+ protected String name, description;
+ protected Random rand = new Random();
+ private static ArrayList<Curse> curses = new ArrayList<Curse>();
+ public static ArrayList<Curse> availableCurses = new ArrayList<Curse>();
+
+ /**
+ * @param id the ID of the curse
+ * @param name the name of the curse
+ * @param texturepack the ID of the pack the texture is located in
+ */
+ protected Curse(int id, String name, int texturepack)
+ {
+ this.id = id;
+ this.name = name;
+ this.texturepack = texturepack;
+ curses.add(this);
+ availableCurses.add(this);
+ }
+
+ /**
+ * @return the name of the curse
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * @return the description of the curse
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public Curse setDescription(String desc)
+ {
+ description = desc;
+ return this;
+ }
+
+ /**
+ * @return the curse ID
+ */
+ public int getID()
+ {
+ return id;
+ }
+
+ /**
+ * @return the texture pack ID
+ */
+ public int getTexturePack()
+ {
+ return texturepack;
+ }
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void action(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void playerDeathAction(World world, EntityPlayer player)
+ {}
+
+ public void entityDeathAction(World world, EntityLivingBase target, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void respawnAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ public void entityDropItems(EntityPlayer player, Entity target, ArrayList<EntityItem> drops)
+ {}
+
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {}
+
+ public boolean itemToss()
+ {
+ return false;
+ }
+
+ /**
+ * @return
+ */
+ public static ArrayList<Curse> getCurseList()
+ {
+ return curses;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e1/90df506301e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e1/90df506301e50014174fe663e69b8422
deleted file mode 100644
index ddf14d8..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e1/90df506301e50014174fe663e69b8422
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null && Block.getBlockFromItem(item.getItem()) == null)
- return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e3/308fca16fde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e3/308fca16fde40014174fe663e69b8422
deleted file mode 100644
index ae58ad0..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e3/308fca16fde40014174fe663e69b8422
+++ /dev/null
@@ -1,66 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.block.material.Material;
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static Item goldifiedObject;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldifiedObject(Material.air).setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e3/5045c01799ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e3/5045c01799ea001411cee0f8f86532a4
new file mode 100644
index 0000000..669827c
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e3/5045c01799ea001411cee0f8f86532a4
@@ -0,0 +1,141 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+ float rot = 0F;
+
+ @SubscribeEvent
+ public void renderHand(RenderHandEvent event)
+ {
+ System.out.println(event.renderPass);
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, -16F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e4/60b445e4aeea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e4/60b445e4aeea001411cee0f8f86532a4
new file mode 100644
index 0000000..34cc2ed
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e4/60b445e4aeea001411cee0f8f86532a4
@@ -0,0 +1,18 @@
+package darkknight.jewelrycraft.entities;
+
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.JewelrycraftMod;
+import darkknight.jewelrycraft.util.Variables;
+
+public class EntityList
+{
+
+ public static void preInit(FMLPreInitializationEvent e)
+ {
+
+ createEntity(EntityHeart.class, Variables.MODID + ".Heart", 0xFF0000, 0xFF0000, false);
+ createEntity(EntityHalfHeart.class, Variables.MODID + ".Half-Heart", 0x000000, 0xFF0000, false);
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e6/00004ede9ae3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e6/00004ede9ae3001412c4c4819c88e86b
deleted file mode 100644
index f9a583a..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e6/00004ede9ae3001412c4c4819c88e86b
+++ /dev/null
@@ -1,95 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.ArrayList;
-import java.util.Random;
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-import darkknight.jewelrycraft.tileentity.TileEntityMolder;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- @Override
- public void breakBlock(World world, int i, int j, int k, Block par5, int par6)
- {
- TileEntityMidasTouch te = (TileEntityMidasTouch)world.getTileEntity(i, j, k);
- if (te.target != null) dropItem(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, new ItemStack(Items.gold_nugget, (int)(((TileEntityMidasTouch)tile).target.width * ((TileEntityMidasTouch)tile).target.height), 0));
-// world.removeTileEntity(i, j, k);
- super.breakBlock(world, i, j, k, par5, par6);
- }
-
- public void dropItem(World world, double x, double y, double z, ItemStack stack)
- {
- EntityItem entityitem = new EntityItem(world, x + 0.5D, y + 0.5D, z + 0.5D, stack);
- entityitem.motionX = 0;
- entityitem.motionZ = 0;
- entityitem.motionY = 0.11000000298023224D;
- world.spawnEntityInWorld(entityitem);
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null) this.setBlockBounds(0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0F, 0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2, ((TileEntityMidasTouch)tile).target.height, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2);
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e6/50d52b2996ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e6/50d52b2996ea001411cee0f8f86532a4
new file mode 100644
index 0000000..9df617a
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e6/50d52b2996ea001411cee0f8f86532a4
@@ -0,0 +1,113 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.05f, 0.05f);
+ GL11.glTranslatef(0.0F, 1.0F, -1.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e7/909b303c96ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e7/909b303c96ea001411cee0f8f86532a4
new file mode 100644
index 0000000..1ff4900
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e7/909b303c96ea001411cee0f8f86532a4
@@ -0,0 +1,113 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.JewelryNBT;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -1.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ /**
+ * @param string
+ * @return
+ */
+ private boolean checkPlayerInfamy(String string)
+ {
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
+ if (playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
+ return false;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e7/b0d35f77b0ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e7/b0d35f77b0ea001411cee0f8f86532a4
new file mode 100644
index 0000000..730bb56
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e7/b0d35f77b0ea001411cee0f8f86532a4
@@ -0,0 +1,118 @@
+/*
+ * Mod made by DarkKnight during the Modjam 3
+ * It's an awesome mod
+ * I love me! :D
+ */
+package darkknight.jewelrycraft;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.Item;
+import net.minecraft.nbt.NBTTagCompound;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.Mod.EventHandler;
+import cpw.mods.fml.common.Mod.Instance;
+import cpw.mods.fml.common.ModMetadata;
+import cpw.mods.fml.common.SidedProxy;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.commands.JewelrycraftCommands;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.entities.EntityList;
+import darkknight.jewelrycraft.events.EventList;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.network.PacketHandler;
+import darkknight.jewelrycraft.proxy.CommonProxy;
+import darkknight.jewelrycraft.recipes.CraftingRecipes;
+import darkknight.jewelrycraft.util.Variables;
+import darkknight.jewelrycraft.worldGen.village.VillageHandler;
+
+@Mod (modid = Variables.MODID, name = Variables.MODNAME, version = Variables.VERSION, guiFactory = Variables.CONFIG_GUI, acceptedMinecraftVersions = "[1.7.10,1.8)", canBeDeactivated = true)
+public class JewelrycraftMod
+{
+ @Instance (Variables.MODID)
+ public static JewelrycraftMod instance;
+ @SidedProxy (clientSide = Variables.CLIENT_PROXY, serverSide = Variables.SERVER_PROXY)
+ public static CommonProxy proxy;
+ public static final Logger logger = Logger.getLogger("Jewelrycraft");
+ public static File dir;
+ public static CreativeTabs jewelrycraft = new CreativeTabs(Variables.MODID){
+ @Override
+ public Item getTabIconItem()
+ {
+ return Item.getItemFromBlock(BlockList.jewelCraftingTable);
+ }
+ };
+ public static CreativeTabs liquids = new CreativeTabLiquids("Liquids");
+ public static NBTTagCompound saveData = new NBTTagCompound();
+ public static NBTTagCompound clientData = new NBTTagCompound();
+ public static File liquidsConf;
+ public static SimpleNetworkWrapper netWrapper;
+ public static boolean fancyRender;
+ List<String> authorList = new ArrayList<String>();
+
+ /**
+ * Pre initialization of mod stuff.
+ *
+ * @param e FMLPreInitializationEvent
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ @EventHandler
+ public void preInit(FMLPreInitializationEvent e) throws IOException
+ {
+ ModMetadata metadata = e.getModMetadata();
+ dir = e.getModConfigurationDirectory();
+ ConfigHandler.INSTANCE.loadConfig(e);
+ BlockList.preInit(e);
+ ItemList.preInit(e);
+ CraftingRecipes.preInit(e);
+ CurseList.preInit(e);
+ PacketHandler.preInit(e);
+ EntityList.preInit(e);
+ VillageHandler.preInit(e);
+ EventList.preInit(e);
+ authorList.add("OnyxDarkKnight");
+ authorList.add("bspkrs");
+ authorList.add("domi1819");
+ metadata.autogenerated = false;
+ metadata.authorList = authorList;
+ metadata.url = "https://github.com/sor1n/Jewelrycraft";
+ }
+
+ /**
+ * Initializes the world generation and key bindings.
+ *
+ * @param e FMLInitializationEvent
+ */
+ @EventHandler
+ public void init(FMLInitializationEvent e)
+ {
+ EventList.init(e);
+ }
+
+ /**
+ * Post initialization of metals, modifiers and others.
+ *
+ * @param e FMLPostInitializationEvent
+ */
+ @EventHandler
+ public void postInit(FMLPostInitializationEvent e)
+ {
+ EventList.postInit(e);
+ }
+
+ @Mod.EventHandler
+ public void serverLoad(FMLServerStartingEvent event)
+ {
+ event.registerServerCommand(new JewelrycraftCommands());
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e7/c04057b047e700141e05cdbaeb682437 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e7/c04057b047e700141e05cdbaeb682437
deleted file mode 100644
index e705fa6..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e7/c04057b047e700141e05cdbaeb682437
+++ /dev/null
@@ -1,128 +0,0 @@
-package darkknight.jewelrycraft.events;
-
-import java.util.Iterator;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import darkknight.jewelrycraft.curses.CurseList;
-import darkknight.jewelrycraft.entities.renders.RenderHelper;
-import darkknight.jewelrycraft.item.render.BraceletRender;
-import darkknight.jewelrycraft.item.render.EarringsRender;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.model.ModelBracelet;
-import darkknight.jewelrycraft.util.JewelryNBT;
-import darkknight.jewelrycraft.util.PlayerUtils;
-import darkknight.jewelrycraft.util.Variables;
-
-public class PlayerRenderHandler
-{
- MaskRender mask = new MaskRender();
- EarringsRender earrings = new EarringsRender();
- BraceletRender bracelet = new BraceletRender();
-// public static String[] infamyCache = new String[]{};
- public static NBTTagCompound playersInfo = new NBTTagCompound();
-
- @SubscribeEvent
- public void renderScreen(RenderPlayerEvent.Specials.Post event)
- {
- ModelBiped main = event.renderer.modelBipedMain;
- Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
- if (playersInfo != null){
- while (players.hasNext()){
- EntityPlayer player = players.next();
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
- if (checkPlayerInfamy(player.getDisplayName()) && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0){
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(1.6f, 1.6f, 1.6f);
- GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
- mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
- GL11.glPopMatrix();
- }
- if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
- float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
- float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glRotatef(yawOffset, 0, -1, 0);
- GL11.glRotatef(yaw - 90, 0, 1, 0);
- GL11.glRotatef(pitch, 0, 0, -1);
- GL11.glRotatef(90F, 0, 1F, 0F);
- RenderHelper.translateToHeadLevel(player);
- GL11.glScalef(0.07f, 0.07f, 0.07f);
- GL11.glTranslatef(0.0F, 3.0F, -2.0F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- earrings.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- GL11.glPopMatrix();
- }
- for(int i = 10; i <= 13; i++)
- if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
- NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
- ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glTranslatef((i / 12 == 1) ? -0.275F : 0.475F, 0.2F + ((i / 12 == 1) ? (i - 12) * 0.08F : (i - 10) * 0.08F), 0F);
- if (player.isSneaking()) GL11.glTranslatef(0F, 0F, -((i == 10 || i == 12) ? (0.1F) : 0.05F));
- if (i / 12 == 1){
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedRightArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedRightArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- System.out.println(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0.0F);
- }else{
- GL11.glScalef(0.05f, 0.03f, 0.05f);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleX * (180F / (float)Math.PI), 1F, 0F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleY * (180F / (float)Math.PI), 0F, 1F, 0F);
- GL11.glRotatef(main.bipedLeftArm.rotateAngleZ * (180F / (float)Math.PI), 0F, 0F, 1F);
- int gemColor = -1;
- int ingotColor = -1;
- if (JewelryNBT.gem(item) != null) gemColor = JewelryNBT.gemColor(item);
- if (JewelryNBT.ingot(item) != null) ingotColor = JewelryNBT.ingotColor(item);
- System.out.println(item);
- bracelet.doRender(event.entityPlayer, 0F, 0F, (float)ingotColor, (float)gemColor, 0F);
- }
- GL11.glPopMatrix();
- }
- }
- }
- }
-
- /**
- * @param string
- * @return
- */
- private boolean checkPlayerInfamy(String string)
- {
- NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(string);
- if(playerInfo.getInteger(CurseList.infamy.getName()) > 0) return true;
-// for(int i = 0; i < infamyCache.length; i++)
-// if (infamyCache[i].equals(string)) return true;
- return false;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e8/00dc62a998e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e8/00dc62a998e3001412c4c4819c88e86b
deleted file mode 100644
index c66477f..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e8/00dc62a998e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,27 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
-// GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- System.out.println(midas.target.rotationYaw);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, midas.target.posX - RenderManager.instance.renderPosX, midas.target.posY - RenderManager.instance.renderPosY, midas.target.posZ - RenderManager.instance.renderPosZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e8/606bf5d786ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e8/606bf5d786ea001411cee0f8f86532a4
new file mode 100644
index 0000000..ed8c629
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/e8/606bf5d786ea001411cee0f8f86532a4
@@ -0,0 +1,65 @@
+package darkknight.jewelrycraft.curses;
+
+import org.lwjgl.opengl.GL11;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.SharedMonsterAttributes;
+import net.minecraft.entity.monster.EntityMob;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import darkknight.jewelrycraft.damage.DamageSourceList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.MaskRender;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.PlayerUtils;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CurseInfamy extends Curse
+{
+ MaskRender mask = new MaskRender();
+ public CurseInfamy(int id, String name, int txtID, int packID)
+ {
+ super(id, name, txtID, packID);
+ }
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {
+ if (rand.nextInt(5) == 0 && !world.isRemote && !(target instanceof EntityMob) && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && target.canAttackWithItem()){
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
+ if (playerInfo.getFloat("BlackHeart") < 20F) playerInfo.setFloat("BlackHeart", playerInfo.getFloat("BlackHeart") + 1.0F);
+ if (player.getMaxHealth() >= 3F){
+ player.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(player.getMaxHealth() - 1.0F);
+ player.setHealth(player.getHealth() - 1.0F);
+ }
+ JewelrycraftUtil.addCursePoints(player, 10);
+ }
+ }
+
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {
+ float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
+ float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
+ float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ GL11.glRotatef(yawOffset, 0, -1, 0);
+ GL11.glRotatef(yaw - 90, 0, 1, 0);
+ GL11.glRotatef(pitch, 0, 0, -1);
+ GL11.glRotatef(90F, 0, 1F, 0F);
+ RenderHelper.translateToHeadLevel(player);
+ GL11.glScalef(1.6f, 1.6f, 1.6f);
+ GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
+ mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "What have you done?!";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ea/705e53cd96e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ea/705e53cd96e3001412c4c4819c88e86b
deleted file mode 100644
index a69b87f..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ea/705e53cd96e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,26 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, midas.target.posX - RenderManager.instance.renderPosX, midas.target.posY - RenderManager.instance.renderPosY, midas.target.posZ - RenderManager.instance.renderPosZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ea/80100efb96e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ea/80100efb96e3001412c4c4819c88e86b
deleted file mode 100644
index 33a2363..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ea/80100efb96e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,72 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null) this.setBlockBounds(0F, 0F, 0F, 1F, ((TileEntityMidasTouch)tile).target.height, 1F);
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ea/a053aefe94e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ea/a053aefe94e3001412c4c4819c88e86b
deleted file mode 100644
index f7cdd74..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ea/a053aefe94e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,74 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
- TileEntity tile = world.getTileEntity(x, y, z);
- if(((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target.boundingBox.calculateXOffset(((TileEntityMidasTouch)tile).target.boundingBox, 1f));
- this.setBlockBounds((float)((TileEntityMidasTouch)tile).target.boundingBox.minX, (float)((TileEntityMidasTouch)tile).target.boundingBox.minY, (float)((TileEntityMidasTouch)tile).target.boundingBox.minZ, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxX, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxY, (float)((TileEntityMidasTouch)tile).target.boundingBox.maxZ);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/001088b1b2ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/001088b1b2ea001411cee0f8f86532a4
new file mode 100644
index 0000000..37e291e
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/001088b1b2ea001411cee0f8f86532a4
@@ -0,0 +1,32 @@
+package darkknight.jewelrycraft.item.render;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BraceletRender extends TileEntitySpecialRenderer
+{
+ public ModelBracelet bracelet = new ModelBracelet();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Bracelet.png");
+
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ }
+
+ public void doRender(Entity entity, double x, double y, double z, float f, float g)
+ {
+ GL11.glPushMatrix();
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+ System.out.println((int)x + " " + (int)z);
+ if (z != (float)-1) bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ GL11.glTranslatef(0F, 3F, 0F);
+ if (x != (float)-1) bracelet.render(entity, 0F, 0F, 0F, (float)x, (float)y, 1.0F);
+ GL11.glPopMatrix();
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/4003450d99ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/4003450d99ea001411cee0f8f86532a4
new file mode 100644
index 0000000..e520fc9
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/4003450d99ea001411cee0f8f86532a4
@@ -0,0 +1,140 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+ float rot = 0F;
+
+ @SubscribeEvent
+ public void renderHand(RenderHandEvent event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, -16F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/506ecaee98ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/506ecaee98ea001411cee0f8f86532a4
new file mode 100644
index 0000000..c505024
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/506ecaee98ea001411cee0f8f86532a4
@@ -0,0 +1,140 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+ float rot = 0F;
+
+ @SubscribeEvent
+ public void renderHand(RenderHandEvent event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, -15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/90c9eff2fce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/90c9eff2fce40014174fe663e69b8422
deleted file mode 100644
index a499d75..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/90c9eff2fce40014174fe663e69b8422
+++ /dev/null
@@ -1,46 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.StatCollector;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public abstract class ItemGoldifiedObject extends Item
-{
- public ItemGoldifiedObject()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- if (JewelryNBT.gem(stack) != null) return this.getIconIndex(JewelryNBT.gem(stack));
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return (StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/e0c7efa692e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/e0c7efa692e3001417b2e384bf7c3702
deleted file mode 100644
index cb3c72b..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/eb/e0c7efa692e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,27 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, midas.target.posX - Minecraft.getMinecraft().thePlayer.posX, midas.target.posY - Minecraft.getMinecraft().thePlayer.posY, midas.target.posZ - Minecraft.getMinecraft().thePlayer.posZ, 0F, 1F);
-// RenderManager.instance.getEntityRenderObject(midas.target).doRender(midas.target, midas.target.posX - Minecraft.getMinecraft().thePlayer.posX, midas.target.posY - Minecraft.getMinecraft().thePlayer.posY, midas.target.posZ - Minecraft.getMinecraft().thePlayer.posZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ec/304cb8c386ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ec/304cb8c386ea001411cee0f8f86532a4
new file mode 100644
index 0000000..d88333a
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ec/304cb8c386ea001411cee0f8f86532a4
@@ -0,0 +1,60 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CursePentagram extends Curse
+{
+ float rot = 0F;
+
+ public CursePentagram(int id, String name, int txtID, int packID)
+ {
+ super(id, name, txtID, packID);
+ }
+
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(Variables.CURSES_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "The Dark Lord has misterious ways of showing you his love.";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ee/101c29e799e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ee/101c29e799e3001412c4c4819c88e86b
deleted file mode 100644
index 9f6222b..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ee/101c29e799e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,72 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null) this.setBlockBounds(0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0F, 0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2, ((TileEntityMidasTouch)tile).target.height, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2);
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ee/60f0442899ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ee/60f0442899ea001411cee0f8f86532a4
new file mode 100644
index 0000000..0263396
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ee/60f0442899ea001411cee0f8f86532a4
@@ -0,0 +1,141 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+ float rot = 0F;
+
+ @SubscribeEvent
+ public void renderHand(RenderHandEvent event)
+ {
+ System.out.println(event.context.getDebugInfoRenders());
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, -16F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ef/10d23bbdb2ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ef/10d23bbdb2ea001411cee0f8f86532a4
new file mode 100644
index 0000000..1567ffe
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ef/10d23bbdb2ea001411cee0f8f86532a4
@@ -0,0 +1,32 @@
+package darkknight.jewelrycraft.item.render;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BraceletRender extends TileEntitySpecialRenderer
+{
+ public ModelBracelet bracelet = new ModelBracelet();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Bracelet.png");
+
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ }
+
+ public void doRender(Entity entity, double x, double y, double z, float f, float g)
+ {
+ GL11.glPushMatrix();
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+// System.out.println((int)x + " " + (int)z);
+ if (z != (float)-1) bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ GL11.glTranslatef(0F, 3F, 0F);
+ if (x != (float)-1) bracelet.render(entity, 0F, 0F, 0F, (float)x, (float)y, 1.0F);
+ GL11.glPopMatrix();
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ef/70093e68afea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ef/70093e68afea001411cee0f8f86532a4
new file mode 100644
index 0000000..e1fef46
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ef/70093e68afea001411cee0f8f86532a4
@@ -0,0 +1,180 @@
+/*
+ * Mod made by DarkKnight during the Modjam 3
+ * It's an awesome mod
+ * I love me! :D
+ */
+package darkknight.jewelrycraft;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.gen.structure.MapGenStructureIO;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.oredict.OreDictionary;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.Mod.EventHandler;
+import cpw.mods.fml.common.Mod.Instance;
+import cpw.mods.fml.common.ModMetadata;
+import cpw.mods.fml.common.SidedProxy;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
+import cpw.mods.fml.common.registry.EntityRegistry;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.client.gui.GuiHandler;
+import darkknight.jewelrycraft.commands.JewelrycraftCommands;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.damage.DamageSourceList;
+import darkknight.jewelrycraft.effects.EffectsList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.entities.EntityList;
+import darkknight.jewelrycraft.events.BlockEventHandler;
+import darkknight.jewelrycraft.events.BucketHandler;
+import darkknight.jewelrycraft.events.EntityEventHandler;
+import darkknight.jewelrycraft.events.EventCommonHandler;
+import darkknight.jewelrycraft.events.KeyBindings;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.network.PacketClearColorCache;
+import darkknight.jewelrycraft.network.PacketHandler;
+import darkknight.jewelrycraft.network.PacketKeyPressEvent;
+import darkknight.jewelrycraft.network.PacketRequestLiquidData;
+import darkknight.jewelrycraft.network.PacketRequestPlayerInfo;
+import darkknight.jewelrycraft.network.PacketRequestSetSlot;
+import darkknight.jewelrycraft.network.PacketSendServerPlayersInfo;
+import darkknight.jewelrycraft.network.PacketSendLiquidData;
+import darkknight.jewelrycraft.network.PacketSendClientPlayerInfo;
+import darkknight.jewelrycraft.proxy.CommonProxy;
+import darkknight.jewelrycraft.recipes.CraftingRecipes;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.Variables;
+import darkknight.jewelrycraft.worldGen.Generation;
+import darkknight.jewelrycraft.worldGen.village.ComponentJewelry;
+import darkknight.jewelrycraft.worldGen.village.JCTrades;
+import darkknight.jewelrycraft.worldGen.village.VillageJewelryHandler;
+
+@Mod (modid = Variables.MODID, name = Variables.MODNAME, version = Variables.VERSION, guiFactory = Variables.CONFIG_GUI, acceptedMinecraftVersions = "[1.7.10,1.8)", canBeDeactivated = true)
+public class JewelrycraftMod
+{
+ @Instance (Variables.MODID)
+ public static JewelrycraftMod instance;
+
+ @SidedProxy (clientSide = Variables.CLIENT_PROXY, serverSide = Variables.SERVER_PROXY)
+ public static CommonProxy proxy;
+ public static final Logger logger = Logger.getLogger("Jewelrycraft");
+ public static File dir;
+
+ public static CreativeTabs jewelrycraft = new CreativeTabs(Variables.MODID){
+ @Override
+ public Item getTabIconItem()
+ {
+ return Item.getItemFromBlock(BlockList.jewelCraftingTable);
+ }
+ };
+
+ public static CreativeTabs liquids = new CreativeTabLiquids("Liquids");
+ public static NBTTagCompound saveData = new NBTTagCompound();
+ public static NBTTagCompound clientData = new NBTTagCompound();
+ public static File liquidsConf;
+ public static SimpleNetworkWrapper netWrapper;
+ public static boolean fancyRender;
+ List<String> authorList = new ArrayList<String>();
+
+ /**
+ * Pre initialization of mod stuff.
+ *
+ * @param e FMLPreInitializationEvent
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ @EventHandler
+ public void preInit(FMLPreInitializationEvent e) throws IOException
+ {
+ ModMetadata metadata = e.getModMetadata();
+ dir = e.getModConfigurationDirectory();
+
+ ConfigHandler.INSTANCE.loadConfig(e);
+ BlockList.preInit(e);
+ ItemList.preInit(e);
+ CraftingRecipes.preInit(e);
+ CurseList.preInit(e);
+ PacketHandler.preInit(e);
+ EntityList.preInit(e);
+
+ proxy.preInit();
+
+ OreDictionary.registerOre("ingotShadow", new ItemStack(ItemList.shadowIngot));
+ OreDictionary.registerOre("oreShadow", new ItemStack(BlockList.shadowOre));
+ VillagerRegistry.instance().registerVillagerId(3000);
+ VillagerRegistry.instance().registerVillageTradeHandler(3000, new JCTrades());
+ VillagerRegistry.instance().registerVillageCreationHandler(new VillageJewelryHandler());
+ try{
+ MapGenStructureIO.func_143031_a(ComponentJewelry.class, Variables.MODID + ":Jewelry");
+ }
+ catch(Throwable e2){
+ logger.severe("Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.7.10");
+ }
+ MinecraftForge.EVENT_BUS.register(new EntityEventHandler());
+ MinecraftForge.EVENT_BUS.register(new BlockEventHandler());
+ MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
+ FMLCommonHandler.instance().bus().register(new EventCommonHandler());
+ BucketHandler.INSTANCE.buckets.put(BlockList.moltenMetal, ItemList.bucket);
+
+ authorList.add("OnyxDarkKnight");
+ authorList.add("bspkrs");
+ authorList.add("domi1819");
+ metadata.autogenerated = false;
+ metadata.authorList = authorList;
+ metadata.url = "https://github.com/sor1n/Jewelrycraft";
+ }
+
+ /**
+ * Initializes the world generation and key bindings.
+ *
+ * @param e FMLInitializationEvent
+ */
+ @EventHandler
+ public void init(FMLInitializationEvent e)
+ {
+ GameRegistry.registerWorldGenerator(new Generation(), 0);
+ if (FMLCommonHandler.instance().getSide() == Side.CLIENT) FMLCommonHandler.instance().bus().register(new KeyBindings());
+ new GuiHandler();
+ FMLCommonHandler.instance().bus().register(ConfigHandler.INSTANCE);
+ }
+
+ /**
+ * Post initialization of metals, modifiers and others.
+ *
+ * @param e FMLPostInitializationEvent
+ */
+ @EventHandler
+ public void postInit(FMLPostInitializationEvent e)
+ {
+ JewelrycraftUtil.addMetals();
+ JewelrycraftUtil.jamcrafters();
+ EffectsList.postInit(e);
+ DamageSourceList.postInit(e);
+ proxy.postInit();
+ }
+
+ @Mod.EventHandler
+ public void serverLoad(FMLServerStartingEvent event)
+ {
+ event.registerServerCommand(new JewelrycraftCommands());
+ }
+
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ef/b02994c8fce50014127dc373d78c1666 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ef/b02994c8fce50014127dc373d78c1666
deleted file mode 100644
index 7c02d6c..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ef/b02994c8fce50014127dc373d78c1666
+++ /dev/null
@@ -1,94 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.ArrayList;
-import java.util.Random;
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-import darkknight.jewelrycraft.tileentity.TileEntityMolder;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 0;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- @Override
- public void breakBlock(World world, int i, int j, int k, Block par5, int par6)
- {
- TileEntityMidasTouch te = (TileEntityMidasTouch)world.getTileEntity(i, j, k);
- if (te.target != null) dropItem(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, new ItemStack(Items.gold_nugget, (int)(te.target.width * te.target.height * 100), 0));
- super.breakBlock(world, i, j, k, par5, par6);
- }
-
- public void dropItem(World world, double x, double y, double z, ItemStack stack)
- {
- EntityItem entityitem = new EntityItem(world, x + 0.5D, y + 0.5D, z + 0.5D, stack);
- entityitem.motionX = 0;
- entityitem.motionZ = 0;
- entityitem.motionY = 0.11000000298023224D;
- world.spawnEntityInWorld(entityitem);
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null) this.setBlockBounds(0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0F, 0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2, ((TileEntityMidasTouch)tile).target.height, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2);
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ef/e0b44d1186ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ef/e0b44d1186ea001411cee0f8f86532a4
new file mode 100644
index 0000000..2e70e63
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ef/e0b44d1186ea001411cee0f8f86532a4
@@ -0,0 +1,134 @@
+package darkknight.jewelrycraft.curses;
+
+import java.util.ArrayList;
+import java.util.Random;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+
+public class Curse
+{
+ protected int id, texturepack, textureID;
+ protected String name, description;
+ protected Random rand = new Random();
+ private static ArrayList<Curse> curses = new ArrayList<Curse>();
+ public static ArrayList<Curse> availableCurses = new ArrayList<Curse>();
+
+ /**
+ * @param id the ID of the curse
+ * @param name the name of the curse
+ * @param texturepack the ID of the pack the texture is located in
+ */
+ protected Curse(int id, String name, int txtID, int texturepack)
+ {
+ this.id = id;
+ this.name = name;
+ this.texturepack = texturepack;
+ this.textureID = txtID;
+ curses.add(this);
+ availableCurses.add(this);
+ }
+
+ /**
+ * @return the name of the curse
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * @return the description of the curse
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public Curse setDescription(String desc)
+ {
+ description = desc;
+ return this;
+ }
+
+ /**
+ * @return the curse ID
+ */
+ public int getID()
+ {
+ return id;
+ }
+
+ /**
+ * @return the texture pack ID
+ */
+ public int getTexturePack()
+ {
+ return texturepack;
+ }
+
+ public int getTextureID()
+ {
+ return textureID;
+ }
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void action(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void playerDeathAction(World world, EntityPlayer player)
+ {}
+
+ public void entityDeathAction(World world, EntityLivingBase target, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void respawnAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedAction(World world, EntityPlayer player)
+ {}
+
+ /**
+ * @param world
+ * @param player
+ */
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {}
+
+ public void entityDropItems(EntityPlayer player, Entity target, ArrayList<EntityItem> drops)
+ {}
+
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {}
+
+ public boolean itemToss()
+ {
+ return false;
+ }
+
+ /**
+ * @return
+ */
+ public static ArrayList<Curse> getCurseList()
+ {
+ return curses;
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f/10c9048a91e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f/10c9048a91e3001417b2e384bf7c3702
deleted file mode 100644
index ed399b8..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f/10c9048a91e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,25 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(1F, 0.0F, 1.0F);
- RenderManager.instance.getEntityRenderObject(midas.target).doRender(midas.target, 0D, 0D, 0D, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f1/60bb815703e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f1/60bb815703e50014174fe663e69b8422
deleted file mode 100644
index 2a639d2..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f1/60bb815703e50014174fe663e69b8422
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null){
- if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else return Block.getBlockFromItem(item.getItem()).getIcon(0, 0);
- }else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/00f951d59ce3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/00f951d59ce3001412c4c4819c88e86b
deleted file mode 100644
index f06b435..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/00f951d59ce3001412c4c4819c88e86b
+++ /dev/null
@@ -1,96 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.ArrayList;
-import java.util.Random;
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-import darkknight.jewelrycraft.tileentity.TileEntityMolder;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- @Override
- public void breakBlock(World world, int i, int j, int k, Block par5, int par6)
- {
- TileEntityMidasTouch te = (TileEntityMidasTouch)world.getTileEntity(i, j, k);
- if (te.target != null) dropItem(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, new ItemStack(Items.gold_nugget, (int)(te.target.width * te.target.height * 100), 0));
-// world.removeTileEntity(i, j, k);
- System.out.println("drop");
- super.breakBlock(world, i, j, k, par5, par6);
- }
-
- public void dropItem(World world, double x, double y, double z, ItemStack stack)
- {
- EntityItem entityitem = new EntityItem(world, x + 0.5D, y + 0.5D, z + 0.5D, stack);
- entityitem.motionX = 0;
- entityitem.motionZ = 0;
- entityitem.motionY = 0.11000000298023224D;
- world.spawnEntityInWorld(entityitem);
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null) this.setBlockBounds(0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0F, 0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2, ((TileEntityMidasTouch)tile).target.height, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2);
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/308b24a298ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/308b24a298ea001411cee0f8f86532a4
new file mode 100644
index 0000000..a307d00
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/308b24a298ea001411cee0f8f86532a4
@@ -0,0 +1,140 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+ float rot = 0F;
+
+ @SubscribeEvent
+ public void renderHand(RenderHandEvent event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-16F, 15F, -16F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/a0e185aeb4ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/a0e185aeb4ea001411cee0f8f86532a4
new file mode 100644
index 0000000..5b38d47
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/a0e185aeb4ea001411cee0f8f86532a4
@@ -0,0 +1,32 @@
+package darkknight.jewelrycraft.item.render;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.model.ModelBracelet;
+import darkknight.jewelrycraft.util.Variables;
+
+public class BraceletRender extends TileEntitySpecialRenderer
+{
+ public ModelBracelet bracelet = new ModelBracelet();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/entities/Bracelet.png");
+
+ @Override
+ public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
+ {
+ }
+
+ public void doRender(Entity entity, double x, double y, double z, float f, float g)
+ {
+ GL11.glPushMatrix();
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+// System.out.println((int)x + " " + (int)z);
+ if ((int)z != 16777215) bracelet.render(entity, 0F, 0F, 0F, (float)z, f, 1.0F);
+ GL11.glTranslatef(0F, 3F, 0F);
+ if ((int)x != 16777215) bracelet.render(entity, 0F, 0F, 0F, (float)x, (float)y, 1.0F);
+ GL11.glPopMatrix();
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/b0a9941f9be3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/b0a9941f9be3001412c4c4819c88e86b
deleted file mode 100644
index 1055fc5..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/b0a9941f9be3001412c4c4819c88e86b
+++ /dev/null
@@ -1,95 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.ArrayList;
-import java.util.Random;
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-import darkknight.jewelrycraft.tileentity.TileEntityMolder;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- @Override
- public void breakBlock(World world, int i, int j, int k, Block par5, int par6)
- {
- TileEntityMidasTouch te = (TileEntityMidasTouch)world.getTileEntity(i, j, k);
- if (te.target != null) dropItem(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, new ItemStack(Items.gold_nugget, (int)(te.target.width * te.target.height), 0));
-// world.removeTileEntity(i, j, k);
- super.breakBlock(world, i, j, k, par5, par6);
- }
-
- public void dropItem(World world, double x, double y, double z, ItemStack stack)
- {
- EntityItem entityitem = new EntityItem(world, x + 0.5D, y + 0.5D, z + 0.5D, stack);
- entityitem.motionX = 0;
- entityitem.motionZ = 0;
- entityitem.motionY = 0.11000000298023224D;
- world.spawnEntityInWorld(entityitem);
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null) this.setBlockBounds(0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0F, 0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2, ((TileEntityMidasTouch)tile).target.height, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2);
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/b0d474f9aeea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/b0d474f9aeea001411cee0f8f86532a4
new file mode 100644
index 0000000..9f2f570
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f2/b0d474f9aeea001411cee0f8f86532a4
@@ -0,0 +1,190 @@
+/*
+ * Mod made by DarkKnight during the Modjam 3
+ * It's an awesome mod
+ * I love me! :D
+ */
+package darkknight.jewelrycraft;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.gen.structure.MapGenStructureIO;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.oredict.OreDictionary;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.Mod.EventHandler;
+import cpw.mods.fml.common.Mod.Instance;
+import cpw.mods.fml.common.ModMetadata;
+import cpw.mods.fml.common.SidedProxy;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
+import cpw.mods.fml.common.registry.EntityRegistry;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+import cpw.mods.fml.relauncher.Side;
+import darkknight.jewelrycraft.block.BlockList;
+import darkknight.jewelrycraft.client.gui.GuiHandler;
+import darkknight.jewelrycraft.commands.JewelrycraftCommands;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.damage.DamageSourceList;
+import darkknight.jewelrycraft.effects.EffectsList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.events.BlockEventHandler;
+import darkknight.jewelrycraft.events.BucketHandler;
+import darkknight.jewelrycraft.events.EntityEventHandler;
+import darkknight.jewelrycraft.events.EventCommonHandler;
+import darkknight.jewelrycraft.events.KeyBindings;
+import darkknight.jewelrycraft.item.ItemList;
+import darkknight.jewelrycraft.network.PacketClearColorCache;
+import darkknight.jewelrycraft.network.PacketHandler;
+import darkknight.jewelrycraft.network.PacketKeyPressEvent;
+import darkknight.jewelrycraft.network.PacketRequestLiquidData;
+import darkknight.jewelrycraft.network.PacketRequestPlayerInfo;
+import darkknight.jewelrycraft.network.PacketRequestSetSlot;
+import darkknight.jewelrycraft.network.PacketSendServerPlayersInfo;
+import darkknight.jewelrycraft.network.PacketSendLiquidData;
+import darkknight.jewelrycraft.network.PacketSendClientPlayerInfo;
+import darkknight.jewelrycraft.proxy.CommonProxy;
+import darkknight.jewelrycraft.recipes.CraftingRecipes;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.Variables;
+import darkknight.jewelrycraft.worldGen.Generation;
+import darkknight.jewelrycraft.worldGen.village.ComponentJewelry;
+import darkknight.jewelrycraft.worldGen.village.JCTrades;
+import darkknight.jewelrycraft.worldGen.village.VillageJewelryHandler;
+
+@Mod (modid = Variables.MODID, name = Variables.MODNAME, version = Variables.VERSION, guiFactory = Variables.CONFIG_GUI, acceptedMinecraftVersions = "[1.7.10,1.8)", canBeDeactivated = true)
+public class JewelrycraftMod
+{
+ @Instance (Variables.MODID)
+ public static JewelrycraftMod instance;
+
+ @SidedProxy (clientSide = Variables.CLIENT_PROXY, serverSide = Variables.SERVER_PROXY)
+ public static CommonProxy proxy;
+ public static final Logger logger = Logger.getLogger("Jewelrycraft");
+ public static File dir;
+
+ public static CreativeTabs jewelrycraft = new CreativeTabs(Variables.MODID){
+ @Override
+ public Item getTabIconItem()
+ {
+ return Item.getItemFromBlock(BlockList.jewelCraftingTable);
+ }
+ };
+
+ public static CreativeTabs liquids = new CreativeTabLiquids("Liquids");
+ public static NBTTagCompound saveData = new NBTTagCompound();
+ public static NBTTagCompound clientData = new NBTTagCompound();
+ public static File liquidsConf;
+ public static SimpleNetworkWrapper netWrapper;
+ public static boolean fancyRender;
+
+ /**
+ * Pre initialization of mod stuff.
+ *
+ * @param e FMLPreInitializationEvent
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ @EventHandler
+ public void preInit(FMLPreInitializationEvent e) throws IOException
+ {
+ ConfigHandler.INSTANCE.loadConfig(e);
+ BlockList.preInit(e);
+ ItemList.preInit(e);
+ CraftingRecipes.preInit(e);
+ CurseList.preInit(e);
+ OreDictionary.registerOre("ingotShadow", new ItemStack(ItemList.shadowIngot));
+ OreDictionary.registerOre("oreShadow", new ItemStack(BlockList.shadowOre));
+ VillagerRegistry.instance().registerVillagerId(3000);
+ VillagerRegistry.instance().registerVillageTradeHandler(3000, new JCTrades());
+ VillagerRegistry.instance().registerVillageCreationHandler(new VillageJewelryHandler());
+ try{
+ MapGenStructureIO.func_143031_a(ComponentJewelry.class, Variables.MODID + ":Jewelry");
+ }
+ catch(Throwable e2){
+ logger.severe("Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.7.10");
+ }
+ MinecraftForge.EVENT_BUS.register(new EntityEventHandler());
+ MinecraftForge.EVENT_BUS.register(new BlockEventHandler());
+ MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
+ FMLCommonHandler.instance().bus().register(new EventCommonHandler());
+ BucketHandler.INSTANCE.buckets.put(BlockList.moltenMetal, ItemList.bucket);
+
+ ModMetadata metadata = e.getModMetadata();
+ List<String> authorList = new ArrayList<String>();
+
+ authorList.add("OnyxDarkKnight");
+ authorList.add("bspkrs");
+ authorList.add("domi1819");
+
+ dir = e.getModConfigurationDirectory();
+ proxy.preInit();
+ PacketHandler.preInit(e);
+
+ metadata.autogenerated = false;
+ metadata.authorList = authorList;
+ metadata.url = "https://github.com/sor1n/Jewelrycraft";
+
+ createEntity(EntityHeart.class, Variables.MODID + ".Heart", 0xFF0000, 0xFF0000, false);
+ createEntity(EntityHalfHeart.class, Variables.MODID + ".Half-Heart", 0x000000, 0xFF0000, false);
+
+ }
+
+ public void createEntity(Class<? extends Entity> entity, String entityName, int solidColor, int spotColor, boolean hasSpawnEgg)
+ {
+ int randomID = EntityRegistry.findGlobalUniqueEntityId();
+ if(hasSpawnEgg) EntityRegistry.registerGlobalEntityID(entity, entityName, randomID, solidColor, spotColor);
+ else EntityRegistry.registerGlobalEntityID(entity, entityName, randomID);
+ EntityRegistry.registerModEntity(entity, entityName, randomID, this, 40, 3, true);
+ }
+
+ /**
+ * Initializes the world generation and key bindings.
+ *
+ * @param e FMLInitializationEvent
+ */
+ @EventHandler
+ public void init(FMLInitializationEvent e)
+ {
+ GameRegistry.registerWorldGenerator(new Generation(), 0);
+ if (FMLCommonHandler.instance().getSide() == Side.CLIENT) FMLCommonHandler.instance().bus().register(new KeyBindings());
+ new GuiHandler();
+ FMLCommonHandler.instance().bus().register(ConfigHandler.INSTANCE);
+ }
+
+ /**
+ * Post initialization of metals, modifiers and others.
+ *
+ * @param e FMLPostInitializationEvent
+ */
+ @EventHandler
+ public void postInit(FMLPostInitializationEvent e)
+ {
+ JewelrycraftUtil.addMetals();
+ JewelrycraftUtil.jamcrafters();
+ EffectsList.postInit(e);
+ DamageSourceList.postInit(e);
+ proxy.postInit();
+ }
+
+ @Mod.EventHandler
+ public void serverLoad(FMLServerStartingEvent event)
+ {
+ event.registerServerCommand(new JewelrycraftCommands());
+ }
+
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5/c0c8f29707e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f3/2044223785ea001411cee0f8f86532a4
index ec1b0c0..446cf92 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/5/c0c8f29707e50014174fe663e69b8422
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f3/2044223785ea001411cee0f8f86532a4
@@ -7,6 +7,7 @@ import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
+import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.VillagerRegistry;
import darkknight.jewelrycraft.block.BlockList;
import darkknight.jewelrycraft.client.InventoryTabVanilla;
@@ -52,10 +53,8 @@ public class ClientProxy extends CommonProxy
@Override
public void preInit()
{
- ResourceLocation pedestalResourceLocation = new ResourceLocation(Variables.MODID, "textures/tileentities/BricksPedestal.png");
- TileEntityHandPedestalRender pedestalRender = new TileEntityHandPedestalRender(new ModelHandPedestal(pedestalResourceLocation), pedestalResourceLocation);
- ResourceLocation shadowResourceLocation = new ResourceLocation(Variables.MODID, "textures/tileentities/ShadowHand.png");
- TileEntityShadowHandRender shadowHandRender = new TileEntityShadowHandRender(new ModelShadowHand(shadowResourceLocation), shadowResourceLocation);
+ TileEntityHandPedestalRender pedestalRender = new TileEntityHandPedestalRender(new ModelHandPedestal(Variables.PEDESTAL_TEXTURE), Variables.PEDESTAL_TEXTURE);
+ TileEntityShadowHandRender shadowHandRender = new TileEntityShadowHandRender(new ModelShadowHand(Variables.SHADOW_HAND_TEXTURE), Variables.SHADOW_HAND_TEXTURE);
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmelter.class, new TileEntitySmelterRender());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMolder.class, new TileEntityMolderRender());
@@ -71,21 +70,20 @@ public class ClientProxy extends CommonProxy
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.smelter), new ItemRender(new TileEntitySmelterRender(), new TileEntitySmelter(), new ModelSmelter()));
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.molder), new ItemRender(new TileEntityMolderRender(), new TileEntityMolder(), new ModelMolder()));
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.shadowEye), new ItemRender(new TileEntityShadowEyeRender(), new TileEntityShadowEye(), new ModelShadowEye()));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.handPedestal), new ItemRender(pedestalRender, new TileEntityHandPedestal(), new ModelHandPedestal(pedestalResourceLocation)));
- MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.shadowHand), new ItemRender(shadowHandRender, new TileEntityShadowHand(), new ModelShadowHand(shadowResourceLocation)));
- MinecraftForgeClient.registerItemRenderer(ItemList.goldObj, new ItemRender(null));
+ MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.handPedestal), new ItemRender(pedestalRender, new TileEntityHandPedestal(), new ModelHandPedestal(Variables.PEDESTAL_TEXTURE)));
+ MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockList.shadowHand), new ItemRender(shadowHandRender, new TileEntityShadowHand(), new ModelShadowHand(Variables.SHADOW_HAND_TEXTURE)));
+ MinecraftForgeClient.registerItemRenderer(ItemList.goldObj, new ItemRender());
- VillagerRegistry.instance().registerVillagerSkin(3000, new ResourceLocation(Variables.MODID, "textures/entities/jeweler.png"));
+ VillagerRegistry.instance().registerVillagerSkin(3000, Variables.VILLAGER_TEXTURE);
RenderingRegistry.registerEntityRenderingHandler(EntityHeart.class, new HeartRender(new ModelHeart(), 0.25F));
RenderingRegistry.registerEntityRenderingHandler(EntityHalfHeart.class, new HeartRender(new ModelHalfHeart(), 0.25F));
-
+
TabRegistry.registerTab(new InventoryTabVanilla());
TabRegistry.registerTab(new TabJewelry());
MinecraftForge.EVENT_BUS.register(new TabRegistry());
MinecraftForge.EVENT_BUS.register(new PlayerRenderHandler());
- ResourceLocation jeweleryTexture = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
- MinecraftForge.EVENT_BUS.register(new ScreenHandler(Minecraft.getMinecraft(), jeweleryTexture));
+ MinecraftForge.EVENT_BUS.register(new ScreenHandler(Minecraft.getMinecraft(), Variables.CURSES_TEXTURE));
}
@Override
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f3/f03670018ee3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f3/f03670018ee3001417b2e384bf7c3702
deleted file mode 100644
index 07f5a94..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f3/f03670018ee3001417b2e384bf7c3702
+++ /dev/null
@@ -1,24 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor4f(1F, 0.0F, 0.0F, 1F);
- RenderManager.instance.renderEntityStatic(midas.target, 1F, false);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f4/a015049497e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f4/a015049497e3001412c4c4819c88e86b
deleted file mode 100644
index 0199fbb..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f4/a015049497e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,75 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target.width);
- this.setBlockBounds(-((TileEntityMidasTouch)tile).target.width, 0F, -((TileEntityMidasTouch)tile).target.width, ((TileEntityMidasTouch)tile).target.width, ((TileEntityMidasTouch)tile).target.height, ((TileEntityMidasTouch)tile).target.width);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f4/b08f72dafce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f4/b08f72dafce40014174fe663e69b8422
deleted file mode 100644
index a499d75..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f4/b08f72dafce40014174fe663e69b8422
+++ /dev/null
@@ -1,46 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.StatCollector;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public abstract class ItemGoldifiedObject extends Item
-{
- public ItemGoldifiedObject()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- if (JewelryNBT.gem(stack) != null) return this.getIconIndex(JewelryNBT.gem(stack));
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return (StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f5/40205b7887ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f5/40205b7887ea001411cee0f8f86532a4
new file mode 100644
index 0000000..03d31d0
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f5/40205b7887ea001411cee0f8f86532a4
@@ -0,0 +1,65 @@
+package darkknight.jewelrycraft.curses;
+
+import org.lwjgl.opengl.GL11;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.SharedMonsterAttributes;
+import net.minecraft.entity.monster.EntityMob;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import darkknight.jewelrycraft.damage.DamageSourceList;
+import darkknight.jewelrycraft.entities.EntityHalfHeart;
+import darkknight.jewelrycraft.entities.EntityHeart;
+import darkknight.jewelrycraft.entities.renders.RenderHelper;
+import darkknight.jewelrycraft.item.render.MaskRender;
+import darkknight.jewelrycraft.util.JewelrycraftUtil;
+import darkknight.jewelrycraft.util.PlayerUtils;
+import darkknight.jewelrycraft.util.Variables;
+
+public class CurseInfamy extends Curse
+{
+ MaskRender mask = new MaskRender();
+ public CurseInfamy(String name, int txtID, int packID)
+ {
+ super(name, txtID, packID);
+ }
+ @Override
+ public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
+ {
+ if (rand.nextInt(5) == 0 && !world.isRemote && !(target instanceof EntityMob) && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && target.canAttackWithItem()){
+ NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID);
+ if (playerInfo.getFloat("BlackHeart") < 20F) playerInfo.setFloat("BlackHeart", playerInfo.getFloat("BlackHeart") + 1.0F);
+ if (player.getMaxHealth() >= 3F){
+ player.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(player.getMaxHealth() - 1.0F);
+ player.setHealth(player.getHealth() - 1.0F);
+ }
+ JewelrycraftUtil.addCursePoints(player, 10);
+ }
+ }
+
+ public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
+ {
+ float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * event.partialRenderTick;
+ float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
+ float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ GL11.glRotatef(yawOffset, 0, -1, 0);
+ GL11.glRotatef(yaw - 90, 0, 1, 0);
+ GL11.glRotatef(pitch, 0, 0, -1);
+ GL11.glRotatef(90F, 0, 1F, 0F);
+ RenderHelper.translateToHeadLevel(player);
+ GL11.glScalef(1.6f, 1.6f, 1.6f);
+ GL11.glTranslatef(-0.25F, -0.25F, -0.25F);
+ mask.doRender(event.entityPlayer, 0F, 0F, 0F, 0F, 0F);
+ GL11.glPopMatrix();
+ }
+
+ public String getDescription()
+ {
+ return "What have you done?!";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f5/4093e81d8ee3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f5/4093e81d8ee3001417b2e384bf7c3702
deleted file mode 100644
index be1ccdc..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f5/4093e81d8ee3001417b2e384bf7c3702
+++ /dev/null
@@ -1,25 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glColor4f(1F, 0.0F, 1.0F, 0.3F);
- GL11.glTranslatef(0.5F, 0.0F, 0.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- RenderManager.instance.renderEntityStatic(midas.target, 1F, false);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f5/602433bf74e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f5/602433bf74e70014115de2bb951f0adf
deleted file mode 100644
index 2943ec9..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f5/602433bf74e70014115de2bb951f0adf
+++ /dev/null
@@ -1,63 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.ItemRenderer;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.client.renderer.texture.TextureManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.World;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.util.Variables;
-
-public class CursePentagram extends Curse
-{
- ResourceLocation curse = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
- public CursePentagram(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- }
-
- public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
- {
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- Tessellator tessellator = Tessellator.instance;
- TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
- texturemanager.bindTexture(curse);
- GL11.glScalef(0.1F, 0.1F, 0.1F);
- GL11.glTranslatef(1F, 1F, 1F);
- GL11.glRotatef(90F, 1F, 0F, 0F);
- float f = 0.00390625F;
- float f1 = 0.00390625F;
- int x = 0;
- int y = 0;
- int u = 0;
- int v = 0;
- int width = 32;
- int height = 32;
- tessellator.startDrawingQuads();
- tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
- tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
- tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
- tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
- tessellator.draw();
- GL11.glPopMatrix();
- }
-
- public String getDescription()
- {
- return "The Dark Lord has misterious ways of showing you his love.";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f5/c0204a4dfde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f5/c0204a4dfde40014174fe663e69b8422
deleted file mode 100644
index c3781ad..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f5/c0204a4dfde40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- public static Item goldifiedObject;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldObject();
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f6/40e2247284ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f6/40e2247284ea001411cee0f8f86532a4
new file mode 100644
index 0000000..276342c
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f6/40e2247284ea001411cee0f8f86532a4
@@ -0,0 +1,19 @@
+package darkknight.jewelrycraft.util;
+
+import net.minecraft.util.ResourceLocation;
+
+public class Variables
+{
+ public static final String MODID = "jewelrycraft2";
+ public static final String MODNAME = "Jewelrycraft 2";
+ public static final String VERSION = "1.0";
+ public static final String PACKET_CHANNEL = "jewelrycraft2";
+
+ public static final String CONFIG_GUI = "darkknight.jewelrycraft.config.ConfigGuiFactory";
+ public static final String CLIENT_PROXY = "darkknight.jewelrycraft.proxy.ClientProxy";
+ public static final String SERVER_PROXY = "darkknight.jewelrycraft.proxy.CommonProxy";
+
+ public static final int MAX_CURSES = 10;
+ public static final ResourceLocation PEDESTAL_TEXTURE = new ResourceLocation(Variables.MODID, "textures/tileentities/BricksPedestal.png");
+ public static final ResourceLocation SHADOW_HAND_TEXTURE = new ResourceLocation(Variables.MODID, "textures/tileentities/ShadowHand.png");
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f7/80a33c36fde40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f7/80a33c36fde40014174fe663e69b8422
deleted file mode 100644
index f395f9f..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f7/80a33c36fde40014174fe663e69b8422
+++ /dev/null
@@ -1,65 +0,0 @@
-package darkknight.jewelrycraft.item;
-
-import net.minecraft.item.Item;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import darkknight.jewelrycraft.JewelrycraftMod;
-import darkknight.jewelrycraft.util.Variables;
-
-public class ItemList
-{
- public static Item thiefGloves;
- public static Item shadowIngot;
- public static Item molds;
- public static Item clayMolds;
- public static Item crystal;
- public static ItemRing ring;
- public static ItemNecklace necklace;
- public static ItemBracelet bracelet;
- public static ItemEarrings earrings;
- public static Item guide;
- public static Item jewelryModifier;
- public static ItemMoltenMetalBucket bucket;
- public static ItemMoltenMetal metal;
- public static Item goldifiedObject;
- private static boolean isInitialized = false;
-
- /**
- * @param e
- */
- public static void preInit(FMLPreInitializationEvent e)
- {
- if (!isInitialized){
- thiefGloves = new ItemThiefGloves().setUnlocalizedName(Variables.MODID + ".thiefGloves").setTextureName(Variables.MODID + ":thiefGloves").setCreativeTab(JewelrycraftMod.jewelrycraft);
- shadowIngot = new Item().setUnlocalizedName(Variables.MODID + ".ingotShadow").setTextureName(Variables.MODID + ":ingotShadow").setCreativeTab(JewelrycraftMod.jewelrycraft);
- molds = new ItemMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- clayMolds = new ItemClayMolds().setUnlocalizedName(Variables.MODID + ".mold").setTextureName("Mold").setCreativeTab(JewelrycraftMod.jewelrycraft);
- ring = (ItemRing)new ItemRing().setUnlocalizedName(Variables.MODID + ".ring").setTextureName(Variables.MODID + ":ring").setCreativeTab(JewelrycraftMod.jewelrycraft);
- necklace = (ItemNecklace)new ItemNecklace().setUnlocalizedName(Variables.MODID + ".necklace").setTextureName(Variables.MODID + ":necklace").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bracelet = (ItemBracelet)new ItemBracelet().setUnlocalizedName(Variables.MODID + ".bracelet").setTextureName(Variables.MODID + ":bracelet").setCreativeTab(JewelrycraftMod.jewelrycraft);
- earrings = (ItemEarrings)new ItemEarrings().setUnlocalizedName(Variables.MODID + ".earrings").setTextureName(Variables.MODID + ":earrings").setCreativeTab(JewelrycraftMod.jewelrycraft);
- crystal = new ItemCrystal().setUnlocalizedName(Variables.MODID + ".crystal").setTextureName(Variables.MODID + ":crystal").setCreativeTab(JewelrycraftMod.jewelrycraft);
- guide = new ItemGuide().setUnlocalizedName(Variables.MODID + ".guide").setTextureName(Variables.MODID + ":guide").setCreativeTab(JewelrycraftMod.jewelrycraft);
- bucket = (ItemMoltenMetalBucket)new ItemMoltenMetalBucket().setUnlocalizedName(Variables.MODID + ".bucket");
- metal = (ItemMoltenMetal)new ItemMoltenMetal().setUnlocalizedName(Variables.MODID + ".bucket");
- jewelryModifier = new ItemJewelryModifier().setUnlocalizedName(Variables.MODID + ".jewelryModifier").setTextureName(Variables.MODID + ":jewelryModifier").setCreativeTab(JewelrycraftMod.jewelrycraft);
- goldifiedObject = new ItemGoldifiedObject().setUnlocalizedName(Variables.MODID + ".goldifiedObject");
-
- GameRegistry.registerItem(thiefGloves, "thiefGloves");
- GameRegistry.registerItem(shadowIngot, "shadowIngot");
- GameRegistry.registerItem(molds, "molds");
- GameRegistry.registerItem(clayMolds, "clayMolds");
- GameRegistry.registerItem(ring, "ring");
- GameRegistry.registerItem(necklace, "necklace");
- GameRegistry.registerItem(bracelet, "bracelet");
- GameRegistry.registerItem(earrings, "earrings");
- GameRegistry.registerItem(crystal, "crystal");
- GameRegistry.registerItem(guide, "guide");
- GameRegistry.registerItem(bucket, "moltenMetalBucket");
- GameRegistry.registerItem(metal, "moltenMetal");
- GameRegistry.registerItem(jewelryModifier, "jewelryModifier");
- GameRegistry.registerItem(goldifiedObject, "goldifiedObject");
- isInitialized = true;
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f8/007cb0a590e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f8/007cb0a590e3001417b2e384bf7c3702
deleted file mode 100644
index eec4f55..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f8/007cb0a590e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,85 +0,0 @@
-package darkknight.jewelrycraft.tileentity;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.NetworkManager;
-import net.minecraft.network.Packet;
-import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
-import net.minecraft.tileentity.TileEntity;
-
-public class TileEntityMidasTouch extends TileEntity
-{
- public Entity target;
-
- public TileEntityMidasTouch()
- {
- }
-
- public void setEntity(Entity ent)
- {
- target = ent;
- }
-
- @Override
- public void writeToNBT(NBTTagCompound nbt)
- {
- super.writeToNBT(nbt);
- if (target != null){
- int id = EntityList.getEntityID(target);
- NBTTagCompound tag = new NBTTagCompound();
- target.writeToNBT(tag);
- nbt.setInteger("entityID", id);
- nbt.setTag("entity", tag);
- }
- }
-
- /**
- * @param nbt
- */
- @Override
- public void readFromNBT(NBTTagCompound nbt)
- {
- super.readFromNBT(nbt);
- if (nbt.hasKey("entityID") && nbt.hasKey("entity")){
- NBTTagCompound en = (NBTTagCompound)nbt.getTag("entity");
- int entityID = nbt.getInteger("entityID");
- EntityLivingBase entity = (EntityLivingBase)EntityList.createEntityByID(entityID, worldObj);
- entity.readFromNBT(en);
- target = entity;
- }
- }
-
- /**
- *
- */
- @Override
- public void updateEntity()
- {
- super.updateEntity();
- // System.out.println(target);
- }
-
- /**
- * @return
- */
- @Override
- public Packet getDescriptionPacket()
- {
- NBTTagCompound nbttagcompound = new NBTTagCompound();
- writeToNBT(nbttagcompound);
- return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbttagcompound);
- }
-
- /**
- * @param net
- * @param packet
- */
- @Override
- public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet)
- {
- readFromNBT(packet.func_148857_g());
- worldObj.func_147479_m(xCoord, yCoord, zCoord);
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f8/00dc645002e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f8/00dc645002e50014174fe663e69b8422
deleted file mode 100644
index f13e940..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f8/00dc645002e50014174fe663e69b8422
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) if (Block.getBlockFromItem(item.getItem()) == Blocks.air) return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else return Block.getBlockFromItem(item.getItem()).getIcon(0, 0);
- else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f8/60e51a8387ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f8/60e51a8387ea001411cee0f8f86532a4
new file mode 100644
index 0000000..1b32080
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f8/60e51a8387ea001411cee0f8f86532a4
@@ -0,0 +1,23 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+
+public class CurseFlamingSoul extends Curse
+{
+ public CurseFlamingSoul(String name, int txtID, int packID)
+ {
+ super(name, txtID, packID);
+ }
+
+ @Override
+ public void action(World world, EntityPlayer player)
+ {
+ if (!player.isBurning() && rand.nextInt(20) == 0) player.setFire(5);
+ }
+
+ public String getDescription()
+ {
+ return "Is it me or is it getting hot in here?";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f8/802b95f798e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f8/802b95f798e3001412c4c4819c88e86b
deleted file mode 100644
index 1c311a2..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f8/802b95f798e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,27 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
-// System.out.println(midas.target.rotationYaw);
-// GL11.glRotatef(, 0.0F, 1.0F, 0.0F);
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, midas.target.posX - RenderManager.instance.renderPosX, midas.target.posY - RenderManager.instance.renderPosY, midas.target.posZ - RenderManager.instance.renderPosZ, 23F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f9/100285e848e700141e05cdbaeb682437 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f9/100285e848e700141e05cdbaeb682437
deleted file mode 100644
index 295a776..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f9/100285e848e700141e05cdbaeb682437
+++ /dev/null
@@ -1,770 +0,0 @@
-package darkknight.jewelrycraft.util;
-
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-
-public class JewelryNBT
-{
- // TODO NBT Tag Adding
- public static void addItem(ItemStack item, ItemStack target)
- {
- if (target != null){
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound targetNBT = new NBTTagCompound();
- target.writeToNBT(targetNBT);
- itemStackData.setTag("target", targetNBT);
- }
- }
-
- /**
- * @param item The item you want to add the NBT data on
- * @param metal The metal you want to add on the item
- */
- public static void addMetal(ItemStack item, ItemStack metal)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound ingotNBT = new NBTTagCompound();
- metal.writeToNBT(ingotNBT);
- itemStackData.setTag("ingot", ingotNBT);
- }
-
- /**
- * @param item The item you want to add the NBT data on
- * @param gem The gem you want to add on the item
- */
- public static void addGem(ItemStack item, ItemStack gem)
- {
- if (gem != null){
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound gemNBT = new NBTTagCompound();
- gem.writeToNBT(gemNBT);
- itemStackData.setTag("gem", gemNBT);
- }
- }
-
- /**
- * @param item The item you want to add the NBT data on
- * @param modifier The modifier you want to add on the item
- */
- public static void addModifiers(ItemStack item, ArrayList<ItemStack> modifier)
- {
- if (modifier != null){
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- for(int i = 0; i < modifier.size(); i++){
- NBTTagCompound modifierNBT = new NBTTagCompound();
- modifier.get(i).writeToNBT(modifierNBT);
- itemStackData.setTag("modifier" + i, modifierNBT);
- }
- itemStackData.setInteger("modifierSize", modifier.size());
- }
- }
-
- /**
- * @param item The item you want to add the NBT data on
- * @param entity The entity to add on the item
- */
- public static void addEntity(ItemStack item, EntityLivingBase entity)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound entityNBT = new NBTTagCompound();
- entity.writeToNBT(entityNBT);
- itemStackData.setTag("entity", entityNBT);
- }
-
- /**
- * @param item
- * @param entity
- */
- public static void addEntityID(ItemStack item, EntityLivingBase entity)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound entityNBT = new NBTTagCompound();
- int id = EntityList.getEntityID(entity);
- entityNBT.setInteger("entityID", id);
- itemStackData.setTag("entityID", entityNBT);
- }
-
- /**
- * @param item
- * @param x
- * @param y
- * @param z
- */
- public static void addCoordonates(ItemStack item, double x, double y, double z)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound coords = new NBTTagCompound();
- coords.setDouble("x", x);
- coords.setDouble("y", y);
- coords.setDouble("z", z);
- itemStackData.setTag("x", coords);
- itemStackData.setTag("y", coords);
- itemStackData.setTag("z", coords);
- }
-
- /**
- * @param item
- * @param world
- * @param x
- * @param y
- * @param z
- */
- public static void addTileEntityBlock(ItemStack item, World world, int x, int y, int z)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound tileNBT = new NBTTagCompound();
- NBTTagCompound block = new NBTTagCompound();
- world.getTileEntity(x, y, z).writeToNBT(tileNBT);
- itemStackData.setTag("tile", tileNBT);
- block.setInteger("blockID", Block.getIdFromBlock(world.getBlock(x, y, z)));
- block.setInteger("metadata", world.getBlockMetadata(x, y, z));
- block.setInteger("blockX", x);
- block.setInteger("blockY", y);
- block.setInteger("blockZ", z);
- itemStackData.setTag("metadata", block);
- itemStackData.setTag("blockID", block);
- itemStackData.setTag("blockX", block);
- itemStackData.setTag("blockY", block);
- itemStackData.setTag("blockZ", block);
- }
-
- /**
- * @param item
- * @param block
- * @param metadata
- */
- public static void addBlock(ItemStack item, int block, int metadata)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound blockNBT = new NBTTagCompound();
- blockNBT.setInteger("blockID", block);
- itemStackData.setTag("blockID", blockNBT);
- blockNBT.setInteger("metadata", metadata);
- itemStackData.setTag("metadata", blockNBT);
- }
-
- /**
- * @param item
- * @param x
- * @param y
- * @param z
- */
- public static void addBlockCoordonates(ItemStack item, int x, int y, int z)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound coords = new NBTTagCompound();
- coords.setInteger("blockX", x);
- coords.setInteger("blockY", y);
- coords.setInteger("blockZ", z);
- itemStackData.setTag("blockX", coords);
- itemStackData.setTag("blockY", coords);
- itemStackData.setTag("blockZ", coords);
- }
-
- /**
- * @param item
- * @param x
- * @param y
- * @param z
- * @param dim
- * @param name
- */
- public static void addCoordonatesAndDimension(ItemStack item, double x, double y, double z, int dim, String name)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound coords = new NBTTagCompound();
- coords.setDouble("x", x);
- coords.setDouble("y", y);
- coords.setDouble("z", z);
- coords.setInteger("dimension", dim);
- coords.setString("dimName", name);
- itemStackData.setTag("x", coords);
- itemStackData.setTag("y", coords);
- itemStackData.setTag("z", coords);
- itemStackData.setTag("dimension", coords);
- itemStackData.setTag("dimName", coords);
- }
-
- /**
- * @param item
- */
- public static void addFakeEnchantment(ItemStack item)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- itemStackData.setTag("ench", new NBTTagList());
- }
-
- /**
- * @param item
- * @param color
- */
- public static void addIngotColor(ItemStack item, int color)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound colors = new NBTTagCompound();
- colors.setInteger("ingotColor", color);
- itemStackData.setTag("ingotColor", colors);
- }
-
- // TODO
- /**
- * @param item
- * @param color
- */
- public static void addGemColor(ItemStack item, int color)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound colors = new NBTTagCompound();
- colors.setInteger("gemColor", color);
- itemStackData.setTag("gemColor", colors);
- }
-
- /**
- * @param item
- * @param list
- */
- @SuppressWarnings ("rawtypes")
- public static void addEntities(ItemStack item, List list)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- NBTTagCompound entityNBT = new NBTTagCompound();
- for(int i = 0; i < list.size(); i++)
- ((EntityLivingBase)list.get(i)).writeToNBT(entityNBT);
- itemStackData.setTag("entities", entityNBT);
- }
-
- // TODO NBT Tag Removing
- /**
- * @param item
- * @param tag
- */
- public static void removeNBT(ItemStack item, String tag)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- itemStackData.removeTag(tag);
- }
-
- /**
- * @param item
- */
- public static void removeEntity(ItemStack item)
- {
- JewelryNBT.removeNBT(item, "entityID");
- JewelryNBT.removeNBT(item, "entity");
- JewelryNBT.removeNBT(item, "ench");
- }
-
- /**
- * @param item
- */
- public static void removeBlock(ItemStack item)
- {
- JewelryNBT.removeNBT(item, "blockID");
- JewelryNBT.removeNBT(item, "metadata");
- JewelryNBT.removeNBT(item, "tile");
- JewelryNBT.removeNBT(item, "blockX");
- JewelryNBT.removeNBT(item, "blockY");
- JewelryNBT.removeNBT(item, "blockZ");
- }
-
- // TODO NTB Tag Checking
- /**
- * @param item
- * @param tag
- * @return
- */
- public static boolean hasTag(ItemStack item, String tag)
- {
- NBTTagCompound itemStackData;
- if (item.hasTagCompound()) itemStackData = item.getTagCompound();
- else{
- itemStackData = new NBTTagCompound();
- item.setTagCompound(itemStackData);
- }
- if (itemStackData.hasKey(tag)) return true;
- return false;
- }
-
- /**
- * @param stack
- * @param gem
- * @return
- */
- public static boolean isGemX(ItemStack stack, ItemStack gem)
- {
- if (gem(stack) != null && gem(stack).getItem() == gem.getItem() && gem(stack).getItemDamage() == gem.getItemDamage()) return true;
- return false;
- }
-
- /**
- * @param stack
- * @param modifier
- * @return
- */
- public static boolean doesModifierExist(ItemStack stack, ItemStack modifier)
- {
- if (modifier(stack) != null){
- ArrayList<ItemStack> list = modifier(stack);
- for(int i = 0; i < list.size(); i++)
- if (list.get(i).getItem() == modifier.getItem() && list.get(i).getItemDamage() == modifier.getItemDamage()) return true;
- }
- return false;
- }
-
- public static int modifierSize(ItemStack stack, ItemStack modifier)
- {
- if (modifier(stack) != null){
- ArrayList<ItemStack> list = modifier(stack);
- for(int i = 0; i < list.size(); i++)
- if (list.get(i).getItem() == modifier.getItem() && list.get(i).getItemDamage() == modifier.getItemDamage()) return list.get(i).stackSize;
- }
- return -1;
- }
-
- public static int numberOfModifiers(ItemStack stack)
- {
- if (modifier(stack) != null) return modifier(stack).size();
- return -1;
- }
-
- /**
- * @param stack
- * @param ingot
- * @return
- */
- public static boolean isIngotX(ItemStack stack, ItemStack ingot)
- {
- if (ingot(stack) != null && ingot(stack).getItem() == ingot.getItem() && ingot(stack).getItemDamage() == ingot.getItemDamage()) return true;
- return false;
- }
-
- /**
- * @param stack
- * @param player
- * @param entity
- * @return
- */
- public static boolean isEntityX(ItemStack stack, EntityPlayer player, EntityLivingBase entity)
- {
- if (entity != null && entity instanceof EntityLivingBase && entity(stack, player) != null && entity(stack, player).equals(entity)) return true;
- return false;
- }
-
- /**
- * @param stack
- * @param dimName
- * @return
- */
- public static boolean isDimNameX(ItemStack stack, String dimName)
- {
- if (ingot(stack) != null && dimName(stack).equals(dimName)) return true;
- return false;
- }
-
- /**
- * @param stack
- * @param dimension
- * @return
- */
- public static boolean isDimensionX(ItemStack stack, int dimension)
- {
- if (dimension(stack) != -2 && dimension(stack) == dimension) return true;
- return false;
- }
-
- // TODO Return components based on NBT
- public static ItemStack item(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() && stack.getTagCompound().hasKey("target")){
- NBTTagCompound itemNBT = (NBTTagCompound)stack.getTagCompound().getTag("target");
- ItemStack target = new ItemStack(Item.getItemById(0), 0, 0);
- target.readFromNBT(itemNBT);
- return target;
- }
- return null;
- }
-
- /**
- * @param stack
- * @return
- */
- public static ItemStack gem(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() && stack.getTagCompound().hasKey("gem")){
- NBTTagCompound jewelNBT = (NBTTagCompound)stack.getTagCompound().getTag("gem");
- ItemStack gem = new ItemStack(Item.getItemById(0), 0, 0);
- gem.readFromNBT(jewelNBT);
- return gem;
- }
- return null;
- }
-
- /**
- * @param stack
- * @return
- */
- public static ArrayList<ItemStack> modifier(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound()){
- int size = stack.getTagCompound().getInteger("modifierSize");
- ArrayList<ItemStack> list = new ArrayList<ItemStack>();
- for(int i = 0; i < size; i++){
- ItemStack modifier = new ItemStack(Item.getItemById(0), 0, 0);
- NBTTagCompound modifierNBT = (NBTTagCompound)stack.getTagCompound().getTag("modifier" + i);
- modifier.readFromNBT(modifierNBT);
- list.add(modifier);
- }
- return list;
- }
- return null;
- }
-
- /**
- * @param stack
- * @return
- */
- public static ItemStack ingot(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() && stack.getTagCompound().hasKey("ingot")){
- NBTTagCompound ingotNBT = (NBTTagCompound)stack.getTagCompound().getTag("ingot");
- ItemStack ingot = new ItemStack(Item.getItemById(0), 0, 0);
- ingot.readFromNBT(ingotNBT);
- return ingot;
- }
- return null;
- }
-
- /**
- * @param stack
- * @param player
- * @return
- */
- public static EntityLivingBase entity(ItemStack stack, EntityPlayer player)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("entityID") && stack.getTagCompound().hasKey("entity")){
- NBTTagCompound enID = (NBTTagCompound)stack.getTagCompound().getTag("entityID");
- NBTTagCompound en = (NBTTagCompound)stack.getTagCompound().getTag("entity");
- int entityID = 0;
- entityID = enID.getInteger("entityID");
- EntityLivingBase entity = (EntityLivingBase)EntityList.createEntityByID(entityID, player.worldObj);
- if (entity != null && entity instanceof EntityLivingBase){
- entity.readFromNBT(en);
- return entity;
- }else return null;
- }
- return null;
- }
-
- /**
- * @param stack
- * @return
- */
- public static TileEntity tileEntity(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("tile")){
- NBTTagCompound tileNBT = (NBTTagCompound)stack.getTagCompound().getTag("tile");
- TileEntity tile = TileEntity.createAndLoadEntity(tileNBT);
- if (tile != null && tile instanceof TileEntity){
- tile.readFromNBT(tileNBT);
- return tile;
- }else return null;
- }
- return null;
- }
-
- /**
- * @param stack
- * @return
- */
- public static String dimName(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() && stack.getTagCompound().hasKey("dimName")){
- NBTTagCompound dim = (NBTTagCompound)stack.getTagCompound().getTag("dimName");
- String name = dim.getString("dimName");
- return name;
- }
- return null;
- }
-
- /**
- * @param stack
- * @return
- */
- public static String modeName(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() && stack.getTagCompound().hasKey("mode")){
- NBTTagCompound dim = (NBTTagCompound)stack.getTagCompound().getTag("mode");
- String name = dim.getString("mode");
- return name;
- }
- return null;
- }
-
- /**
- * @param stack
- * @return
- */
- public static int dimension(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() && stack.getTagCompound().hasKey("dimension")){
- NBTTagCompound dim = (NBTTagCompound)stack.getTagCompound().getTag("dimension");
- int dimension = dim.getInteger("dimension");
- return dimension;
- }
- return -2;
- }
-
- /**
- * @param stack
- * @return
- */
- public static int blockCoordX(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("blockX")){
- NBTTagCompound x = (NBTTagCompound)stack.getTagCompound().getTag("blockX");
- int posX = x.getInteger("blockX");
- return posX;
- }
- return -1;
- }
-
- /**
- * @param stack
- * @return
- */
- public static int blockCoordY(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("blockY")){
- NBTTagCompound y = (NBTTagCompound)stack.getTagCompound().getTag("blockY");
- int posY = y.getInteger("blockY");
- return posY;
- }
- return -1;
- }
-
- /**
- * @param stack
- * @return
- */
- public static int blockCoordZ(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("blockZ")){
- NBTTagCompound z = (NBTTagCompound)stack.getTagCompound().getTag("blockZ");
- int posZ = z.getInteger("blockZ");
- return posZ;
- }
- return -1;
- }
-
- /**
- * @param stack
- * @return
- */
- public static int blockID(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("blockID")){
- NBTTagCompound blockID = (NBTTagCompound)stack.getTagCompound().getTag("blockID");
- int blockId = blockID.getInteger("blockID");
- return blockId;
- }
- return -1;
- }
-
- /**
- * @param stack
- * @return
- */
- public static int blockMetadata(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("metadata")){
- NBTTagCompound metadataNBT = (NBTTagCompound)stack.getTagCompound().getTag("metadata");
- int metadata = metadataNBT.getInteger("metadata");
- return metadata;
- }
- return -1;
- }
-
- /**
- * @param stack
- * @return
- */
- public static double playerPosX(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("x")){
- NBTTagCompound x = (NBTTagCompound)stack.getTagCompound().getTag("x");
- double posX = x.getDouble("x");
- return posX;
- }
- return -1;
- }
-
- /**
- * @param stack
- * @return
- */
- public static double playerPosY(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("y")){
- NBTTagCompound y = (NBTTagCompound)stack.getTagCompound().getTag("y");
- double posY = y.getDouble("y");
- return posY;
- }
- return -1;
- }
-
- /**
- * @param stack
- * @return
- */
- public static double playerPosZ(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("z")){
- NBTTagCompound z = (NBTTagCompound)stack.getTagCompound().getTag("z");
- double posZ = z.getDouble("z");
- return posZ;
- }
- return -1;
- }
-
- /**
- * @param stack
- * @return
- */
- public static int ingotColor(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() && stack.getTagCompound().hasKey("ingotColor")){
- NBTTagCompound colors = (NBTTagCompound)stack.getTagCompound().getTag("ingotColor");
- int color = colors.getInteger("ingotColor");
- return color;
- }
- return 16777215;
- }
-
- // TODO
- /**
- * @param stack
- * @return
- */
- public static int gemColor(ItemStack stack)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() && stack.getTagCompound().hasKey("gemColor")){
- NBTTagCompound colors = (NBTTagCompound)stack.getTagCompound().getTag("gemColor");
- int color = colors.getInteger("gemColor");
- return color;
- }
- return 16777215;
- }
-
- /**
- * @param stack
- * @param player
- * @return
- */
- @SuppressWarnings ({"rawtypes", "unchecked", "null"})
- public static List entities(ItemStack stack, EntityPlayer player)
- {
- if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.getTagCompound().hasKey("entities")){
- NBTTagCompound enID = (NBTTagCompound)stack.getTagCompound().getTag("entitiesID");
- List list = null;
- int[] entityID;
- EntityLivingBase entity;
- entityID = enID.getIntArray("entitiesID");
- for(int element: entityID){
- entity = (EntityLivingBase)EntityList.createEntityByID(element, player.worldObj);
- list.add(entity);
- }
- return list;
- }
- return null;
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f9/201cfc0598e3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f9/201cfc0598e3001412c4c4819c88e86b
deleted file mode 100644
index 62b87a0..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/f9/201cfc0598e3001412c4c4819c88e86b
+++ /dev/null
@@ -1,75 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null){
- System.out.println(((TileEntityMidasTouch)tile).target.width);
- this.setBlockBounds(0.5f - ((TileEntityMidasTouch)tile).target.width/2, 0F, 0.5f -((TileEntityMidasTouch)tile).target.width/2, 0.5f +((TileEntityMidasTouch)tile).target.width/2, ((TileEntityMidasTouch)tile).target.height, 0.5f +((TileEntityMidasTouch)tile).target.width/2);
- }
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fa/00a6fb0785ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fa/00a6fb0785ea001411cee0f8f86532a4
new file mode 100644
index 0000000..5a7b728
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fa/00a6fb0785ea001411cee0f8f86532a4
@@ -0,0 +1,102 @@
+package darkknight.jewelrycraft.events;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.gui.GuiChat;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderGameOverlayEvent;
+import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
+import net.minecraftforge.event.entity.player.PlayerOpenContainerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.util.Variables;
+
+public class ScreenHandler extends Gui
+{
+ private Minecraft mc;
+ public static NBTTagCompound tagCache = null;
+ public static int cooldown;
+ static ResourceLocation texture;
+ static ResourceLocation hearts = new ResourceLocation(Variables.MODID, "textures/gui/hearts.png");
+
+ public ScreenHandler(Minecraft mc, ResourceLocation tex)
+ {
+ super();
+ this.mc = mc;
+ texture = tex;
+ }
+
+ @SubscribeEvent
+ public void renderScreen(RenderGameOverlayEvent event)
+ {
+ if (event.isCancelable() || event.type != ElementType.ALL || tagCache == null) return;
+ if (!mc.gameSettings.showDebugInfo && !(mc.currentScreen instanceof GuiChat)){
+ int count = 0;
+ int size = 32;
+ ScaledResolution resolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
+ if (tagCache.hasKey("cursePoints") && tagCache.getInteger("cursePoints") > 0){
+ mc.renderEngine.bindTexture(hearts);
+ for(Curse curse: Curse.getCurseList()){
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ drawTexturedModalRect(-16, -16 + (size - 6) * count, 0, 32, 144, 60);
+ count++;
+ }
+ }
+ mc.renderEngine.bindTexture(texture);
+ count = 0;
+ for(Curse curse: Curse.getCurseList())
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ int tag = curse.getID();
+ GL11.glPushMatrix();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glScalef(0.45f, 0.45f, 0.0f);
+ drawTexturedModalRect(28, 18 + (size + 26) * count, tag % size * size, tag / size * size, size, size);
+ GL11.glPopMatrix();
+ count++;
+ }
+ count = 0;
+ size = 16;
+ for(Curse curse: Curse.getCurseList())
+ if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ int tag = curse.getID();
+ mc.fontRenderer.drawStringWithShadow(curse.getName().split(":")[1], 30, 11 + (size + 10) * count, 16777215);
+ if (tagCache.getInteger(curse.getName()) == 2){
+ mc.renderEngine.bindTexture(hearts);
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GL11.glColor4f(1f, 1f, 1f, 0.5f);
+ drawTexturedModalRect(95, 7 + (size + 10) * count, 3 * size, 0, size, size);
+ GL11.glPopMatrix();
+ }
+ count++;
+ }
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1f, 1f, 1f, 1.0f);
+ mc.renderEngine.bindTexture(hearts);
+ count = 0;
+ size = 16;
+ if (tagCache.getFloat("BlueHeart") > 0){
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 0 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlueHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
+ }
+ count++;
+ mc.renderEngine.bindTexture(hearts);
+ if (tagCache.getFloat("BlackHeart") > 0){
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 1 * size, 0 * size, size, size);
+ mc.fontRenderer.drawStringWithShadow("x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlackHeart")) / 2.0F), 15 + 35*count, resolution.getScaledHeight() - 16, 16777215);
+ }
+ count++;
+ mc.renderEngine.bindTexture(hearts);
+ if (tagCache.getFloat("WhiteHeart") > 0)
+ drawTexturedModalRect(5 + 35*count, resolution.getScaledHeight() - 20, 2 * size, 1 * size, size, size);
+ GL11.glPopMatrix();
+ }
+ }
+} \ No newline at end of file
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fa/40f248b698ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fa/40f248b698ea001411cee0f8f86532a4
new file mode 100644
index 0000000..bc6f40c
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fa/40f248b698ea001411cee0f8f86532a4
@@ -0,0 +1,140 @@
+package darkknight.jewelrycraft.events;
+
+import java.util.Iterator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.texture.TextureManager;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.event.RenderHandEvent;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import darkknight.jewelrycraft.curses.Curse;
+import darkknight.jewelrycraft.curses.CurseList;
+import darkknight.jewelrycraft.item.render.BraceletRender;
+import darkknight.jewelrycraft.item.render.EarringsRender;
+import darkknight.jewelrycraft.util.JewelryNBT;
+import darkknight.jewelrycraft.util.Variables;
+
+public class PlayerRenderHandler
+{
+ EarringsRender earrings = new EarringsRender();
+ BraceletRender bracelet = new BraceletRender();
+ public static NBTTagCompound playersInfo = new NBTTagCompound();
+ int[] gemColor = {-1, -1, -1, -1};
+ int[] ingotColor = {-1, -1, -1, -1};
+ int earringGem = -1;
+ int earringIngot = -1;
+ float size = 0.055F;
+
+ @SubscribeEvent
+ public void renderScreen(RenderPlayerEvent.Specials.Post event)
+ {
+ ModelBiped main = event.renderer.modelBipedMain;
+ ModelRenderer rightArm = event.renderer.modelBipedMain.bipedRightArm;
+ ModelRenderer leftArm = event.renderer.modelBipedMain.bipedLeftArm;
+ ModelRenderer head = event.renderer.modelBipedMain.bipedHead;
+ Iterator<EntityPlayer> players = event.entityPlayer.worldObj.playerEntities.iterator();
+ if (playersInfo != null){
+ while (players.hasNext()){
+ EntityPlayer player = players.next();
+ NBTTagCompound playerInfo = (NBTTagCompound)playersInfo.getTag(player.getDisplayName());
+ for(Curse curse: Curse.getCurseList())
+ if (playerInfo.getInteger(curse.getName()) > 0 && event.entityPlayer.getDisplayName().equals(player.getDisplayName()) && playerInfo.getInteger("cursePoints") > 0) curse.playerRender(player, event);
+ if (playerInfo.hasKey("ext17") && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext17");
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ GL11.glPushMatrix();
+ if (head.rotateAngleX == 0.0F && head.rotateAngleY == 0.0F && head.rotateAngleZ == 0.0F){
+ if (head.rotationPointX != 0.0F || head.rotationPointY != 0.0F || head.rotationPointZ != 0.0F) GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(head.rotationPointX * size, head.rotationPointY * size, head.rotationPointZ * size);
+ if (head.rotateAngleZ != 0.0F) GL11.glRotatef(head.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (head.rotateAngleY != 0.0F) GL11.glRotatef(head.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (head.rotateAngleX != 0.0F) GL11.glRotatef(head.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.0625f, 0.0625f, 0.0625f);
+ GL11.glTranslatef(0.0F, 1.0F, -2.0F);
+ if (JewelryNBT.gem(item) != null) earringGem = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) earringIngot = JewelryNBT.ingotColor(item);
+ earrings.doRender(event.entityPlayer, 0F, 0F, (float)earringIngot, (float)earringGem, 0F);
+ GL11.glPopMatrix();
+ }
+ for(int i = 10; i <= 13; i++)
+ if (playerInfo.hasKey("ext" + i) && event.entityPlayer.getDisplayName().equals(player.getDisplayName())){
+ NBTTagCompound nbt = (NBTTagCompound)playerInfo.getTag("ext" + i);
+ ItemStack item = ItemStack.loadItemStackFromNBT(nbt);
+ if (JewelryNBT.gem(item) != null) gemColor[i - 10] = JewelryNBT.gemColor(item);
+ if (JewelryNBT.ingot(item) != null) ingotColor[i - 10] = JewelryNBT.ingotColor(item);
+ }
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (rightArm.rotateAngleX == 0.0F && rightArm.rotateAngleY == 0.0F && rightArm.rotateAngleZ == 0.0F){
+ if (rightArm.rotationPointX != 0.0F || rightArm.rotationPointY != 0.0F || rightArm.rotationPointZ != 0.0F) GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(rightArm.rotationPointX * size, rightArm.rotationPointY * size, rightArm.rotationPointZ * size);
+ if (rightArm.rotateAngleZ != 0.0F) GL11.glRotatef(rightArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (rightArm.rotateAngleY != 0.0F) GL11.glRotatef(rightArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (rightArm.rotateAngleX != 0.0F) GL11.glRotatef(rightArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[0], (float)gemColor[0], (float)ingotColor[1], (float)gemColor[1], 0.0F);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1, 1, 1, 1);
+ if (leftArm.rotateAngleX == 0.0F && leftArm.rotateAngleY == 0.0F && leftArm.rotateAngleZ == 0.0F){
+ if (leftArm.rotationPointX != 0.0F || leftArm.rotationPointY != 0.0F || leftArm.rotationPointZ != 0.0F) GL11.glTranslatef(leftArm.rotationPointX * size, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ }else{
+ GL11.glTranslatef(leftArm.rotationPointX * size + 0.2F, leftArm.rotationPointY * size, leftArm.rotationPointZ * size);
+ if (leftArm.rotateAngleZ != 0.0F) GL11.glRotatef(leftArm.rotateAngleZ * (180F / (float)Math.PI), 0.0F, 0.0F, 1.0F);
+ if (leftArm.rotateAngleY != 0.0F) GL11.glRotatef(leftArm.rotateAngleY * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
+ if (leftArm.rotateAngleX != 0.0F) GL11.glRotatef(leftArm.rotateAngleX * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
+ }
+ GL11.glScalef(0.05f, 0.03f, 0.05f);
+ bracelet.doRender(event.entityPlayer, (float)ingotColor[2], (float)gemColor[2], (float)ingotColor[3], (float)gemColor[3], 0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+ float rot = 0F;
+
+ @SubscribeEvent
+ public void renderHand(RenderHandEvent event)
+ {
+ ResourceLocation PENTAGRAM_TEXTURE = new ResourceLocation(Variables.MODID, "textures/gui/" + CurseList.pentagram.getTexturePack() + ".png");
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_SRC_COLOR);
+ Tessellator tessellator = Tessellator.instance;
+ TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
+ texturemanager.bindTexture(PENTAGRAM_TEXTURE);
+ GL11.glRotatef(rot, 0F, 1F, 0F);
+ GL11.glScalef(0.1F, 0.1F, 0.1F);
+ GL11.glTranslatef(-1F, -4F, -1F);
+ GL11.glRotatef(90F, 1F, 0F, 0F);
+ rot += 3F;
+ if (rot > 360F) rot = 0F;
+ float f = 0.00390625F;
+ float f1 = 0.00390625F;
+ int x = 0;
+ int y = 0;
+ int u = 32 * 7;
+ int v = 0;
+ int width = 32;
+ int height = 32;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
+ tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
+ tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
+ tessellator.draw();
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fa/d0acf8ff27e500141c50bd6848c69dc6 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fa/d0acf8ff27e500141c50bd6848c69dc6
deleted file mode 100644
index 5a61768..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fa/d0acf8ff27e500141c50bd6848c69dc6
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public boolean hasEffect(ItemStack item)
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) return item.getIconIndex();
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo) list.add(EnumChatFormatting.DARK_PURPLE + "Shiny, but useless :c");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fa/e0cd16ca92e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fa/e0cd16ca92e3001417b2e384bf7c3702
deleted file mode 100644
index 2072a65..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fa/e0cd16ca92e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,27 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.renderEntityWithPosYaw(midas.target, midas.target.posX - RenderManager.instance.renderPosX, midas.target.posY - RenderManager.instance.renderPosY, midas.target.posZ - RenderManager.instance.renderPosZ, 0F, 1F);
-// RenderManager.instance.getEntityRenderObject(midas.target).doRender(midas.target, midas.target.posX - RenderManager.instance.renderPosX, midas.target.posY - RenderManager.instance.renderPosY, midas.target.posZ - RenderManager.instance.renderPosZ, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fc/10e7546d07e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fc/10e7546d07e50014174fe663e69b8422
deleted file mode 100644
index 9ed257e..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fc/10e7546d07e50014174fe663e69b8422
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public boolean hasEffect(ItemStack item)
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) return item.getIconIndex();
- return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
-// if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fc/303da9d874e70014115de2bb951f0adf b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fc/303da9d874e70014115de2bb951f0adf
deleted file mode 100644
index 2efe23d..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fc/303da9d874e70014115de2bb951f0adf
+++ /dev/null
@@ -1,63 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.ItemRenderer;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.client.renderer.texture.TextureManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.World;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.item.render.MaskRender;
-import darkknight.jewelrycraft.util.Variables;
-
-public class CursePentagram extends Curse
-{
- ResourceLocation curse = new ResourceLocation(Variables.MODID, "textures/gui/curses.png");
- public CursePentagram(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- }
-
- public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event)
- {
- GL11.glPushMatrix();
- GL11.glColor4f(1, 1, 1, 1);
- Tessellator tessellator = Tessellator.instance;
- TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();
- texturemanager.bindTexture(curse);
- GL11.glScalef(0.1F, 0.1F, 0.1F);
- GL11.glTranslatef(1F, 15F, 1F);
- GL11.glRotatef(90F, 1F, 0F, 0F);
- float f = 0.00390625F;
- float f1 = 0.00390625F;
- int x = 0;
- int y = 0;
- int u = 0;
- int v = 0;
- int width = 32;
- int height = 32;
- tessellator.startDrawingQuads();
- tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + height) * f1));
- tessellator.addVertexWithUV((double)(x + width), (double)(y + height), (double)0, (double)((float)(u + width) * f), (double)((float)(v + height) * f1));
- tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), (double)0, (double)((float)(u + width) * f), (double)((float)(v + 0) * f1));
- tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), (double)0, (double)((float)(u + 0) * f), (double)((float)(v + 0) * f1));
- tessellator.draw();
- GL11.glPopMatrix();
- }
-
- public String getDescription()
- {
- return "The Dark Lord has misterious ways of showing you his love.";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fc/30be15db86ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fc/30be15db86ea001411cee0f8f86532a4
new file mode 100644
index 0000000..0a88315
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fc/30be15db86ea001411cee0f8f86532a4
@@ -0,0 +1,25 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.world.World;
+
+public class CurseBlind extends Curse
+{
+ public CurseBlind(int id, String name, int txtID, int packID)
+ {
+ super(id, name, txtID, packID);
+ }
+
+ @Override
+ public void action(World world, EntityPlayer player)
+ {
+ if (!player.isPotionActive(Potion.blindness) || player.getActivePotionEffect(Potion.blindness).getDuration() < 30) player.addPotionEffect(new PotionEffect(Potion.blindness.id, 60));
+ }
+
+ public String getDescription()
+ {
+ return "You see the light slowly fading in front of you";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fd/40224cbcafea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fd/40224cbcafea001411cee0f8f86532a4
new file mode 100644
index 0000000..1b8b1f7
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fd/40224cbcafea001411cee0f8f86532a4
@@ -0,0 +1,25 @@
+package darkknight.jewelrycraft.entities;
+
+import net.minecraft.entity.Entity;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.registry.EntityRegistry;
+import darkknight.jewelrycraft.JewelrycraftMod;
+import darkknight.jewelrycraft.util.Variables;
+
+public class EntityList
+{
+
+ public static void preInit(FMLPreInitializationEvent e)
+ {
+ createEntity(EntityHeart.class, Variables.MODID + ".Heart", 0xFF0000, 0xFF0000, false);
+ createEntity(EntityHalfHeart.class, Variables.MODID + ".Half-Heart", 0x000000, 0xFF0000, false);
+ }
+
+ public static void createEntity(Class<? extends Entity> entity, String entityName, int solidColor, int spotColor, boolean hasSpawnEgg)
+ {
+ int randomID = EntityRegistry.findGlobalUniqueEntityId();
+ if(hasSpawnEgg) EntityRegistry.registerGlobalEntityID(entity, entityName, randomID, solidColor, spotColor);
+ else EntityRegistry.registerGlobalEntityID(entity, entityName, randomID);
+ EntityRegistry.registerModEntity(entity, entityName, randomID, JewelrycraftMod.instance, 40, 3, true);
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fd/900f624402e50014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fd/900f624402e50014174fe663e69b8422
deleted file mode 100644
index d61aba7..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fd/900f624402e50014174fe663e69b8422
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- *
- */
-package darkknight.jewelrycraft.item;
-
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import darkknight.jewelrycraft.util.JewelryNBT;
-
-public class ItemGoldObj extends Item
-{
- public ItemGoldObj()
- {}
-
- public boolean requiresMultipleRenderPasses()
- {
- return true;
- }
-
- @SideOnly (Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int pass)
- {
- return 0xffff00;
- }
-
- @Override
- public IIcon getIcon(ItemStack stack, int pass)
- {
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) return item.getItem().getIconIndex(JewelryNBT.item(stack));
- else return itemIcon;
- }
-
- public String getItemStackDisplayName(ItemStack stack)
- {
- return "Golden " + JewelryNBT.item(stack).getDisplayName();
- }
-
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo)
- {
- if (displayInfo){
- ItemStack item = JewelryNBT.item(stack);
- if (item != null) list.add("Item: " + EnumChatFormatting.BLUE + item.getDisplayName());
- list.add(EnumChatFormatting.DARK_PURPLE + "Well this is useless now");
- }
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fd/e07ed5e186ea001411cee0f8f86532a4 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fd/e07ed5e186ea001411cee0f8f86532a4
new file mode 100644
index 0000000..8e44936
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fd/e07ed5e186ea001411cee0f8f86532a4
@@ -0,0 +1,23 @@
+package darkknight.jewelrycraft.curses;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+
+public class CurseFlamingSoul extends Curse
+{
+ public CurseFlamingSoul(int id, String name, int txtID, int packID)
+ {
+ super(id, name, txtID, packID);
+ }
+
+ @Override
+ public void action(World world, EntityPlayer player)
+ {
+ if (!player.isBurning() && rand.nextInt(20) == 0) player.setFire(5);
+ }
+
+ public String getDescription()
+ {
+ return "Is it me or is it getting hot in here?";
+ }
+}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fe/c010f86d9ae3001412c4c4819c88e86b b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fe/c010f86d9ae3001412c4c4819c88e86b
deleted file mode 100644
index e9b08aa..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fe/c010f86d9ae3001412c4c4819c88e86b
+++ /dev/null
@@ -1,86 +0,0 @@
-package darkknight.jewelrycraft.block;
-
-import java.util.ArrayList;
-import java.util.Random;
-import net.minecraft.block.BlockContainer;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class BlockMidasTouch extends BlockContainer
-{
- protected BlockMidasTouch(Material mat)
- {
- super(mat);
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int var2)
- {
- return new TileEntityMidasTouch();
- }
-
- @Override
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- @Override
- public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
- {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- @Override
- public int getRenderType()
- {
- return -1;
- }
-
- public int quantityDropped(Random rand)
- {
- return 1;
- }
-
- public Item getItemDropped(int id, Random rand, int size)
- {
- return Items.gold_nugget;
- }
-
- @Override
- public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune)
- {
- ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
-
- TileEntity tile = world.getTileEntity(x, y, z);
- if (tile != null && ((TileEntityMidasTouch)tile).target != null)
- ret.add(new ItemStack(Items.gold_nugget, 23, 0));
-
- return ret;
- }
-
- public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
- {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (((TileEntityMidasTouch)tile).target != null) this.setBlockBounds(0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0F, 0.5f - ((TileEntityMidasTouch)tile).target.width / 2, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2, ((TileEntityMidasTouch)tile).target.height, 0.5f + ((TileEntityMidasTouch)tile).target.width / 2);
- }
-
- @Override
- public void registerBlockIcons(IIconRegister icon)
- {
- blockIcon = icon.registerIcon("minecraft:gold_block");
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fe/d0474cdb91e3001417b2e384bf7c3702 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fe/d0474cdb91e3001417b2e384bf7c3702
deleted file mode 100644
index ce67e78..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/fe/d0474cdb91e3001417b2e384bf7c3702
+++ /dev/null
@@ -1,26 +0,0 @@
-package darkknight.jewelrycraft.tileentity.renders;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.tileentity.TileEntity;
-import org.lwjgl.opengl.GL11;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class TileEntityMidasTouchRender extends TileEntitySpecialRenderer
-{
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale)
- {
- GL11.glPushMatrix();
- TileEntityMidasTouch midas = (TileEntityMidasTouch)te;
- GL11.glTranslatef(1.0F, 0.0F, 1.0F);
- if (midas.target != null){
- ((EntityLiving)midas.target).hurtTime = 0;
- GL11.glColor3f(1.0F, 1.0F, 0.0F);
- RenderManager.instance.getEntityRenderObject(midas.target).doRender(midas.target, te.xCoord - Minecraft.getMinecraft().thePlayer.posX, 0D, 0D, 0F, 1F);
- }
- GL11.glPopMatrix();
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ff/b02f1331fce40014174fe663e69b8422 b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ff/b02f1331fce40014174fe663e69b8422
deleted file mode 100644
index c4fbc04..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.history/ff/b02f1331fce40014174fe663e69b8422
+++ /dev/null
@@ -1,48 +0,0 @@
-package darkknight.jewelrycraft.curses;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import darkknight.jewelrycraft.block.BlockList;
-import darkknight.jewelrycraft.entities.EntityHalfHeart;
-import darkknight.jewelrycraft.entities.EntityHeart;
-import darkknight.jewelrycraft.item.ItemList;
-import darkknight.jewelrycraft.tileentity.TileEntityMidasTouch;
-
-public class CurseMidasTouch extends Curse
-{
- public CurseMidasTouch(int id, String name, int text)
- {
- super(id, name, text);
- }
-
- @Override
- public void attackedByPlayerAction(World world, EntityPlayer player, Entity target)
- {
- if (!world.isRemote && target instanceof EntityLiving && !(target instanceof EntityHeart) && !(target instanceof EntityHalfHeart) && player.inventory.getCurrentItem() == null){
- world.setBlock(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), BlockList.midasTouchBlock, 0, 2);
- TileEntityMidasTouch midasTouchVictim = new TileEntityMidasTouch();
- midasTouchVictim.setEntity(target);
- world.setTileEntity(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ), midasTouchVictim);
- target.setDead();
- }
- }
-
- @Override
- public void action(World world, EntityPlayer player)
- {
- if(player.inventory.getCurrentItem() != null){
- int index = player.inventory.currentItem;
- ItemStack item = player.inventory.getCurrentItem();
- player.inventory.setInventorySlotContents(index, new ItemStack(ItemList.goldifiedObject,item.stackSize,item.getItemDamage()));
- }
- }
-
- public String getDescription()
- {
- return "Be careful what you wish for...";
- }
-}
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.jdt.core.external.folders/.markers.snap b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.jdt.core.external.folders/.markers.snap
new file mode 100644
index 0000000..ed1c082
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.jdt.core.external.folders/.markers.snap
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.jdt.core.external.folders/.syncinfo.snap b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.jdt.core.external.folders/.syncinfo.snap
new file mode 100644
index 0000000..ed1c082
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.jdt.core.external.folders/.syncinfo.snap
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/13/6a/history.index b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/13/6a/history.index
index bf2c649..498af17 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/13/6a/history.index
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/13/6a/history.index
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/13/history.index b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/13/history.index
index 48569fa..1d109f7 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/13/history.index
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/13/history.index
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/2/history.index b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/2/history.index
index 38c474c..2cdce4d 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/2/history.index
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/2/history.index
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/29/history.index b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/29/history.index
index 728c0fd..dcb0e91 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/29/history.index
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/29/history.index
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/2e/history.index b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/2e/history.index
index 985133f..641513f 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/2e/history.index
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/2e/history.index
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/3f/history.index b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/3f/history.index
new file mode 100644
index 0000000..0c24836
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/3f/history.index
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/5e/ac/history.index b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/5e/ac/history.index
new file mode 100644
index 0000000..3db9800
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/5e/ac/history.index
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/6e/history.index b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/6e/history.index
index 9d4afeb..65479b1 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/6e/history.index
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/6e/history.index
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/8d/history.index b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/8d/history.index
index 000689c..e0793a8 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/8d/history.index
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/8d/history.index
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/df/history.index b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/df/history.index
index d4653cf..69a90bc 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/df/history.index
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/df/history.index
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/e7/history.index b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/e7/history.index
index eb2d439..e216449 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/e7/history.index
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/e7/history.index
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/ef/9d/history.index b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/ef/9d/history.index
index ad15fa4..d88876d 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/ef/9d/history.index
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/ef/9d/history.index
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/ef/history.index b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/ef/history.index
deleted file mode 100644
index 4428198..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/ef/history.index
+++ /dev/null
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/history.index b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/history.index
index 3605671..00c6ba5 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/history.index
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.indexes/e4/b9/22/7d/96/history.index
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.markers.snap b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.markers.snap
new file mode 100644
index 0000000..ed1c082
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.markers.snap
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.syncinfo.snap b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.syncinfo.snap
new file mode 100644
index 0000000..ed1c082
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.syncinfo.snap
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/org.eclipse.jdt.core/state.dat b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/org.eclipse.jdt.core/state.dat
deleted file mode 100644
index f8b6680..0000000
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/org.eclipse.jdt.core/state.dat
+++ /dev/null
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap
new file mode 100644
index 0000000..ed1c082
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/66.tree b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/68.tree
index b823a83..25482f4 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/66.tree
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/68.tree
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
index 8c181f8..b159f63 100644
--- a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
Binary files differ
diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/68.snap b/eclipse/.metadata/.plugins/org.eclipse.core.resources/68.snap
new file mode 100644
index 0000000..26076e2
--- /dev/null
+++ b/eclipse/.metadata/.plugins/org.eclipse.core.resources/68.snap
Binary files differ