Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WrapperPlayServerEffect #702

Open
wants to merge 4 commits into
base: 2.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -792,8 +792,7 @@ public enum Server implements PacketTypeCommon, ClientBoundPacket {
RESET_SCORE,
RESOURCE_PACK_REMOVE,
TICKING_STATE,
TICKING_STEP,
WORLD_EVENT;
TICKING_STEP;

private static int INDEX = 0;
private static final Map<Byte, Map<Integer, PacketTypeCommon>> PACKET_TYPE_ID_MAP = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
import com.github.retrooper.packetevents.util.Vector3i;
import com.github.retrooper.packetevents.wrapper.PacketWrapper;

class WrapperPlayServerWorldEvent extends PacketWrapper<WrapperPlayServerWorldEvent> {
private int event;
private Vector3i location;
private int data;
private boolean globalEvent;
public class WrapperPlayServerEffect extends PacketWrapper<WrapperPlayServerEffect> {
private int event;
private Vector3i location;
private int data;
private boolean globalEvent;


public WrapperPlayServerWorldEvent(PacketReceiveEvent event) {
super(event);
}
public WrapperPlayServerEffect(PacketReceiveEvent event) {
jtJava marked this conversation as resolved.
Show resolved Hide resolved
super(event);
}

public WrapperPlayServerWorldEvent(int type, Vector3i location, int data, boolean globalEvent) {
super(PacketType.Play.Server.WORLD_EVENT);
this.event = type;
this.location = location;
this.data = data;
this.globalEvent = globalEvent;
}
public WrapperPlayServerEffect(int type, Vector3i location, int data, boolean globalEvent) {
super(PacketType.Play.Server.EFFECT);
this.event = type;
this.location = location;
this.data = data;
this.globalEvent = globalEvent;
}

@Override
public void read() {
Expand All @@ -41,7 +41,7 @@ public void write() {
}

@Override
public void copy(WrapperPlayServerWorldEvent wrapper) {
public void copy(WrapperPlayServerEffect wrapper) {
this.event = wrapper.event;
this.location = wrapper.location;
this.data = wrapper.data;
Expand Down
Loading