Created
September 25, 2013 02:58
-
-
Save agaricusb/6694659 to your computer and use it in GitHub Desktop.
Dimensional Doors NPE: something on tick went wrong: java.lang.NullPointerException at StevenDimDoors.mod_pocketDim.CommonTickHandler.onTickInGame(CommonTickHandler.java:249)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 19:56:52 [INFO] something on tick went wrong: java.lang.NullPointerException | |
| 19:56:52 [SEVERE] java.lang.NullPointerException | |
| 19:56:52 [SEVERE] at StevenDimDoors.mod_pocketDim.CommonTickHandler.onTickInGame(CommonTickHandler.java:249) | |
| 19:56:52 [SEVERE] at StevenDimDoors.mod_pocketDim.CommonTickHandler.tickStart(CommonTickHandler.java:43) | |
| 19:56:52 [SEVERE] at cpw.mods.fml.common.SingleIntervalHandler.tickStart(SingleIntervalHandler.java:28) | |
| 19:56:52 [SEVERE] at cpw.mods.fml.common.FMLCommonHandler.tickStart(FMLCommonHandler.java:122) | |
| 19:56:52 [SEVERE] at cpw.mods.fml.common.FMLCommonHandler.onPreServerTick(FMLCommonHandler.java:287) | |
| 19:56:52 [SEVERE] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:717) | |
| 19:56:52 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:612) | |
| 19:56:52 [SEVERE] at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:573) | |
| private void onTickInGame() | |
| { | |
| try | |
| { | |
| if (this.tickCount > 100) | |
| { | |
| this.tickCount = 0; | |
| int i = 0; | |
| while ((i < 15) && (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER)) | |
| { | |
| i++; | |
| LinkData link = dimHelper.instance.getRandomLinkData(true); | |
| if (link != null) { | |
| if (dimHelper.getWorld(link.locDimID) != null) | |
| { | |
| World world = dimHelper.getWorld(link.locDimID); | |
| int blocktoReplace = world.func_72798_a(link.locXCoord, link.locYCoord, link.locZCoord); | |
| if (!mod_pocketDim.blocksImmuneToRift.contains(Integer.valueOf(blocktoReplace))) { | |
| if (dimHelper.instance.getLinkDataFromCoords(link.locXCoord, link.locYCoord, link.locZCoord, link.locDimID) != null) | |
| { | |
| dimHelper.getWorld(link.locDimID).func_94575_c(link.locXCoord, link.locYCoord, link.locZCoord, properties.RiftBlockID); | |
| ((TileEntityRift)TileEntityRift.class.cast(dimHelper.getWorld(link.locDimID).func_72796_p(link.locXCoord, link.locYCoord, link.locZCoord))).hasGrownRifts = true; // <-- NPE |
Author
Author
Patched at https://dl.dropboxusercontent.com/u/126404991/DimDoorsRiftNPEFix-1.zip - install as jarmods/SERVER/DimDoorsRiftNPEFix-1.zip along with https://github.com/agaricusb/Jarmod2Coremod
built with:
CLASSPATH=/tmp/mcpc-plus-1.5.2-R1.1-srgnames-api-A644.jar:. javac StevenDimDoors/mod_pocketDim/ticking/RiftRegenerator.java
using srgnames-api from http://ci.md-5.net/job/MCPC-Plus-Legacy/
--- RiftRegenerator.java.orig 2013-09-26 18:52:55.000000000 -0700
+++ RiftRegenerator.java 2013-09-26 18:57:14.000000000 -0700
@@ -41,11 +41,11 @@
if(!BlockRift.isBlockImmune(world, link.locXCoord, link.locYCoord, link.locZCoord) && dimHelper.instance.getLinkDataFromCoords(link.locXCoord, link.locYCoord, link.locZCoord, link.locDimID) != null) {
world.func_94575_c(link.locXCoord, link.locYCoord, link.locZCoord, this.properties.RiftBlockID);
TileEntityRift rift = (TileEntityRift)world.func_72796_p(link.locXCoord, link.locYCoord, link.locZCoord);
- if(rift == null) {
+ if(rift == null && link != null) { // XXX: add link != null
dimHelper.getWorld(link.locDimID).func_72837_a(link.locXCoord, link.locYCoord, link.locZCoord, new TileEntityRift());
}
- rift.hasGrownRifts = true;
+ if (rift != null) rift.hasGrownRifts = true; // XXX: add rift != null
}
}
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
updated to DimensionalDoors-1.5.2R1.4.1RC1-228.zip from http://build.technicpack.net/job/DimDoors/ - the ticking code has been overhauled, new error logged:
18:34:42 [SEVERE] An exception occurred in RiftRegenerator.regenerate():
18:34:42 [SEVERE] java.lang.NullPointerException
18:34:42 [SEVERE] at StevenDimDoors.mod_pocketDim.ticking.RiftRegenerator.regenerate(RiftRegenerator.java:60)
18:34:42 [SEVERE] at StevenDimDoors.mod_pocketDim.ticking.RiftRegenerator.notifyTick(RiftRegenerator.java:27)
18:34:42 [SEVERE] at StevenDimDoors.mod_pocketDim.ticking.CommonTickHandler.tickEnd(CommonTickHandler.java:59)
18:34:42 [SEVERE] at cpw.mods.fml.common.SingleIntervalHandler.tickEnd(SingleIntervalHandler.java:34)
18:34:42 [SEVERE] at cpw.mods.fml.common.FMLCommonHandler.tickEnd(FMLCommonHandler.java:141)
18:34:42 [SEVERE] at cpw.mods.fml.common.FMLCommonHandler.onPostServerTick(FMLCommonHandler.java:274)
18:34:42 [SEVERE] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:763)
18:34:42 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:612)
18:34:42 [SEVERE] at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:573)
https://github.com/StevenRS11/DimDoors/blob/master/StevenDimDoors/mod_pocketDim/ticking/RiftRegenerator.java#L60