barbed wire models, proto laser

This commit is contained in:
HbmMods 2020-03-18 21:14:31 +01:00
parent 702ce91f64
commit 219a19d12d
16 changed files with 619 additions and 80 deletions

View File

@ -0,0 +1,445 @@
# Blender v2.76 (sub 0) OBJ File: ''
# www.blender.org
o cube
v 0.500000 0.062531 0.187500
v 0.500000 0.062531 -0.187500
v -0.500000 0.062531 -0.187500
v -0.500000 0.062531 0.187500
v 0.437500 0.937531 0.187500
v 0.437500 0.937531 -0.187500
v -0.437500 0.937531 -0.187500
v -0.437500 0.937531 0.187500
v 0.500000 0.687500 -0.437469
v 0.500000 0.312500 -0.437469
v -0.500000 0.687500 -0.437469
v -0.500000 0.312500 -0.437469
v 0.500000 0.687500 0.437562
v 0.500000 0.312500 0.437531
v 0.500000 0.687500 0.437500
v -0.500000 0.687500 0.437531
v -0.500000 0.312500 0.437531
v 0.500000 0.323245 -0.441920
v 0.500000 0.058080 -0.176755
v -0.500000 0.323245 -0.441920
v -0.500000 0.058080 -0.176755
v 0.500000 0.941964 0.176799
v 0.500000 0.676821 0.441986
v 0.500000 0.676777 0.441942
v -0.500000 0.941964 0.176799
v -0.500000 0.676777 0.441942
v -0.500000 0.676821 0.441986
v 0.500000 0.941920 -0.176755
v 0.500000 0.676755 -0.441920
v -0.500000 0.941920 -0.176755
v -0.500000 0.676755 -0.441920
v 0.500000 0.323201 0.441964
v 0.500000 0.058036 0.176799
v -0.500000 0.323201 0.441964
v -0.500000 0.058036 0.176799
v -0.437500 0.968458 0.510064
v -0.437500 -0.003814 -0.462208
v -0.437500 1.012652 0.465869
v -0.437500 0.040381 -0.506402
v -0.500000 1.012652 0.465869
v -0.500000 0.040381 -0.506402
v -0.500000 0.968458 0.510064
v -0.500000 -0.003814 -0.462208
v 0.500000 1.003814 -0.462208
v 0.500000 0.031542 0.510064
v 0.500000 0.959619 -0.506402
v 0.500000 -0.012652 0.465869
v 0.437500 0.959619 -0.506402
v 0.437500 -0.012652 0.465869
v 0.437500 1.003814 -0.462208
v 0.437500 0.031542 0.510064
v -0.374969 0.687500 0.500000
v -0.374969 0.312500 0.500000
v -0.374969 0.687500 0.375000
v -0.374969 0.312500 0.375000
v -0.124969 0.687500 0.500000
v -0.124969 0.312500 0.500000
v -0.124969 0.687500 0.375000
v -0.124969 0.312500 0.375000
v 0.375031 0.687500 0.500000
v 0.375031 0.312500 0.500000
v 0.375031 0.687500 0.375000
v 0.375031 0.312500 0.375000
v 0.125031 0.687500 0.500000
v 0.125031 0.312500 0.500000
v 0.125031 0.687500 0.375000
v 0.125031 0.312500 0.375000
v 0.125031 0.687500 -0.375000
v 0.125031 0.312500 -0.375000
v 0.125031 0.687500 -0.500000
v 0.125031 0.312500 -0.500000
v -0.374969 0.687500 -0.375000
v -0.374969 0.312500 -0.375000
v -0.374969 0.687500 -0.500000
v -0.374969 0.312500 -0.500000
v -0.124969 0.687500 -0.375000
v -0.124937 0.312500 -0.375000
v -0.124969 0.687500 -0.500000
v -0.124969 0.312500 -0.500000
v -0.125000 0.312500 -0.375000
v 0.375031 0.687500 -0.375000
v 0.375031 0.312500 -0.375000
v 0.375031 0.687500 -0.500000
v 0.375031 0.312500 -0.500000
v -0.374969 0.125000 0.187500
v -0.374969 0.000000 0.187500
v -0.374969 0.125000 -0.187500
v -0.374969 0.000000 -0.187500
v -0.124969 0.125000 0.187500
v -0.124969 0.000000 0.187500
v -0.124969 0.125000 -0.187500
v -0.124969 0.000000 -0.187500
v 0.375031 0.125000 0.187500
v 0.375031 0.000000 0.187500
v 0.375031 0.125000 -0.187500
v 0.375031 0.000000 -0.187500
v 0.125031 0.125000 0.187500
v 0.125031 0.000000 0.187500
v 0.125031 0.125000 -0.187500
v 0.125031 0.000000 -0.187500
v 0.125031 1.000000 0.187500
v 0.125031 0.875000 0.187500
v 0.125031 1.000000 -0.187500
v 0.125031 0.875000 -0.187500
v -0.374969 1.000000 0.187500
v -0.374969 0.875000 0.187500
v -0.374969 1.000000 -0.187500
v -0.374969 0.875000 -0.187500
v -0.124969 1.000000 0.187500
v -0.124969 0.875000 0.187500
v -0.124969 1.000000 -0.187500
v -0.124969 0.875000 -0.187500
v 0.375031 1.000000 0.187500
v 0.375031 0.875000 0.187500
v 0.375031 1.000000 -0.187500
v 0.375031 0.875000 -0.187500
v -0.374969 0.279029 0.486136
v -0.374969 0.013864 0.220971
v -0.374969 0.367417 0.397748
v -0.374969 0.102252 0.132583
v -0.374969 0.720971 0.486136
v -0.374969 0.632582 0.397748
v -0.374969 0.986136 0.220971
v -0.374969 0.897748 0.132583
v -0.374969 0.102252 -0.132583
v -0.374969 0.013864 -0.220971
v -0.374969 0.367418 -0.397748
v -0.374969 0.279029 -0.486136
v -0.374969 0.897748 -0.132583
v -0.374969 0.632583 -0.397748
v -0.374969 0.986136 -0.220971
v -0.374969 0.720971 -0.486136
v -0.124969 0.720971 0.486136
v -0.124969 0.632582 0.397748
v -0.124969 0.986136 0.220971
v -0.124969 0.897748 0.132583
v 0.125031 0.720971 0.486136
v 0.125031 0.632582 0.397748
v 0.125031 0.986136 0.220971
v 0.125031 0.897748 0.132583
v 0.375031 0.897748 -0.132583
v 0.375031 0.632583 -0.397748
v 0.375031 0.986136 -0.220971
v 0.375031 0.720971 -0.486136
v 0.375031 0.102252 -0.132583
v 0.375031 0.013864 -0.220971
v 0.375031 0.367418 -0.397748
v 0.375031 0.279029 -0.486136
v 0.375031 0.279029 0.486136
v 0.375031 0.013864 0.220971
v 0.375031 0.367417 0.397748
v 0.375031 0.102252 0.132583
v 0.375031 0.720971 0.486136
v 0.375031 0.632582 0.397748
v 0.375031 0.986136 0.220971
v 0.375031 0.897748 0.132583
v -0.124969 0.897748 -0.132583
v -0.124969 0.632583 -0.397748
v -0.124969 0.986136 -0.220971
v -0.124969 0.720971 -0.486136
v -0.124969 0.279029 0.486136
v -0.124969 0.013864 0.220971
v -0.124969 0.367417 0.397748
v -0.124969 0.102252 0.132583
v -0.124969 0.102252 -0.132583
v -0.124969 0.013864 -0.220971
v -0.124969 0.367418 -0.397748
v -0.124969 0.279029 -0.486136
v 0.125031 0.279029 0.486136
v 0.125031 0.013864 0.220971
v 0.125031 0.367417 0.397748
v 0.125031 0.102252 0.132583
v 0.125031 0.102252 -0.132583
v 0.125031 0.013864 -0.220971
v 0.125031 0.367418 -0.397748
v 0.125031 0.279029 -0.486136
v 0.125031 0.897748 -0.132583
v 0.125031 0.632583 -0.397748
v 0.125031 0.986136 -0.220971
v 0.125031 0.720971 -0.486136
vt 0.687012 0.187500
vt 0.687012 0.374512
vt 0.187988 0.187500
vt 0.187988 0.374512
vt 0.624512 0.375000
vt 0.624512 0.562012
vt 0.187988 0.375000
vt 0.187988 0.562012
vt 0.500488 0.812988
vt 0.999512 0.812988
vt 0.999512 0.999512
vt 0.000488 0.812988
vt 0.499512 0.812988
vt 0.500000 1.000000
vt 0.000488 0.687012
vt 0.000488 0.000488
vt 0.030762 0.687012
vt 0.030762 0.000488
vt 0.062988 0.687012
vt 0.062988 0.000488
vt 0.093262 0.687012
vt 0.093262 0.000488
vt 0.062012 0.687988
vt 0.062012 0.718262
vt 0.031738 0.687988
vt 0.031738 0.718262
vt 0.093262 0.687988
vt 0.062988 0.687988
vt 0.062988 0.718262
vt 0.094238 0.687012
vt 0.094238 0.000488
vt 0.124512 0.687012
vt 0.124512 0.000488
vt 0.031738 0.687012
vt 0.031738 0.000488
vt 0.062012 0.687012
vt 0.062012 0.000488
vt 0.093262 0.718262
vt 0.125488 0.812012
vt 0.125488 0.625488
vt 0.187500 0.812500
vt 0.187012 0.625488
vt 0.125488 0.624512
vt 0.125488 0.562988
vt 0.312500 0.624512
vt 0.312500 0.562988
vt 0.187988 0.625488
vt 0.249512 0.625488
vt 0.249512 0.812012
vt 0.500000 0.562988
vt 0.500000 0.624512
vt 0.000488 1.000000
vt 0.000488 0.999512
vt 1.062012 0.375488
vt 0.625488 0.375488
vt 0.625488 0.562012
vt 1.062012 0.562012
vt 1.187012 0.187988
vt 0.687988 0.187988
vt 0.687988 0.374512
vt 1.187012 0.374512
vn 0.000000 1.000000 0.000000
vn 0.000000 0.707200 0.707000
vn 0.000000 -0.707000 -0.707200
vn 1.000000 0.000000 0.000000
vn -1.000000 0.000000 0.000000
vn 0.000000 0.707100 0.707100
vn 0.000000 -0.707100 -0.707100
vn 0.000000 -0.707100 0.707100
vn 0.000000 0.707100 -0.707100
vn 1.000000 0.000100 0.000000
vn 1.000000 0.000000 -0.000300
vn -1.000000 0.000100 -0.000200
vn 0.000000 0.000000 -1.000000
vn -0.000000 -0.000100 -1.000000
vn 0.000000 -0.000100 1.000000
vn -0.000000 0.000000 1.000000
vn 0.000000 -1.000000 0.000000
s off
f 3/1/1 4/2/1 2/3/1
f 4/2/1 1/4/1 2/3/1
f 7/5/1 8/6/1 6/7/1
f 8/6/1 5/8/1 6/7/1
f 27/9/2 23/10/2 22/11/2
f 24/12/3 26/13/3 25/14/3
f 36/15/4 37/16/4 38/17/4
f 37/16/4 39/18/4 38/17/4
f 40/19/5 41/20/5 42/21/5
f 41/20/5 43/22/5 42/21/5
f 40/23/6 42/24/6 38/25/6
f 42/24/6 36/26/6 38/25/6
f 41/27/7 39/28/7 37/29/7
f 42/30/8 43/31/8 36/32/8
f 43/31/8 37/33/8 36/32/8
f 38/34/9 39/35/9 40/36/9
f 39/35/9 41/37/9 40/36/9
f 44/15/4 45/16/4 46/17/4
f 45/16/4 47/18/4 46/17/4
f 48/19/5 49/20/5 50/21/5
f 49/20/5 51/22/5 50/21/5
f 48/23/9 50/24/9 46/25/9
f 50/24/9 44/26/9 46/25/9
f 51/38/8 49/27/8 45/29/8
f 49/27/8 47/28/8 45/29/8
f 50/30/6 51/31/6 44/32/6
f 51/31/6 45/33/6 44/32/6
f 46/34/7 47/35/7 48/36/7
f 47/35/7 49/37/7 48/36/7
f 52/39/4 53/40/4 54/41/4
f 53/40/4 55/42/4 54/41/4
f 56/39/4 57/40/4 58/41/4
f 57/40/4 59/42/4 58/41/4
f 60/39/4 61/40/4 62/41/4
f 61/40/4 63/42/4 62/41/4
f 64/39/4 65/40/4 66/41/4
f 65/40/4 67/42/4 66/41/4
f 68/39/4 69/40/4 70/41/4
f 69/40/4 71/42/4 70/41/4
f 72/39/4 73/40/4 74/41/4
f 73/40/4 75/42/4 74/41/4
f 76/39/10 77/40/10 78/41/10
f 77/40/11 79/42/11 78/41/11
f 81/39/4 82/40/4 83/41/4
f 82/40/4 84/42/4 83/41/4
f 85/43/4 86/44/4 87/45/4
f 86/44/4 88/46/4 87/45/4
f 89/43/4 90/44/4 91/45/4
f 90/44/4 92/46/4 91/45/4
f 180/47/5 178/48/5 177/49/5
f 179/41/5 180/47/5 177/49/5
f 93/43/4 94/44/4 95/45/4
f 94/44/4 96/46/4 95/45/4
f 176/46/5 174/50/5 173/51/5
f 175/45/5 176/46/5 173/51/5
f 172/47/5 170/48/5 169/49/5
f 171/41/5 172/47/5 169/49/5
f 97/43/4 98/44/4 99/45/4
f 98/44/4 100/46/4 99/45/4
f 168/46/5 166/50/5 165/51/5
f 167/45/5 168/46/5 165/51/5
f 164/47/5 162/48/5 161/49/5
f 163/41/5 164/47/5 161/49/5
f 101/43/4 102/44/4 103/45/4
f 102/44/4 104/46/4 103/45/4
f 160/47/5 158/48/5 157/49/5
f 159/41/5 160/47/5 157/49/5
f 156/46/5 154/50/5 153/51/5
f 155/45/5 156/46/5 153/51/5
f 105/43/4 106/44/4 107/45/4
f 106/44/4 108/46/4 107/45/4
f 152/47/5 150/48/5 149/49/5
f 151/41/5 152/47/5 149/49/5
f 148/46/5 146/50/5 145/51/5
f 147/45/5 148/46/5 145/51/5
f 109/43/4 110/44/4 111/45/4
f 110/44/4 112/46/4 111/45/4
f 144/47/5 142/48/5 141/49/5
f 143/41/5 144/47/5 141/49/5
f 140/46/5 138/50/5 137/51/5
f 139/45/5 140/46/5 137/51/5
f 113/43/4 114/44/4 115/45/4
f 114/44/4 116/46/4 115/45/4
f 136/46/5 134/50/5 133/51/5
f 135/45/5 136/46/5 133/51/5
f 132/47/5 130/48/5 129/49/5
f 131/41/5 132/47/5 129/49/5
f 117/39/4 118/40/4 119/41/4
f 118/40/4 120/42/4 119/41/4
f 128/46/5 126/50/5 125/51/5
f 127/45/5 128/46/5 125/51/5
f 124/46/5 122/50/5 121/51/5
f 123/45/5 124/46/5 121/51/5
f 121/43/4 122/44/4 123/45/4
f 122/44/4 124/46/4 123/45/4
f 120/47/5 118/48/5 117/49/5
f 119/41/5 120/47/5 117/49/5
f 116/46/5 114/50/5 113/51/5
f 115/45/5 116/46/5 113/51/5
f 125/43/4 126/44/4 127/45/4
f 126/44/4 128/46/4 127/45/4
f 112/46/5 110/50/5 109/51/5
f 111/45/5 112/46/5 109/51/5
f 108/46/5 106/50/5 105/51/5
f 107/45/5 108/46/5 105/51/5
f 129/39/4 130/40/4 131/41/4
f 130/40/4 132/42/4 131/41/4
f 104/46/5 102/50/5 101/51/5
f 103/45/5 104/46/5 101/51/5
f 100/46/5 98/50/5 97/51/5
f 99/45/5 100/46/5 97/51/5
f 133/43/4 134/44/4 135/45/4
f 134/44/4 136/46/4 135/45/4
f 96/46/5 94/50/5 93/51/5
f 95/45/5 96/46/5 93/51/5
f 92/46/5 90/50/5 89/51/5
f 91/45/5 92/46/5 89/51/5
f 137/43/4 138/44/4 139/45/4
f 138/44/4 140/46/4 139/45/4
f 88/46/5 86/50/5 85/51/5
f 87/45/5 88/46/5 85/51/5
f 84/47/5 82/48/5 81/49/5
f 83/41/5 84/47/5 81/49/5
f 141/39/4 142/40/4 143/41/4
f 142/40/4 144/42/4 143/41/4
f 79/47/12 80/48/12 76/49/12
f 78/41/5 79/47/5 76/49/5
f 75/47/5 73/48/5 72/49/5
f 74/41/5 75/47/5 72/49/5
f 145/43/4 146/44/4 147/45/4
f 146/44/4 148/46/4 147/45/4
f 71/47/5 69/48/5 68/49/5
f 70/41/5 71/47/5 68/49/5
f 67/47/5 65/48/5 64/49/5
f 66/41/5 67/47/5 64/49/5
f 149/39/4 150/40/4 151/41/4
f 150/40/4 152/42/4 151/41/4
f 63/47/5 61/48/5 60/49/5
f 62/41/5 63/47/5 60/49/5
f 59/47/5 57/48/5 56/49/5
f 58/41/5 59/47/5 56/49/5
f 153/43/4 154/44/4 155/45/4
f 154/44/4 156/46/4 155/45/4
f 55/47/5 53/48/5 52/49/5
f 54/41/5 55/47/5 52/49/5
f 33/12/9 35/13/9 34/14/9
f 32/52/9 33/12/9 34/14/9
f 157/39/4 158/40/4 159/41/4
f 158/40/4 160/42/4 159/41/4
f 35/9/8 33/10/8 32/11/8
f 34/14/8 35/9/8 32/11/8
f 29/12/9 31/13/9 30/14/9
f 28/52/9 29/12/9 30/14/9
f 161/39/4 162/40/4 163/41/4
f 162/40/4 164/42/4 163/41/4
f 31/9/8 29/10/8 28/11/8
f 30/14/8 31/9/8 28/11/8
f 22/52/3 24/12/3 25/14/3
f 25/14/2 27/9/2 22/11/2
f 165/43/4 166/44/4 167/45/4
f 166/44/4 168/46/4 167/45/4
f 19/12/7 21/13/7 20/14/7
f 18/52/7 19/12/7 20/14/7
f 21/9/6 19/10/6 18/11/6
f 20/14/6 21/9/6 18/11/6
f 169/39/4 170/40/4 171/41/4
f 170/40/4 172/42/4 171/41/4
f 14/12/13 17/13/13 16/14/13
f 15/53/14 14/12/14 16/14/14
f 17/9/15 14/10/15 13/11/15
f 16/14/16 17/9/16 13/11/16
f 173/43/4 174/44/4 175/45/4
f 174/44/4 176/46/4 175/45/4
f 10/12/13 12/13/13 11/14/13
f 9/52/13 10/12/13 11/14/13
f 12/9/16 10/10/16 9/11/16
f 11/14/16 12/9/16 9/11/16
f 177/39/4 178/40/4 179/41/4
f 178/40/4 180/42/4 179/41/4
f 7/54/17 6/55/17 5/56/17
f 8/57/17 7/54/17 5/56/17
f 3/58/17 2/59/17 1/60/17
f 4/61/17 3/58/17 1/60/17

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 619 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

