1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2026-04-03 21:51:23 +00:00
Files
CC-Tweaked/src/main/java/dan200/computercraft/api/network/IPacketSender.java
Devan-Kerman c5eb7a9501 reformat
2020-09-04 18:07:48 -05:00

43 lines
1.1 KiB
Java

/*
* This file is part of the public ComputerCraft API - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2020. This API may be redistributed unmodified and in full only.
* For help using the API, and posting your mods, visit the forums at computercraft.info.
*/
package dan200.computercraft.api.network;
import javax.annotation.Nonnull;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World;
/**
* An object on a {@link IPacketNetwork}, capable of sending packets.
*/
public interface IPacketSender {
/**
* Get the world in which this packet sender exists.
*
* @return The sender's world.
*/
@Nonnull
World getWorld();
/**
* Get the position in the world at which this sender exists.
*
* @return The sender's position.
*/
@Nonnull
Vec3d getPosition();
/**
* Get some sort of identification string for this sender. This does not strictly need to be unique, but you should be able to extract some identifiable
* information from it.
*
* @return This device's id.
*/
@Nonnull
String getSenderID();
}