Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. public class WrapperPlayClientUseEntity extends AbstractPacket {
  2. public static final PacketType TYPE = PacketType.Play.Client.USE_ENTITY;
  3.  
  4. public WrapperPlayClientUseEntity() {
  5. super(new PacketContainer(TYPE), TYPE);
  6. handle.getModifier().writeDefaults();
  7. }
  8.  
  9. public WrapperPlayClientUseEntity(PacketContainer packet) {
  10. super(packet, TYPE);
  11. }
  12.  
  13. public int getTargetID() {
  14. return handle.getIntegers().read(0);
  15. }
  16.  
  17. public Entity getTarget(World world) {
  18. return handle.getEntityModifier(world).read(0);
  19. }
  20.  
  21. public Entity getTarget(PacketEvent event) {
  22. return getTarget(event.getPlayer().getWorld());
  23. }
  24.  
  25. public void setTargetID(int value) {
  26. handle.getIntegers().write(0, value);
  27. }
  28.  
  29. public EntityUseAction getMouse() {
  30. return handle.getEntityUseActions().read(0);
  31. }
  32.  
  33. public void setMouse(EntityUseAction value) {
  34. handle.getEntityUseActions().write(0, value);
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement