Jump to content

Recommended Posts

Posted

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)

  • 1 year later...
Posted

I know this post is old, but the problem is still a thing.

I had the same issue. It's because Minecraft can only handle 4000 particles at once. If there are more than 4000, the game crashes.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Verified users can now unlock a $100 OFF Temu Coupon Code using the verified promo code [ALF401700]. This Temu $100 OFF code works for both new and existing customers and can be used to redeem up to 50% off your next order. Our exclusive Temu coupon code [ALF401700] delivers a flat $100 OFF on top of existing deals. First-time customers using code ALF401700 can save an extra 100% off select items. Returning users also qualify for an automatic $100 OFF discount just by applying this code at checkout. But wait—there’s more. With our Temu coupon codes for 2025, users can score up to 90% OFF on clearance items. Whether you’re shopping in the USA, Canada, UK, or elsewhere, Temu promo code ALF401700 unlocks extra discounts tailored to your account. Some users are saving 100% on items using this 2025 Temu promo code. 🔥 Temu Coupon Highlights Using Code [ALF401700]: Temu new user code – ALF401700: Save 50% off your first order + $100 OFF. Temu promo for existing customers – ALF401700: Enjoy flat $100 OFF instantly. Global availability: Works in the USA, UK, Canada, Germany, France, Japan, Chile, Colombia, Malaysia, Mexico, South Korea, Philippines, Saudi Arabia, Qatar, Pakistan, and more. Top 2025 Coupon Deal: Get $200 OFF plus 100% bonus discounts using code ALF401700. Top-Ranked Temu Deals for 2025 (Coupon Code: ALF401700): ✅ Temu $100 OFF Memorial Day Sale — Use ALF401700 ✅ Temu First Order Coupon — Use ALF401700 for 50% + $100 OFF ✅ Temu USA Coupon Code — Save $100 instantly with ALF401700 ✅ Temu Japan, Germany, Chile Codes — All support ALF401700 ✅ Temu Reddit Discount – $100 OFF: Valid for both new and old users ✅ Temu Coupon Bundle 2025 — $100 OFF + up to 50% slash ✅ 100% OFF Free Gift Code — Use ALF401700, no invite needed ✅ Temu Sign-Up Bonus Promo — Get a welcome $100 OFF instantly ✅ Free Temu Code for New Users — Use ALF401700, no referral required  Temu Clearance Codes 2025 — Use ALF401700 for 85–100% discounts Why ALF401700 is the Best Temu Code in 2025 Using Temu code ALF401700 is your ticket to massive savings, free shipping, first-order discounts, and stackable coupon bundles. Whether you're browsing electronics, fashion, home goods, or beauty products, this verified Temu discount code offers real savings—up to 90% OFF + $100 OFF on qualified orders. 💡 Pro Tip: Apply ALF401700 during checkout in the Temu app or website to activate your instant $100 discount, even if you’re not a new user. Temu $100 OFF Code by Country (All Use ALF401700): 🇺🇸 Temu USA – ALF401700 🇯🇵 Temu Japan – ALF401700 🇲🇽 Temu Mexico – ALF401700 🇨🇱 Temu Chile – ALF401700 🇨🇴 Temu Colombia – ALF401700 🇲🇾 Temu Malaysia – ALF401700 🇵🇭 Temu Philippines – ALF401700 🇰🇷 Temu Korea – ALF401700 🇵🇰 Temu Pakistan – ALF401700 🇫🇮 Temu Finland – ALF401700 🇸🇦 Temu Saudi Arabia – ALF401700 🇶🇦 Temu Qatar – ALF401700 🇫🇷 Temu France – ALF401700 🇩🇪 Temu Germany – ALF401700 🇮🇱 Temu Israel – ALF401700 Temu Coupon Code [ALF401700] Summary for SEO: Temu $100 OFF Code  Temu First Order Discount Code 2025  Temu Verified Promo Code ALF401700  Temu 50% OFF + $100 Bonus  Temu 100% OFF Code 2025  Temu App Promo ALF401700  Temu Working Discount Code 2025 
    • Hey there, nothing to do with the code, I am just suggesting you use Intelij IDEA. Trust me, it is the best.
    • Hey there, nothing to do with the code, I am just suggesting you use Intelij IDEA. Trust me, it is the best.
    • You can check the config of Geckolib and Mowzie's Mobs - maybe there is a way to disable some render features
    • You can use the .requires() function  the server also has a permission level of 4, which is the highest permission level.
  • Topics

×
×
  • Create New...

Important Information

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