Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. No it can be accessed on the server, I believe the reason for this is because they use the gameprofile(UUID from the profile)of the player to save nbt.
  2. Happy modding to you, and I'm glad I could help. write Solved in the topic subject.
  3. All entities need to be registered with the EntityRegistry, but no instead of public static Entity altarlisttier1(ItemStack item) { for (Entry<ItemStack, Entity> entry : altarlisttier1.entrySet()) { if (ItemStack.areItemsEqual(item, (ItemStack)entry.getKey())) { return entry.getValue(); } else { return null; } } return null; } Some thing like public static Entity getEntityFromItemStackInAltar(World world, ItemStack stack) { // Only needs either instanceof or == if (stack != null && (stack.getItem() instanceof ItemClass || stack.getItem() == Items.diamond)) { return new Entity(world); } }
  4. Also it seems when you create that single instance, thank you for pointing that out Choonster, you are passing in a null parameter for world.
  5. Is your Void Beast a hostile entity, if so you might be better to extend something that doesn't extend EntityAgeable
  6. 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);
  7. 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.
  8. 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"))); } }
  9. 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.
  10. 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?
  11. 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.
  12. 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.
  13. 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.
  14. 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.
  15. 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).
  16. 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 Privacy Policy.