Jump to content

NeverMind

Members
  • Posts

    57
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

NeverMind's Achievements

Stone Miner

Stone Miner (3/8)

0

Reputation

  1. Can you please tell me more? It the first time I hear about that.
  2. The code is pretty huge. I will show you the main modding class. package com.NeverMind.SonOfGods; import org.lwjgl.input.Keyboard; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderFireball; import net.minecraft.client.renderer.entity.RenderSnowball; import net.minecraft.client.settings.KeyBinding; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ChatComponentText; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLLoadEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = "SonOfGods", name = "SonOfGods", version = "1.0") public class SonOfGods { public static boolean breed = false; public static final String modid = "SonOfGods"; public static boolean ifdiamond= false; public static boolean held = true; public static boolean thunderdiamond = false; public static boolean creeperkill = false; public static boolean knockbackOn = false; public static boolean falling = false; public static boolean jump = false; public static boolean skeletonkill = false; public ItemStack theItem; public InventoryPlayer inventory; public EntityPlayer player; public static Item TalismanOfGods; public static EntityThrowable FireBall; private float field_77002_a; public static Item fireball; public static boolean ghastkill = false; public static boolean blazekill = false; public static KeyBinding fKey; public static boolean endermankill = false; public static boolean barehands = false; public static boolean zombiekill = false; public static boolean dragonkill = false; public static boolean breedthunder = false; public static boolean collisionparticles = false; @EventHandler public void preInit(FMLPreInitializationEvent e) { fKey = new KeyBinding("fKey", Keyboard.KEY_F, modid); ClientRegistry.registerKeyBinding(fKey); //FMLCommonHandler.instance().bus().register(new KeyHandler()); fireball = new Item(); fireball.setUnlocalizedName("fireball").setTextureName("NeverMind2" + ":" + "fireball"); GameRegistry.registerItem(fireball, "fireball"); RenderingRegistry.registerEntityRenderingHandler(FireBall.class, new RenderSnowball(fireball)); FMLCommonHandler.instance().bus().register(new PlayerEventHandler()); MinecraftForge.EVENT_BUS.register(new itDied()); TalismanOfGods = new TalismanOfGods(); TalismanOfGods.setUnlocalizedName("TalismanOfGods"); GameRegistry.registerItem(TalismanOfGods, "TalismanOfGods"); TalismanOfGods.setTextureName("NeverMind2" + ":" + "TalismanOfGods"); TalismanOfGods.setCreativeTab(CreativeTabs.tabTools); GameRegistry.addRecipe(new ItemStack (TalismanOfGods), new Object[]{ "XX", "XX", 'X', Blocks.dirt }); TalismanOfGods.setMaxStackSize(1); } @EventHandler public void Init(FMLInitializationEvent e) { } @EventHandler public void Load(FMLLoadEvent e) { } }
  3. I have kind of big problem with my mod. I try to test it. I did what was needed and I ran Minecraft with the forge and the mod. Everything seemed ok, but when I started the game again, the progress was gone. To explain better, a weapon which received attributes lost them, as the player did too. Like all the variables reset. I think I might did something very stupid.
  4. this is the line: par3 = ((AxisAlignedBB)list.get(i)).calculateYOffset(this.boundingBox, par3); I don't understand what works wrong.
  5. I have 2 questions. How can I make the player invulnerable to fall damage? (I don't want the option when I set the fall distance to 0). The second question: How can I make a monster look hurt? (hurt animation)
  6. Hey, guys. I need some help with a problem. I tried adding a custom particle effect, but when i want to use it in game, the game crashes. Here is the crash report and the code: package com.NeverMind.SonOfGods; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.Minecraft; import net.minecraft.client.particle.EntityFX; import net.minecraft.client.renderer.Tessellator; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; @SideOnly(Side.CLIENT) public class EntityClothFX extends EntityFX { private static final ResourceLocation texture = new ResourceLocation("Nevermind2:" + "textures/particle/particlecloth.png"); protected EntityClothFX(World par1World, double x, double y, double z) { super(par1World, x, y, z); setGravity(0); } public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7) { float f6 = (float)this.particleTextureIndexX / 16.0F; float f7 = f6 + 0.0624375F; float f8 = (float)this.particleTextureIndexY / 16.0F; float f9 = f8 + 0.0624375F; float f10 = 0.1F * this.particleScale; if (this.particleIcon != null) { f6 = this.particleIcon.getMinU(); f7 = this.particleIcon.getMaxU(); f8 = this.particleIcon.getMinV(); f9 = this.particleIcon.getMaxV(); } float f11 = (float)(this.prevPosX + (this.posX - this.prevPosX) * (double)par2 - interpPosX); float f12 = (float)(this.prevPosY + (this.posY - this.prevPosY) * (double)par2 - interpPosY); float f13 = (float)(this.prevPosZ + (this.posZ - this.prevPosZ) * (double)par2 - interpPosZ); par1Tessellator.setColorRGBA_F(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha); par1Tessellator.addVertexWithUV((double)(f11 - par3 * f10 - par6 * f10), (double)(f12 - par4 * f10), (double)(f13 - par5 * f10 - par7 * f10), (double)f7, (double)f9); par1Tessellator.addVertexWithUV((double)(f11 - par3 * f10 + par6 * f10), (double)(f12 + par4 * f10), (double)(f13 - par5 * f10 + par7 * f10), (double)f7, (double)f8); par1Tessellator.addVertexWithUV((double)(f11 + par3 * f10 + par6 * f10), (double)(f12 + par4 * f10), (double)(f13 + par5 * f10 + par7 * f10), (double)f6, (double)f8); par1Tessellator.addVertexWithUV((double)(f11 + par3 * f10 - par6 * f10), (double)(f12 - par4 * f10), (double)(f13 + par5 * f10 - par7 * f10), (double)f6, (double)f9); } public int getFXLayer() { return 3; } public EntityClothFX setMaxAge(int maxAge){ particleMaxAge = maxAge; return this; } public EntityClothFX setGravity(int gravity) { particleGravity = gravity; return this; } public EntityClothFX setscale(int scale) { particleScale = scale; return this; } //this is how I try to add it in the game Minecraft.getMinecraft().effectRenderer.addEffect(new EntityClothFX(world, (double)x, (double)y, (double)z)); ---- Minecraft Crash Report ---- // Everything's going to plan. No, really, that was supposed to happen. Time: 7/20/14 4:24 PM Description: Ticking Particle java.lang.NullPointerException: Ticking Particle at net.minecraft.entity.Entity.moveEntity(Entity.java:718) at net.minecraft.client.particle.EntityFX.onUpdate(EntityFX.java:144) at net.minecraft.client.particle.EffectRenderer.updateEffects(EffectRenderer.java:79) at net.minecraft.client.Minecraft.runTick(Minecraft.java:2113) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:996) at net.minecraft.client.Minecraft.run(Minecraft.java:912) at net.minecraft.client.main.Main.main(Main.java:112) 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:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.entity.Entity.moveEntity(Entity.java:718) at net.minecraft.client.particle.EntityFX.onUpdate(EntityFX.java:144) -- Particle being ticked -- Details: Particle: EntityClothFX, Pos (-192.71832275390625,4.0,827.936279296875), RGBA (1.0,1.0,1.0,1.0), Age 4 Particle Type: ENTITY_PARTICLE_TEXTURE Stacktrace: at net.minecraft.client.particle.EffectRenderer.updateEffects(EffectRenderer.java:79) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player244'/218, l='MpServer', x=-192.72, y=5.62, z=827.94]] Chunk stats: MultiplayerChunkCache: 225, 225 Level seed: 0 Level generator: ID 01 - flat, ver 0. Features enabled: false Level generator options: Level spawn location: World: (-275,4,694), Chunk: (at 13,0,6 in -18,43; contains blocks -288,0,688 to -273,255,703), Region: (-1,1; contains chunks -32,32 to -1,63, blocks -512,0,512 to -1,255,1023) Level time: 130339 game time, 50600 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: 66 total; [EntityItem['item.item.rottenFlesh'/128, l='MpServer', x=-246.84, y=4.13, z=823.75], EntityItem['item.item.arrow'/129, l='MpServer', x=-246.50, y=4.13, z=887.06], EntityItem['item.item.bone'/130, l='MpServer', x=-246.84, y=4.13, z=887.50], EntitySlime['Slime'/131, l='MpServer', x=-241.60, y=4.47, z=891.95], EntitySlime['Slime'/132, l='MpServer', x=-237.71, y=4.42, z=883.46], EntitySlime['Slime'/143, l='MpServer', x=-224.21, y=5.50, z=766.33], EntityItem['item.item.seeds'/145, l='MpServer', x=-228.31, y=5.13, z=764.00], EntityItem['item.item.wheat'/146, l='MpServer', x=-226.19, y=5.13, z=766.03], EntityItem['item.item.seeds'/147, l='MpServer', x=-226.97, y=5.13, z=765.50], EntityItem['item.item.rottenFlesh'/148, l='MpServer', x=-231.31, y=4.13, z=812.31], EntityItem['item.item.rottenFlesh'/149, l='MpServer', x=-232.97, y=4.13, z=813.47], EntitySlime['Slime'/150, l='MpServer', x=-224.00, y=4.47, z=812.19], EntitySlime['Slime'/151, l='MpServer', x=-232.91, y=4.48, z=837.14], EntityItem['item.item.rottenFlesh'/152, l='MpServer', x=-231.94, y=4.13, z=859.81], EntityCreeper['Creeper'/153, l='MpServer', x=-236.31, y=4.00, z=848.28], EntitySlime['Slime'/158, l='MpServer', x=-217.32, y=4.47, z=781.56], EntityItem['item.item.arrow'/159, l='MpServer', x=-223.69, y=4.13, z=797.97], EntityZombie['Zombie'/160, l='MpServer', x=-207.83, y=4.00, z=837.51], EntityItem['item.item.arrow'/161, l='MpServer', x=-222.00, y=4.13, z=871.41], EntitySlime['Slime'/173, l='MpServer', x=-191.34, y=4.00, z=768.22], EntitySlime['Slime'/174, l='MpServer', x=-204.68, y=4.47, z=754.48], EntityCow['Cow'/175, l='MpServer', x=-196.38, y=4.00, z=768.28], EntitySlime['Slime'/176, l='MpServer', x=-204.32, y=4.50, z=778.62], EntityItem['item.item.arrow'/177, l='MpServer', x=-198.09, y=4.13, z=797.97], EntityItem['item.item.arrow'/178, l='MpServer', x=-202.69, y=4.13, z=791.63], EntityItem['item.item.bone'/179, l='MpServer', x=-199.47, y=4.13, z=796.75], EntityItem['item.item.bone'/180, l='MpServer', x=-198.94, y=4.13, z=789.00], EntitySlime['Slime'/181, l='MpServer', x=-204.46, y=4.47, z=829.21], EntitySlime['Slime'/182, l='MpServer', x=-197.37, y=4.47, z=856.24], EntitySlime['Slime'/183, l='MpServer', x=-204.59, y=4.47, z=875.19], EntitySlime['Slime'/184, l='MpServer', x=-206.80, y=4.41, z=885.15], EntitySlime['Slime'/187, l='MpServer', x=-176.03, y=4.00, z=762.78], EntitySlime['Slime'/188, l='MpServer', x=-179.13, y=4.11, z=781.08], EntitySlime['Slime'/189, l='MpServer', x=-180.02, y=4.27, z=790.52], EntityItem['item.item.bone'/190, l='MpServer', x=-189.72, y=4.13, z=800.34], EntityItem['item.item.arrow'/191, l='MpServer', x=-190.09, y=4.13, z=819.03], EntityItem['item.item.bone'/192, l='MpServer', x=-186.53, y=4.13, z=816.34], EntitySlime['Slime'/193, l='MpServer', x=-188.66, y=4.00, z=855.00], EntitySlime['Slime'/200, l='MpServer', x=-158.66, y=4.33, z=876.45], EntitySlime['Slime'/204, l='MpServer', x=-143.80, y=4.50, z=831.84], EntitySlime['Slime'/205, l='MpServer', x=-161.18, y=4.44, z=842.41], EntitySlime['Slime'/206, l='MpServer', x=-155.98, y=4.50, z=850.98], EntitySlime['Slime'/207, l='MpServer', x=-154.14, y=4.50, z=865.20], EntitySlime['Slime'/210, l='MpServer', x=-131.59, y=4.00, z=804.94], EntitySlime['Slime'/211, l='MpServer', x=-141.96, y=4.11, z=843.34], EntitySlime['Slime'/212, l='MpServer', x=-134.69, y=4.00, z=866.53], EntitySlime['Slime'/213, l='MpServer', x=-137.24, y=4.00, z=849.33], EntitySlime['Slime'/214, l='MpServer', x=-123.44, y=4.00, z=845.16], EntitySlime['Slime'/215, l='MpServer', x=-125.00, y=4.11, z=832.04], EntitySlime['Slime'/216, l='MpServer', x=-120.62, y=4.33, z=865.99], EntitySlime['Slime'/217, l='MpServer', x=-123.26, y=4.00, z=882.31], EntitySlime['Slime'/223, l='MpServer', x=-186.26, y=4.00, z=899.29], EntitySlime['Slime'/226, l='MpServer', x=-158.19, y=4.00, z=897.91], EntityClientPlayerMP['Player244'/218, l='MpServer', x=-192.72, y=5.62, z=827.94], EntityCow['Cow'/101, l='MpServer', x=-272.78, y=4.00, z=800.28], EntityCow['Cow'/114, l='MpServer', x=-268.59, y=5.00, z=756.41], EntitySlime['Slime'/115, l='MpServer', x=-259.21, y=5.47, z=766.94], EntityChicken['Chicken'/116, l='MpServer', x=-260.47, y=4.00, z=777.56], EntitySlime['Slime'/117, l='MpServer', x=-267.58, y=4.24, z=778.82], EntityChicken['Chicken'/118, l='MpServer', x=-265.25, y=4.00, z=796.19], EntityCow['Cow'/119, l='MpServer', x=-270.28, y=4.00, z=786.31], EntityBat['Bat'/120, l='MpServer', x=-254.48, y=4.58, z=801.21], EntitySlime['Slime'/121, l='MpServer', x=-260.78, y=4.24, z=826.24], EntitySlime['Slime'/124, l='MpServer', x=-266.12, y=4.23, z=862.93], EntitySlime['Slime'/126, l='MpServer', x=-252.35, y=4.23, z=762.94], EntitySlime['Slime'/127, l='MpServer', x=-248.63, y=4.00, z=775.46]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:412) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2523) at net.minecraft.client.Minecraft.run(Minecraft.java:934) at net.minecraft.client.main.Main.main(Main.java:112) 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:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) -- System Details -- Details: Minecraft Version: 1.7.2 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.8.0_05, Oracle Corporation Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 926761136 bytes (883 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 34851 (1951656 bytes; 1 MB) allocated, 1665 (93240 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.03 FML v7.2.211.1121 Minecraft Forge 10.12.2.1121 6 mods loaded, 6 mods active mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.2.211.1121} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.12.2.1121} [Minecraft Forge] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available examplemod{1.0} [Example Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available SonOfGods{1.0} [sonOfGods] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available NeverMind{1.0} [FirstMod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Launched Version: 1.6 LWJGL: 2.9.0 OpenGL: GeForce GTX 560 Ti/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation 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: 1445 (80920 bytes; 0 MB) allocated, 135 (7560 bytes; 0 MB) used Anisotropic Filtering: Off (1)
  7. I made a custom particle, but I want to use for it a texture already used in Minecraft, like flame.
  8. Where is the location of particles textures?
  9. I want to generate particles on player movement. Is there any method that verifies if an entity moves?
  10. I don't know why, lol. That's what I read
  11. I knew this doesn't work in 1.7.
  12. I tried to find out if the block under the player is dirt. The if condition looks like this if (world.func_147439_a(x, y, z) == Blocks.dirt). I get an error: The method func_147439_a is undefined for the type World. Any help?
  13. Yep, it works now. Thanks a lot .
×
×
  • Create New...

Important Information

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