Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. For one you are spawning the entity even if it is null. EntityLiving entityliving = spawn instanceof EntityLiving ? (EntityLiving)spawn : null; spawn.setLocationAndAngles(pos.getX(), pos.getY()+1.25f, pos.getZ(), worldObj.rand.nextFloat() * 360.0F, 0.0F); AnvilChunkLoader.spawnEntity(spawn, worldObj);
  2. Include the whole Entity class please.
  3. Where is the GameProfile initialized? How is it initialized? And After looking at the crash report, it may be mo villages, unless this is happening in dev environment.
  4. I don't think the Village has the players UUID saved and is throwing that error. And this doesn't look like it is writing anything, it looks like it is reading NBTTagList nbttaglist1 = compound.getTagList("Players", 10); for (int j = 0; j < nbttaglist1.tagCount(); ++j) { NBTTagCompound nbttagcompound1 = nbttaglist1.getCompoundTagAt(j); if (nbttagcompound1.hasKey("UUID") && this.worldObj != null && this.worldObj.getMinecraftServer() != null) { PlayerProfileCache playerprofilecache = this.worldObj.getMinecraftServer().getPlayerProfileCache(); GameProfile gameprofile = playerprofilecache.getProfileByUUID(UUID.fromString(nbttagcompound1.getString("UUID"))); if (gameprofile != null) { this.playerReputation.put(gameprofile.getName(), Integer.valueOf(nbttagcompound1.getInteger("S"))); } } else { this.playerReputation.put(nbttagcompound1.getString("Name"), Integer.valueOf(nbttagcompound1.getInteger("S"))); } }
  5. Taken Directly from Game Profile, you should insert not equal to null checks. /** * Gets the unique ID of this game profile. * <p /> * This may be null for partial profile data if constructed manually. * * @return ID of the profile */ public UUID getId() { return id; } /** * Gets the display name of this game profile. * <p /> * This may be null for partial profile data if constructed manually. * * @return Name of the profile */ public String getName() { return name; } Which line is line 39 in your server tick event btw.
  6. Why are you calling this every tick? Are you making sure there is a player? Is there another Phase? Wouldn't it be easier to use Player Tick? And if you don't mind me asking why are you writing a village to a players nbt?
  7. So obviously both the UUID and Name of the player seems to not exist, could it be that you are calling CreateVillageNBT on the client side only or server side only. Where is CreateVillageNBT called.
  8. May I see all of the code mainly where it is being called.
  9. If he just wants to override the right clicking of a vanilla item, not replacing it couldn't he just use events. More specifically the PlayerInteractEvent.
  10. Aright thank you that kinda irritated me, but my mistake. It worked when I went back to implementing ITileEntityProvider BTW. It seems it is required to even have a TileEntity in 1.7, not sure about other versions, but good catch and Thank you again. Oh and adding this.isBlockContainer = true did not crash me.
  11. The reason I have the loop in is so I don't have to type GameRegistry.registerTileEntity(TileEntity.class, Main.MODID + ":tileEntity") Full TileEntity class Base Class for TileEntity New Updated Block Class edit I added this.isBlockContainer = true after testing without it.
  12. Thank you for your help Diesieben I plan on updating, sorry for still using 1.7.10. I switched over to the normal Block class and set hasTileEntity to true and changed the createNewTileEntity to createTileEntity. This just caused the update method to never get called. Yes I know that tileEntitySolarPanel is a terrible name, but it was only to test if there was a problem with my methed RegistryHelper.registerTileEntity (which is just a loop into GameRegistry.registerTileEntity).
  13. Hello and may I start off saying this is really weird and I have never seen anything like this. I have made TileEntities before, and never ran into this problem. I have other TileEntities that are being called on the server. This is the updateEntity method in the TileEntity. This is my whole Block class. This is my TileEntity Registry. This is my main class This is the Log from my dev environment from when createNewTileEntity was called until I paused the game to look at the log. Any help would be apreciated and I am using forge 1.7.10-10.13.4.1614. I am using 1.7.10 because alot of mods aren't updated and I do plan on updating after "finishing" it.
×
×
  • Create New...

Important Information

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