carrier rocket, rocket booster, world saving test

This commit is contained in:
HbmMods 2018-05-01 22:06:08 +02:00
parent a89a659192
commit 2da280076f
23 changed files with 2082 additions and 9 deletions

View File

@ -1276,6 +1276,8 @@ item.missile_doomsday.name=Doomsday Rakete
item.missile_taint.name=Verdorbene Rakete
item.missile_micro.name=Mikro-Atomrakete
item.missile_carrier.name=HTR-01 Trägerrakete
item.hazmat_helmet.name=Strahlenschutzhelm
item.hazmat_plate.name=Strahlenschutzbrustplatte
item.hazmat_legs.name=Strahlenschutzhose

View File

@ -1275,6 +1275,8 @@ item.missile_doomsday.name=Doomsday Missile
item.missile_taint.name=Taint-Tipped Missile
item.missile_micro.name=Micro-Nuclear Missile
item.missile_carrier.name=HTR-01 Carrier Rocket
item.hazmat_helmet.name=Hazmat Helmet
item.hazmat_plate.name=Hazmat Chestplate
item.hazmat_legs.name=Hazmat Leggings

View File

@ -0,0 +1,416 @@
# Blender v2.76 (sub 0) OBJ File: 'carrier_booster.blend'
# www.blender.org
o Cylinder
v 0.000000 1.000000 -0.500000
v 0.000000 8.000000 -0.500000
v 0.250000 1.000000 -0.433013
v 0.250000 8.000000 -0.433013
v 0.433013 1.000000 -0.250000
v 0.433013 8.000000 -0.250000
v 0.500000 1.000000 0.000000
v 0.500000 8.000000 0.000000
v 0.433013 1.000000 0.250000
v 0.433013 8.000000 0.250000
v 0.250000 1.000000 0.433013
v 0.250000 8.000000 0.433013
v 0.000000 1.000000 0.500000
v 0.000000 8.000000 0.500000
v -0.250000 1.000000 0.433013
v -0.250000 8.000000 0.433013
v -0.433013 1.000000 0.250000
v -0.433013 8.000000 0.250000
v -0.500000 1.000000 0.000000
v -0.500000 8.000000 0.000000
v -0.433013 1.000000 -0.250000
v -0.433013 8.000000 -0.250000
v -0.250000 1.000000 -0.433013
v -0.250000 8.000000 -0.433013
v 0.200001 8.500000 -0.346410
v 0.000001 8.500000 -0.400000
v 0.346411 8.500000 -0.200000
v 0.400001 8.500000 0.000000
v 0.346411 8.500000 0.200000
v 0.200001 8.500000 0.346410
v 0.000001 8.500000 0.400000
v -0.199999 8.500000 0.346410
v -0.346409 8.500000 0.200000
v -0.399999 8.500000 0.000000
v -0.346409 8.500000 -0.200000
v -0.199999 8.500000 -0.346410
v 0.037502 9.000000 -0.064952
v 0.000002 9.000000 -0.075000
v 0.064954 9.000000 -0.037500
v 0.075002 9.000000 0.000000
v 0.064953 9.000000 0.037500
v 0.037502 9.000000 0.064952
v 0.000002 9.000000 0.075000
v -0.037498 9.000000 0.064952
v -0.064950 9.000000 0.037500
v -0.074998 9.000000 0.000000
v -0.064950 9.000000 -0.037500
v -0.037498 9.000000 -0.064952
v -0.000000 1.000000 -0.375000
v 0.187500 1.000000 -0.324760
v 0.324760 1.000000 -0.187500
v 0.375000 1.000000 0.000000
v 0.324760 1.000000 0.187500
v 0.187500 1.000000 0.324760
v 0.000000 1.000000 0.375000
v -0.187500 1.000000 0.324760
v -0.324759 1.000000 0.187500
v -0.375000 1.000000 0.000000
v -0.324760 1.000000 -0.187500
v -0.187500 1.000000 -0.324759
v 0.000000 0.000000 -0.500000
v 0.250000 0.000000 -0.433013
v 0.433013 0.000000 -0.250000
v 0.500000 0.000000 0.000000
v 0.433013 0.000000 0.250000
v 0.250000 0.000000 0.433013
v 0.000000 0.000000 0.500000
v -0.250000 0.000000 0.433013
v -0.433012 0.000000 0.250000
v -0.500000 0.000000 0.000000
v -0.433013 0.000000 -0.250000
v -0.250000 0.000000 -0.433013
vt 0.291673 0.852188
vt 0.261395 0.852188
vt 0.261395 0.033298
vt 0.231118 0.852188
vt 0.231118 0.033298
vt 0.200840 0.852188
vt 0.200840 0.033298
vt 0.170562 0.852188
vt 0.170563 0.033298
vt 0.140284 0.852188
vt 0.140285 0.033298
vt 0.110006 0.852188
vt 0.110008 0.033298
vt 0.079728 0.852188
vt 0.079730 0.033298
vt 0.049451 0.852188
vt 0.049453 0.033298
vt 0.019173 0.852188
vt 0.019175 0.033297
vt 0.382507 0.852188
vt 0.352229 0.852188
vt 0.352228 0.033298
vt 0.321951 0.852188
vt 0.349201 0.911762
vt 0.291673 0.033298
vt 0.321950 0.033298
vt 0.053237 0.019173
vt 0.197812 0.911762
vt 0.187972 0.980827
vt 0.183430 0.980827
vt 0.258368 0.911762
vt 0.379479 0.911762
vt 0.046423 0.911762
vt 0.022201 0.911762
vt 0.076701 0.911762
vt 0.052478 0.911762
vt 0.106979 0.911762
vt 0.082756 0.911762
vt 0.137256 0.911762
vt 0.113034 0.911762
vt 0.167534 0.911762
vt 0.143312 0.911762
vt 0.173590 0.911762
vt 0.318923 0.911762
vt 0.288645 0.911762
vt 0.228090 0.911762
vt 0.726241 0.560416
vt 0.740920 0.556483
vt 0.736987 0.571161
vt 0.339361 0.980827
vt 0.334819 0.980827
vt 0.264423 0.911762
vt 0.278805 0.980827
vt 0.066861 0.980827
vt 0.157694 0.980827
vt 0.153152 0.980827
vt 0.309083 0.980827
vt 0.304541 0.980827
vt 0.248527 0.980827
vt 0.243986 0.980827
vt 0.036583 0.980827
vt 0.032041 0.980827
vt 0.127416 0.980827
vt 0.218250 0.980827
vt 0.213708 0.980827
vt 0.369639 0.980827
vt 0.365097 0.980827
vt 0.097138 0.980827
vt 0.092596 0.980827
vt 0.643102 0.894316
vt 0.613151 0.780289
vt 0.642667 0.773541
vt 0.083515 0.019173
vt 0.106223 0.019173
vt 0.113792 0.019173
vt 0.136500 0.019173
vt 0.144070 0.019173
vt 0.166778 0.019173
vt 0.174347 0.019173
vt 0.197055 0.019173
vt 0.295457 0.019173
vt 0.265180 0.019173
vt 0.287888 0.019173
vt 0.204625 0.019173
vt 0.227333 0.019173
vt 0.325735 0.019173
vt 0.348443 0.019173
vt 0.234902 0.019173
vt 0.257610 0.019173
vt 0.382505 0.033297
vt 0.356012 0.019173
vt 0.022960 0.019173
vt 0.797384 0.255928
vt 0.684386 0.225651
vt 0.725746 0.184290
vt 0.710258 0.883441
vt 0.702692 0.765789
vt 0.732955 0.764817
vt 0.822808 0.894316
vt 0.852759 0.780289
vt 0.881781 0.788917
vt 0.778254 0.885625
vt 0.793354 0.768701
vt 0.823243 0.773541
vt 0.621335 0.900787
vt 0.584128 0.788917
vt 0.687655 0.885625
vt 0.672555 0.768701
vt 0.800671 0.889255
vt 0.755651 0.883441
vt 0.763217 0.765789
vt 0.600028 0.908641
vt 0.555719 0.799390
vt 0.665239 0.889255
vt 0.732955 0.882712
vt 0.844574 0.900787
vt 0.910190 0.799390
vt 0.324979 0.911762
vt 0.075946 0.019173
vt 0.234145 0.911762
vt 0.355257 0.911762
vt 0.294701 0.911762
vt 0.203868 0.911762
vt 0.732445 0.571161
vt 0.728512 0.568891
vt 0.726241 0.564957
vt 0.728512 0.556483
vt 0.732445 0.554212
vt 0.736987 0.554212
vt 0.743191 0.560416
vt 0.743191 0.564957
vt 0.740920 0.568891
vt 0.274263 0.980827
vt 0.062319 0.980827
vt 0.122875 0.980827
vt 0.318165 0.019173
vt 0.378720 0.019173
vt 0.045668 0.019173
vt 0.756024 0.184290
vt 0.782245 0.199429
vt 0.797384 0.225651
vt 0.782245 0.282150
vt 0.756024 0.297288
vt 0.725746 0.297288
vt 0.699525 0.282150
vt 0.684386 0.255928
vt 0.699525 0.199429
vt 0.865881 0.908641
vn 0.258800 0.000000 -0.965900
vn 0.707100 0.000000 -0.707100
vn 0.965900 0.000000 -0.258800
vn 0.965900 0.000000 0.258800
vn 0.707100 0.000000 0.707100
vn 0.258800 0.000000 0.965900
vn -0.258800 0.000000 0.965900
vn -0.707100 0.000000 0.707100
vn -0.965900 0.000000 0.258800
vn -0.965900 0.000000 -0.258800
vn -0.694300 0.189700 -0.694300
vn -0.258800 0.000000 -0.965900
vn -0.707100 0.000000 -0.707100
vn 0.000000 -1.000000 0.000000
vn 0.818100 0.531700 0.219200
vn 0.694300 0.189700 -0.694300
vn -0.948400 0.189700 -0.254100
vn -0.948400 0.189700 0.254100
vn -0.694300 0.189700 0.694300
vn -0.254100 0.189700 0.948400
vn 0.254100 0.189700 0.948400
vn 0.694300 0.189700 0.694300
vn 0.948400 0.189700 0.254100
vn -0.254100 0.189700 -0.948400
vn 0.254100 0.189700 -0.948400
vn 0.948400 0.189700 -0.254100
vn 0.000000 1.000000 -0.000000
vn -0.598900 0.531700 -0.598900
vn 0.219200 0.531700 -0.818100
vn -0.598900 0.531700 0.598900
vn 0.598900 0.531700 0.598900
vn -0.219200 0.531700 -0.818100
vn 0.598900 0.531700 -0.598900
vn -0.818100 0.531700 0.219200
vn 0.219200 0.531700 0.818100
vn 0.818100 0.531700 -0.219200
vn -0.818100 0.531700 -0.219200
vn -0.219200 0.531700 0.818100
vn -0.257000 0.119900 0.959000
vn 0.959000 0.119900 0.257000
vn -0.702000 0.119900 -0.702000
vn 0.257000 0.119900 -0.959000
vn -0.702000 0.119900 0.702000
vn 0.702000 0.119900 0.702000
vn -0.257000 0.119900 -0.959000
vn 0.702000 0.119900 -0.702000
vn -0.959000 0.119900 0.257000
vn 0.257000 0.119900 0.959000
vn 0.959000 0.119900 -0.257000
vn -0.959000 0.119900 -0.257000
vn 0.000000 1.000000 0.000100
vn 0.000000 1.000000 -0.000100
s off
f 2/1/1 4/2/1 3/3/1
f 4/2/2 6/4/2 5/5/2
f 6/4/3 8/6/3 7/7/3
f 8/6/4 10/8/4 9/9/4
f 10/8/5 12/10/5 11/11/5
f 12/10/6 14/12/6 13/13/6
f 14/12/7 16/14/7 15/15/7
f 16/14/8 18/16/8 17/17/8
f 18/16/9 20/18/9 19/19/9
f 20/20/10 22/21/10 21/22/10
f 24/23/11 22/21/11 35/24/11
f 24/23/12 2/1/12 1/25/12
f 22/21/13 24/23/13 23/26/13
f 15/15/14 17/17/14 57/27/14
f 28/28/15 40/29/15 41/30/15
f 6/4/16 4/2/16 25/31/16
f 22/21/17 20/20/17 34/32/17
f 18/16/18 33/33/18 34/34/18
f 16/14/19 32/35/19 33/36/19
f 14/12/20 31/37/20 32/38/20
f 12/10/21 30/39/21 31/40/21
f 10/8/22 29/41/22 30/42/22
f 8/6/23 28/28/23 29/43/23
f 2/1/24 24/23/24 36/44/24
f 4/2/25 2/1/25 26/45/25
f 8/6/26 6/4/26 27/46/26
f 47/47/27 43/48/27 39/49/27
f 35/24/28 47/50/28 48/51/28
f 25/52/29 26/45/29 38/53/29
f 33/36/30 32/35/30 44/54/30
f 29/41/31 41/55/31 42/56/31
f 36/44/32 48/57/32 38/58/32
f 25/31/33 37/59/33 39/60/33
f 33/33/34 45/61/34 46/62/34
f 31/40/35 30/39/35 42/63/35
f 27/46/36 39/64/36 40/65/36
f 34/32/37 46/66/37 47/67/37
f 31/37/38 43/68/38 44/69/38
f 56/70/39 68/71/39 67/72/39
f 15/15/14 56/73/14 55/74/14
f 13/13/14 55/75/14 54/76/14
f 11/11/14 54/77/14 53/78/14
f 9/9/14 53/79/14 52/80/14
f 23/26/14 1/25/14 49/81/14
f 3/3/14 50/82/14 49/83/14
f 7/7/14 52/84/14 51/85/14
f 23/26/14 60/86/14 59/87/14
f 5/5/14 51/88/14 50/89/14
f 19/90/14 21/22/14 59/91/14
f 17/17/14 19/19/14 58/92/14
f 64/93/14 70/94/14 72/95/14
f 53/96/40 65/97/40 64/98/40
f 60/99/41 72/100/41 71/101/41
f 50/102/42 62/103/42 61/104/42
f 57/105/43 69/106/43 68/71/43
f 54/107/44 66/108/44 65/97/44
f 60/99/45 49/109/45 61/104/45
f 50/102/46 51/110/46 63/111/46
f 57/105/47 58/112/47 70/113/47
f 54/107/48 55/114/48 67/72/48
f 52/115/49 64/98/49 63/111/49
f 59/116/50 71/101/50 70/117/50
f 1/25/1 2/1/1 3/3/1
f 3/3/2 4/2/2 5/5/2
f 5/5/3 6/4/3 7/7/3
f 7/7/4 8/6/4 9/9/4
f 9/9/5 10/8/5 11/11/5
f 11/11/6 12/10/6 13/13/6
f 13/13/7 14/12/7 15/15/7
f 15/15/8 16/14/8 17/17/8
f 17/17/9 18/16/9 19/19/9
f 19/90/10 20/20/10 21/22/10
f 36/118/11 24/23/11 35/24/11
f 23/26/12 24/23/12 1/25/12
f 21/22/13 22/21/13 23/26/13
f 56/119/14 15/15/14 57/27/14
f 29/43/15 28/28/15 41/30/15
f 27/120/16 6/4/16 25/31/16
f 35/121/17 22/21/17 34/32/17
f 20/18/18 18/16/18 34/34/18
f 18/16/19 16/14/19 33/36/19
f 16/14/20 14/12/20 32/38/20
f 14/12/21 12/10/21 31/40/21
f 12/10/22 10/8/22 30/42/22
f 10/8/23 8/6/23 29/43/23
f 26/122/24 2/1/24 36/44/24
f 25/52/25 4/2/25 26/45/25
f 28/123/26 8/6/26 27/46/26
f 39/49/51 37/124/51 38/125/51
f 38/125/51 48/126/51 47/47/51
f 47/47/27 46/127/27 43/48/27
f 45/128/52 44/129/52 43/48/52
f 43/48/51 42/130/51 41/131/51
f 41/131/27 40/132/27 43/48/27
f 39/49/27 38/125/27 47/47/27
f 46/127/27 45/128/27 43/48/27
f 43/48/27 40/132/27 39/49/27
f 36/118/28 35/24/28 48/51/28
f 37/133/29 25/52/29 38/53/29
f 45/134/30 33/36/30 44/54/30
f 30/42/31 29/41/31 42/56/31
f 26/122/32 36/44/32 38/58/32
f 27/120/33 25/31/33 39/60/33
f 34/34/34 33/33/34 46/62/34
f 43/135/35 31/40/35 42/63/35
f 28/123/36 27/46/36 40/65/36
f 35/121/37 34/32/37 47/67/37
f 32/38/38 31/37/38 44/69/38
f 55/114/39 56/70/39 67/72/39
f 13/13/14 15/15/14 55/74/14
f 11/11/14 13/13/14 54/76/14
f 9/9/14 11/11/14 53/78/14
f 7/7/14 9/9/14 52/80/14
f 60/136/14 23/26/14 49/81/14
f 1/25/14 3/3/14 49/83/14
f 5/5/14 7/7/14 51/85/14
f 21/22/14 23/26/14 59/87/14
f 3/3/14 5/5/14 50/89/14
f 58/137/14 19/90/14 59/91/14
f 57/138/14 17/17/14 58/92/14
f 72/95/14 61/139/14 62/140/14
f 62/140/14 63/141/14 64/93/14
f 64/93/14 65/142/14 66/143/14
f 66/143/14 67/144/14 68/145/14
f 68/145/14 69/146/14 70/94/14
f 70/94/14 71/147/14 72/95/14
f 72/95/14 62/140/14 64/93/14
f 64/93/14 66/143/14 68/145/14
f 68/145/14 70/94/14 64/93/14
f 52/115/40 53/96/40 64/98/40
f 59/116/41 60/99/41 71/101/41
f 49/109/42 50/102/42 61/104/42
f 56/70/43 57/105/43 68/71/43
f 53/96/44 54/107/44 65/97/44
f 72/100/45 60/99/45 61/104/45
f 62/103/46 50/102/46 63/111/46
f 69/106/47 57/105/47 70/113/47
f 66/108/48 54/107/48 67/72/48
f 51/110/49 52/115/49 63/111/49
f 58/148/50 59/116/50 70/117/50

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -4,6 +4,7 @@ import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.entity.logic.EntityMissileTest;
import com.hbm.entity.missile.EntityCarrier;
import com.hbm.entity.missile.EntityMissileAntiBallistic;
import com.hbm.entity.missile.EntityMissileBunkerBuster;
import com.hbm.entity.missile.EntityMissileBurst;
@ -434,6 +435,20 @@ public class LaunchPad extends BlockContainer implements IBomb {
p_149695_1_.playSoundEffect(x, y, z, "hbm:weapon.missileTakeOff", 2.0F, 1.0F);
}
}
if(entity.slots[0] != null && entity.slots[0].getItem() == ModItems.missile_carrier && entity.power >= 75000)
{
EntityCarrier missile = new EntityCarrier(p_149695_1_);
missile.posX = x + 0.5F;
missile.posY = y + 0.5F;
missile.posZ = z + 0.5F;
if (!p_149695_1_.isRemote)
p_149695_1_.spawnEntityInWorld(missile);
entity.power -= 75000;
entity.slots[0] = null;
p_149695_1_.playSoundEffect(x, y, z, "hbm:weapon.missileTakeOff", 2.0F, 1.0F);
}
}
}

