Java Code Examples for net.minecraft.entity.player.EntityPlayerMP#moveToBlockPosAndAngles()

The following examples show how to use net.minecraft.entity.player.EntityPlayerMP#moveToBlockPosAndAngles() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BlockUtils.java    From Wizardry with GNU Lesser General Public License v3.0 5 votes vote down vote up
public static EntityPlayerMP makePlacer(@Nonnull World world, @Nonnull BlockPos pos, @Nullable Entity entity) {
	if (entity instanceof EntityPlayerMP) {
		return (EntityPlayerMP) entity;
	}
	EntityPlayerMP bro = FakePlayerFactory.get((WorldServer) world, PLACER);
	bro.moveToBlockPosAndAngles(pos, 0, -90);
	bro.setSneaking(true);
	return bro;
}
 
Example 2
Source File: BlockUtils.java    From Wizardry with GNU Lesser General Public License v3.0 5 votes vote down vote up
public static EntityPlayerMP makeBreaker(@Nonnull World world, @Nonnull BlockPos pos, @Nullable Entity entity) {
	if (entity instanceof EntityPlayerMP) {
		return (EntityPlayerMP) entity;
	}
	EntityPlayerMP bro = FakePlayerFactory.get((WorldServer) world, BREAKER);
	bro.moveToBlockPosAndAngles(pos, 0, -90);
	return bro;
}