Minecraft PC IP: play.cubecraft.net

ExtendedHorizons

Well-Known Member
Oct 4, 2014
206
167
118
Utah
bit.ly
I have a plugin Idea that I've somewhat tested out to see if it works properly, and from what I can tell it does. So the concept is that a command or event creates a fake entity player at a certain location with a wall (PacketPlayOutNamedEntity & PacketPlayOutBed). Then you could teleport the real player to safe area. Then set the players camera to fake players (PacketPlayOutEntityCamera? I think). Also if you use PacketPlayOutBed (makes a player in the position they are in when they sleep) they can only face upwards from what I can tell. And If you don't want the bed to be "visible" set its y to 1 then use PacketPlayOutEntityMove.Relative to the y level you want it to be at. So the main problem that I cant find out a good way to get the way the player is moving in so that you can then move the fake player in that direction as well. Maybe you can do it by putting a player on a minecart or something xD. You can move the fake player by using PacketPlayOutEntityMove.Relative as I mentioned earlier, at least i'm pretty sure if thats not the right packet name sorry. But anyways I thought this was a cool idea that people could do if they wanted to, I would but I'm working on a much larger project . If you guys do it feel free to show it here!
public static Location lowestLocation(org.bukkit.entity.Entity entity) {
for (int i = (int) Math.round(entity.getLocation().getY()); i > 1; i--) {
org.bukkit.World world = entity.getWorld();
Location loc = new Location(world, entity.getLocation().getX(), i, entity.getLocation().getZ());
if (!loc.getBlock().getType().equals(org.bukkit.Material.AIR) && !loc.getBlock().isLiquid()) {
Location loc1 = loc.add(0,-1,0);
return loc1;
}
}
return null;
}
 
Members Online

Members online

Latest profile posts

Centuria wrote on TC XD's profile.
Happy birthday and thank you! 💖
Zawuri wrote on TC XD's profile.
Happy birthday!
envyvturban wrote on Hazard's profile.
Yo we should play sometime
CrystalLegend01 wrote on TC XD's profile.
Happy birthday!
CrystalLegend01 wrote on PVP LOL F15's profile.
Thanks for the follow!
Top Bottom