Jump to content

Recommended Posts

Posted

Hello all! I made a Tile Entity that gets the player in a 10 block radius, then gives the player a potion effect, but then this happens:

 

[09:34:20] [Client thread/FATAL]: Reported exception thrown!

net.minecraft.util.ReportedException: Ticking block entity

at net.minecraft.world.World.updateEntities(World.java:2175) ~[World.class:?]

at net.minecraft.client.Minecraft.runTick(Minecraft.java:2097) ~[Minecraft.class:?]

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

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

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

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_60]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_60]

at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_60]

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

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

at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]

at GradleStart.main(Unknown Source) [start/:?]

Caused by: java.lang.NullPointerException

at arekkuusu.grimoireOfAlice.client.tile.TileEntityHolyStone.updateEntity(TileEntityHolyStone.java:16) ~[TileEntityHolyStone.class:?]

at net.minecraft.world.World.updateEntities(World.java:2160) ~[World.class:?]

... 12 more

[09:34:20] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----

// On the bright side, I bought you a teddy bear!

 

Time: 29/05/16 09:34 AM

Description: Ticking block entity

 

java.lang.NullPointerException: Ticking block entity

at arekkuusu.grimoireOfAlice.client.tile.TileEntityHolyStone.updateEntity(TileEntityHolyStone.java:16)

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

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:962)

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:497)

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 arekkuusu.grimoireOfAlice.client.tile.TileEntityHolyStone.updateEntity(TileEntityHolyStone.java:16)

 

-- Block entity being ticked --

Details:

Name: HolyStone // arekkuusu.grimoireOfAlice.client.tile.TileEntityHolyStone

Block type: ID #177 (tile.HolyStone // arekkuusu.grimoireOfAlice.block.BlockHolyStone)

Block data value: 0 / 0x0 / 0b0000

Block location: World: (-397,4,-1155), Chunk: (at 3,0,13 in -25,-73; contains blocks -400,0,-1168 to -385,255,-1153), Region: (-1,-3; contains chunks -32,-96 to -1,-65, blocks -512,0,-1536 to -1,255,-1025)

Actual block type: ID #177 (tile.HolyStone // arekkuusu.grimoireOfAlice.block.BlockHolyStone)

Actual block data value: 0 / 0x0 / 0b0000

Stacktrace:

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

 

-- Affected level --

Details:

Level name: MpServer

All players: 1 total; [EntityClientPlayerMP['Player532'/364, l='MpServer', x=-397.72, y=5.62, z=-1145.12]]

Chunk stats: MultiplayerChunkCache: 169, 169

Level seed: 0

Level generator: ID 01 - flat, ver 0. Features enabled: false

Level generator options:

Level spawn location: World: (-430,4,-1154), Chunk: (at 2,0,14 in -27,-73; contains blocks -432,0,-1168 to -417,255,-1153), Region: (-1,-3; contains chunks -32,-96 to -1,-65, blocks -512,0,-1536 to -1,255,-1025)

Level time: 312931 game time, 25424 day time

Level dimension: 0

Level storage version: 0x00000 - Unknown?

Level weather: Rain time: 0 (now: true), thunder time: 0 (now: false)

Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false

