Jump to content

Recommended Posts

Posted

So, the basic gist of it is I'm trying to spawn particles on the client side, just a test, see if I can get it to spawn when you're on a server, as it's just client side. The problem is that I can't get it to spawn in the first place. I may be going about this all wrong, but I'm trying to make a RenderTickHandler to spawn 2 "portal" particles (like the Enderman) each tick. (I've taken the velocity and spawning from there as well). I've done google searches a lot, and I don't know if I've even done the start of the spawning correct, so any feedback would be appreciated. I didn't register it in my main mod class as I read that it was done in the ClientProxy.

 

VV ClientProxy VV

package selfparticlesmod.client;

import net.minecraft.client.Minecraft;
import cpw.mods.fml.common.FMLCommonHandler;
import selfparticlesmod.main.RenderTickHandler;
import selfparticlesmod.main.CommonProxy;

public class ClientProxy extends CommonProxy{

public static void registerRenderers(){

}

@Override
public void initialize()
{
	super.initialize();
	FMLCommonHandler.instance().bus().register(new RenderTickHandler(Minecraft.getMinecraft()));
}
}

 

VV RenderTickHandler VV

package selfparticlesmod.main;

import java.util.Random;

import net.minecraft.client.Minecraft;
import net.minecraft.world.World;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent.RenderTickEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class RenderTickHandler {

public int particleNumber = 1;
public Random rand;
private Minecraft mc;

public RenderTickHandler(Minecraft mc)
{
	this.mc = mc;
}
public World world;

@SubscribeEvent
public void onRenderTick(RenderTickEvent event)
{
	for (int countparticles = 0; countparticles < 2; countparticles++)
	{
		mc.thePlayer.worldObj.spawnParticle("portal", mc.thePlayer.posX + (rand.nextDouble() - 0.5D) * (double)mc.thePlayer.width, mc.thePlayer.posY + rand.nextDouble() * (double)mc.thePlayer.height - 0.25D, mc.thePlayer.posZ + (rand.nextDouble() - 0.5D) * (double)mc.thePlayer.width, (rand.nextDouble() - 0.5D) * 2.0D, -rand.nextDouble(), (rand.nextDouble() - 0.5D) * 2.0D);				
	}
}
}

Posted

So, I believe I have fixed this issue, as it now goes into the code and crashes upon reaching "thePlayer", as it's not in game and it is attempting to run it. Is there any way I can fix this? Basically, it can't find the mc.thePlayer, and it's crashing upon the first frame of the menu. Is there a check I can have to see if they're in the game before running the code to spawn particles?

 

[spoiler=Crash log]java.lang.NullPointerException

at selfparticlesmod.main.RenderTickHandler.onRenderTick(RenderTickHandler.java:31) ~[RenderTickHandler.class:?]

at cpw.mods.fml.common.eventhandler.ASMEventHandler_5_RenderTickHandler_onRenderTick_RenderTickEvent.invoke(.dynamic) ~[?:?]

at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:51) ~[ASMEventHandler.class:?]

at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:122) ~[EventBus.class:?]

at cpw.mods.fml.common.FMLCommonHandler.onRenderTickStart(FMLCommonHandler.java:334) ~[FMLCommonHandler.class:?]

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1065) ~[Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:961) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]

at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]

at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]

at GradleStart.bounce(GradleStart.java:107) [start/:?]

at GradleStart.startClient(GradleStart.java:100) [start/:?]

at GradleStart.main(GradleStart.java:55) [start/:?]

 

Posted

Minecraft minecraft = Minecraft.getMinecraft();

if(minecraft.thePlayer != null)
{
    //Code using the player
}

 

Minecraft#thePlayer is only valid when the 'player' is in an actual world.

 

RenderTickEvent would be called from the moment the main menu is showing (where there is no 'player').

BEFORE ASKING FOR HELP READ THE EAQ!

 

I'll help if I can. Apologies if I do something obviously stupid. :D

 

If you don't know basic Java yet, go and follow these tutorials.

Posted

Although that seems as it would work, I think it registers the player before opening the world, so it can't spawn the world. Would I also be able to check if a world is loaded and rendering?

Posted

If the world is not null I'd assume it would be fine.

 

Anyway, I think a better place to do this is in a PlayerTickEvent. That way you already know the player isn't null and the World object associated with it isn't null either. Then all you'd have to do is surround your code with

 

