Awsome Posted August 2, 2020 Posted August 2, 2020 I have a tile entity that has a capability that checks what biome the tile entity is in, but the game crashes when I place the tile entity. Here is the crash report: ---- Minecraft Crash Report ---- // I let you down. Sorry :( Time: 8/2/20 12:18 PM Description: Unexpected error java.lang.NullPointerException: Unexpected error at awsome.techmod.api.capability.impl.HeatHandler.getBaseTempBasedOnBiome(HeatHandler.java:125) ~[main/:?] {re:classloading} at awsome.techmod.api.capability.impl.HeatHandler.<init>(HeatHandler.java:28) ~[main/:?] {re:classloading} at awsome.techmod.tileentity.TEFirebox.<init>(TEFirebox.java:30) ~[main/:?] {re:classloading} at awsome.techmod.blocks.BlockFirebox.createTileEntity(BlockFirebox.java:44) ~[main/:?] {re:classloading} at net.minecraftforge.common.extensions.IForgeBlockState.createTileEntity(IForgeBlockState.java:130) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading} at net.minecraft.world.chunk.Chunk.setBlockState(Chunk.java:293) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading} at net.minecraft.world.World.setBlockState(World.java:209) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.item.BlockItem.placeBlock(BlockItem.java:149) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading} at net.minecraft.item.BlockItem.tryPlace(BlockItem.java:57) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading} at net.minecraft.item.BlockItem.onItemUse(BlockItem.java:42) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading} at net.minecraft.item.ItemStack.lambda$onItemUse$0(ItemStack.java:174) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading} at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:189) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading} at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:174) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading} at net.minecraft.client.multiplayer.PlayerController.func_217292_a(PlayerController.java:318) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1333) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:1600) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.runTick(Minecraft.java:1433) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:941) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.run(Minecraft.java:558) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:177) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162] {} at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162] {} at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162] {} at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162] {} at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.1.2.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.1.2.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.1.2.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.1.2.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.1.2.jar:?] {} at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace: at awsome.techmod.api.capability.impl.HeatHandler.getBaseTempBasedOnBiome(HeatHandler.java:125) at awsome.techmod.api.capability.impl.HeatHandler.<init>(HeatHandler.java:28) at awsome.techmod.tileentity.TEFirebox.<init>(TEFirebox.java:30) at awsome.techmod.blocks.BlockFirebox.createTileEntity(BlockFirebox.java:44) at net.minecraftforge.common.extensions.IForgeBlockState.createTileEntity(IForgeBlockState.java:130) at net.minecraft.world.chunk.Chunk.setBlockState(Chunk.java:293) at net.minecraft.world.World.setBlockState(World.java:209) at net.minecraft.item.BlockItem.placeBlock(BlockItem.java:149) at net.minecraft.item.BlockItem.tryPlace(BlockItem.java:57) at net.minecraft.item.BlockItem.onItemUse(BlockItem.java:42) at net.minecraft.item.ItemStack.lambda$onItemUse$0(ItemStack.java:174) at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:189) at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:174) at net.minecraft.client.multiplayer.PlayerController.func_217292_a(PlayerController.java:318) at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1333) at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:1600) -- Affected level -- Details: All players: 1 total; [ClientPlayerEntity['Awsomekeldeo'/25, l='MpServer', x=8.50, y=54.00, z=8.50]] Chunk stats: Client Chunk Cache: 841, 529 Level dimension: DimensionType{minecraft:overworld} Level name: MpServer Level seed: 2721498909152078286 Level generator: ID 01 - flat, ver 0. Features enabled: false Level generator options: {} Level spawn location: World: (8,53,8), Chunk: (at 8,3,8 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 69701 game time, 69701 day time Known server brands: Level was modded: false Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: true), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Server brand: forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.world.ClientWorld.fillCrashReport(ClientWorld.java:457) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:1839) at net.minecraft.client.Minecraft.run(Minecraft.java:577) at net.minecraft.client.main.Main.main(Main.java:177) 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.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) -- System Details -- Details: Minecraft Version: 1.15.2 Minecraft Version ID: 1.15.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_162, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 551957936 bytes (526 MB) / 1136656384 bytes (1084 MB) up to 1908932608 bytes (1820 MB) CPUs: 2 JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump ModLauncher: 5.1.2+70+master.2845bb9 ModLauncher launch target: fmluserdevclient ModLauncher naming: mcp ModLauncher services: /eventbus-2.2.0-service.jar eventbus PLUGINSERVICE /forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-launcher.jar object_holder_definalize PLUGINSERVICE /forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-launcher.jar runtime_enum_extender PLUGINSERVICE /accesstransformers-2.1.3-shadowed.jar accesstransformer PLUGINSERVICE /forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-launcher.jar capability_inject_definalize PLUGINSERVICE /forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-launcher.jar runtimedistcleaner PLUGINSERVICE /forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-launcher.jar fml TRANSFORMATIONSERVICE FML: 31.2 Forge: net.minecraftforge:31.2.31 FML Language Providers: [email protected] minecraft@1 Mod List: client-extra.jar Minecraft {[email protected] DONE} forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar Forge {[email protected] DONE} main Untitled Tech Mod {[email protected] DONE} Launched Version: MOD_DEV Backend library: LWJGL version 3.2.2 build 10 Backend API: GeForce GTX 1050/PCIe/SSE2 GL version 4.6.0 NVIDIA 451.67, NVIDIA Corporation GL Caps: Using framebuffer using OpenGL 3.0 Using VBOs: Yes Is Modded: Definitely; Client brand changed to 'forge' Type: Client (map_client.txt) Resource Packs: vanilla, mod_resources, file/§9[§5§lTMoTF§9] §f- §eResource Pack§2 v1.03 (incompatible) Current Language: English (US) CPU: 2x Pentium(R) Dual-Core CPU E5700 @ 3.00GHz Links to my source: Capability: Interface: https://github.com/Awsomekeldeo/TechMod/blob/master/src/main/java/awsome/techmod/api/capability/energy/IHeat.java Registration: https://github.com/Awsomekeldeo/TechMod/blob/master/src/main/java/awsome/techmod/api/capability/energy/CapabilityHeat.java Default Implementation (where the call to world.getBiome is): https://github.com/Awsomekeldeo/TechMod/blob/master/src/main/java/awsome/techmod/api/capability/impl/HeatHandler.java TileEntity: https://github.com/Awsomekeldeo/TechMod/blob/master/src/main/java/awsome/techmod/tileentity/TEFirebox.java Quote
Awsome Posted August 2, 2020 Author Posted August 2, 2020 (edited) nope, i added a check for if world.getBiome() is null and it still crashes Updated Default Implementation: package awsome.techmod.api.capability.impl; import awsome.techmod.api.capability.energy.CapabilityHeat; import awsome.techmod.api.capability.energy.IHeat; import awsome.techmod.util.MathUtil; import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos.PooledMutable; import net.minecraft.world.World; import net.minecraft.world.biome.Biome; import net.minecraftforge.common.util.INBTSerializable; import net.minecraftforge.common.util.LazyOptional; public class HeatHandler implements IHeat, INBTSerializable<CompoundNBT> { public TileEntity te; public float temperature = 0; public float maxTemperature; public boolean canCool; public boolean transmitsHeat; public HeatHandler(TileEntity te, float maxTemp, boolean canTransmitHeat) { this.te = te; this.maxTemperature = maxTemp; this.transmitsHeat = canTransmitHeat; this.temperature = getBaseTempBasedOnBiome(this.te.getPos()); } public HeatHandler heatProducer(TileEntity te, float maxTemp) { return new HeatHandler(te, maxTemp, true); } public HeatHandler heatConsumer(TileEntity te, float maxTemp) { return new HeatHandler(te, maxTemp, false); } public void setTemp(float temp) { if (temp < getBaseTempBasedOnBiome(this.te.getPos()) && !canCool ) { this.temperature = getBaseTempBasedOnBiome(te.getPos()); }else{ this.temperature = MathUtil.roundFloat(temp, 2); } } @Override public float getTemperature() { if (this.temperature < getBaseTempBasedOnBiome(this.te.getPos()) && !canCool) { return getBaseTempBasedOnBiome(te.getPos()); }else{ return MathUtil.roundFloat(this.temperature, 2); } } @Override public float getMaxTemperature() { return this.maxTemperature; } @Override public float changeTemp(float amount) { float oldTemp = this.getTemperature(); float newTemp = (maxTemperature - oldTemp < amount) ? maxTemperature : (oldTemp + amount); setTemp(newTemp); return newTemp - oldTemp; } @Override public boolean getInCoolingMode() { return false; } @Override public float drawHeatFromSide(BlockPos pos, Direction side) { if (!pos.equals(BlockPos.ZERO)) { PooledMutable blockPos = PooledMutable.retain(); blockPos.setPos(pos).move(side); World world = this.te.getWorld(); TileEntity tile = world.getTileEntity(blockPos); if (tile != null) { LazyOptional<IHeat> heatCap = tile.getCapability(CapabilityHeat.HEAT_CAPABILITY, null); IHeat heatHandler = heatCap.orElseThrow(() -> new IllegalArgumentException("Heat capability cannot be null")); if (heatHandler != null) { if (heatHandler.canTransmitHeat() == true) { float lossyTemp = (float) (heatHandler.getTemperature() * (7/8f)); lossyTemp = MathUtil.roundFloat(lossyTemp, 2); return lossyTemp; }else{ return this.getTemperature(); } }else{ return this.getTemperature(); } } } return 0; } @Override public CompoundNBT serializeNBT() { CompoundNBT tag = new CompoundNBT(); tag.putFloat("temperature", temperature); tag.putFloat("max_temperature", maxTemperature); return tag; } @Override public void deserializeNBT(CompoundNBT tag) { temperature = tag.getLong("temperature"); maxTemperature = tag.getLong("max_temperature"); } @Override public boolean canTransmitHeat() { return this.transmitsHeat; } @Override public float getBaseTempBasedOnBiome(BlockPos pos) { World world = this.te.getWorld(); PooledMutable blockPos = PooledMutable.retain(); blockPos.setPos(pos); if (world.getBiome(blockPos) != null) { Biome biome = world.getBiome(blockPos); float biomeTemp = biome.getTemperature(blockPos); float tempF = (float) (95.9451242/(1+(3.012462778*(Math.pow(Math.E, (-3.330913488*biomeTemp)))))); float temp = (tempF - 32.0f) * (5.0f/9.0f); blockPos.close(); return temp; } return 0; } @Override public void setThermalMode(boolean mode) { this.canCool = mode; } } Crash Report: ---- Minecraft Crash Report ---- // There are four lights! Time: 8/2/20 1:31 PM Description: Unexpected error java.lang.NullPointerException: Unexpected error at awsome.techmod.api.capability.impl.HeatHandler.getBaseTempBasedOnBiome(HeatHandler.java:124) ~[main/:?] {re:classloading} at awsome.techmod.api.capability.impl.HeatHandler.<init>(HeatHandler.java:28) ~[main/:?] {re:classloading} at awsome.techmod.tileentity.TEFirebox.<init>(TEFirebox.java:30) ~[main/:?] {re:classloading} at awsome.techmod.blocks.BlockFirebox.createTileEntity(BlockFirebox.java:44) ~[main/:?] {re:classloading} at net.minecraftforge.common.extensions.IForgeBlockState.createTileEntity(IForgeBlockState.java:130) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading} at net.minecraft.world.chunk.Chunk.setBlockState(Chunk.java:293) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading} at net.minecraft.world.World.setBlockState(World.java:209) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.item.BlockItem.placeBlock(BlockItem.java:149) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading} at net.minecraft.item.BlockItem.tryPlace(BlockItem.java:57) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading} at net.minecraft.item.BlockItem.onItemUse(BlockItem.java:42) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading} at net.minecraft.item.ItemStack.lambda$onItemUse$0(ItemStack.java:174) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading} at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:189) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading} at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:174) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading} at net.minecraft.client.multiplayer.PlayerController.func_217292_a(PlayerController.java:318) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1333) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:1600) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.runTick(Minecraft.java:1433) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:941) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.run(Minecraft.java:558) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:177) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162] {} at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162] {} at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162] {} at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162] {} at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.1.2.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.1.2.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.1.2.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.1.2.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.1.2.jar:?] {} at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace: at awsome.techmod.api.capability.impl.HeatHandler.getBaseTempBasedOnBiome(HeatHandler.java:124) at awsome.techmod.api.capability.impl.HeatHandler.<init>(HeatHandler.java:28) at awsome.techmod.tileentity.TEFirebox.<init>(TEFirebox.java:30) at awsome.techmod.blocks.BlockFirebox.createTileEntity(BlockFirebox.java:44) at net.minecraftforge.common.extensions.IForgeBlockState.createTileEntity(IForgeBlockState.java:130) at net.minecraft.world.chunk.Chunk.setBlockState(Chunk.java:293) at net.minecraft.world.World.setBlockState(World.java:209) at net.minecraft.item.BlockItem.placeBlock(BlockItem.java:149) at net.minecraft.item.BlockItem.tryPlace(BlockItem.java:57) at net.minecraft.item.BlockItem.onItemUse(BlockItem.java:42) at net.minecraft.item.ItemStack.lambda$onItemUse$0(ItemStack.java:174) at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:189) at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:174) at net.minecraft.client.multiplayer.PlayerController.func_217292_a(PlayerController.java:318) at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1333) at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:1600) -- Affected level -- Details: All players: 1 total; [ClientPlayerEntity['Awsomekeldeo'/25, l='MpServer', x=8.50, y=54.00, z=8.50]] Chunk stats: Client Chunk Cache: 841, 529 Level dimension: DimensionType{minecraft:overworld} Level name: MpServer Level seed: 2721498909152078286 Level generator: ID 01 - flat, ver 0. Features enabled: false Level generator options: {} Level spawn location: World: (8,53,8), Chunk: (at 8,3,8 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 70542 game time, 70542 day time Known server brands: Level was modded: false Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: true), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Server brand: forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.world.ClientWorld.fillCrashReport(ClientWorld.java:457) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:1839) at net.minecraft.client.Minecraft.run(Minecraft.java:577) at net.minecraft.client.main.Main.main(Main.java:177) 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.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) -- System Details -- Details: Minecraft Version: 1.15.2 Minecraft Version ID: 1.15.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_162, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 476434568 bytes (454 MB) / 1220018176 bytes (1163 MB) up to 1908932608 bytes (1820 MB) CPUs: 2 JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump ModLauncher: 5.1.2+70+master.2845bb9 ModLauncher launch target: fmluserdevclient ModLauncher naming: mcp ModLauncher services: /eventbus-2.2.0-service.jar eventbus PLUGINSERVICE /forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-launcher.jar object_holder_definalize PLUGINSERVICE /forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-launcher.jar runtime_enum_extender PLUGINSERVICE /accesstransformers-2.1.3-shadowed.jar accesstransformer PLUGINSERVICE /forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-launcher.jar capability_inject_definalize PLUGINSERVICE /forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-launcher.jar runtimedistcleaner PLUGINSERVICE /forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-launcher.jar fml TRANSFORMATIONSERVICE FML: 31.2 Forge: net.minecraftforge:31.2.31 FML Language Providers: [email protected] minecraft@1 Mod List: client-extra.jar Minecraft {[email protected] DONE} forge-1.15.2-31.2.31_mapped_snapshot_20200514-1.15.1-recomp.jar Forge {[email protected] DONE} main Untitled Tech Mod {[email protected] DONE} Launched Version: MOD_DEV Backend library: LWJGL version 3.2.2 build 10 Backend API: GeForce GTX 1050/PCIe/SSE2 GL version 4.6.0 NVIDIA 451.67, NVIDIA Corporation GL Caps: Using framebuffer using OpenGL 3.0 Using VBOs: Yes Is Modded: Definitely; Client brand changed to 'forge' Type: Client (map_client.txt) Resource Packs: vanilla, mod_resources, file/§9[§5§lTMoTF§9] §f- §eResource Pack§2 v1.03 (incompatible) Current Language: English (US) CPU: 2x Pentium(R) Dual-Core CPU E5700 @ 3.00GHz EDIT: The wierd thing is, if I add a check to see if blockPos is not equal to 0, 0, 0 then it works but has the unintended side effect of causing the temperature reading at 0, 0, 0 to always be 0. Edited August 2, 2020 by Awsome Quote
Awsome Posted August 3, 2020 Author Posted August 3, 2020 line 124 is if (world.getBiome(blockPos) != null) { Quote
Recommended Posts
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.