Forced entities: 93 total; [EntityCow['Cow'/257, l='MpServer', x=-388.88, y=4.00, z=-1197.03], EntityCow['Cow'/258, l='MpServer', x=-377.31, y=4.00, z=-1195.75], EntityHorse['Horse'/259, l='MpServer', x=-375.88, y=4.00, z=-1192.00], EntityChicken['Chicken'/261, l='MpServer', x=-370.56, y=4.00, z=-1119.44], EntityPig['Pig'/288, l='MpServer', x=-361.88, y=4.00, z=-1210.41], EntityChicken['Chicken'/289, l='MpServer', x=-365.75, y=4.00, z=-1204.47], EntitySlime['Slime'/290, l='MpServer', x=-329.24, y=4.00, z=-1155.10], EntityCow['Cow'/291, l='MpServer', x=-354.31, y=4.00, z=-1078.78], EntityChicken['Chicken'/308, l='MpServer', x=-344.66, y=4.00, z=-1200.41], EntitySlime['Slime'/309, l='MpServer', x=-356.14, y=4.69, z=-1107.39], EntitySheep['Sheep'/310, l='MpServer', x=-346.81, y=4.00, z=-1148.31], EntityCow['Cow'/311, l='MpServer', x=-346.69, y=4.00, z=-1079.75], EntitySlime['Slime'/317, l='MpServer', x=-369.69, y=4.00, z=-1213.13], EntityItem['item.tile.dirt.default'/122684, l='MpServer', x=-396.78, y=3.13, z=-1154.69], EntitySlime['Slime'/318, l='MpServer', x=-362.25, y=4.00, z=-1218.44], EntitySlime['Slime'/120, l='MpServer', x=-425.90, y=4.00, z=-1218.50], EntityChicken['Chicken'/122, l='MpServer', x=-465.22, y=4.00, z=-1190.78], EntityHorse['Horse'/129, l='MpServer', x=-458.00, y=4.00, z=-1182.94], EntitySlime['Slime'/130, l='MpServer', x=-455.68, y=4.32, z=-1182.78], EntitySlime['Slime'/131, l='MpServer', x=-450.69, y=1.69, z=-1107.31], EntitySlime['Slime'/132, l='MpServer', x=-455.22, y=2.00, z=-1098.78], EntitySlime['Slime'/134, l='MpServer', x=-445.38, y=1.00, z=-1105.40], EntitySlime['Slime'/149637, l='MpServer', x=-434.50, y=4.00, z=-1067.50], EntitySlime['Slime'/138, l='MpServer', x=-398.70, y=4.82, z=-1222.38], EntityCow['Cow'/140, l='MpServer', x=-438.56, y=4.00, z=-1213.22], EntityClientPlayerMP['Player532'/364, l='MpServer', x=-397.72, y=5.62, z=-1145.12], EntitySlime['Slime'/141, l='MpServer', x=-440.63, y=2.00, z=-1164.63], EntitySlime['Slime'/142, l='MpServer', x=-443.65, y=1.47, z=-1140.63], EntityItem['item.tile.dirt.default'/143, l='MpServer', x=-434.91, y=1.13, z=-1138.69], EntityItem['item.tile.dirt.default'/144, l='MpServer', x=-432.16, y=1.13, z=-1140.31], EntityItem['item.tile.dirt.default'/145, l='MpServer', x=-432.59, y=2.13, z=-1140.97], EntityItem['item.tile.dirt.default'/146, l='MpServer', x=-433.91, y=2.13, z=-1139.34], EntityItem['item.tile.dirt.default'/147, l='MpServer', x=-432.47, y=2.13, z=-1143.13], EntityItem['item.tile.dirt.default'/148, l='MpServer', x=-445.13, y=1.13, z=-1120.19], EntityItem['item.tile.dirt.default'/149, l='MpServer', x=-444.47, y=1.13, z=-1121.13], EntityItem['item.tile.dirt.default'/150, l='MpServer', x=-447.94, y=1.13, z=-1120.88], EntityItem['item.tile.dirt.default'/151, l='MpServer', x=-446.69, y=2.13, z=-1121.19], EntitySlime['Slime'/152, l='MpServer', x=-439.60, y=1.00, z=-1105.40], EntitySlime['Slime'/153, l='MpServer', x=-444.22, y=1.00, z=-1104.80], EntitySlime['Slime'/154, l='MpServer', x=-445.38, y=1.00, z=-1105.40], EntitySlime['Slime'/155, l='MpServer', x=-435.22, y=2.00, z=-1113.22], EntityItem['item.tile.dirt.default'/156, l='MpServer', x=-443.84, y=1.13, z=-1118.97], EntityItem['item.tile.dirt.default'/157, l='MpServer', x=-436.53, y=1.13, z=-1112.25], EntityItem['item.tile.dirt.default'/158, l='MpServer', x=-435.13, y=1.13, z=-1111.69], EntitySlime['Slime'/159, l='MpServer', x=-435.60, y=1.00, z=-1097.40], EntityChicken['Chicken'/173, l='MpServer', x=-418.59, y=4.00, z=-1200.44], EntityCreeper['Creeper'/174, l='MpServer', x=-429.78, y=4.00, z=-1191.28], EntitySlime['Slime'/175, l='MpServer', x=-472.45, y=4.47, z=-1191.39], EntitySlime['Slime'/176, l='MpServer', x=-421.63, y=1.15, z=-1159.63], EntityItem['item.tile.dirt.default'/177, l='MpServer', x=-430.56, y=2.13, z=-1139.53], EntityItem['item.tile.dirt.default'/178, l='MpServer', x=-431.13, y=1.13, z=-1139.91], EntityItem['item.tile.dirt.default'/179, l='MpServer', x=-431.81, y=2.13, z=-1145.22], EntityItem['item.tile.dirt.default'/180, l='MpServer', x=-429.94, y=2.13, z=-1144.63], EntityItem['item.tile.dirt.default'/181, l='MpServer', x=-429.53, y=2.13, z=-1143.13], EntityItem['item.tile.dirt.default'/182, l='MpServer', x=-431.34, y=1.13, z=-1143.94], EntityItem['item.item.spiderEye'/183, l='MpServer', x=-421.78, y=3.13, z=-1124.78], EntityXPOrb['Experience Orb'/184, l='MpServer', x=-419.25, y=3.25, z=-1123.75], EntityXPOrb['Experience Orb'/185, l='MpServer', x=-421.19, y=3.25, z=-1122.75], EntitySlime['Slime'/186, l='MpServer', x=-418.63, y=2.60, z=-1091.38], EntitySlime['Slime'/187, l='MpServer', x=-418.63, y=2.00, z=-1087.38], EntitySlime['Slime'/199, l='MpServer', x=-423.50, y=4.00, z=-1189.43], EntitySheep['Sheep'/200, l='MpServer', x=-404.75, y=4.00, z=-1210.16], EntityItem['item.tile.dirt.default'/201, l='MpServer', x=-401.72, y=1.13, z=-1164.31], EntityItem['item.tile.dirt.default'/202, l='MpServer', x=-408.88, y=2.13, z=-1122.44], EntityItem['item.tile.dirt.default'/203, l='MpServer', x=-406.81, y=2.13, z=-1124.47], EntityItem['item.tile.dirt.default'/204, l='MpServer', x=-407.28, y=2.13, z=-1121.13], EntityItem['item.tile.dirt.default'/205, l='MpServer', x=-408.69, y=2.13, z=-1123.88], EntityItem['item.tile.dirt.default'/206, l='MpServer', x=-406.06, y=2.13, z=-1122.13], EntityItem['item.tile.dirt.default'/207, l='MpServer', x=-407.69, y=1.13, z=-1123.47], EntityItem['item.tile.dirt.default'/208, l='MpServer', x=-414.34, y=2.13, z=-1115.91], EntityItem['item.tile.dirt.default'/209, l='MpServer', x=-413.69, y=2.13, z=-1118.88], EntityItem['item.tile.dirt.default'/210, l='MpServer', x=-411.13, y=1.13, z=-1118.88], EntityItem['item.tile.dirt.default'/211, l='MpServer', x=-412.78, y=1.13, z=-1118.88], EntityItem['item.tile.dirt.default'/212, l='MpServer', x=-411.13, y=1.13, z=-1117.63], EntityItem['item.tile.dirt.default'/213, l='MpServer', x=-411.13, y=2.13, z=-1116.13], EntityItem['item.tile.dirt.default'/214, l='MpServer', x=-412.09, y=2.13, z=-1118.94], EntityItem['item.tile.dirt.default'/215, l='MpServer', x=-412.34, y=1.13, z=-1116.88], EntityItem['item.tile.dirt.default'/216, l='MpServer', x=-414.88, y=1.13, z=-1117.13], EntityItem['item.tile.dirt.default'/217, l='MpServer', x=-413.81, y=1.13, z=-1117.31], EntityItem['item.tile.dirt.default'/218, l='MpServer', x=-410.13, y=2.13, z=-1118.72], EntityItem['item.tile.dirt.default'/219, l='MpServer', x=-412.09, y=2.13, z=-1119.78], EntitySlime['Slime'/220, l='MpServer', x=-414.30, y=1.00, z=-1087.69], EntitySlime['Slime'/221, l='MpServer', x=-415.70, y=1.00, z=-1087.69], EntityItem['item.item.slimeball'/38621, l='MpServer', x=-451.91, y=1.13, z=-1110.22], EntitySlime['Slime'/222, l='MpServer', x=-414.90, y=2.13, z=-1087.69], EntitySlime['Slime'/223, l='MpServer', x=-414.30, y=1.76, z=-1087.69], EntitySlime['Slime'/235, l='MpServer', x=-382.37, y=4.60, z=-1162.16], EntityItem['item.tile.dirt.default'/236, l='MpServer', x=-399.13, y=1.13, z=-1161.16], EntityItem['item.tile.dirt.default'/237, l='MpServer', x=-399.72, y=1.13, z=-1162.06], EntitySlime['Slime'/238, l='MpServer', x=-395.38, y=1.00, z=-1128.38], EntitySlime['Slime'/239, l='MpServer', x=-393.84, y=1.00, z=-1128.38], EntitySlime['Slime'/240, l='MpServer', x=-396.63, y=2.00, z=-1127.69], EntitySlime['Slime'/241, l='MpServer', x=-399.38, y=2.00, z=-1083.38]]

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:2566)

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

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:497)

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)

 

 