if(event.side.isClient())

 

And use event.player rather than Minecraft#thePlayer. 

BEFORE ASKING FOR HELP READ THE EAQ!

 

I'll help if I can. Apologies if I do something obviously stupid. :D

 

If you don't know basic Java yet, go and follow these tutorials.

Posted
  On 9/16/2014 at 10:00 PM, shieldbug1 said:

If the world is not null I'd assume it would be fine.

 

Anyway, I think a better place to do this is in a PlayerTickEvent. That way you already know the player isn't null and the World object associated with it isn't null either. Then all you'd have to do is surround your code with

 

if(event.side.isClient())

 

And use event.player rather than Minecraft#thePlayer.

 

I've tried this, this is what my code looks like so far (I changed the particle position and velocity code to match that of an enderman)

 

package selfparticlesmod.main;

import java.util.Random;

import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ChatComponentText;
import net.minecraft.world.World;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class PlayerTickHandler {

public int particleNumber = 1;
public Random rand;
private Minecraft mc;

public PlayerTickHandler(Minecraft mc)
{
	this.mc = mc;
}
public World world;

@SubscribeEvent
public void onPlayerTick(TickEvent.PlayerTickEvent event)
{
	if(event.side.isClient())
	{
		EntityPlayer player = (EntityPlayer) event.player;
            short short1 = 128;
            for (int l = 0; l < 2; l++)
            {
                    double d3 = player.posX;
                    double d4 = player.posY;
                    double d5 = player.posZ;
                    double d6 = (double)l / ((double)short1 - 1.0D);
                    float f = (rand.nextFloat() - 0.5F) * 0.2F;
                    float f1 = (rand.nextFloat() - 0.5F) * 0.2F;
                    float f2 = (rand.nextFloat() - 0.5F) * 0.2F;
                    double d7 = d3 + (player.posX - d3) * d6 + (rand .nextDouble() - 0.5D) * (double)player.width * 2.0D;
                    double d8 = d4 + (player.posY - d4) * d6 - rand.nextDouble() * (double)player.height;
                    double d9 = d5 + (player.posZ - d5) * d6 + (rand.nextDouble() - 0.5D) * (double)player.width * 2.0D;
                    player.worldObj.spawnParticle("portal", d7, d8, d9, (double)f, (double)f1, (double)f2);
                    player.addChatMessage(new ChatComponentText("Particle spawned"));
            }

	}

}
}

 

The only problem is that, upon loading a world, it crashes when it reaches line 40.

 

Line 40:

float f = (rand.nextFloat() - 0.5F) * 0.2F;

 

Because of:

java.lang.NullPointerException: Ticking entity

 

[spoiler=Crash Report]---- Minecraft Crash Report ----

// Shall we play a game?

 

Time: 9/16/14 5:11 PM

Description: Ticking entity

 

java.lang.NullPointerException: Ticking entity

at selfparticlesmod.main.PlayerTickHandler.onPlayerTick(PlayerTickHandler.java:40)

at cpw.mods.fml.common.eventhandler.ASMEventHandler_5_PlayerTickHandler_onPlayerTick_PlayerTickEvent.invoke(.dynamic)

at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:51)

at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:122)

at cpw.mods.fml.common.FMLCommonHandler.onPlayerPreTick(FMLCommonHandler.java:344)

at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:273)

at net.minecraft.client.entity.EntityClientPlayerMP.onUpdate(EntityClientPlayerMP.java:100)

at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2253)

at net.minecraft.world.World.updateEntity(World.java:2213)

at net.minecraft.world.World.updateEntities(World.java:2063)

at net.minecraft.client.Minecraft.runTick(Minecraft.java:2097)

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039)

at net.minecraft.client.Minecraft.run(Minecraft.java:961)

at net.minecraft.client.main.Main.main(Main.java:164)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at GradleStart.bounce(GradleStart.java:107)

at GradleStart.startClient(GradleStart.java:100)

at GradleStart.main(GradleStart.java:55)

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- Head --

Stacktrace:

at selfparticlesmod.main.PlayerTickHandler.onPlayerTick(PlayerTickHandler.java:40)

at cpw.mods.fml.common.eventhandler.ASMEventHandler_5_PlayerTickHandler_onPlayerTick_PlayerTickEvent.invoke(.dynamic)

at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:51)

at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:122)