View File

@ -1093,12 +1093,12 @@ public class ModBlocks {
door_office = new BlockModDoor(Material.iron).setBlockName("door_office").setHardness(10.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":door_office");
door_bunker = new BlockModDoor(Material.iron).setBlockName("door_bunker").setHardness(10.0F).setResistance(100.0F).setBlockTextureName(RefStrings.MODID + ":door_bunker");
barbed_wire = new BarbedWire(Material.iron).setBlockName("barbed_wire").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":barbed_wire");
barbed_wire_fire = new BarbedWire(Material.iron).setBlockName("barbed_wire_fire").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":barbed_wire_fire");
barbed_wire_poison = new BarbedWire(Material.iron).setBlockName("barbed_wire_poison").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":barbed_wire_poison");
barbed_wire_acid = new BarbedWire(Material.iron).setBlockName("barbed_wire_acid").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":barbed_wire_acid");
barbed_wire_wither = new BarbedWire(Material.iron).setBlockName("barbed_wire_wither").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":barbed_wire_wither");
barbed_wire_ultradeath = new BarbedWire(Material.iron).setBlockName("barbed_wire_ultradeath").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":barbed_wire_ultradeath");
barbed_wire = new BarbedWire(Material.iron).setBlockName("barbed_wire").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":barbed_wire_model");
barbed_wire_fire = new BarbedWire(Material.iron).setBlockName("barbed_wire_fire").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":barbed_wire_fire_model");
barbed_wire_poison = new BarbedWire(Material.iron).setBlockName("barbed_wire_poison").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":barbed_wire_poison_model");
barbed_wire_acid = new BarbedWire(Material.iron).setBlockName("barbed_wire_acid").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":barbed_wire_acid_model");
barbed_wire_wither = new BarbedWire(Material.iron).setBlockName("barbed_wire_wither").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":barbed_wire_wither_model");
barbed_wire_ultradeath = new BarbedWire(Material.iron).setBlockName("barbed_wire_ultradeath").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":barbed_wire_ultradeath_model");
marker_structure = new BlockMarker(Material.iron).setBlockName("marker_structure").setHardness(0.0F).setResistance(0.0F).setLightLevel(1.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":marker_structure");