Im using this code:

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;

public class TileEntityHolyStone extends TileEntity{

@Override
public void updateEntity(){

	boolean isRain = worldObj.isRaining();
	if(isRain && worldObj.isRemote){
		EntityPlayer player = this.worldObj.getClosestPlayer(this.xCoord, this.yCoord, this.zCoord, 10);
		player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 42, 0));
	}
}
}

Thanks! X3

 

Aya Shamelessmaru at your service

Posted

Hello all! I made a Tile Entity that gets the player in a 10 block radius, then gives the player a potion effect, but then this happens:

 

[09:34:20] [Client thread/FATAL]: Reported exception thrown!

net.minecraft.util.ReportedException: Ticking block entity

at net.minecraft.world.World.updateEntities(World.java:2175) ~[World.class:?]

at net.minecraft.client.Minecraft.runTick(Minecraft.java:2097) ~[Minecraft.class:?]

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

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

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

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_60]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_60]

at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_60]

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

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

at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]

at GradleStart.main(Unknown Source) [start/:?]

Caused by: java.lang.NullPointerException

at arekkuusu.grimoireOfAlice.client.tile.TileEntityHolyStone.updateEntity(TileEntityHolyStone.java:16) ~[TileEntityHolyStone.class:?]

at net.minecraft.world.World.updateEntities(World.java:2160) ~[World.class:?]