at cpw.mods.fml.common.FMLCommonHandler.onPlayerPreTick(FMLCommonHandler.java:344)

at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:273)

at net.minecraft.client.entity.EntityClientPlayerMP.onUpdate(EntityClientPlayerMP.java:100)

at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2253)

at net.minecraft.world.World.updateEntity(World.java:2213)

 

-- Entity being ticked --

Details:

Entity Type: null (net.minecraft.client.entity.EntityClientPlayerMP)

Entity ID: 421

Entity Name: ForgeDevName

Entity's Exact location: -293.49, 74.62, 262.99

Entity's Block location: World: (-294,74,262), Chunk: (at 10,4,6 in -19,16; contains blocks -304,0,256 to -289,255,271), 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:2063)

 

-- Affected level --

Details:

Level name: MpServer

All players: 1 total; [EntityClientPlayerMP['ForgeDevName'/421, l='MpServer', x=-293.49, y=74.62, z=262.99]]

Chunk stats: MultiplayerChunkCache: 85, 85

Level seed: 0

Level generator: ID 00 - default, ver 1. Features enabled: false

Level generator options:

Level spawn location: World: (-256,64,232), Chunk: (at 0,4,8 in -16,14; contains blocks -256,0,224 to -241,255,239), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)

Level time: 5476 game time, 5476 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: 113 total; [EntitySpider['Spider'/256, l='MpServer', x=-225.47, y=51.00, z=321.53], EntitySkeleton['Skeleton'/63, l='MpServer', x=-366.50, y=46.00, z=239.50], EntityCreeper['Creeper'/62, l='MpServer', x=-364.28, y=45.00, z=239.50], EntityZombie['Zombie'/61, l='MpServer', x=-364.63, y=50.00, z=214.03], EntityChicken['Chicken'/68, l='MpServer', x=-363.47, y=73.00, z=282.16], EntitySheep['Sheep'/69, l='MpServer', x=-362.63, y=73.00, z=282.16], EntityCreeper['Creeper'/70, l='MpServer', x=-362.56, y=31.00, z=290.97], EntitySkeleton['Skeleton'/64, l='MpServer', x=-367.50, y=46.00, z=241.50], EntityEnderman['Enderman'/65, l='MpServer', x=-356.44, y=41.00, z=240.84], EntityZombie['Zombie'/66, l='MpServer', x=-359.41, y=20.00, z=266.69], EntitySkeleton['Skeleton'/67, l='MpServer', x=-352.53, y=28.00, z=276.93], EntitySheep['Sheep'/72, l='MpServer', x=-367.72, y=75.00, z=296.81], EntitySheep['Sheep'/73, l='MpServer', x=-353.00, y=76.00, z=314.38], EntityBat['Bat'/85, l='MpServer', x=-343.01, y=18.07, z=254.55], EntityBat['Bat'/84, l='MpServer', x=-347.38, y=42.10, z=231.47], EntitySheep['Sheep'/87, l='MpServer', x=-347.19, y=76.00, z=319.09], EntitySheep['Sheep'/86, l='MpServer', x=-351.25, y=72.00, z=274.66], EntitySheep['Sheep'/81, l='MpServer', x=-342.13, y=68.00, z=204.13], EntitySkeleton['Skeleton'/83, l='MpServer', x=-338.14, y=15.00, z=234.35], EntitySheep['Sheep'/82, l='MpServer', x=-342.56, y=68.00, z=208.75], EntitySheep['Sheep'/89, l='MpServer', x=-343.34, y=68.00, z=334.47], EntitySheep['Sheep'/88, l='MpServer', x=-348.06, y=76.00, z=327.50], EntitySheep['Sheep'/102, l='MpServer', x=-331.81, y=72.00, z=196.53], EntitySheep['Sheep'/103, l='MpServer', x=-320.38, y=72.00, z=200.09], EntitySkeleton['Skeleton'/100, l='MpServer', x=-330.50, y=26.00, z=193.84], EntitySkeleton['Skeleton'/101, l='MpServer', x=-329.50, y=26.00, z=200.50], EntitySkeleton['Skeleton'/98, l='MpServer', x=-331.50, y=30.00, z=195.50], EntitySkeleton['Skeleton'/99, l='MpServer', x=-330.47, y=20.00, z=193.84], EntitySheep['Sheep'/111, l='MpServer', x=-334.66, y=70.00, z=335.50], EntitySheep['Sheep'/108, l='MpServer', x=-334.34, y=74.00, z=262.88], EntityChicken['Chicken'/109, l='MpServer', x=-329.88, y=72.00, z=268.53], EntitySheep['Sheep'/106, l='MpServer', x=-321.50, y=71.00, z=212.59], EntitySheep['Sheep'/107, l='MpServer', x=-327.06, y=75.00, z=253.09], EntitySheep['Sheep'/104, l='MpServer', x=-331.31, y=70.00, z=207.25], EntitySheep['Sheep'/105, l='MpServer', x=-335.34, y=70.00, z=200.50], EntitySheep['Sheep'/119, l='MpServer', x=-308.38, y=74.00, z=211.19], EntitySheep['Sheep'/118, l='MpServer', x=-307.88, y=74.00, z=220.13], EntitySheep['Sheep'/117, l='MpServer', x=-317.34, y=74.00, z=195.56], EntityZombie['Zombie'/127, l='MpServer', x=-317.50, y=63.00, z=319.31], EntitySheep['Sheep'/126, l='MpServer', x=-308.13, y=76.00, z=292.09], EntityHorse['Horse'/125, l='MpServer', x=-316.66, y=77.00, z=281.66], EntitySheep['Sheep'/124, l='MpServer', x=-319.63, y=76.00, z=259.81], EntitySheep['Sheep'/123, l='MpServer', x=-306.75, y=72.00, z=241.31], EntitySheep['Sheep'/122, l='MpServer', x=-313.38, y=72.00, z=245.34], EntitySheep['Sheep'/121, l='MpServer', x=-313.59, y=72.00, z=239.22], EntitySheep['Sheep'/120, l='MpServer', x=-307.16, y=73.00, z=238.91], EntitySheep['Sheep'/139, l='MpServer', x=-301.47, y=75.00, z=213.34], EntitySheep['Sheep'/141, l='MpServer', x=-302.78, y=73.00, z=266.34], EntitySheep['Sheep'/140, l='MpServer', x=-303.34, y=72.00, z=246.38], EntityHorse['Horse'/143, l='MpServer', x=-289.66, y=73.00, z=265.60], EntitySheep['Sheep'/142, l='MpServer', x=-298.22, y=73.00, z=266.63], EntityItem['item.item.seeds'/152, l='MpServer', x=-288.97, y=72.13, z=317.41], EntityBat['Bat'/153, l='MpServer', x=-301.10, y=27.48, z=330.29], EntityHorse['Horse'/144, l='MpServer', x=-292.44, y=73.00, z=282.44], EntityHorse['Horse'/145, l='MpServer', x=-288.72, y=74.00, z=279.00], EntityHorse['Horse'/146, l='MpServer', x=-288.41, y=72.00, z=295.78], EntitySheep['Sheep'/147, l='MpServer', x=-297.38, y=73.00, z=289.78], EntityHorse['Horse'/148, l='MpServer', x=-290.19, y=73.00, z=289.19], EntitySkeleton['Skeleton'/149, l='MpServer', x=-288.53, y=42.00, z=306.97], EntityItem['item.item.seeds'/150, l='MpServer', x=-292.19, y=73.13, z=309.44], EntitySheep['Sheep'/151, l='MpServer', x=-301.28, y=73.00, z=306.50], EntitySheep['Sheep'/171, l='MpServer', x=-286.52, y=75.00, z=217.44], EntitySheep['Sheep'/170, l='MpServer', x=-275.09, y=72.00, z=206.03], EntityChicken['Chicken'/175, l='MpServer', x=-282.56, y=74.00, z=251.53], EntityChicken['Chicken'/174, l='MpServer', x=-284.56, y=74.00, z=234.16], EntityChicken['Chicken'/173, l='MpServer', x=-276.44, y=73.00, z=213.41], EntitySheep['Sheep'/172, l='MpServer', x=-285.78, y=74.00, z=222.59], EntityCreeper['Creeper'/187, l='MpServer', x=-263.00, y=26.00, z=216.53], EntitySheep['Sheep'/190, l='MpServer', x=-262.22, y=77.00, z=256.03], EntityZombie['Zombie'/188, l='MpServer', x=-260.91, y=35.00, z=215.47], EntitySheep['Sheep'/189, l='MpServer', x=-269.28, y=73.00, z=219.59], EntityClientPlayerMP['ForgeDevName'/421, l='MpServer', x=-293.49, y=74.62, z=262.99], EntitySkeleton['Skeleton'/205, l='MpServer', x=-254.69, y=23.92, z=214.47], EntityBat['Bat'/204, l='MpServer', x=-246.25, y=26.10, z=217.53], EntitySkeleton['Skeleton'/207, l='MpServer', x=-247.59, y=22.00, z=217.31], EntitySkeleton['Skeleton'/206, l='MpServer', x=-248.09, y=23.00, z=216.38], EntityCreeper['Creeper'/203, l='MpServer', x=-256.00, y=25.00, z=206.44], EntitySheep['Sheep'/220, l='MpServer', x=-244.53, y=77.00, z=277.47], EntityCreeper['Creeper'/216, l='MpServer', x=-252.50, y=49.00, z=272.50], EntityCreeper['Creeper'/217, l='MpServer', x=-251.66, y=49.00, z=272.63], EntitySheep['Sheep'/218, l='MpServer', x=-244.33, y=75.00, z=287.85], EntitySheep['Sheep'/219, l='MpServer', x=-244.53, y=77.00, z=277.47], EntitySkeleton['Skeleton'/212, l='MpServer', x=-242.88, y=19.00, z=259.38], EntityCreeper['Creeper'/213, l='MpServer', x=-251.97, y=49.00, z=269.56], EntitySheep['Sheep'/214, l='MpServer', x=-248.56, y=79.00, z=271.47], EntitySheep['Sheep'/215, l='MpServer', x=-253.56, y=80.00, z=261.81], EntityCreeper['Creeper'/208, l='MpServer', x=-245.53, y=23.00, z=216.84], EntityCreeper['Creeper'/209, l='MpServer', x=-248.28, y=21.00, z=255.06], EntitySheep['Sheep'/210, l='MpServer', x=-241.53, y=82.00, z=249.16], EntitySheep['Sheep'/211, l='MpServer', x=-241.53, y=81.00, z=246.13], EntitySheep['Sheep'/239, l='MpServer', x=-232.47, y=82.00, z=246.53], EntitySheep['Sheep'/238, l='MpServer', x=-233.53, y=82.00, z=245.47], EntityBat['Bat'/237, l='MpServer', x=-236.25, y=19.10, z=244.25], EntityBat['Bat'/236, l='MpServer', x=-230.19, y=23.96, z=235.25], EntityCreeper['Creeper'/235, l='MpServer', x=-228.66, y=22.00, z=219.31], EntityZombie['Zombie'/234, l='MpServer', x=-224.53, y=20.00, z=222.91], EntityBat['Bat'/233, l='MpServer', x=-224.84, y=22.10, z=214.91], EntityChicken['Chicken'/254, l='MpServer', x=-234.47, y=71.00, z=317.47], EntityZombie['Zombie'/255, l='MpServer', x=-228.09, y=27.00, z=322.41], EntityChicken['Chicken'/252, l='MpServer', x=-231.38, y=72.00, z=300.44], EntityZombie['Zombie'/253, l='MpServer', x=-234.97, y=17.00, z=318.44], EntitySheep['Sheep'/250, l='MpServer', x=-230.53, y=81.92, z=272.53], EntitySheep['Sheep'/251, l='MpServer', x=-236.97, y=74.00, z=296.97], EntityChicken['Chicken'/248, l='MpServer', x=-230.41, y=75.00, z=282.41], EntityChicken['Chicken'/249, l='MpServer', x=-236.56, y=75.00, z=281.53], EntitySheep['Sheep'/246, l='MpServer', x=-238.25, y=85.00, z=267.19], EntitySheep['Sheep'/247, l='MpServer', x=-234.94, y=76.00, z=278.69], EntityChicken['Chicken'/244, l='MpServer', x=-225.75, y=85.00, z=261.56], EntityChicken['Chicken'/245, l='MpServer', x=-235.47, y=86.00, z=265.47], EntityChicken['Chicken'/242, l='MpServer', x=-233.25, y=85.00, z=257.84], EntityChicken['Chicken'/243, l='MpServer', x=-231.53, y=87.00, z=269.59], EntitySheep['Sheep'/240, l='MpServer', x=-235.47, y=82.00, z=246.47], EntityCreeper['Creeper'/241, l='MpServer', x=-225.62, y=62.00, z=270.47]]