View File

@ -7,25 +7,25 @@ import com.hbm.potion.HbmPotion;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class BarbedWire extends Block {
public BarbedWire(Material mat)
{
public BarbedWire(Material mat) {
super(mat);
}
public void onEntityCollidedWithBlock(World p_149670_1_, int x, int y, int z, Entity ent)
{
public void onEntityCollidedWithBlock(World p_149670_1_, int x, int y, int z, Entity ent) {
ent.setInWeb();
if(this == ModBlocks.barbed_wire) {
@ -83,12 +83,29 @@ public class BarbedWire extends Block {
public int getRenderType()
{
return 1;
return 334083;
}
public boolean renderAsNormalBlock()
{
return false;
}
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
if (i == 0) {
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
}
if (i == 1) {
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
}
if (i == 2) {
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
}
if (i == 3) {
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
}
}
}

View File

@ -1,12 +1,14 @@
package com.hbm.entity.projectile;
import com.hbm.main.MainRegistry;
import com.hbm.lib.Library;
import com.hbm.lib.ModDamageSource;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
@ -20,7 +22,17 @@ public class EntityLaser extends Entity {
public EntityLaser(World world, EntityPlayer player) {
super(world);
this.ignoreFrustumCheck = true;
this.dataWatcher.updateObject(20, player.getUniqueID().toString());
this.dataWatcher.updateObject(20, player.getDisplayName());
Vec3 vec = player.getLookVec();
vec.rotateAroundY(-90F);
float l = 0.25F;
vec.xCoord *= l;
vec.yCoord *= l;
vec.zCoord *= l;
this.setPosition(player.posX + vec.xCoord, player.posY + player.getEyeHeight(), player.posZ + vec.zCoord);
}
@Override
@ -30,8 +42,29 @@ public class EntityLaser extends Entity {
@Override
public void onUpdate() {
if(!worldObj.isRemote && this.ticksExisted > 1)
if(this.ticksExisted > 1)
this.setDead();
int range = 100;
EntityPlayer player = worldObj.getPlayerEntityByName(this.dataWatcher.getWatchableObjectString(20));
if(player != null) {
//this.setPosition(player.posX, player.posY + player.getEyeHeight(), player.posZ);
MovingObjectPosition pos = Library.rayTrace(player, range, 1);
if(pos.entityHit != null) {
pos.entityHit.attackEntityFrom(ModDamageSource.radiation, 2);
}
//worldObj.createExplosion(this, pos.hitVec.xCoord, pos.hitVec.yCoord, pos.hitVec.zCoord, 1, false);
worldObj.spawnParticle("cloud", pos.hitVec.xCoord, pos.hitVec.yCoord, pos.hitVec.zCoord, 0, 0, 0);
worldObj.playSound(pos.hitVec.xCoord, pos.hitVec.yCoord, pos.hitVec.zCoord, "random.fizz", 1, 1, true);
}
}
@Override

View File

@ -59,12 +59,8 @@ public class GunBrimstone extends Item {
EntityLaser laser = new EntityLaser(world, player);
MovingObjectPosition pos = Library.rayTrace(player, 200, 1.0F);
laser.posX = pos.blockX + 0.5;
laser.posY = pos.blockY + 0.5;
laser.posZ = pos.blockZ + 0.5;
world.playSoundAtEntity(player, "hbm:weapon.rifleShoot", 1.0F, 0.8F + (rand.nextFloat() * 0.4F));
//world.playSoundAtEntity(player, "hbm:weapon.rifleShoot", 1.0F, 0.8F + (rand.nextFloat() * 0.4F));
if (!flag) {
player.inventory.consumeInventoryItem(ModItems.gun_dash_ammo);

View File

@ -59,6 +59,7 @@ public class ClientProxy extends ServerProxy
RenderingRegistry.registerBlockHandler(new RenderSteelBeam());
RenderingRegistry.registerBlockHandler(new RenderBarrel());
RenderingRegistry.registerBlockHandler(new RenderFence());
RenderingRegistry.registerBlockHandler(new RenderBarbedWire());
MinecraftForgeClient.registerItemRenderer(ModItems.assembly_template, new ItemRenderTemplate());
MinecraftForgeClient.registerItemRenderer(ModItems.chemistry_template, new ItemRenderTemplate());

View File

@ -610,5 +610,6 @@ public class ResourceManager {
public static final IModelCustom beam = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/beam.obj"));
public static final IModelCustom barrel = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/barrel.obj"));
public static final IModelCustom pole = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/pole.obj"));
public static final IModelCustom barbed_wire = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/barbed_wire.obj"));
}

View File

@ -0,0 +1,74 @@
package com.hbm.render.block;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.client.model.obj.WavefrontObject;
public class RenderBarbedWire implements ISimpleBlockRenderingHandler {
@Override
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
GL11.glPushMatrix();
Tessellator tessellator = Tessellator.instance;
IIcon iicon = block.getIcon(0, 0);
tessellator.setColorOpaque_F(1, 1, 1);
if (renderer.hasOverrideBlockTexture())
{
iicon = renderer.overrideBlockTexture;
}
GL11.glTranslated(0, -0.5, 0);
tessellator.startDrawingQuads();
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.barbed_wire, iicon, tessellator, 0, false);
tessellator.draw();
GL11.glPopMatrix();
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
Tessellator tessellator = Tessellator.instance;
IIcon iicon = block.getIcon(0, world.getBlockMetadata(x, y, z));
tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
tessellator.setColorOpaque_F(1, 1, 1);
if (renderer.hasOverrideBlockTexture())
{
iicon = renderer.overrideBlockTexture;
}
float rotation = (float) -Math.PI;
if(world.getBlockMetadata(x, y, z) < 4)
rotation = -90F / 180F * (float)Math.PI;
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.barbed_wire, iicon, tessellator, rotation, true);
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
return true;
}
@Override
public boolean shouldRender3DInInventory(int modelId) {
return true;
}
@Override
public int getRenderId() {
return 334083;
}
}

View File

@ -3,87 +3,54 @@ package com.hbm.render.entity;
import org.lwjgl.opengl.GL11;
import com.hbm.entity.projectile.EntityLaser;
import com.hbm.lib.Library;
import com.hbm.render.util.BeamPronter;
import com.hbm.render.util.BeamPronter.EnumBeamType;
import com.hbm.render.util.BeamPronter.EnumWaveType;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Vec3;
public class RenderLaser extends Render {
@Override
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_,
float p_76986_9_) {
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) {
this.doRender((EntityLaser)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}
public void doRender(EntityLaser laser, double x, double y, double z, float p_76986_8_,
float p_76986_9_) {
public void doRender(EntityLaser laser, double x, double y, double z, float p_76986_8_, float p_76986_9_) {
EntityPlayer player = null;
GL11.glPushMatrix();
for(Object p: laser.worldObj.playerEntities) {
EntityPlayer player = laser.worldObj.getPlayerEntityByName(laser.getDataWatcher().getWatchableObjectString(20));
if(player != null) {
double dX = laser.posX - player.posX;
double dY = laser.posY - player.posY;
double dZ = laser.posZ - player.posZ;
if(p instanceof EntityPlayer) {
EntityPlayer pla = (EntityPlayer)p;
if(pla.getUniqueID().toString().equals(laser.getDataWatcher().getWatchableObjectString(20))) {
player = pla;
break;
}
}
//GL11.glTranslated(x - dX, y - dY, z - dZ);
GL11.glTranslated(x, y, z);
MovingObjectPosition pos = Library.rayTrace(player, 100, 1);
Vec3 skeleton = Vec3.createVectorHelper(pos.hitVec.xCoord - player.posX, pos.hitVec.yCoord - player.posY - player.getEyeHeight(), pos.hitVec.zCoord - player.posZ);
BeamPronter.prontHelix(skeleton, 0, 0, 0, EnumWaveType.SPIRAL, EnumBeamType.LINE, 0x0000ff, 0x8080ff, 0, (int)(skeleton.lengthVector() * 5), 0.2F);
}
if(player == null)
return;
Vec3 vec = Vec3.createVectorHelper(-0.2, -0.1, 0.2);
vec.rotateAroundX(-(float)(player.rotationPitch * Math.PI / 180D));
vec.rotateAroundY(-(float)(player.rotationYaw * Math.PI / 180D));
drawPowerLine(x, y, z,
x + (player.posX + vec.xCoord - laser.posX),
y + (player.posY + vec.yCoord - laser.posY),
z + (player.posZ + vec.zCoord - laser.posZ));
GL11.glPopMatrix();
}
@Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
return null;
}
public void drawPowerLine(double x, double y, double z, double a, double b, double c) {
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawing(5);
tessellator.setColorRGBA_F(0.683F, 0.089F, 0.0F, 1.0F);
tessellator.addVertex(x, y + 0.05F, z);
tessellator.addVertex(x, y - 0.05F, z);
tessellator.addVertex(a, b + 0.05F, c);
tessellator.addVertex(a, b - 0.05F, c);
tessellator.draw();
tessellator.startDrawing(5);
tessellator.setColorRGBA_F(0.683F, 0.089F, 0.0F, 1.0F);
tessellator.addVertex(x + 0.05F, y, z);
tessellator.addVertex(x - 0.05F, y, z);
tessellator.addVertex(a + 0.05F, b, c);
tessellator.addVertex(a - 0.05F, b, c);
tessellator.draw();
tessellator.startDrawing(5);
tessellator.setColorRGBA_F(0.683F, 0.089F, 0.0F, 1.0F);
tessellator.addVertex(x, y, z + 0.05F);
tessellator.addVertex(x, y, z - 0.05F);
tessellator.addVertex(a, b, c + 0.05F);
tessellator.addVertex(a, b, c - 0.05F);
tessellator.draw();
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_CULL_FACE);
}
}

View File

@ -10,6 +10,7 @@ import com.hbm.interfaces.ILaserable;
import com.hbm.inventory.FluidTank;
import com.hbm.tileentity.TileEntityMachineBase;
import net.minecraft.block.Block;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityCoreEmitter extends TileEntityMachineBase implements IConsumer, IFluidAcceptor, ILaserable {
@ -38,8 +39,12 @@ public class TileEntityCoreEmitter extends TileEntityMachineBase implements ICon
//tank.updateTank(xCoord, yCoord, zCoord);
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata());
int range = 50;
//worldObj.setBlock(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, Blocks.dirt);
for(int i = 1; i <= range; i++) {
Block b = worldObj.getBlock(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ);
}
}
}