... 12 more

[09:34:20] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----

// On the bright side, I bought you a teddy bear!

 

Time: 29/05/16 09:34 AM

Description: Ticking block entity

 

java.lang.NullPointerException: Ticking block entity

at arekkuusu.grimoireOfAlice.client.tile.TileEntityHolyStone.updateEntity(TileEntityHolyStone.java:16)

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

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:962)

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:497)

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 arekkuusu.grimoireOfAlice.client.tile.TileEntityHolyStone.updateEntity(TileEntityHolyStone.java:16)

 

-- Block entity being ticked --

Details:

Name: HolyStone // arekkuusu.grimoireOfAlice.client.tile.TileEntityHolyStone

Block type: ID #177 (tile.HolyStone // arekkuusu.grimoireOfAlice.block.BlockHolyStone)

Block data value: 0 / 0x0 / 0b0000

Block location: World: (-397,4,-1155), Chunk: (at 3,0,13 in -25,-73; contains blocks -400,0,-1168 to -385,255,-1153), Region: (-1,-3; contains chunks -32,-96 to -1,-65, blocks -512,0,-1536 to -1,255,-1025)

Actual block type: ID #177 (tile.HolyStone // arekkuusu.grimoireOfAlice.block.BlockHolyStone)

Actual block data value: 0 / 0x0 / 0b0000