View File

@ -15,6 +15,7 @@ import com.hbm.entity.projectile.EntityMeteor;
import com.hbm.main.MainRegistry;
import com.hbm.main.ModEventHandler;
import com.hbm.potion.PotionEffectTaint;
import com.hbm.saveddata.SatelliteSavedData;
import com.hbm.world.Meteorite;
import net.minecraft.block.Block;
@ -26,8 +27,10 @@ import net.minecraft.item.ItemStack;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.village.VillageCollection;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraft.world.chunk.Chunk;
@ -166,13 +169,13 @@ public class TestEventTester extends Block {
ModEventHandler.meteorShower = 6000;
}*/
EntityCloudFleija rainbow = new EntityCloudFleija(worldObj);
/*EntityCloudFleija rainbow = new EntityCloudFleija(worldObj);
rainbow.posX = x1;
rainbow.posY = y1;
rainbow.posZ = z1;
rainbow.maxAge = 100;
if(!worldObj.isRemote)
worldObj.spawnEntityInWorld(rainbow);
worldObj.spawnEntityInWorld(rainbow);*/
@ -198,6 +201,8 @@ public class TestEventTester extends Block {
@Override
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
{
this.worldObj = par1World;
/*double d = (float)par2 + 0.5F;
double d1 = (float)par3 + 0.7F;
double d2 = (float)par4 + 0.5F;
@ -226,11 +231,27 @@ public class TestEventTester extends Block {
//return true;
//System.out.println(par5EntityPlayer.getCommandSenderName());
//System.out.println(par5EntityPlayer.getUniqueID());
List<ItemStack> list = new ArrayList<ItemStack>();
/*List<ItemStack> list = new ArrayList<ItemStack>();
PotionEffect effect = new PotionEffect(PotionEffectTaint.instance.id, 300, 0);
effect.setCurativeItems(list);
par5EntityPlayer.addPotionEffect(effect);
return true;
return true;*/
if(!worldObj.isRemote) {
SatelliteSavedData data = (SatelliteSavedData)worldObj.perWorldStorage.loadData(SatelliteSavedData.class, "satellites");
if(data == null) {
worldObj.perWorldStorage.setData("satellites", new SatelliteSavedData(worldObj));
return true;
}
par5EntityPlayer.addChatComponentMessage(new ChatComponentText(String.valueOf(data.globalAccessThingy)));
data.globalAccessThingy = itemRand.nextInt(10000);
par5EntityPlayer.addChatComponentMessage(new ChatComponentText(String.valueOf(data.globalAccessThingy)));
data.markDirty();
}
return true;
}
/*public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float a, float b, float c)

View File

@ -0,0 +1,107 @@
package com.hbm.entity.missile;
import com.hbm.entity.effect.EntityNukeCloudSmall;
import com.hbm.entity.logic.EntityNukeExplosionAdvanced;
import com.hbm.entity.logic.EntityNukeExplosionMK3;
import com.hbm.entity.logic.EntityNukeExplosionMK4;
import com.hbm.entity.particle.EntityGasFlameFX;
import com.hbm.entity.particle.EntitySmokeFX;
import com.hbm.entity.particle.EntityTSmokeFX;
import com.hbm.explosion.ExplosionLarge;
import com.hbm.main.MainRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.init.Blocks;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
public class EntityBooster extends EntityThrowable {
public EntityBooster(World p_i1582_1_) {
super(p_i1582_1_);
this.ignoreFrustumCheck = true;
}
@Override
public void onUpdate() {
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
this.posX += this.motionX;
this.posY += this.motionY;
this.posZ += this.motionZ;
this.motionY -= 0.015;
if(motionY < -1.5F)
motionY = -1.5F;
this.rotation();
if(this.worldObj.getBlock((int)this.posX, (int)this.posY, (int)this.posZ) != Blocks.air)
{
if(!this.worldObj.isRemote)
{
ExplosionLarge.explodeFire(worldObj, posX, posY, posZ, 10F, true, false, true);
}
this.setDead();
}
if(!worldObj.isRemote) {
for(int i = 0; i < 2; i++) {
EntityTSmokeFX fx1 = new EntityTSmokeFX(worldObj);
fx1.posY = posY - 0.25D;
fx1.posX = posX + rand.nextGaussian() * 0.25D;
fx1.posZ = posZ + rand.nextGaussian() * 0.25D;
fx1.motionY = -0.2D;
worldObj.spawnEntityInWorld(fx1);
}
}
this.motionX *= 0.995;
this.motionZ *= 0.995;
}
protected void rotation() {
float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
for (this.rotationPitch = (float)(Math.atan2(this.motionY, f2) * 180.0D / Math.PI) - 90; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
{
;
}
while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
{
this.prevRotationPitch += 360.0F;
}
while (this.rotationYaw - this.prevRotationYaw < -180.0F)
{
this.prevRotationYaw -= 360.0F;
}
while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
{
this.prevRotationYaw += 360.0F;
}
}
@Override
protected void onImpact(MovingObjectPosition p_70184_1_) {
}
@Override
@SideOnly(Side.CLIENT)
public boolean isInRangeToRenderDist(double distance)
{
return distance < 500000;
}
}

View File

@ -0,0 +1,161 @@
package com.hbm.entity.missile;
import com.hbm.entity.particle.EntityDSmokeFX;
import com.hbm.entity.particle.EntityGasFlameFX;
import com.hbm.entity.particle.EntitySmokeFX;
import com.hbm.explosion.ExplosionChaos;
import com.hbm.explosion.ExplosionLarge;
import com.hbm.main.MainRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.init.Blocks;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeChunkManager;
import net.minecraftforge.common.ForgeChunkManager.Type;
public class EntityCarrier extends EntityThrowable {
double acceleration = 0.00D;
public EntityCarrier(World p_i1582_1_) {
super(p_i1582_1_);
this.ignoreFrustumCheck = true;
this.setSize(3.0F, 26.0F);
}
@Override
public void onUpdate() {
//this.setDead();
if(motionY < 3.0D) {
acceleration += 0.0005D;
motionY += acceleration;
}
this.setLocationAndAngles(posX + this.motionX, posY + this.motionY, posZ + this.motionZ, 0, 0);
if(!worldObj.isRemote) {
for(int i = 0; i < 10; i++) {
EntityGasFlameFX fx = new EntityGasFlameFX(worldObj);
fx.posY = posY - 0.25D;
fx.posX = posX + rand.nextGaussian() * 0.75D;
fx.posZ = posZ + rand.nextGaussian() * 0.75D;
fx.motionY = -0.2D;
worldObj.spawnEntityInWorld(fx);
}
if(this.dataWatcher.getWatchableObjectInt(8) == 1)
for(int i = 0; i < 2; i++) {
EntityGasFlameFX fx1 = new EntityGasFlameFX(worldObj);
fx1.posY = posY - 0.25D;
fx1.posX = posX + rand.nextGaussian() * 0.15D + 2.5D;
fx1.posZ = posZ + rand.nextGaussian() * 0.15D;
fx1.motionY = -0.2D;
worldObj.spawnEntityInWorld(fx1);
EntityGasFlameFX fx2 = new EntityGasFlameFX(worldObj);
fx2.posY = posY - 0.25D;
fx2.posX = posX + rand.nextGaussian() * 0.15D - 2.5D;
fx2.posZ = posZ + rand.nextGaussian() * 0.15D;
fx2.motionY = -0.2D;
worldObj.spawnEntityInWorld(fx2);
EntityGasFlameFX fx3 = new EntityGasFlameFX(worldObj);
fx3.posY = posY - 0.25D;
fx3.posX = posX + rand.nextGaussian() * 0.15D;
fx3.posZ = posZ + rand.nextGaussian() * 0.15D + 2.5D;
fx3.motionY = -0.2D;
worldObj.spawnEntityInWorld(fx3);
EntityGasFlameFX fx4 = new EntityGasFlameFX(worldObj);
fx4.posY = posY - 0.25D;
fx4.posX = posX + rand.nextGaussian() * 0.15D;
fx4.posZ = posZ + rand.nextGaussian() * 0.15D - 2.5D;
fx4.motionY = -0.2D;
worldObj.spawnEntityInWorld(fx4);
}
if(this.ticksExisted < 20) {
ExplosionLarge.spawnShock(worldObj, posX, posY, posZ, 13 + rand.nextInt(3), 4 + rand.nextGaussian() * 2);
}
}
if(this.posY > 300 && this.dataWatcher.getWatchableObjectInt(8) == 1)
this.disengageBoosters();
//this.setDead();
if(this.posY > 600) {
this.setDead();
}
}
@Override
protected void entityInit() {
this.dataWatcher.addObject(8, 1);
}
private void disengageBoosters() {
this.dataWatcher.updateObject(8, 0);
if(!worldObj.isRemote) {
EntityBooster boost1 = new EntityBooster(worldObj);
boost1.posX = posX + 1.5D;
boost1.posY = posY;
boost1.posZ = posZ;
boost1.motionX = 0.45D + rand.nextDouble() * 0.2D;
boost1.motionY = motionY;
boost1.motionZ = rand.nextGaussian() * 0.1D;
worldObj.spawnEntityInWorld(boost1);
EntityBooster boost2 = new EntityBooster(worldObj);
boost2.posX = posX - 1.5D;
boost2.posY = posY;
boost2.posZ = posZ;
boost2.motionX = -0.45D - rand.nextDouble() * 0.2D;
boost2.motionY = motionY;
boost2.motionZ = rand.nextGaussian() * 0.1D;
worldObj.spawnEntityInWorld(boost2);
EntityBooster boost3 = new EntityBooster(worldObj);
boost3.posX = posX;
boost3.posY = posY;
boost3.posZ = posZ + 1.5D;
boost3.motionZ = 0.45D + rand.nextDouble() * 0.2D;
boost3.motionY = motionY;
boost3.motionX = rand.nextGaussian() * 0.1D;
worldObj.spawnEntityInWorld(boost3);
EntityBooster boost4 = new EntityBooster(worldObj);
boost4.posX = posX;
boost4.posY = posY;
boost4.posZ = posZ - 1.5D;
boost4.motionZ = -0.45D - rand.nextDouble() * 0.2D;
boost4.motionY = motionY;
boost4.motionX = rand.nextGaussian() * 0.1D;
worldObj.spawnEntityInWorld(boost4);
}
}
@Override
protected void onImpact(MovingObjectPosition p_70184_1_) {
}
@Override
@SideOnly(Side.CLIENT)
public boolean isInRangeToRenderDist(double distance)
{
return distance < 500000;
}
}

View File

@ -88,7 +88,7 @@ public class EntityMIRV extends EntityThrowable {
@SideOnly(Side.CLIENT)
public boolean isInRangeToRenderDist(double distance)
{
return distance < 25000;
return distance < 500000;
}
}

View File

@ -251,7 +251,7 @@ public abstract class EntityMissileBaseAdvanced extends Entity implements IChunk
@SideOnly(Side.CLIENT)
public boolean isInRangeToRenderDist(double distance)
{
return distance < 25000;
return distance < 500000;
}
public abstract void onImpact();

View File

@ -675,6 +675,8 @@ public class ModItems {
public static Item missile_doomsday;
public static Item missile_taint;
public static Item missile_micro;
public static Item missile_carrier;
public static Item gun_rpg;
public static Item gun_rpg_ammo;
@ -1816,6 +1818,7 @@ public class ModItems {
missile_doomsday = new Item().setUnlocalizedName("missile_doomsday").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":missile_doomsday");
missile_taint = new Item().setUnlocalizedName("missile_taint").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":missile_taint");
missile_micro = new Item().setUnlocalizedName("missile_micro").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":missile_micro");
missile_carrier = new Item().setUnlocalizedName("missile_carrier").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":missile_carrier");
gun_rpg = new GunRpg().setUnlocalizedName("gun_rpg").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_rpg_new");
gun_rpg_ammo = new Item().setUnlocalizedName("gun_rpg_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_rpg_ammo_new");
@ -3131,6 +3134,7 @@ public class ModItems {
GameRegistry.registerItem(missile_doomsday, missile_doomsday.getUnlocalizedName());
GameRegistry.registerItem(missile_taint, missile_taint.getUnlocalizedName());
GameRegistry.registerItem(missile_micro, missile_micro.getUnlocalizedName());
GameRegistry.registerItem(missile_carrier, missile_carrier.getUnlocalizedName());
//Guns
GameRegistry.registerItem(gun_revolver_iron, gun_revolver_iron.getUnlocalizedName());

View File

@ -3,7 +3,7 @@ package com.hbm.lib;
public class RefStrings {
public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (Positron-X06)";
public static final String VERSION = "1.0.27 BETA (Lanthanium-Y7)";
//HBM's Beta Naming Convention:
//V T (X-Y-Z)
//V -> next release version

View File

@ -283,6 +283,8 @@ public class ClientProxy extends ServerProxy
RenderingRegistry.registerEntityRenderingHandler(EntityBoxcar.class, new RenderBoxcar());
RenderingRegistry.registerEntityRenderingHandler(EntityMissileTaint.class, new RenderMissileTaint());
RenderingRegistry.registerEntityRenderingHandler(EntityMissileMicro.class, new RenderMissileTaint());
RenderingRegistry.registerEntityRenderingHandler(EntityCarrier.class, new RenderCarrierMissile());
RenderingRegistry.registerEntityRenderingHandler(EntityBooster.class, new RenderBoosterMissile());
RenderingRegistry.registerEntityRenderingHandler(EntityAAShell.class, new RenderMirv());
RenderingRegistry.registerEntityRenderingHandler(EntityRocketHoming.class, new RenderSRocket());

View File

@ -91,6 +91,8 @@ import com.hbm.entity.logic.EntityNukeExplosionPlus;
import com.hbm.entity.logic.IChunkLoader;
import com.hbm.entity.missile.EntityBombletSelena;
import com.hbm.entity.missile.EntityBombletTheta;
import com.hbm.entity.missile.EntityBooster;
import com.hbm.entity.missile.EntityCarrier;
import com.hbm.entity.missile.EntityMIRV;
import com.hbm.entity.missile.EntityMissileAntiBallistic;
import com.hbm.entity.missile.EntityMissileBunkerBuster;
@ -716,6 +718,8 @@ public class MainRegistry
EntityRegistry.registerModEntity(EntityMissileMicro.class, "entity_missile_taint", 94, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityCloudSolinium.class, "entity_cloud_rainbow", 95, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityRagingVortex.class, "entity_raging_vortex", 96, this, 250, 1, true);
EntityRegistry.registerModEntity(EntityCarrier.class, "entity_missile_carrier", 97, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityBooster.class, "entity_missile_booster", 98, this, 1000, 1, true);
EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00);
EntityRegistry.registerGlobalEntityID(EntityHunterChopper.class, "entity_mob_hunter_chopper", EntityRegistry.findGlobalUniqueEntityId(), 0x000020, 0x2D2D72);

View File

@ -169,6 +169,8 @@ public class ResourceManager {
public static final IModelCustom missileThermo = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missileThermo.obj"));
public static final IModelCustom missileDoomsday = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missileDoomsday.obj"));
public static final IModelCustom missileTaint = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missileTaint.obj"));
public static final IModelCustom missileCarrier = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missileCarrier.obj"));
public static final IModelCustom missileBooster = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missileBooster.obj"));
////Texture Entities
@ -195,4 +197,6 @@ public class ResourceManager {
public static final ResourceLocation missileDoomsday_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileDoomsday.png");
public static final ResourceLocation missileTaint_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileTaint.png");
public static final ResourceLocation missileMicro_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileMicro.png");
public static final ResourceLocation missileCarrier_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileCarrier.png");
public static final ResourceLocation missileBooster_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileBooster.png");
}

View File

@ -68,6 +68,8 @@ public class TEMissilePacket implements IMessage {
type = 18;
if(stack.getItem() == ModItems.missile_micro)
type = 19;
if(stack.getItem() == ModItems.missile_carrier)
type = 20;
}
}

View File

@ -0,0 +1,42 @@
package com.hbm.render.entity;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.main.ResourceManager;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
public class RenderBoosterMissile extends Render {
public RenderBoosterMissile() { }
@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_) {
GL11.glPushMatrix();
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
GL11.glRotatef(p_76986_1_.prevRotationYaw + (p_76986_1_.rotationYaw - p_76986_1_.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glScalef(2F, 2F, 2F);
bindTexture(ResourceManager.missileBooster_tex);
ResourceManager.missileBooster.renderAll();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
}
@Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
return ResourceManager.missileBooster_tex;
}
}

View File

@ -0,0 +1,53 @@
package com.hbm.render.entity;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.main.ResourceManager;
import com.hbm.render.model.ModelShrapnel;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
public class RenderCarrierMissile extends Render {
public RenderCarrierMissile() { }
@Override
public void doRender(Entity rocket, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_,
float p_76986_9_) {
GL11.glPushMatrix();
GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_);
GL11.glScalef(1.0F, 1.0F, 1.0F);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glScalef(2F, 2F, 2F);
bindTexture(ResourceManager.missileCarrier_tex);
ResourceManager.missileCarrier.renderAll();
if(rocket.getDataWatcher().getWatchableObjectInt(8) == 1) {
GL11.glTranslated(0.0D, 0.5D, 0.0D);
GL11.glTranslated(1.25D, 0.0D, 0.0D);
bindTexture(ResourceManager.missileBooster_tex);
ResourceManager.missileBooster.renderAll();
GL11.glTranslated(-2.5D, 0.0D, 0.0D);
ResourceManager.missileBooster.renderAll();
GL11.glTranslated(1.25D, 0.0D, 0.0D);
GL11.glTranslated(0.0D, 0.0D, 1.25D);
ResourceManager.missileBooster.renderAll();
GL11.glTranslated(0.0D, 0.0D, -2.5D);
ResourceManager.missileBooster.renderAll();
GL11.glTranslated(0.0D, 0.0D, 1.25D);
}
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
}
@Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
return ResourceManager.missileCarrier_tex;
}
}

View File

@ -30,7 +30,7 @@ public class RenderLaunchPadTier1 extends TileEntitySpecialRenderer {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
GL11.glEnable(GL11.GL_LIGHTING);
switch(tileEntity.getBlockMetadata())
/*switch(tileEntity.getBlockMetadata())
{
case 5:
GL11.glRotatef(90, 0F, 1F, 0F); break;
@ -40,7 +40,7 @@ public class RenderLaunchPadTier1 extends TileEntitySpecialRenderer {
GL11.glRotatef(270, 0F, 1F, 0F); break;
case 3:
GL11.glRotatef(0, 0F, 1F, 0F); break;
}
}*/
GL11.glScalef(1.5F, 1.0F, 1.5F);
bindTexture(padTexture);
@ -169,6 +169,24 @@ public class RenderLaunchPadTier1 extends TileEntitySpecialRenderer {
bindTexture(ResourceManager.missileMicro_tex);
ResourceManager.missileTaint.renderAll();
}
if(state == 20)
{
GL11.glScalef(2F, 2F, 2F);
bindTexture(ResourceManager.missileCarrier_tex);
ResourceManager.missileCarrier.renderAll();
GL11.glTranslated(0.0D, 0.5D, 0.0D);
GL11.glTranslated(1.25D, 0.0D, 0.0D);
bindTexture(ResourceManager.missileBooster_tex);
ResourceManager.missileBooster.renderAll();
GL11.glTranslated(-2.5D, 0.0D, 0.0D);
ResourceManager.missileBooster.renderAll();
GL11.glTranslated(1.25D, 0.0D, 0.0D);
GL11.glTranslated(0.0D, 0.0D, 1.25D);
ResourceManager.missileBooster.renderAll();
GL11.glTranslated(0.0D, 0.0D, -2.5D);
ResourceManager.missileBooster.renderAll();
GL11.glTranslated(0.0D, 0.0D, 1.25D);
}
GL11.glEnable(GL11.GL_CULL_FACE);

View File

@ -0,0 +1,39 @@
package com.hbm.saveddata;
import java.util.Arrays;
import com.hbm.handler.FluidTypeHandler.FluidType;
import net.minecraft.nbt.NBTTagCompound;
public class SatelliteSaveStructure {
public int satelliteID;
public SatelliteType satelliteType;
enum SatelliteType {
MAPPER, RADAR, SCANNER, RELAY, LASER;
public static SatelliteType getEnum(int i) {
if(i < SatelliteType.values().length)
return SatelliteType.values()[i];
else
return SatelliteType.RELAY;
}
public int getID() {
return Arrays.asList(SatelliteType.values()).indexOf(this);
}
}
public void readFromNBT(NBTTagCompound nbt, int index) {
satelliteID = nbt.getInteger("sat_" + index + "_id");
satelliteType = SatelliteType.getEnum(nbt.getInteger("sat_" + index + "_type"));
}
public void writeToNBT(NBTTagCompound nbt, int index) {
nbt.setInteger("sat_" + index + "_id", satelliteID);
nbt.setInteger("sat_" + index + "_type", satelliteType.getID());
}
}

View File

@ -0,0 +1,33 @@
package com.hbm.saveddata;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraft.world.WorldSavedData;
public class SatelliteSavedData extends WorldSavedData {
public int globalAccessThingy;
private World worldObj;
public SatelliteSavedData(String p_i2141_1_) {
super(p_i2141_1_);
}
public SatelliteSavedData(World p_i1678_1_)
{
super("satellites");
this.worldObj = p_i1678_1_;
this.markDirty();
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
globalAccessThingy = nbt.getInteger("gat");
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
nbt.setInteger("gat", globalAccessThingy);
}
}