Jump to content

2FastAssassin

Members
  • Posts

    88
  • Joined

  • Last visited

Everything posted by 2FastAssassin

  1. To be honest, I dont know how to do that, dont get mad please, but how do i do that?
  2. it is its code, there is one part missing but it only works on the actual creeper, its the creeper swell task
  3. Unsolved: Please assist, I dont know what code to use to make my custom mob explode. her is my mob class
  4. I need some help on where I can find a place that tells me how to add effects to an arrow or if anyone can help me with it. the types of things im trying to do is add like flame arrows and poison effects
  5. I am trying to make my mod 1.8 and higher versions please help I cant seem to find what I am looking for
  6. I think It stopped but thank you for helping
  7. I have looked at the Crash log in the console and cant find anything wrong with my mod but it keeps randomly crashing here is the crash report please help: ---- Minecraft Crash Report ---- // Don't be sad, have a hug! <3 Time: 7/04/15 10:42 PM Description: Unexpected error java.lang.NullPointerException: Unexpected error at net.minecraft.client.audio.SoundManager$SoundSystemStarterThread.playing(SoundManager.java:547) at net.minecraft.client.audio.SoundManager.updateAllSounds(SoundManager.java:245) at net.minecraft.client.audio.SoundHandler.update(SoundHandler.java:224) at net.minecraft.client.Minecraft.runTick(Minecraft.java:2093) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1028) at net.minecraft.client.Minecraft.run(Minecraft.java:951) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.client.audio.SoundManager$SoundSystemStarterThread.playing(SoundManager.java:547) at net.minecraft.client.audio.SoundManager.updateAllSounds(SoundManager.java:245) at net.minecraft.client.audio.SoundHandler.update(SoundHandler.java:224) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player461'/242, l='MpServer', x=-145.40, y=69.15, z=224.82]] Chunk stats: MultiplayerChunkCache: 288, 289 Level seed: 0 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: World: (-124,64,240), Chunk: (at 4,4,0 in -8,15; contains blocks -128,0,240 to -113,255,255), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Level time: 45162 game time, 47622 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 68 total; [EntityearthelementalMob['Earth Elemental'/129, l='MpServer', x=-135.43, y=69.00, z=225.29], EntityCow['Cow'/141, l='MpServer', x=-130.63, y=87.00, z=154.38], EntityCreeper['Creeper'/142, l='MpServer', x=-119.47, y=89.00, z=148.28], EntityBat['Bat'/1168, l='MpServer', x=-156.22, y=25.53, z=147.53], EntityCreeper['Creeper'/145, l='MpServer', x=-125.91, y=26.00, z=221.50], EntityCreeper['Creeper'/146, l='MpServer', x=-130.00, y=22.00, z=215.66], EntityBat['Bat'/1171, l='MpServer', x=-144.57, y=22.98, z=144.90], EntitySquid['Squid'/789, l='MpServer', x=-97.41, y=50.34, z=273.94], EntitySquid['Squid'/790, l='MpServer', x=-105.78, y=50.38, z=278.69], EntitySquid['Squid'/791, l='MpServer', x=-99.72, y=50.34, z=280.06], EntitySquid['Squid'/792, l='MpServer', x=-107.19, y=48.00, z=280.59], EntityCreeper['Creeper'/1048, l='MpServer', x=-71.50, y=24.00, z=271.50], EntitySquid['Squid'/793, l='MpServer', x=-102.69, y=50.22, z=271.69], EntityCreeper['Creeper'/1049, l='MpServer', x=-72.50, y=24.00, z=271.50], EntitySquid['Squid'/794, l='MpServer', x=-97.47, y=47.94, z=275.88], EntityCow['Cow'/155, l='MpServer', x=-126.38, y=90.00, z=158.41], EntitySquid['Squid'/795, l='MpServer', x=-97.13, y=50.38, z=284.06], EntityCreeper['Creeper'/1051, l='MpServer', x=-180.31, y=23.00, z=161.69], EntitySquid['Squid'/796, l='MpServer', x=-100.56, y=48.97, z=278.38], EntityCreeper['Creeper'/1052, l='MpServer', x=-182.47, y=24.00, z=163.03], EntitySquid['Squid'/797, l='MpServer', x=-93.72, y=47.00, z=274.94], EntityCreeper['Creeper'/1053, l='MpServer', x=-169.50, y=23.00, z=156.50], EntitySquid['Squid'/798, l='MpServer', x=-93.13, y=49.28, z=273.25], EntitySquid['Squid'/799, l='MpServer', x=-94.94, y=49.25, z=288.94], EntitySquid['Squid'/800, l='MpServer', x=-103.56, y=49.38, z=283.72], EntityCow['Cow'/167, l='MpServer', x=-109.84, y=90.00, z=146.22], EntityZombie['Zombie'/682, l='MpServer', x=-199.50, y=42.00, z=288.50], EntityZombie['Zombie'/683, l='MpServer', x=-200.50, y=42.00, z=290.50], EntitySheep['Sheep'/172, l='MpServer', x=-101.88, y=64.00, z=219.94], EntityZombie['Zombie'/684, l='MpServer', x=-199.50, y=42.00, z=287.50], EntitySkeleton['Skeleton'/686, l='MpServer', x=-200.50, y=42.00, z=287.50], EntityCow['Cow'/179, l='MpServer', x=-76.53, y=78.00, z=146.69], EntityCow['Cow'/187, l='MpServer', x=-72.06, y=87.00, z=175.16], EntityCow['Cow'/188, l='MpServer', x=-67.44, y=84.00, z=169.63], EntityPig['Pig'/61, l='MpServer', x=-225.56, y=64.00, z=185.50], EntityBat['Bat'/1085, l='MpServer', x=-204.17, y=37.00, z=147.50], EntityZombie['Zombie'/192, l='MpServer', x=-78.50, y=18.00, z=285.50], EntityBat['Bat'/69, l='MpServer', x=-217.10, y=46.00, z=285.58], EntityBat['Bat'/73, l='MpServer', x=-194.75, y=43.63, z=285.23], EntitySquid['Squid'/841, l='MpServer', x=-142.44, y=52.00, z=285.22], EntitySquid['Squid'/842, l='MpServer', x=-151.06, y=52.00, z=286.84], EntitySquid['Squid'/843, l='MpServer', x=-146.66, y=53.38, z=288.50], EntitySkeleton['Skeleton'/79, l='MpServer', x=-219.50, y=65.00, z=179.50], EntityPig['Pig'/80, l='MpServer', x=-217.84, y=64.00, z=213.78], EntityPig['Pig'/83, l='MpServer', x=-223.88, y=64.00, z=259.56], EntityPig['Pig'/87, l='MpServer', x=-216.09, y=65.00, z=285.78], EntityBat['Bat'/727, l='MpServer', x=-142.44, y=22.01, z=144.72], EntityPig['Pig'/88, l='MpServer', x=-216.22, y=66.00, z=292.50], EntityBat['Bat'/728, l='MpServer', x=-154.73, y=25.06, z=147.48], EntityZombie['Zombie'/477, l='MpServer', x=-155.50, y=24.00, z=154.50], EntityCreeper['Creeper'/96, l='MpServer', x=-198.50, y=66.00, z=171.50], EntityPig['Pig'/97, l='MpServer', x=-198.50, y=67.00, z=178.31], EntitySquid['Squid'/865, l='MpServer', x=-112.13, y=51.78, z=290.44], EntityPig['Pig'/98, l='MpServer', x=-202.94, y=65.00, z=190.91], EntitySquid['Squid'/866, l='MpServer', x=-103.50, y=49.78, z=287.81], EntityPig['Pig'/99, l='MpServer', x=-193.06, y=65.00, z=198.16], EntityPig['Pig'/100, l='MpServer', x=-199.78, y=65.00, z=214.78], EntityPig['Pig'/101, l='MpServer', x=-198.03, y=64.00, z=201.44], EntityZombie['Zombie'/1253, l='MpServer', x=-83.50, y=19.00, z=281.50], EntityPig['Pig'/102, l='MpServer', x=-196.25, y=64.00, z=263.50], EntityZombie['Zombie'/1254, l='MpServer', x=-84.50, y=19.00, z=281.50], EntityZombie['Zombie'/1255, l='MpServer', x=-86.50, y=19.00, z=281.50], EntityPig['Pig'/108, l='MpServer', x=-190.97, y=64.00, z=217.97], EntityClientPlayerMP['Player461'/242, l='MpServer', x=-145.40, y=69.15, z=224.82], EntityPig['Pig'/116, l='MpServer', x=-162.03, y=68.00, z=189.81], EntityPig['Pig'/117, l='MpServer', x=-174.19, y=70.00, z=190.50], EntityPig['Pig'/118, l='MpServer', x=-163.13, y=68.00, z=190.97], EntityPig['Pig'/119, l='MpServer', x=-177.78, y=64.00, z=208.59]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2555) at net.minecraft.client.Minecraft.run(Minecraft.java:980) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 7 (x86) version 6.1 Java Version: 1.8.0_25, Oracle Corporation Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation Memory: 776981760 bytes (740 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94 FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available watwm{1.0.2} [We Are The Warriors Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: ATI Radeon 3000 Graphics GL version 3.3.10750 Compatibility Profile Context, ATI Technologies Inc. GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1)
  8. I am currently working on my final armor set before my main mod release and im trying to add wings on the back of an armor texture, would i need to do it in techne or can i just do it on the texture. please help
  9. the body of my mob is opening and closing like a door and it wont stay in one place model code: package wearethewarriorsmod.mob; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; public class EarthElemental extends ModelBase { //fields ModelRenderer arm2top; ModelRenderer body1; ModelRenderer arm1top; ModelRenderer arm2bot; ModelRenderer arm1bot; ModelRenderer leg1top; ModelRenderer leg2top; ModelRenderer leg1bot; ModelRenderer leg2bot; ModelRenderer head; ModelRenderer arm2rock; ModelRenderer leg2butt; ModelRenderer arm1backrock; ModelRenderer arm2backrock; ModelRenderer leg1knee; ModelRenderer leg1butt; ModelRenderer arm2fing1; ModelRenderer arm2fing2; ModelRenderer arm2fing3; ModelRenderer arm2fing4; ModelRenderer arm2fing5; ModelRenderer arm1fing1; ModelRenderer body2; ModelRenderer arm1fing2; ModelRenderer arm1fing3; ModelRenderer arm1fing4; ModelRenderer body3; ModelRenderer body4; ModelRenderer body5; ModelRenderer body6; ModelRenderer arm1rock; ModelRenderer leg2knee; ModelRenderer leg2foot; ModelRenderer leg1foot; ModelRenderer spike1; ModelRenderer spike2; ModelRenderer spike3; ModelRenderer spike4; ModelRenderer spike5; ModelRenderer spike6; ModelRenderer spike7; ModelRenderer spike8; ModelRenderer spike9; ModelRenderer spike10; ModelRenderer Spike11; ModelRenderer spike12; public EarthElemental() { textureWidth = 128; textureHeight = 32; arm2top = new ModelRenderer(this, 26, 0); arm2top.addBox(0F, 0F, 0F, 4, 10, 4); arm2top.setRotationPoint(3F, -3F, 1F); arm2top.setTextureSize(128, 32); arm2top.mirror = true; setRotation(arm2top, -0.1570796F, 0F, -0.122173F); body1 = new ModelRenderer(this, 0, 0); body1.addBox(0F, 0F, 0F, 7, 12, 5); body1.setRotationPoint(-4F, -3F, 0F); body1.setTextureSize(128, 32); body1.mirror = true; setRotation(body1, 0.1745329F, 0F, 0F); arm1top = new ModelRenderer(this, 26, 0); arm1top.addBox(0F, 0F, 0F, 4, 10, 4); arm1top.setRotationPoint(-8F, -3F, 1F); arm1top.setTextureSize(128, 32); arm1top.mirror = true; setRotation(arm1top, -0.1570796F, 0F, 0.122173F); arm2bot = new ModelRenderer(this, 26, 0); arm2bot.addBox(0F, 0F, 0F, 4, 8, 4); arm2bot.setRotationPoint(4F, 5F, -0.5F); arm2bot.setTextureSize(128, 32); arm2bot.mirror = true; setRotation(arm2bot, -0.1570796F, 0F, 0.122173F); arm1bot = new ModelRenderer(this, 26, 0); arm1bot.addBox(0F, 0F, 0F, 4, 8, 4); arm1bot.setRotationPoint(-9.2F, 6F, 0F); arm1bot.setTextureSize(128, 32); arm1bot.mirror = true; setRotation(arm1bot, -0.1570796F, 0F, -0.122173F); leg1top = new ModelRenderer(this, 26, 0); leg1top.addBox(0F, 0F, 0F, 4, 8, 4); leg1top.setRotationPoint(-4F, 8F, 3F); leg1top.setTextureSize(128, 32); leg1top.mirror = true; setRotation(leg1top, -0.2617994F, 0F, 0.1396263F); leg2top = new ModelRenderer(this, 26, 0); leg2top.addBox(0F, 0F, 0F, 4, 8, 4); leg2top.setRotationPoint(-1F, 8F, 3F); leg2top.setTextureSize(128, 32); leg2top.mirror = true; setRotation(leg2top, -0.2792527F, 0F, -0.1745329F); leg1bot = new ModelRenderer(this, 26, 0); leg1bot.addBox(0F, 0F, 0F, 4, 10, 4); leg1bot.setRotationPoint(-5F, 14F, 1F); leg1bot.setTextureSize(128, 32); leg1bot.mirror = true; setRotation(leg1bot, 0.1570796F, 0F, 0.0872665F); leg2bot = new ModelRenderer(this, 26, 0); leg2bot.addBox(0F, 0F, 0F, 4, 10, 4); leg2bot.setRotationPoint(0F, 15F, 0.7F); leg2bot.setTextureSize(128, 32); leg2bot.mirror = true; setRotation(leg2bot, 0.1570796F, 0F, -0.1570796F); head = new ModelRenderer(this, 51, 0); head.addBox(0F, 0F, 0F, 7, 7, 7); head.setRotationPoint(-4F, -10F, -2.5F); head.setTextureSize(128, 32); head.mirror = true; setRotation(head, 0.1047198F, 0F, 0F); arm2rock = new ModelRenderer(this, 80, 0); arm2rock.addBox(0F, 0F, 0F, 2, 3, 3); arm2rock.setRotationPoint(6F, 0F, 0F); arm2rock.setTextureSize(128, 32); arm2rock.mirror = true; setRotation(arm2rock, 0F, 0F, 0F); leg2butt = new ModelRenderer(this, 80, 0); leg2butt.addBox(0F, 0F, 0F, 4, 3, 3); leg2butt.setRotationPoint(-1F, 7F, 4F); leg2butt.setTextureSize(128, 32); leg2butt.mirror = true; setRotation(leg2butt, 0F, 0F, -0.0872665F); arm1backrock = new ModelRenderer(this, 80, 0); arm1backrock.addBox(0F, 0F, 0F, 2, 3, 3); arm1backrock.setRotationPoint(-5F, -2.066667F, 2F); arm1backrock.setTextureSize(128, 32); arm1backrock.mirror = true; setRotation(arm1backrock, 0F, 0F, 0F); arm2backrock = new ModelRenderer(this, 80, 0); arm2backrock.addBox(0F, 0F, 0F, 2, 3, 3); arm2backrock.setRotationPoint(2F, -3F, 2F); arm2backrock.setTextureSize(128, 32); arm2backrock.mirror = true; setRotation(arm2backrock, 0F, 0F, 0F); leg1knee = new ModelRenderer(this, 80, 0); leg1knee.addBox(0F, 0F, 0F, 4, 3, 3); leg1knee.setRotationPoint(-4.8F, 13F, 1F); leg1knee.setTextureSize(128, 32); leg1knee.mirror = true; setRotation(leg1knee, -0.0523599F, 0F, 0.122173F); leg1butt = new ModelRenderer(this, 80, 0); leg1butt.addBox(0F, 0F, 0F, 4, 3, 3); leg1butt.setRotationPoint(-4F, 7F, 4F); leg1butt.setTextureSize(128, 32); leg1butt.mirror = true; setRotation(leg1butt, 0F, 0F, 0.0872665F); arm2fing1 = new ModelRenderer(this, 80, 0); arm2fing1.addBox(0F, 0F, 0F, 3, 3, 3); arm2fing1.setRotationPoint(4F, 8F, -2F); arm2fing1.setTextureSize(128, 32); arm2fing1.mirror = true; setRotation(arm2fing1, -0.0872665F, 0F, 0F); arm2fing2 = new ModelRenderer(this, 80, 0); arm2fing2.addBox(0F, 0F, 0F, 2, 3, 3); arm2fing2.setRotationPoint(3F, 10F, -2F); arm2fing2.setTextureSize(128, 32); arm2fing2.mirror = true; setRotation(arm2fing2, 0F, 0F, 0F); arm2fing3 = new ModelRenderer(this, 80, 0); arm2fing3.addBox(0F, 0F, 0F, 2, 3, 3); arm2fing3.setRotationPoint(6F, 9F, -2F); arm2fing3.setTextureSize(128, 32); arm2fing3.mirror = true; setRotation(arm2fing3, -0.0349066F, -0.0523599F, 0.2617994F); arm2fing4 = new ModelRenderer(this, 80, 0); arm2fing4.addBox(0F, 0F, 0F, 2, 3, 3); arm2fing4.setRotationPoint(6F, 9F, 0F); arm2fing4.setTextureSize(128, 32); arm2fing4.mirror = true; setRotation(arm2fing4, 0F, 0F, 0.0698132F); arm2fing5 = new ModelRenderer(this, 80, 0); arm2fing5.addBox(0F, 0F, 0F, 2, 3, 3); arm2fing5.setRotationPoint(5F, 10.5F, -1.8F); arm2fing5.setTextureSize(128, 32); arm2fing5.mirror = true; setRotation(arm2fing5, -0.2268928F, -0.0174533F, -0.0698132F); arm1fing1 = new ModelRenderer(this, 80, 0); arm1fing1.addBox(0F, 0F, 0F, 3, 3, 3); arm1fing1.setRotationPoint(-7F, 11F, -1.1F); arm1fing1.setTextureSize(128, 32); arm1fing1.mirror = true; setRotation(arm1fing1, -0.0872665F, 0F, 0F); body2 = new ModelRenderer(this, 80, 0); body2.addBox(0F, 0F, 0F, 3, 7, 3); body2.setRotationPoint(0.1F, -3F, -0.5F); body2.setTextureSize(128, 32); body2.mirror = true; setRotation(body2, 0.1745329F, 0F, 0F); arm1fing2 = new ModelRenderer(this, 80, 0); arm1fing2.addBox(0F, 0F, 0F, 2, 3, 3); arm1fing2.setRotationPoint(-9F, 9F, -1F); arm1fing2.setTextureSize(128, 32); arm1fing2.mirror = true; setRotation(arm1fing2, -0.2268928F, -0.0174533F, -0.1919862F); arm1fing3 = new ModelRenderer(this, 80, 0); arm1fing3.addBox(0F, 0F, 0F, 2, 3, 3); arm1fing3.setRotationPoint(-6F, 8F, -1F); arm1fing3.setTextureSize(128, 32); arm1fing3.mirror = true; setRotation(arm1fing3, 0F, 0F, 0.0698132F); arm1fing4 = new ModelRenderer(this, 80, 0); arm1fing4.addBox(0F, 0F, 0F, 2, 3, 3); arm1fing4.setRotationPoint(-8F, 11F, -1.2F); arm1fing4.setTextureSize(128, 32); arm1fing4.mirror = true; setRotation(arm1fing4, -0.0349066F, -0.0523599F, 0.2617994F); body3 = new ModelRenderer(this, 80, 0); body3.addBox(0F, 0F, 0F, 3, 7, 3); body3.setRotationPoint(-2.2F, -5F, -0.5F); body3.setTextureSize(128, 32); body3.mirror = true; setRotation(body3, 0.1745329F, 0.0349066F, 0F); body4 = new ModelRenderer(this, 80, 0); body4.addBox(0F, 0F, 0F, 2, 7, 3); body4.setRotationPoint(-4.1F, -3F, -0.5F); body4.setTextureSize(128, 32); body4.mirror = true; setRotation(body4, 0.1745329F, 0F, 0F); body5 = new ModelRenderer(this, 80, 0); body5.addBox(0F, 0F, 0F, 2, 3, 3); body5.setRotationPoint(1.1F, 3F, 0.7F); body5.setTextureSize(128, 32); body5.mirror = true; setRotation(body5, 0.1745329F, 0F, 0F); body6 = new ModelRenderer(this, 80, 0); body6.addBox(0F, 0F, 0F, 1, 2, 1); body6.setRotationPoint(2.1F, 5F, 1.1F); body6.setTextureSize(128, 32); body6.mirror = true; setRotation(body6, 0.1745329F, 0F, 0F); arm1rock = new ModelRenderer(this, 80, 0); arm1rock.addBox(0F, 0F, 0F, 2, 3, 3); arm1rock.setRotationPoint(-8F, -3F, 0F); arm1rock.setTextureSize(128, 32); arm1rock.mirror = true; setRotation(arm1rock, -0.122173F, 0F, 0.2268928F); leg2knee = new ModelRenderer(this, 80, 0); leg2knee.addBox(0F, 0F, 0F, 4, 3, 3); leg2knee.setRotationPoint(0F, 13F, 0.8F); leg2knee.setTextureSize(128, 32); leg2knee.mirror = true; setRotation(leg2knee, -0.0523599F, 0F, -0.122173F); leg2foot = new ModelRenderer(this, 80, 0); leg2foot.addBox(0F, 0F, 0F, 4, 2, 6); leg2foot.setRotationPoint(1.3F, 22F, 0F); leg2foot.setTextureSize(128, 32); leg2foot.mirror = true; setRotation(leg2foot, 0F, 0F, 0F); leg1foot = new ModelRenderer(this, 80, 0); leg1foot.addBox(0F, 0F, 0F, 4, 2, 6); leg1foot.setRotationPoint(-6F, 22F, 0F); leg1foot.setTextureSize(128, 32); leg1foot.mirror = true; setRotation(leg1foot, 0F, 0F, 0F); spike1 = new ModelRenderer(this, 102, 22); spike1.addBox(0F, 0F, 0F, 1, 1, 3); spike1.setRotationPoint(1F, -2F, 4F); spike1.setTextureSize(128, 32); spike1.mirror = true; setRotation(spike1, 0.1745329F, 0.1919862F, -0.0523599F); spike2 = new ModelRenderer(this, 102, 22); spike2.addBox(0F, 0F, 0F, 1, 1, 3); spike2.setRotationPoint(-1F, -2F, 6F); spike2.setTextureSize(128, 32); spike2.mirror = true; setRotation(spike2, 0.1745329F, 0.1919862F, -0.0523599F); spike3 = new ModelRenderer(this, 102, 22); spike3.addBox(0F, 0F, 0F, 1, 1, 3); spike3.setRotationPoint(-1F, -0.5F, 6F); spike3.setTextureSize(128, 32); spike3.mirror = true; setRotation(spike3, -0.0523599F, -0.0698132F, 0.0174533F); spike4 = new ModelRenderer(this, 102, 22); spike4.addBox(0F, 0F, 0F, 1, 1, 3); spike4.setRotationPoint(-2F, -2F, 4F); spike4.setTextureSize(128, 32); spike4.mirror = true; setRotation(spike4, 0.2792527F, -0.0698132F, -0.0523599F); spike5 = new ModelRenderer(this, 102, 22); spike5.addBox(0F, 0F, 0F, 1, 1, 3); spike5.setRotationPoint(1F, 0F, 4.533333F); spike5.setTextureSize(128, 32); spike5.mirror = true; setRotation(spike5, 0.122173F, 0.2094395F, 0F); spike6 = new ModelRenderer(this, 102, 22); spike6.addBox(0F, 0F, 0F, 1, 1, 3); spike6.setRotationPoint(0F, 0F, 6F); spike6.setTextureSize(128, 32); spike6.mirror = true; setRotation(spike6, -0.0872665F, 0.0872665F, -0.0174533F); spike7 = new ModelRenderer(this, 102, 22); spike7.addBox(0F, 0F, 0F, 1, 1, 3); spike7.setRotationPoint(-2F, 0F, 5F); spike7.setTextureSize(128, 32); spike7.mirror = true; setRotation(spike7, 0.0349066F, -0.1570796F, -0.0523599F); spike8 = new ModelRenderer(this, 102, 22); spike8.addBox(0F, 0F, 0F, 1, 1, 3); spike8.setRotationPoint(0F, -1F, 5F); spike8.setTextureSize(128, 32); spike8.mirror = true; setRotation(spike8, 0.1919862F, 0.0523599F, -0.0523599F); spike9 = new ModelRenderer(this, 102, 22); spike9.addBox(0F, 0F, 0F, 1, 1, 3); spike9.setRotationPoint(-2F, -1F, 4F); spike9.setTextureSize(128, 32); spike9.mirror = true; setRotation(spike9, 0.1919862F, -0.2268928F, -0.0174533F); spike10 = new ModelRenderer(this, 102, 22); spike10.addBox(0F, 0F, 0F, 1, 1, 3); spike10.setRotationPoint(-1.5F, -3F, 4F); spike10.setTextureSize(128, 32); spike10.mirror = true; setRotation(spike10, 0.1745329F, 0.1570796F, -0.0523599F); Spike11 = new ModelRenderer(this, 102, 22); Spike11.addBox(0F, 0F, 0F, 1, 1, 3); Spike11.setRotationPoint(1F, -1F, 5F); Spike11.setTextureSize(128, 32); Spike11.mirror = true; setRotation(Spike11, 0.1745329F, 0.1919862F, -0.0523599F); spike12 = new ModelRenderer(this, 102, 22); spike12.addBox(0F, 0F, 0F, 1, 1, 3); spike12.setRotationPoint(-3F, -2F, 5F); spike12.setTextureSize(128, 32); spike12.mirror = true; setRotation(spike12, 0.1745329F, -0.2443461F, -0.0349066F); } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); arm2top.render(f5); body1.render(f5); arm1top.render(f5); arm2bot.render(f5); arm1bot.render(f5); leg1top.render(f5); leg2top.render(f5); leg1bot.render(f5); leg2bot.render(f5); head.render(f5); arm2rock.render(f5); leg2butt.render(f5); arm1backrock.render(f5); arm2backrock.render(f5); leg1knee.render(f5); leg1butt.render(f5); arm2fing1.render(f5); arm2fing2.render(f5); arm2fing3.render(f5); arm2fing4.render(f5); arm2fing5.render(f5); arm1fing1.render(f5); body2.render(f5); arm1fing2.render(f5); arm1fing3.render(f5); arm1fing4.render(f5); body3.render(f5); body4.render(f5); body5.render(f5); body6.render(f5); arm1rock.render(f5); leg2knee.render(f5); leg2foot.render(f5); leg1foot.render(f5); spike1.render(f5); spike2.render(f5); spike3.render(f5); spike4.render(f5); spike5.render(f5); spike6.render(f5); spike7.render(f5); spike8.render(f5); spike9.render(f5); spike10.render(f5); Spike11.render(f5); spike12.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); float f6 = (180F / (float)Math.PI); this.body1.rotateAngleX = f4 / (180F / (float)Math.PI); this.body1.rotateAngleY = f3 / (180F / (float)Math.PI); this.body2.rotateAngleX = f4 / (180F / (float)Math.PI); this.body2.rotateAngleY = f3 / (180F / (float)Math.PI); this.body3.rotateAngleX = f4 / (180F / (float)Math.PI); this.body3.rotateAngleY = f3 / (180F / (float)Math.PI); this.body4.rotateAngleX = f4 / (180F / (float)Math.PI); this.body4.rotateAngleY = f3 / (180F / (float)Math.PI); this.body5.rotateAngleX = f4 / (180F / (float)Math.PI); this.body5.rotateAngleY = f3 / (180F / (float)Math.PI); this.body6.rotateAngleX = f4 / (180F / (float)Math.PI); this.body6.rotateAngleY = f3 / (180F / (float)Math.PI); this.leg1bot.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; this.leg1butt.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; this.leg1foot.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; this.leg1knee.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; this.leg1top.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; this.leg2bot.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1; this.leg2butt.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1; this.leg2foot.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1; this.leg2knee.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1; this.leg2top.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1; } } all the extra ones are parts in the same area
  10. first one: package wearethewarriorsmod.bow; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IProjectile; import net.minecraft.entity.monster.EntityEnderman; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.play.server.S2BPacketChangeGameState; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; public class Entityburntarrow extends EntityArrow implements IProjectile { private int field_145791_d = -1; private int field_145792_e = -1; private int field_145789_f = -1; private Block field_145790_g; private int inData; private boolean inGround; /** 1 if the player can pick up the arrow */ public int canBePickedUp; /** Seems to be some sort of timer for animating an arrow. */ public int arrowShake; /** The owner of this arrow. */ public Entity shootingEntity; private int ticksInGround; private int ticksInAir; private double damage = 2.0D; /** The amount of knockback an arrow applies when it hits a mob. */ private int knockbackStrength; private static final String __OBFID = "CL_00001715"; public Entityburntarrow(World p_i1753_1_) { super(p_i1753_1_); this.renderDistanceWeight = 10.0D; this.setSize(0.5F, 0.5F); } public Entityburntarrow(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_) { super(p_i1754_1_); this.renderDistanceWeight = 10.0D; this.setSize(0.5F, 0.5F); this.setPosition(p_i1754_2_, p_i1754_4_, p_i1754_6_); this.yOffset = 0.0F; } public Entityburntarrow(World p_i1755_1_, EntityLivingBase p_i1755_2_, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_) { super(p_i1755_1_); this.renderDistanceWeight = 10.0D; this.shootingEntity = p_i1755_2_; if (p_i1755_2_ instanceof EntityPlayer) { this.canBePickedUp = 1; } this.posY = p_i1755_2_.posY + (double)p_i1755_2_.getEyeHeight() - 0.10000000149011612D; double d0 = p_i1755_3_.posX - p_i1755_2_.posX; double d1 = p_i1755_3_.boundingBox.minY + (double)(p_i1755_3_.height / 3.0F) - this.posY; double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ; double d3 = (double)MathHelper.sqrt_double(d0 * d0 + d2 * d2); if (d3 >= 1.0E-7D) { float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI)); double d4 = d0 / d3; double d5 = d2 / d3; this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3); this.yOffset = 0.0F; float f4 = (float)d3 * 0.2F; this.setThrowableHeading(d0, d1 + (double)f4, d2, p_i1755_4_, p_i1755_5_); } } public Entityburntarrow(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_) { super(p_i1756_1_); this.renderDistanceWeight = 10.0D; this.shootingEntity = p_i1756_2_; if (p_i1756_2_ instanceof EntityPlayer) { this.canBePickedUp = 1; } this.setSize(0.5F, 0.5F); this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + (double)p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); this.posX -= (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F); this.posY -= 0.10000000149011612D; this.posZ -= (double)(MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F); this.setPosition(this.posX, this.posY, this.posZ); this.yOffset = 0.0F; this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); this.motionY = (double)(-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F); } protected void entityInit() { this.dataWatcher.addObject(16, Byte.valueOf((byte)0)); } /** * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction. */ public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_) { float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_); p_70186_1_ /= (double)f2; p_70186_3_ /= (double)f2; p_70186_5_ /= (double)f2; p_70186_1_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_; p_70186_3_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_; p_70186_5_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_; p_70186_1_ *= (double)p_70186_7_; p_70186_3_ *= (double)p_70186_7_; p_70186_5_ *= (double)p_70186_7_; this.motionX = p_70186_1_; this.motionY = p_70186_3_; this.motionZ = p_70186_5_; float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, (double)f3) * 180.0D / Math.PI); this.ticksInGround = 0; } /** * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, * posY, posZ, yaw, pitch */ @SideOnly(Side.CLIENT) public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_) { this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_); this.setRotation(p_70056_7_, p_70056_8_); } /** * Sets the velocity to the args. Args: x, y, z */ @SideOnly(Side.CLIENT) public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) { this.motionX = p_70016_1_; this.motionY = p_70016_3_; this.motionZ = p_70016_5_; if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) { float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, (double)f) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch; this.prevRotationYaw = this.rotationYaw; this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); this.ticksInGround = 0; } } /** * Called to update the entity's position/logic. */ public void onUpdate() { super.onUpdate(); if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) { float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI); } Block block = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); if (block.getMaterial() != Material.air) { block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) { this.inGround = true; } } if (this.arrowShake > 0) { --this.arrowShake; } if (this.inGround) { int j = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f); if (block == this.field_145790_g && j == this.inData) { ++this.ticksInGround; if (this.ticksInGround == 75) { this.setDead(); this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 6.5F, true); } } else { this.inGround = false; this.motionX *= (double)(this.rand.nextFloat() * 0.2F); this.motionY *= (double)(this.rand.nextFloat() * 0.2F); this.motionZ *= (double)(this.rand.nextFloat() * 0.2F); this.ticksInGround = 0; this.ticksInAir = 0; } } else { ++this.ticksInAir; Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false); vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); if (movingobjectposition != null) { vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); } Entity entity = null; List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); double d0 = 0.0D; int i; float f1; for (i = 0; i < list.size(); ++i) { Entity entity1 = (Entity)list.get(i); if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) { f1 = 0.3F; AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand((double)f1, (double)f1, (double)f1); MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3); if (movingobjectposition1 != null) { double d1 = vec31.distanceTo(movingobjectposition1.hitVec); if (d1 < d0 || d0 == 0.0D) { entity = entity1; d0 = d1; } } } } if (entity != null) { movingobjectposition = new MovingObjectPosition(entity); } if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) { EntityPlayer entityplayer = (EntityPlayer)movingobjectposition.entityHit; if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer)this.shootingEntity).canAttackPlayer(entityplayer)) { movingobjectposition = null; } } float f2; float f4; if (movingobjectposition != null) { if (movingobjectposition.entityHit != null) { f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); int k = MathHelper.ceiling_double_int((double)f2 * this.damage); if (this.getIsCritical()) { k += this.rand.nextInt(k / 2 + 2); } DamageSource damagesource = null; if (this.shootingEntity == null) { damagesource = DamageSource.causeThrownDamage(this, this); } else { damagesource = DamageSource.causeThrownDamage(this, this.shootingEntity); } if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman)) { movingobjectposition.entityHit.setFire(5); } if (movingobjectposition.entityHit.attackEntityFrom(damagesource, (float)k)) { if (movingobjectposition.entityHit instanceof EntityLivingBase) { EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit; if (!this.worldObj.isRemote) { entitylivingbase.setArrowCountInEntity(entitylivingbase.getArrowCountInEntity() + 1); } if (this.knockbackStrength > 0) { f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); if (f4 > 0.0F) { movingobjectposition.entityHit.addVelocity(this.motionX * (double)this.knockbackStrength * 0.6000000238418579D / (double)f4, 0.1D, this.motionZ * (double)this.knockbackStrength * 0.6000000238418579D / (double)f4); } } if (this.shootingEntity != null && this.shootingEntity instanceof EntityLivingBase) { EnchantmentHelper.func_151384_a(entitylivingbase, this.shootingEntity); EnchantmentHelper.func_151385_b((EntityLivingBase)this.shootingEntity, entitylivingbase); } if (this.shootingEntity != null && movingobjectposition.entityHit != this.shootingEntity && movingobjectposition.entityHit instanceof EntityPlayer && this.shootingEntity instanceof EntityPlayerMP) { ((EntityPlayerMP)this.shootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F)); } } this.playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); if (!(movingobjectposition.entityHit instanceof EntityEnderman)) { this.setDead(); } } else { this.motionX *= -0.10000000149011612D; this.motionY *= -0.10000000149011612D; this.motionZ *= -0.10000000149011612D; this.rotationYaw += 180.0F; this.prevRotationYaw += 180.0F; this.ticksInAir = 0; } } else { this.field_145791_d = movingobjectposition.blockX; this.field_145792_e = movingobjectposition.blockY; this.field_145789_f = movingobjectposition.blockZ; this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f); this.motionX = (double)((float)(movingobjectposition.hitVec.xCoord - this.posX)); this.motionY = (double)((float)(movingobjectposition.hitVec.yCoord - this.posY)); this.motionZ = (double)((float)(movingobjectposition.hitVec.zCoord - this.posZ)); f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); this.posX -= this.motionX / (double)f2 * 0.05000000074505806D; this.posY -= this.motionY / (double)f2 * 0.05000000074505806D; this.posZ -= this.motionZ / (double)f2 * 0.05000000074505806D; this.playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); this.inGround = true; this.arrowShake = 7; this.setIsCritical(false); if (this.field_145790_g.getMaterial() != Material.air) { this.field_145790_g.onEntityCollidedWithBlock(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f, this); } } } if (this.getIsCritical()) { for (i = 0; i < 4; ++i) { this.worldObj.spawnParticle("crit", this.posX + this.motionX * (double)i / 4.0D, this.posY + this.motionY * (double)i / 4.0D, this.posZ + this.motionZ * (double)i / 4.0D, -this.motionX, -this.motionY + 0.2D, -this.motionZ); } } this.posX += this.motionX; this.posY += this.motionY; this.posZ += this.motionZ; 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, (double)f2) * 180.0D / Math.PI); 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; } this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F; this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F; float f3 = 0.99F; f1 = 0.05F; if (this.isInWater()) { for (int l = 0; l < 4; ++l) { f4 = 0.25F; this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f4, this.posY - this.motionY * (double)f4, this.posZ - this.motionZ * (double)f4, this.motionX, this.motionY, this.motionZ); } f3 = 0.8F; } if (this.isWet()) { this.extinguish(); } this.motionX *= (double)f3; this.motionY *= (double)f3; this.motionZ *= (double)f3; this.motionY -= (double)f1; this.setPosition(this.posX, this.posY, this.posZ); this.func_145775_I(); } } /** * (abstract) Protected helper method to write subclass entity data to NBT. */ public void writeEntityToNBT(NBTTagCompound p_70014_1_) { p_70014_1_.setShort("xTile", (short)this.field_145791_d); p_70014_1_.setShort("yTile", (short)this.field_145792_e); p_70014_1_.setShort("zTile", (short)this.field_145789_f); p_70014_1_.setShort("life", (short)this.ticksInGround); p_70014_1_.setByte("inTile", (byte)Block.getIdFromBlock(this.field_145790_g)); p_70014_1_.setByte("inData", (byte)this.inData); p_70014_1_.setByte("shake", (byte)this.arrowShake); p_70014_1_.setByte("inGround", (byte)(this.inGround ? 1 : 0)); p_70014_1_.setByte("pickup", (byte)this.canBePickedUp); p_70014_1_.setDouble("damage", this.damage); } /** * (abstract) Protected helper method to read subclass entity data from NBT. */ public void readEntityFromNBT(NBTTagCompound p_70037_1_) { this.field_145791_d = p_70037_1_.getShort("xTile"); this.field_145792_e = p_70037_1_.getShort("yTile"); this.field_145789_f = p_70037_1_.getShort("zTile"); this.ticksInGround = p_70037_1_.getShort("life"); this.field_145790_g = Block.getBlockById(p_70037_1_.getByte("inTile") & 255); this.inData = p_70037_1_.getByte("inData") & 255; this.arrowShake = p_70037_1_.getByte("shake") & 255; this.inGround = p_70037_1_.getByte("inGround") == 1; if (p_70037_1_.hasKey("damage", 99)) { this.damage = p_70037_1_.getDouble("damage"); } if (p_70037_1_.hasKey("pickup", 99)) { this.canBePickedUp = p_70037_1_.getByte("pickup"); } else if (p_70037_1_.hasKey("player", 99)) { this.canBePickedUp = p_70037_1_.getBoolean("player") ? 1 : 0; } } /** * Called by a player entity when they collide with an entity */ public void onCollideWithPlayer(EntityPlayer p_70100_1_) { if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) { boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode; if (this.canBePickedUp == 1 && !p_70100_1_.inventory.addItemStackToInventory(new ItemStack(Items.arrow, 1))) { flag = false; } if (flag) { this.playSound("random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F); p_70100_1_.onItemPickup(this, 1); this.setDead(); } } } /** * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to * prevent them from trampling crops */ protected boolean canTriggerWalking() { return false; } @SideOnly(Side.CLIENT) public float getShadowSize() { return 0.0F; } public void setDamage(double p_70239_1_) { this.damage = p_70239_1_; } public double getDamage() { return this.damage; } /** * Sets the amount of knockback the arrow applies when it hits a mob. */ public void setKnockbackStrength(int p_70240_1_) { this.knockbackStrength = p_70240_1_; } /** * If returns false, the item will not inflict any damage against entities. */ public boolean canAttackWithItem() { return false; } /** * Whether the arrow has a stream of critical hit particles flying behind it. */ public void setIsCritical(boolean p_70243_1_) { byte b0 = this.dataWatcher.getWatchableObjectByte(16); if (p_70243_1_) { this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 1))); } else { this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -2))); } } /** * Whether the arrow has a stream of critical hit particles flying behind it. */ public boolean getIsCritical() { byte b0 = this.dataWatcher.getWatchableObjectByte(16); return (b0 & 1) != 0; } } second arrow: package wearethewarriorsmod.bow; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IProjectile; import net.minecraft.entity.monster.EntityEnderman; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.play.server.S2BPacketChangeGameState; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; public class Entityburntarrow extends EntityArrow implements IProjectile { private int field_145791_d = -1; private int field_145792_e = -1; private int field_145789_f = -1; private Block field_145790_g; private int inData; private boolean inGround; /** 1 if the player can pick up the arrow */ public int canBePickedUp; /** Seems to be some sort of timer for animating an arrow. */ public int arrowShake; /** The owner of this arrow. */ public Entity shootingEntity; private int ticksInGround; private int ticksInAir; private double damage = 2.0D; /** The amount of knockback an arrow applies when it hits a mob. */ private int knockbackStrength; private static final String __OBFID = "CL_00001715"; public Entityburntarrow(World p_i1753_1_) { super(p_i1753_1_); this.renderDistanceWeight = 10.0D; this.setSize(0.5F, 0.5F); } public Entityburntarrow(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_) { super(p_i1754_1_); this.renderDistanceWeight = 10.0D; this.setSize(0.5F, 0.5F); this.setPosition(p_i1754_2_, p_i1754_4_, p_i1754_6_); this.yOffset = 0.0F; } public Entityburntarrow(World p_i1755_1_, EntityLivingBase p_i1755_2_, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_) { super(p_i1755_1_); this.renderDistanceWeight = 10.0D; this.shootingEntity = p_i1755_2_; if (p_i1755_2_ instanceof EntityPlayer) { this.canBePickedUp = 1; } this.posY = p_i1755_2_.posY + (double)p_i1755_2_.getEyeHeight() - 0.10000000149011612D; double d0 = p_i1755_3_.posX - p_i1755_2_.posX; double d1 = p_i1755_3_.boundingBox.minY + (double)(p_i1755_3_.height / 3.0F) - this.posY; double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ; double d3 = (double)MathHelper.sqrt_double(d0 * d0 + d2 * d2); if (d3 >= 1.0E-7D) { float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI)); double d4 = d0 / d3; double d5 = d2 / d3; this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3); this.yOffset = 0.0F; float f4 = (float)d3 * 0.2F; this.setThrowableHeading(d0, d1 + (double)f4, d2, p_i1755_4_, p_i1755_5_); } } public Entityburntarrow(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_) { super(p_i1756_1_); this.renderDistanceWeight = 10.0D; this.shootingEntity = p_i1756_2_; if (p_i1756_2_ instanceof EntityPlayer) { this.canBePickedUp = 1; } this.setSize(0.5F, 0.5F); this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + (double)p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); this.posX -= (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F); this.posY -= 0.10000000149011612D; this.posZ -= (double)(MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F); this.setPosition(this.posX, this.posY, this.posZ); this.yOffset = 0.0F; this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); this.motionY = (double)(-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F); } protected void entityInit() { this.dataWatcher.addObject(16, Byte.valueOf((byte)0)); } /** * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction. */ public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_) { float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_); p_70186_1_ /= (double)f2; p_70186_3_ /= (double)f2; p_70186_5_ /= (double)f2; p_70186_1_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_; p_70186_3_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_; p_70186_5_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_; p_70186_1_ *= (double)p_70186_7_; p_70186_3_ *= (double)p_70186_7_; p_70186_5_ *= (double)p_70186_7_; this.motionX = p_70186_1_; this.motionY = p_70186_3_; this.motionZ = p_70186_5_; float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, (double)f3) * 180.0D / Math.PI); this.ticksInGround = 0; } /** * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, * posY, posZ, yaw, pitch */ @SideOnly(Side.CLIENT) public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_) { this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_); this.setRotation(p_70056_7_, p_70056_8_); } /** * Sets the velocity to the args. Args: x, y, z */ @SideOnly(Side.CLIENT) public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) { this.motionX = p_70016_1_; this.motionY = p_70016_3_; this.motionZ = p_70016_5_; if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) { float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, (double)f) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch; this.prevRotationYaw = this.rotationYaw; this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); this.ticksInGround = 0; } } /** * Called to update the entity's position/logic. */ public void onUpdate() { super.onUpdate(); if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) { float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI); } Block block = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); if (block.getMaterial() != Material.air) { block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) { this.inGround = true; } } if (this.arrowShake > 0) { --this.arrowShake; } if (this.inGround) { int j = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f); if (block == this.field_145790_g && j == this.inData) { ++this.ticksInGround; if (this.ticksInGround == 75) { this.setDead(); this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 6.5F, true); } } else { this.inGround = false; this.motionX *= (double)(this.rand.nextFloat() * 0.2F); this.motionY *= (double)(this.rand.nextFloat() * 0.2F); this.motionZ *= (double)(this.rand.nextFloat() * 0.2F); this.ticksInGround = 0; this.ticksInAir = 0; } } else { ++this.ticksInAir; Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false); vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); if (movingobjectposition != null) { vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); } Entity entity = null; List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); double d0 = 0.0D; int i; float f1; for (i = 0; i < list.size(); ++i) { Entity entity1 = (Entity)list.get(i); if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) { f1 = 0.3F; AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand((double)f1, (double)f1, (double)f1); MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3); if (movingobjectposition1 != null) { double d1 = vec31.distanceTo(movingobjectposition1.hitVec); if (d1 < d0 || d0 == 0.0D) { entity = entity1; d0 = d1; } } } } if (entity != null) { movingobjectposition = new MovingObjectPosition(entity); } if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) { EntityPlayer entityplayer = (EntityPlayer)movingobjectposition.entityHit; if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer)this.shootingEntity).canAttackPlayer(entityplayer)) { movingobjectposition = null; } } float f2; float f4; if (movingobjectposition != null) { if (movingobjectposition.entityHit != null) { f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); int k = MathHelper.ceiling_double_int((double)f2 * this.damage); if (this.getIsCritical()) { k += this.rand.nextInt(k / 2 + 2); } DamageSource damagesource = null; if (this.shootingEntity == null) { damagesource = DamageSource.causeThrownDamage(this, this); } else { damagesource = DamageSource.causeThrownDamage(this, this.shootingEntity); } if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman)) { movingobjectposition.entityHit.setFire(5); } if (movingobjectposition.entityHit.attackEntityFrom(damagesource, (float)k)) { if (movingobjectposition.entityHit instanceof EntityLivingBase) { EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit; if (!this.worldObj.isRemote) { entitylivingbase.setArrowCountInEntity(entitylivingbase.getArrowCountInEntity() + 1); } if (this.knockbackStrength > 0) { f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); if (f4 > 0.0F) { movingobjectposition.entityHit.addVelocity(this.motionX * (double)this.knockbackStrength * 0.6000000238418579D / (double)f4, 0.1D, this.motionZ * (double)this.knockbackStrength * 0.6000000238418579D / (double)f4); } } if (this.shootingEntity != null && this.shootingEntity instanceof EntityLivingBase) { EnchantmentHelper.func_151384_a(entitylivingbase, this.shootingEntity); EnchantmentHelper.func_151385_b((EntityLivingBase)this.shootingEntity, entitylivingbase); } if (this.shootingEntity != null && movingobjectposition.entityHit != this.shootingEntity && movingobjectposition.entityHit instanceof EntityPlayer && this.shootingEntity instanceof EntityPlayerMP) { ((EntityPlayerMP)this.shootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F)); } } this.playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); if (!(movingobjectposition.entityHit instanceof EntityEnderman)) { this.setDead(); } } else { this.motionX *= -0.10000000149011612D; this.motionY *= -0.10000000149011612D; this.motionZ *= -0.10000000149011612D; this.rotationYaw += 180.0F; this.prevRotationYaw += 180.0F; this.ticksInAir = 0; } } else { this.field_145791_d = movingobjectposition.blockX; this.field_145792_e = movingobjectposition.blockY; this.field_145789_f = movingobjectposition.blockZ; this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f); this.motionX = (double)((float)(movingobjectposition.hitVec.xCoord - this.posX)); this.motionY = (double)((float)(movingobjectposition.hitVec.yCoord - this.posY)); this.motionZ = (double)((float)(movingobjectposition.hitVec.zCoord - this.posZ)); f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); this.posX -= this.motionX / (double)f2 * 0.05000000074505806D; this.posY -= this.motionY / (double)f2 * 0.05000000074505806D; this.posZ -= this.motionZ / (double)f2 * 0.05000000074505806D; this.playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); this.inGround = true; this.arrowShake = 7; this.setIsCritical(false); if (this.field_145790_g.getMaterial() != Material.air) { this.field_145790_g.onEntityCollidedWithBlock(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f, this); } } } if (this.getIsCritical()) { for (i = 0; i < 4; ++i) { this.worldObj.spawnParticle("crit", this.posX + this.motionX * (double)i / 4.0D, this.posY + this.motionY * (double)i / 4.0D, this.posZ + this.motionZ * (double)i / 4.0D, -this.motionX, -this.motionY + 0.2D, -this.motionZ); } } this.posX += this.motionX; this.posY += this.motionY; this.posZ += this.motionZ; 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, (double)f2) * 180.0D / Math.PI); 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; } this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F; this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F; float f3 = 0.99F; f1 = 0.05F; if (this.isInWater()) { for (int l = 0; l < 4; ++l) { f4 = 0.25F; this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f4, this.posY - this.motionY * (double)f4, this.posZ - this.motionZ * (double)f4, this.motionX, this.motionY, this.motionZ); } f3 = 0.8F; } if (this.isWet()) { this.extinguish(); } this.motionX *= (double)f3; this.motionY *= (double)f3; this.motionZ *= (double)f3; this.motionY -= (double)f1; this.setPosition(this.posX, this.posY, this.posZ); this.func_145775_I(); } } /** * (abstract) Protected helper method to write subclass entity data to NBT. */ public void writeEntityToNBT(NBTTagCompound p_70014_1_) { p_70014_1_.setShort("xTile", (short)this.field_145791_d); p_70014_1_.setShort("yTile", (short)this.field_145792_e); p_70014_1_.setShort("zTile", (short)this.field_145789_f); p_70014_1_.setShort("life", (short)this.ticksInGround); p_70014_1_.setByte("inTile", (byte)Block.getIdFromBlock(this.field_145790_g)); p_70014_1_.setByte("inData", (byte)this.inData); p_70014_1_.setByte("shake", (byte)this.arrowShake); p_70014_1_.setByte("inGround", (byte)(this.inGround ? 1 : 0)); p_70014_1_.setByte("pickup", (byte)this.canBePickedUp); p_70014_1_.setDouble("damage", this.damage); } /** * (abstract) Protected helper method to read subclass entity data from NBT. */ public void readEntityFromNBT(NBTTagCompound p_70037_1_) { this.field_145791_d = p_70037_1_.getShort("xTile"); this.field_145792_e = p_70037_1_.getShort("yTile"); this.field_145789_f = p_70037_1_.getShort("zTile"); this.ticksInGround = p_70037_1_.getShort("life"); this.field_145790_g = Block.getBlockById(p_70037_1_.getByte("inTile") & 255); this.inData = p_70037_1_.getByte("inData") & 255; this.arrowShake = p_70037_1_.getByte("shake") & 255; this.inGround = p_70037_1_.getByte("inGround") == 1; if (p_70037_1_.hasKey("damage", 99)) { this.damage = p_70037_1_.getDouble("damage"); } if (p_70037_1_.hasKey("pickup", 99)) { this.canBePickedUp = p_70037_1_.getByte("pickup"); } else if (p_70037_1_.hasKey("player", 99)) { this.canBePickedUp = p_70037_1_.getBoolean("player") ? 1 : 0; } } /** * Called by a player entity when they collide with an entity */ public void onCollideWithPlayer(EntityPlayer p_70100_1_) { if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) { boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode; if (this.canBePickedUp == 1 && !p_70100_1_.inventory.addItemStackToInventory(new ItemStack(Items.arrow, 1))) { flag = false; } if (flag) { this.playSound("random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F); p_70100_1_.onItemPickup(this, 1); this.setDead(); } } } /** * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to * prevent them from trampling crops */ protected boolean canTriggerWalking() { return false; } @SideOnly(Side.CLIENT) public float getShadowSize() { return 0.0F; } public void setDamage(double p_70239_1_) { this.damage = p_70239_1_; } public double getDamage() { return this.damage; } /** * Sets the amount of knockback the arrow applies when it hits a mob. */ public void setKnockbackStrength(int p_70240_1_) { this.knockbackStrength = p_70240_1_; } /** * If returns false, the item will not inflict any damage against entities. */ public boolean canAttackWithItem() { return false; } /** * Whether the arrow has a stream of critical hit particles flying behind it. */ public void setIsCritical(boolean p_70243_1_) { byte b0 = this.dataWatcher.getWatchableObjectByte(16); if (p_70243_1_) { this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 1))); } else { this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -2))); } } /** * Whether the arrow has a stream of critical hit particles flying behind it. */ public boolean getIsCritical() { byte b0 = this.dataWatcher.getWatchableObjectByte(16); return (b0 & 1) != 0; } }
  11. what arrow class, render, entity, or arrow(item) class
  12. first bow class: package wearethewarriorsmod.bow; import wearethewarriorsmod.WeAreTheWarriorsMod; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.init.Items; import net.minecraft.item.EnumAction; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.player.ArrowLooseEvent; import net.minecraftforge.event.entity.player.ArrowNockEvent; public class flamebow extends Item { public static final String[] bowPullIconNameArray = new String[] {"pulling_0", "pulling_1", "pulling_2"}; @SideOnly(Side.CLIENT) private IIcon[] iconArray; private static final String __OBFID = "CL_00001777"; public flamebow() { this.maxStackSize = 1; this.setMaxDamage(2000); this.setFull3D(); } public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5){ super.onUpdate(stack, world, entity, par4, par5); if(stack.isItemEnchanted() == false) { stack.addEnchantment(Enchantment.flame, 5); super.onUpdate(stack, world, entity, par4, par5); } } /** * called when the player releases the use item button. Args: itemstack, world, entityplayer, itemInUseCount */ public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_) { int j = this.getMaxItemUseDuration(p_77615_1_) - p_77615_4_; ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j); MinecraftForge.EVENT_BUS.post(event); if (event.isCanceled()) { return; } j = event.charge; boolean flag = p_77615_3_.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, p_77615_1_) > 0; if (flag || p_77615_3_.inventory.hasItem(WeAreTheWarriorsMod.burntarrow)) { float f = (float)j / 20.0F; f = (f * f + f * 2.0F) / 3.0F; if ((double)f < 0.1D) { return; } if (f > 1.0F) { f = 1.0F; } Entityburntarrow entityarrow = new Entityburntarrow(p_77615_2_, p_77615_3_, f * 2.0F); if (f == 1.0F) { entityarrow.setIsCritical(true); } int k = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, p_77615_1_); if (k > 0) { entityarrow.setDamage(entityarrow.getDamage() + (double)k * 0.5D + 0.5D); } int l = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, p_77615_1_); if (l > 0) { entityarrow.setKnockbackStrength(l); } if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, p_77615_1_) > 0) { entityarrow.setFire(100); } p_77615_1_.damageItem(1, p_77615_3_); p_77615_2_.playSoundAtEntity(p_77615_3_, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.5F); if (flag) { entityarrow.canBePickedUp = 2; } else { p_77615_3_.inventory.consumeInventoryItem(WeAreTheWarriorsMod.burntarrow); } if (!p_77615_2_.isRemote) { p_77615_2_.spawnEntityInWorld(entityarrow); } } } public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) { return p_77654_1_; } /** * How long it takes to use or consume an item */ public int getMaxItemUseDuration(ItemStack p_77626_1_) { return 80000; } /** * returns the action that specifies what animation to play when the items is being used */ public EnumAction getItemUseAction(ItemStack p_77661_1_) { return EnumAction.bow; } /** * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer */ public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_); MinecraftForge.EVENT_BUS.post(event); if (event.isCanceled()) { return event.result; } if (p_77659_3_.capabilities.isCreativeMode || p_77659_3_.inventory.hasItem(WeAreTheWarriorsMod.burntarrow)) { p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_)); } return p_77659_1_; } /** * Return the enchantability factor of the item, most of the time is based on material. */ public int getItemEnchantability() { return 1; } @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister p_94581_1_) { this.itemIcon = p_94581_1_.registerIcon("watwm:flame_bow_standby"); this.iconArray = new IIcon[bowPullIconNameArray.length]; for (int i = 0; i < this.iconArray.length; ++i) { this.iconArray[i] = p_94581_1_.registerIcon("watwm:flame_bow_" + bowPullIconNameArray[i]); } } @Override @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining){ if(usingItem == null) { return itemIcon; } int ticksInUse = stack.getMaxItemUseDuration() - useRemaining; if (ticksInUse > 17){ return iconArray[2]; } else if (ticksInUse > 13){ return iconArray[1]; } else if (ticksInUse > 0){ return iconArray[0]; } else{ return itemIcon; } } /** * used to cycle through icons based on their used duration, i.e. for the bow */ @SideOnly(Side.CLIENT) public IIcon getItemIconForUseDuration(int p_94599_1_) { return this.iconArray[p_94599_1_]; } } second bow class(for the second bow): package wearethewarriorsmod.bow; import wearethewarriorsmod.WeAreTheWarriorsMod; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.init.Items; import net.minecraft.item.EnumAction; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.player.ArrowLooseEvent; import net.minecraftforge.event.entity.player.ArrowNockEvent; public class corruptedbow extends Item { public static final String[] bowPullIconNameArray = new String[] {"pulling_0", "pulling_1", "pulling_2"}; @SideOnly(Side.CLIENT) private IIcon[] iconArray; private static final String __OBFID = "CL_00001777"; public corruptedbow() { this.maxStackSize = 1; this.setMaxDamage(3000); this.setFull3D(); } public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5){ super.onUpdate(stack, world, entity, par4, par5); if(stack.isItemEnchanted() == false) { stack.addEnchantment(Enchantment.infinity, 1); stack.addEnchantment(Enchantment.power, 5); stack.addEnchantment(Enchantment.looting, 3); super.onUpdate(stack, world, entity, par4, par5); } } /** * called when the player releases the use item button. Args: itemstack, world, entityplayer, itemInUseCount */ public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_) { int j = this.getMaxItemUseDuration(p_77615_1_) - p_77615_4_; ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j); MinecraftForge.EVENT_BUS.post(event); if (event.isCanceled()) { return; } j = event.charge; boolean flag = p_77615_3_.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, p_77615_1_) > 0; if (flag || p_77615_3_.inventory.hasItem(WeAreTheWarriorsMod.corruptedarrow)) { float f = (float)j / 20.0F; f = (f * f + f * 2.0F) / 3.0F; if ((double)f < 0.1D) { return; } if (f > 1.0F) { f = 1.0F; } Entitycorruptedarrow entityarrow = new Entitycorruptedarrow(p_77615_2_, p_77615_3_, f * 2.0F); if (f == 1.0F) { entityarrow.setIsCritical(true); } int k = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, p_77615_1_); if (k > 0) { entityarrow.setDamage(entityarrow.getDamage() + (double)k * 0.5D + 0.5D); } int l = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, p_77615_1_); if (l > 0) { entityarrow.setKnockbackStrength(l); } if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, p_77615_1_) > 0) { entityarrow.setFire(100); } p_77615_1_.damageItem(1, p_77615_3_); p_77615_2_.playSoundAtEntity(p_77615_3_, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.5F); if (flag) { entityarrow.canBePickedUp = 2; } else { p_77615_3_.inventory.consumeInventoryItem(WeAreTheWarriorsMod.corruptedarrow); } if (!p_77615_2_.isRemote) { p_77615_2_.spawnEntityInWorld(entityarrow); } } } public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) { return p_77654_1_; } /** * How long it takes to use or consume an item */ public int getMaxItemUseDuration(ItemStack p_77626_1_) { return 95000; } /** * returns the action that specifies what animation to play when the items is being used */ public EnumAction getItemUseAction(ItemStack p_77661_1_) { return EnumAction.bow; } /** * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer */ public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_); MinecraftForge.EVENT_BUS.post(event); if (event.isCanceled()) { return event.result; } if (p_77659_3_.capabilities.isCreativeMode || p_77659_3_.inventory.hasItem(WeAreTheWarriorsMod.corruptedarrow)) { p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_)); } return p_77659_1_; } /** * Return the enchantability factor of the item, most of the time is based on material. */ public int getItemEnchantability() { return 1; } @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister p_94581_1_) { this.itemIcon = p_94581_1_.registerIcon("watwm:corrupted_bow_standby"); this.iconArray = new IIcon[bowPullIconNameArray.length]; for (int i = 0; i < this.iconArray.length; ++i) { this.iconArray[i] = p_94581_1_.registerIcon("watwm:corrupted_bow_" + bowPullIconNameArray[i]); } } @Override @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining){ if(usingItem == null) { return itemIcon; } int ticksInUse = stack.getMaxItemUseDuration() - useRemaining; if (ticksInUse > 17){ return iconArray[2]; } else if (ticksInUse > 13){ return iconArray[1]; } else if (ticksInUse > 0){ return iconArray[0]; } else{ return itemIcon; } } /** * used to cycle through icons based on their used duration, i.e. for the bow */ @SideOnly(Side.CLIENT) public IIcon getItemIconForUseDuration(int p_94599_1_) { return this.iconArray[p_94599_1_]; }
  13. I have made a techne model sword and Ive tried to follow the tutorial on the one with the gun thing but im finding it a bit difficult to follow because he skips a lot of stuff out, could someone please tell me a place where i can go to learn it or try to help me learn it. preferably without just giving me code because i want to learn not just paste but if its too difficult then maybe.
  14. ok i think i know what one. thank you
  15. I just added a new bow and a new arrow and minecraft keeps crashing, I just copied and pasted my code from my other bow that does work and changed the nesisary things but it still wont work, and i did add the code needed to the client proxy class. ---- Minecraft Crash Report ---- // Who set us up the TNT? Time: 3/04/15 10:31 PM Description: Initializing game java.lang.StringIndexOutOfBoundsException: String index out of range: 8 at java.lang.String.charAt(String.java:646) at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:232) at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:244) at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:239) at wearethewarriorsmod.WeAreTheWarriorsMod.preInit(WeAreTheWarriorsMod.java:207) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239) at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) at net.minecraft.client.Minecraft.run(Minecraft.java:931) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at java.lang.String.charAt(String.java:646) at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:232) at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:244) at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:239) at wearethewarriorsmod.WeAreTheWarriorsMod.preInit(WeAreTheWarriorsMod.java:207) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239) at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:931) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 7 (x86) version 6.1 Java Version: 1.8.0_25, Oracle Corporation Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation Memory: 756478312 bytes (721 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized watwm{1.0.2} [We Are The Warriors Mod] (bin) Unloaded->Constructed->Errored Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: ATI Radeon 3000 Graphics GL version 3.3.10750 Compatibility Profile Context, ATI Technologies Inc. GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1)
  16. when you shoot an arrow anywhere it just hits the player. its not a problem with the code , its got no errors but in game i get injured instead of shooting it
  17. that still had an error but i fixed it. thank you for your help
  18. wher it says itemslot and isSelected is now underlined
  19. ---- Minecraft Crash Report ---- // This doesn't make any sense! Time: 2/04/15 11:22 PM Description: Ticking entity java.lang.Error: Unresolved compilation problems: Syntax error on token ",", ; expected Syntax error on token ")", ; expected at wearethewarriorsmod.item.ItemDragonsword.onUpdate(ItemDragonsword.java:21) at net.minecraft.item.ItemStack.updateAnimation(ItemStack.java:476) at net.minecraft.entity.player.InventoryPlayer.decrementAnimations(InventoryPlayer.java:347) at net.minecraft.entity.player.EntityPlayer.onLivingUpdate(EntityPlayer.java:610) at net.minecraft.client.entity.EntityPlayerSP.onLivingUpdate(EntityPlayerSP.java:299) at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1816) at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:327) at net.minecraft.client.entity.EntityClientPlayerMP.onUpdate(EntityClientPlayerMP.java:96) at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2298) at net.minecraft.world.World.updateEntity(World.java:2258) at net.minecraft.world.World.updateEntities(World.java:2108) at net.minecraft.client.Minecraft.runTick(Minecraft.java:2086) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1028) at net.minecraft.client.Minecraft.run(Minecraft.java:951) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at wearethewarriorsmod.item.ItemDragonsword.onUpdate(ItemDragonsword.java:21) at net.minecraft.item.ItemStack.updateAnimation(ItemStack.java:476) at net.minecraft.entity.player.InventoryPlayer.decrementAnimations(InventoryPlayer.java:347) at net.minecraft.entity.player.EntityPlayer.onLivingUpdate(EntityPlayer.java:610) at net.minecraft.client.entity.EntityPlayerSP.onLivingUpdate(EntityPlayerSP.java:299) at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1816) at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:327) at net.minecraft.client.entity.EntityClientPlayerMP.onUpdate(EntityClientPlayerMP.java:96) at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2298) at net.minecraft.world.World.updateEntity(World.java:2258) -- Entity being ticked -- Details: Entity Type: null (net.minecraft.client.entity.EntityClientPlayerMP) Entity ID: 240 Entity Name: Player941 Entity's Exact location: -381.73, 97.86, 323.81 Entity's Block location: World: (-382,97,323), Chunk: (at 2,6,3 in -24,20; contains blocks -384,0,320 to -369,255,335), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Entity's Momentum: 0.00, 0.00, 0.00 Stacktrace: at net.minecraft.world.World.updateEntities(World.java:2108) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player941'/240, l='MpServer', x=-381.73, y=97.86, z=323.81]] Chunk stats: MultiplayerChunkCache: 0, 0 Level seed: 0 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: World: (-124,64,240), Chunk: (at 4,4,0 in -8,15; contains blocks -128,0,240 to -113,255,255), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Level time: 25018 game time, 25018 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 20 total; [EntityXPOrb['Experience Orb'/256, l='MpServer', x=-377.25, y=88.13, z=308.25], EntityXPOrb['Experience Orb'/257, l='MpServer', x=-376.13, y=83.13, z=310.88], EntityZombie['Zombie'/258, l='MpServer', x=-359.56, y=25.00, z=324.53], EntityCreeper['Creeper'/259, l='MpServer', x=-354.50, y=24.00, z=328.66], EntityCreeper['Creeper'/260, l='MpServer', x=-358.72, y=25.00, z=325.66], EntitySkeleton['Skeleton'/261, l='MpServer', x=-361.44, y=24.00, z=324.72], EntityZombie['Zombie'/263, l='MpServer', x=-356.47, y=24.00, z=335.66], EntityItem['item.item.rottenFlesh'/264, l='MpServer', x=-360.41, y=56.13, z=325.28], EntityClientPlayerMP['Player941'/240, l='MpServer', x=-381.73, y=97.86, z=323.81], EntityZombie['Zombie'/245, l='MpServer', x=-392.41, y=34.00, z=326.94], EntityZombie['Zombie'/246, l='MpServer', x=-393.31, y=34.00, z=324.50], EntityZombie['Zombie'/247, l='MpServer', x=-395.53, y=34.00, z=324.00], EntitySkeleton['Skeleton'/248, l='MpServer', x=-393.88, y=34.00, z=323.47], EntitySkeleton['Skeleton'/249, l='MpServer', x=-393.50, y=34.22, z=329.50], EntityItem['item.tile.stonebrick'/250, l='MpServer', x=-396.38, y=78.13, z=323.41], EntityItem['item.tile.stonebrick'/251, l='MpServer', x=-391.34, y=93.13, z=322.88], EntityItem['item.tile.dirt.default'/252, l='MpServer', x=-394.88, y=95.13, z=326.88], EntityItem['item.tile.dirt.default'/253, l='MpServer', x=-393.13, y=96.13, z=327.88], EntityXPOrb['Experience Orb'/254, l='MpServer', x=-374.50, y=67.13, z=313.94], EntityItem['item.item.rottenFlesh'/255, l='MpServer', x=-377.13, y=88.13, z=309.00]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2555) at net.minecraft.client.Minecraft.run(Minecraft.java:973) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 7 (x86) version 6.1 Java Version: 1.8.0_25, Oracle Corporation Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation Memory: 819846952 bytes (781 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available watwm{1.0} [We Are The Warriors Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: ATI Radeon 3000 Graphics GL version 3.3.10750 Compatibility Profile Context, ATI Technologies Inc. GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1)
  20. I did this and when ever I have the sword the game crashes(I did have some of the code from potion effect but I got rid of the potion effect while doing this) Code for my sword: package wearethewarriorsmod.item; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; public class ItemDragonsword extends ItemSword { public ItemDragonsword(ToolMaterial material) { super(material); } public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5){ super.onUpdate(stack, world, entity, par4, par5); { int itemSlot, boolean isSelected) { stack.addEnchantment(Enchantment.fireAspect, 2); super.onUpdate(stack, world, entity, itemSlot, isSelected); } } } }
  21. I have looked every where and cant find any tutorial on how to make it so a weapon has an enchant as default eg fire sword have fire aspect as default. please help
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.