Stacktrace:

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

 

-- Affected level --

Details:

Level name: MpServer

All players: 1 total; [EntityClientPlayerMP['Player532'/364, l='MpServer', x=-397.72, y=5.62, z=-1145.12]]

Chunk stats: MultiplayerChunkCache: 169, 169

Level seed: 0

Level generator: ID 01 - flat, ver 0. Features enabled: false

Level generator options:

Level spawn location: World: (-430,4,-1154), Chunk: (at 2,0,14 in -27,-73; contains blocks -432,0,-1168 to -417,255,-1153), Region: (-1,-3; contains chunks -32,-96 to -1,-65, blocks -512,0,-1536 to -1,255,-1025)

Level time: 312931 game time, 25424 day time

Level dimension: 0

Level storage version: 0x00000 - Unknown?

Level weather: Rain time: 0 (now: true), thunder time: 0 (now: false)

Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false

Forced entities: 93 total; [EntityCow['Cow'/257, l='MpServer', x=-388.88, y=4.00, z=-1197.03], EntityCow['Cow'/258, l='MpServer', x=-377.31, y=4.00, z=-1195.75], EntityHorse['Horse'/259, l='MpServer', x=-375.88, y=4.00, z=-1192.00], EntityChicken['Chicken'/261, l='MpServer', x=-370.56, y=4.00, z=-1119.44], EntityPig['Pig'/288, l='MpServer', x=-361.88, y=4.00, z=-1210.41], EntityChicken['Chicken'/289, l='MpServer', x=-365.75, y=4.00, z=-1204.47], EntitySlime['Slime'/290, l='MpServer', x=-329.24, y=4.00, z=-1155.10], EntityCow['Cow'/291, l='MpServer', x=-354.31, y=4.00, z=-1078.78], EntityChicken['Chicken'/308, l='MpServer', x=-344.66, y=4.00, z=-1200.41], EntitySlime['Slime'/309, l='MpServer', x=-356.14, y=4.69, z=-1107.39], EntitySheep['Sheep'/310, l='MpServer', x=-346.81, y=4.00, z=-1148.31], EntityCow['Cow'/311, l='MpServer', x=-346.69, y=4.00, z=-1079.75], EntitySlime['Slime'/317, l='MpServer', x=-369.69, y=4.00, z=-1213.13], EntityItem['item.tile.dirt.default'/122684, l='MpServer', x=-396.78, y=3.13, z=-1154.69], EntitySlime['Slime'/318, l='MpServer', x=-362.25, y=4.00, z=-1218.44], EntitySlime['Slime'/120, l='MpServer', x=-425.90, y=4.00, z=-1218.50], EntityChicken['Chicken'/122, l='MpServer', x=-465.22, y=4.00, z=-1190.78], EntityHorse['Horse'/129, l='MpServer', x=-458.00, y=4.00, z=-1182.94], EntitySlime['Slime'/130, l='MpServer', x=-455.68, y=4.32, z=-1182.78], EntitySlime['Slime'/131, l='MpServer', x=-450.69, y=1.69, z=-1107.31], EntitySlime['Slime'/132, l='MpServer', x=-455.22, y=2.00, z=-1098.78], EntitySlime['Slime'/134, l='MpServer', x=-445.38, y=1.00, z=-1105.40], EntitySlime['Slime'/149637, l='MpServer', x=-434.50, y=4.00, z=-1067.50], EntitySlime['Slime'/138, l='MpServer', x=-398.70, y=4.82, z=-1222.38], EntityCow['Cow'/140, l='MpServer', x=-438.56, y=4.00, z=-1213.22], EntityClientPlayerMP['Player532'/364, l='MpServer', x=-397.72, y=5.62, z=-1145.12], EntitySlime['Slime'/141, l='MpServer', x=-440.63, y=2.00, z=-1164.63], EntitySlime['Slime'/142, l='MpServer', x=-443.65, y=1.47, z=-1140.63], EntityItem['item.tile.dirt.default'/143, l='MpServer', x=-434.91, y=1.13, z=-1138.69], EntityItem['item.tile.dirt.default'/144, l='MpServer', x=-432.16, y=1.13, z=-1140.31], EntityItem['item.tile.dirt.default'/145, l='MpServer', x=-432.59, y=2.13, z=-1140.97], EntityItem['item.tile.dirt.default'/146, l='MpServer', x=-433.91, y=2.13, z=-1139.34], EntityItem['item.tile.dirt.default'/147, l='MpServer', x=-432.47, y=2.13, z=-1143.13], EntityItem['item.tile.dirt.default'/148, l='MpServer', x=-445.13, y=1.13, z=-1120.19], EntityItem['item.tile.dirt.default'/149, l='MpServer', x=-444.47, y=1.13, z=-1121.13], EntityItem['item.tile.dirt.default'/150, l='MpServer', x=-447.94, y=1.13, z=-1120.88], EntityItem['item.tile.dirt.default'/151, l='MpServer', x=-446.69, y=2.13, z=-1121.19], EntitySlime['Slime'/152, l='MpServer', x=-439.60, y=1.00, z=-1105.40], EntitySlime['Slime'/153, l='MpServer', x=-444.22, y=1.00, z=-1104.80], EntitySlime['Slime'/154, l='MpServer', x=-445.38, y=1.00, z=-1105.40], EntitySlime['Slime'/155, l='MpServer', x=-435.22, y=2.00, z=-1113.22], EntityItem['item.tile.dirt.default'/156, l='MpServer', x=-443.84, y=1.13, z=-1118.97], EntityItem['item.tile.dirt.default'/157, l='MpServer', x=-436.53, y=1.13, z=-1112.25], EntityItem['item.tile.dirt.default'/158, l='MpServer', x=-435.13, y=1.13, z=-1111.69], EntitySlime['Slime'/159, l='MpServer', x=-435.60, y=1.00, z=-1097.40], EntityChicken['Chicken'/173, l='MpServer', x=-418.59, y=4.00, z=-1200.44], EntityCreeper['Creeper'/174, l='MpServer', x=-429.78, y=4.00, z=-1191.28], EntitySlime['Slime'/175, l='MpServer', x=-472.45, y=4.47, z=-1191.39], EntitySlime['Slime'/176, l='MpServer', x=-421.63, y=1.15, z=-1159.63], EntityItem['item.tile.dirt.default'/177, l='MpServer', x=-430.56, y=2.13, z=-1139.53], EntityItem['item.tile.dirt.default'/178, l='MpServer', x=-431.13, y=1.13, z=-1139.91], EntityItem['item.tile.dirt.default'/179, l='MpServer', x=-431.81, y=2.13, z=-1145.22], EntityItem['item.tile.dirt.default'/180, l='MpServer', x=-429.94, y=2.13, z=-1144.63], EntityItem['item.tile.dirt.default'/181, l='MpServer', x=-429.53, y=2.13, z=-1143.13], EntityItem['item.tile.dirt.default'/182, l='MpServer', x=-431.34, y=1.13, z=-1143.94], EntityItem['item.item.spiderEye'/183, l='MpServer', x=-421.78, y=3.13, z=-1124.78], EntityXPOrb['Experience Orb'/184, l='MpServer', x=-419.25, y=3.25, z=-1123.75], EntityXPOrb['Experience Orb'/185, l='MpServer', x=-421.19, y=3.25, z=-1122.75], EntitySlime['Slime'/186, l='MpServer', x=-418.63, y=2.60, z=-1091.38], EntitySlime['Slime'/187, l='MpServer', x=-418.63, y=2.00, z=-1087.38], EntitySlime['Slime'/199, l='MpServer', x=-423.50, y=4.00, z=-1189.43], EntitySheep['Sheep'/200, l='MpServer', x=-404.75, y=4.00, z=-1210.16], EntityItem['item.tile.dirt.default'/201, l='MpServer', x=-401.72, y=1.13, z=-1164.31], EntityItem['item.tile.dirt.default'/202, l='MpServer', x=-408.88, y=2.13, z=-1122.44], EntityItem['item.tile.dirt.default'/203, l='MpServer', x=-406.81, y=2.13, z=-1124.47], EntityItem['item.tile.dirt.default'/204, l='MpServer', x=-407.28, y=2.13, z=-1121.13], EntityItem['item.tile.dirt.default'/205, l='MpServer', x=-408.69, y=2.13, z=-1123.88], EntityItem['item.tile.dirt.default'/206, l='MpServer', x=-406.06, y=2.13, z=-1122.13], EntityItem['item.tile.dirt.default'/207, l='MpServer', x=-407.69, y=1.13, z=-1123.47], EntityItem['item.tile.dirt.default'/208, l='MpServer', x=-414.34, y=2.13, z=-1115.91], EntityItem['item.tile.dirt.default'/209, l='MpServer', x=-413.69, y=2.13, z=-1118.88], EntityItem['item.tile.dirt.default'/210, l='MpServer', x=-411.13, y=1.13, z=-1118.88], EntityItem['item.tile.dirt.default'/211, l='MpServer', x=-412.78, y=1.13, z=-1118.88], EntityItem['item.tile.dirt.default'/212, l='MpServer', x=-411.13, y=1.13, z=-1117.63], EntityItem['item.tile.dirt.default'/213, l='MpServer', x=-411.13, y=2.13, z=-1116.13], EntityItem['item.tile.dirt.default'/214, l='MpServer', x=-412.09, y=2.13, z=-1118.94], EntityItem['item.tile.dirt.default'/215, l='MpServer', x=-412.34, y=1.13, z=-1116.88], EntityItem['item.tile.dirt.default'/216, l='MpServer', x=-414.88, y=1.13, z=-1117.13], EntityItem['item.tile.dirt.default'/217, l='MpServer', x=-413.81, y=1.13, z=-1117.31], EntityItem['item.tile.dirt.default'/218, l='MpServer', x=-410.13, y=2.13, z=-1118.72], EntityItem['item.tile.dirt.default'/219, l='MpServer', x=-412.09, y=2.13, z=-1119.78], EntitySlime['Slime'/220, l='MpServer', x=-414.30, y=1.00, z=-1087.69], EntitySlime['Slime'/221, l='MpServer', x=-415.70, y=1.00, z=-1087.69], EntityItem['item.item.slimeball'/38621, l='MpServer', x=-451.91, y=1.13, z=-1110.22], EntitySlime['Slime'/222, l='MpServer', x=-414.90, y=2.13, z=-1087.69], EntitySlime['Slime'/223, l='MpServer', x=-414.30, y=1.76, z=-1087.69], EntitySlime['Slime'/235, l='MpServer', x=-382.37, y=4.60, z=-1162.16], EntityItem['item.tile.dirt.default'/236, l='MpServer', x=-399.13, y=1.13, z=-1161.16], EntityItem['item.tile.dirt.default'/237, l='MpServer', x=-399.72, y=1.13, z=-1162.06], EntitySlime['Slime'/238, l='MpServer', x=-395.38, y=1.00, z=-1128.38], EntitySlime['Slime'/239, l='MpServer', x=-393.84, y=1.00, z=-1128.38], EntitySlime['Slime'/240, l='MpServer', x=-396.63, y=2.00, z=-1127.69], EntitySlime['Slime'/241, l='MpServer', x=-399.38, y=2.00, z=-1083.38]]

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:2566)

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

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:497)

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)

 

 

