Posted December 26, 20168 yr Sorry if this or something very similar has been posted before, but I couldn't find it in all my searching. Title says it all, and I assume I just use this below to create a fake player? private static GameProfile KitchenSinkProfile = new GameProfile(UUID.fromString("a7d50290-b3f6-4dd9-afa1-d1de51ce3355"),"[KitchenSink]"); I know almost all mods now somehow use fake players to break their blocks, because it makes it work with permission add-ons on servers. I just need to know how I can break a block given the XYZ using that fakeplayer, and if that's not how I'm supposed to do it, tell me the best way for it to be done. My IGN is TheUnderTaker11, but when I tried to sign up for this site it would not send the email... So yea now I have to use this account.
December 26, 20168 yr Well. For one. A GameProfile isn't an EntityPlayer ... Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
December 26, 20168 yr Author You know when you type that out it sounds a lot dumber than I thought it did... Probably should have asked "how to make a fake player" first. I fiddled around a bit after realizing how stupid that was, and came to this. private static GameProfile KitchenSinkProfile = new GameProfile(UUID.fromString("a7d50290-b3f6-4dd9-afa1-d1de51ce3355"),"[KitchenSink]"); private FakePlayer KitchenSinkPlayer = new FakePlayer(this.getWorld().getMinecraftServer().worldServerForDimension(0),KitchenSinkProfile); Am I doing it right, or am I supposed to use FakePlayerFactory somehow? And like I said google never came up with very much for me, so if you have a link that has the information I need I would be glad to use that. [EDIT] Completely forgot to mention this is in a Tile Entity class for a quarry block I am making. If there is a different place this should be I will move it. My IGN is TheUnderTaker11, but when I tried to sign up for this site it would not send the email... So yea now I have to use this account.
December 26, 20168 yr Why are you doing this? this.getWorld().getMinecraftServer().worldServerForDimension(0) You're asking for the world server for the overworld, your TE might not BE in the overworld. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
December 26, 20168 yr Author I did that cause I thought when I read about the fake player that it would always be at 0,0,0 in the overworld, guess I mis-remembered. Its an easy fix though, just had to add this.getWorld().provider.getDimension() instead of 0 My IGN is TheUnderTaker11, but when I tried to sign up for this site it would not send the email... So yea now I have to use this account.
December 28, 20168 yr Author Bump, as well as saying I can figure out how to set up a fake player, what I'm wanting to know is how to break blocks or really do anything with that fake player. My IGN is TheUnderTaker11, but when I tried to sign up for this site it would not send the email... So yea now I have to use this account.
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.