Retry entities: 0 total; []

Server brand: fml,forge

Server type: Integrated singleplayer server

Stacktrace:

at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:417)

at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2568)

at net.minecraft.client.Minecraft.run(Minecraft.java:982)

at net.minecraft.client.main.Main.main(Main.java:164)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at GradleStart.bounce(GradleStart.java:107)

at GradleStart.startClient(GradleStart.java:100)

at GradleStart.main(GradleStart.java:55)

 

 

Posted

It works! Thank you so much! I forgot to put the = new Random() at the end. By the way, you can't use player.getRNG() in that format because it's a random and it doesn't like to be used with floats.

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

    • Yes that’s the full log, I managed to get it working last night, the anvil fix mod is what was causing it to crash
    • Hey guys, i'm currently developping a mod with forge 1.12.2 2860 and i'm using optifine and gradle 4.9. The thing is i'm trying to figure out how to show the player's body in first person. So far everything's going well since i've try to use a shader. The player's body started to blink dark when using a shader. I've try a lot of shader like chocapic, zeus etc etc but still the same issue. So my question is : How should i apply the current shader to the body ? At the same time i'm also drawing a HUD so maybe it could be the problem?   Here is the issue :    And here is the code where i'm trying to display the body :    private static void renderFirstPersonBody(EntityPlayerSP player, float partialTicks) { Minecraft mc = Minecraft.getMinecraft(); GlStateManager.pushMatrix(); GlStateManager.pushAttrib(); try { // Préparation OpenGL GlStateManager.enableDepth(); GlStateManager.depthMask(true); GlStateManager.enableAlpha(); GlStateManager.alphaFunc(GL11.GL_GREATER, 0.1F); GlStateManager.enableBlend(); GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); // Éclairage correct pour shaders GlStateManager.enableLighting(); RenderHelper.enableStandardItemLighting(); GlStateManager.enableRescaleNormal(); // Active la lightmap pour les shaders mc.entityRenderer.enableLightmap(); // Position de rendu interpolée double px = player.lastTickPosX + (player.posX - player.lastTickPosX) * partialTicks; double py = player.lastTickPosY + (player.posY - player.lastTickPosY) * partialTicks; double pz = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * partialTicks; GlStateManager.translate( px - mc.getRenderManager().viewerPosX, py - mc.getRenderManager().viewerPosY, pz - mc.getRenderManager().viewerPosZ ); // Rendu du joueur sans la tête Render<?> render = mc.getRenderManager().getEntityRenderObject(player); if (render instanceof RenderPlayer) { RenderPlayer renderPlayer = (RenderPlayer) render; boolean oldHeadHidden = renderPlayer.getMainModel().bipedHead.isHidden; boolean oldHeadwearHidden = renderPlayer.getMainModel().bipedHeadwear.isHidden; renderPlayer.getMainModel().bipedHead.isHidden = true; renderPlayer.getMainModel().bipedHeadwear.isHidden = true; setArmorHeadVisibility(renderPlayer, false); renderPlayer.doRender(player, 0, 0, 0, player.rotationYaw, partialTicks); renderPlayer.getMainModel().bipedHead.isHidden = oldHeadHidden; renderPlayer.getMainModel().bipedHeadwear.isHidden = oldHeadwearHidden; setArmorHeadVisibility(renderPlayer, !oldHeadwearHidden); } // Nettoyage post rendu mc.entityRenderer.disableLightmap(); GlStateManager.disableRescaleNormal(); } catch (Exception e) { // silent fail } finally { GlStateManager.popAttrib(); GlStateManager.popMatrix(); } }   Ty for your help. 
    • Item successfully registered, but there was a problem with the texture of the item, it did not insert and has just the wrong texture.     
    • Keep on using the original Launcher Run Vanilla 1.12.2 once and close the game Download Optifine and run optifine as installer (click on the optifine jar) Start the launcher and make sure the Optifine profile is selected - then test it again  
    • Hi everyone, I’m hoping to revisit an old version of Minecraft — specifically around Beta 1.7.3 — for nostalgia’s sake. I’ve heard you can do this through the official Minecraft Launcher, but I’m unsure how to do it safely without affecting my current installation or save files. Are there any compatibility issues I should watch out for when switching between versions? Would really appreciate any tips or advice from anyone who’s done this before! – Adam
  • Topics

×
×
  • Create New...

Important Information

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