Im using this code:

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;

public class TileEntityHolyStone extends TileEntity{

@Override
public void updateEntity(){

	boolean isRain = worldObj.isRaining();
	if(isRain && worldObj.isRemote){
		EntityPlayer player = this.worldObj.getClosestPlayer(this.xCoord, this.yCoord, this.zCoord, 10);
		player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 42, 0));
	}
}
}

Thanks! X3

 

Aya Shamelessmaru at your service

Posted

Read the stacktrace, something was

null

on line 16 of

TileEntityHolyStone

.

 

If you can't figure out what was

null

, set a breakpoint in the method and step through it in a debugger.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Read the stacktrace, something was

null

on line 16 of

TileEntityHolyStone

.

 

If you can't figure out what was

null

, set a breakpoint in the method and step through it in a debugger.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Or more generally:

 

"Golly gee willackers, what happens if there are no players near it?"

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Or more generally:

 

"Golly gee willackers, what happens if there are no players near it?"

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Alright lol, I fixed it thank you all.  :blank:

This is the result, but now the block is more annoying than a talking orange:

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;

public class TileEntityHolyStone extends TileEntity{

public boolean anyPlayerInRange(){
	boolean isRain = worldObj.isRaining();
	if(isRain){
		EntityPlayer player = this.worldObj.getClosestPlayer(this.xCoord, this.yCoord, this.zCoord, 10);
		if(player!=null){
			player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 42, 0));
			}
		else {
			System.out.println("Om Om Nom, No players close");
			}
		return true;
	} else {
		return false;
		}
}

    public void updateEntity() {
        if (this.anyPlayerInRange()) {
            if (this.worldObj.isRemote) {
                double yus1 = (double)((float)this.xCoord + this.worldObj.rand.nextFloat());
                double yus3 = (double)((float)this.yCoord + this.worldObj.rand.nextFloat());
                double yus5 = (double)((float)this.zCoord + this.worldObj.rand.nextFloat());
                this.worldObj.spawnParticle("smoke", yus1, yus3, yus5, 0.0D, 0.0D, 0.0D);
                this.worldObj.spawnParticle("flame", yus1, yus3, yus5, 0.0D, 0.0D, 0.0D);
            	}
            }
        }
}

