Jump to content

NovaViper

Forge Modder
  • Posts

    1061
  • Joined

  • Last visited

Posts posted by NovaViper

  1. Hm.. I am noticing that the debugger is throwing this error after removing one of the dogs:

     

    locationManager.locations.get(1) = {IndexOutOfBoundsException@10226} Method threw 'java.lang.IndexOutOfBoundsException' exception.
     detailMessage = "Index: 1, Size: 1"
     cause = {IndexOutOfBoundsException@10226} "java.lang.IndexOutOfBoundsException: Index: 1, Size: 1"
     stackTrace = {StackTraceElement[18]@10389} 
     suppressedExceptions = {Collections$UnmodifiableRandomAccessList@10386}  size = 0

     And this one whenever I use the radar item at all:

    Cannot find local variable 'loc'

     

  2. @diesieben07 I made several changes (following your advice with using the uniqueID method instead of the former) since earlier today and this warning starting coming up.

    [17:32:04] [Server thread/WARN] [minecraft/EntityDataManager]: defineId called for: class doggytalents.entity.EntityDog from class doggytalents.entity.DogDataTracker

     

    Also, whenever the dogs end up being sent to another dimension (say the nether or the end) while I remain in the original dimension they were in, I get this error when trying to use the radar item to locate them:

     

    [17:42:42] [Server thread/FATAL] [minecraft/MinecraftServer]: Error executing task
    java.util.concurrent.ExecutionException: java.lang.NullPointerException
    	at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_191]
    	at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_191]
    	at net.minecraft.util.Util.runTask(Util.java:54) [Util.class:?]
    	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:798) [MinecraftServer.class:?]
    	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:743) [MinecraftServer.class:?]
    	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192) [IntegratedServer.class:?]
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:592) [MinecraftServer.class:?]
    	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
    Caused by: java.lang.NullPointerException
    	at doggytalents.helper.DogLocationManager$DogLocation.getDog(DogLocationManager.java:173) ~[DogLocationManager$DogLocation.class:?]
    	at doggytalents.item.ItemRadar.onItemRightClick(ItemRadar.java:43) ~[ItemRadar.class:?]
    	at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:234) ~[ItemStack.class:?]
    	at net.minecraft.server.management.PlayerInteractionManager.processRightClick(PlayerInteractionManager.java:384) ~[PlayerInteractionManager.class:?]
    	at net.minecraft.network.NetHandlerPlayServer.processTryUseItem(NetHandlerPlayServer.java:796) ~[NetHandlerPlayServer.class:?]
    	at net.minecraft.network.play.client.CPacketPlayerTryUseItem.processPacket(CPacketPlayerTryUseItem.java:43) ~[CPacketPlayerTryUseItem.class:?]
    	at net.minecraft.network.play.client.CPacketPlayerTryUseItem.processPacket(CPacketPlayerTryUseItem.java:9) ~[CPacketPlayerTryUseItem.class:?]
    	at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:21) ~[PacketThreadUtil$1.class:?]
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_191]
    	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_191]
    	at net.minecraft.util.Util.runTask(Util.java:53) ~[Util.class:?]
    	... 5 more

     

     

    Here are the changes I made: https://gist.github.com/NovaViper/5364aebd06bb9c2f704e89f1a2878512/51d0950e50f956d4db5b6e2ce49965e42c7961d1

  3. Hm.. strangely enough, whenever the dog dies, it doesn't get removed from the World Storage.. as the debug item I'm using (the radar item) checks the queue size (it should start off as 0) seems to have it stored (it says 1 entry is stored instead of 0) while when I untame the dog, the dog gets purged from the storage

     

    https://gist.github.com/NovaViper/5364aebd06bb9c2f704e89f1a2878512

     

    --Edit--

    I figured out it. I discovered that because the LivingUpdate method is almost constantly running, even when the dog died, the LivingUpdate section ran (which loaded the dog's data again)

  4. 9 hours ago, diesieben07 said:

    Death: EntityLivingBase#onDeath.

    Untaming: Well, just do it when you run the untaming code, I don't know where you do that.

    I mean I'm not sure how to actually remove the data out of the storage all together, I did create a piece of code, but because I never really messed around with storing data and such in Minecraft, I'm not exactly sure where to start off with it:

     

    	public void removeDog(EntityDog dog) {
    		DogLocation temp = new DogLocation(dog);
    
    /*		for (int i = 0; i < this.locations.size(); i++) {
    			DogLocation loc = this.locations.get(i);
    
    			if (loc.equals(temp)) {
    				this.locations.remove(i);
    				this.markDirty();
    				return;
    			}
    		}*/
    
    		this.locations.remove(temp);
    		this.markDirty();
    	}

     

    --Edit--

    Nevermind, I just got the code working. Now my issue is trying to figure out how to actually store all of the data that the dog has in the NBT (from the talents to its storage containers that is created from the talents).

  5. I know it has been a while since I've commented on this, but this is what the main developer has came up with so far. However, he hasn't been able to finish the implementation of the WorldSave data class, so I'm trying to pick up on where he left off. So far, he got the dog's location to actually save, but I haven't been able to figure out how the remove the location data when the dog dies or the owner untames it. I'm also trying to figure out what would be the best possible way to basically create a dog that contains all of the data of the original dog (with all the talent data, and the data that's within the talent, PackPuppy since it actually creates a Container to store items like a chest).

    This gist contains all of the files of the current progress so far: https://gist.github.com/NovaViper/5364aebd06bb9c2f704e89f1a2878512

×
×
  • Create New...

Important Information

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