Aya Shamelessmaru at your service

Posted

Alright lol, I fixed it thank you all.  :blank:

This is the result, but now the block is more annoying than a talking orange:

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;

public class TileEntityHolyStone extends TileEntity{

public boolean anyPlayerInRange(){
	boolean isRain = worldObj.isRaining();
	if(isRain){
		EntityPlayer player = this.worldObj.getClosestPlayer(this.xCoord, this.yCoord, this.zCoord, 10);
		if(player!=null){
			player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 42, 0));
			}
		else {
			System.out.println("Om Om Nom, No players close");
			}
		return true;
	} else {
		return false;
		}
}

    public void updateEntity() {
        if (this.anyPlayerInRange()) {
            if (this.worldObj.isRemote) {
                double yus1 = (double)((float)this.xCoord + this.worldObj.rand.nextFloat());
                double yus3 = (double)((float)this.yCoord + this.worldObj.rand.nextFloat());
                double yus5 = (double)((float)this.zCoord + this.worldObj.rand.nextFloat());
                this.worldObj.spawnParticle("smoke", yus1, yus3, yus5, 0.0D, 0.0D, 0.0D);
                this.worldObj.spawnParticle("flame", yus1, yus3, yus5, 0.0D, 0.0D, 0.0D);
            	}
            }
        }
}

Aya Shamelessmaru at your service

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



×
×
  • Create New...

Important Information

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