Skip to content

Commit

Permalink
Update to 1.15.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dmulloy2 committed May 3, 2020
1 parent 17cbb23 commit 5262e36
Show file tree
Hide file tree
Showing 31 changed files with 1,829 additions and 78 deletions.
44 changes: 31 additions & 13 deletions PacketWrapper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.comphenix.packetwrapper</groupId>
<artifactId>PacketWrapper</artifactId>
<version>1.13-R0.1-SNAPSHOT</version>
<version>1.15.2-R0.1-SNAPSHOT</version>

<name>PacketWrapper</name>

<inceptionYear>2012</inceptionYear>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<powermock.version>2.0.4</powermock.version>
</properties>

<repositories>
Expand All @@ -21,22 +22,18 @@
</repository>
<repository>
<id>dmulloy2-repo</id>
<url>http://repo.dmulloy2.net/content/groups/public/</url>
</repository>
<repository>
<id>md_5-repo</id>
<url>http://repo.md-5.net/content/groups/public/</url>
<url>https://repo.dmulloy2.net/content/groups/public/</url>
</repository>
</repositories>

<distributionManagement>
<repository>
<id>dmulloy2-repo</id>
<url>http://repo.dmulloy2.net/content/repositories/releases/</url>
<url>https://repo.dmulloy2.net/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>dmulloy2-repo</id>
<url>http://repo.dmulloy2.net/content/repositories/snapshots/</url>
<url>https://repo.dmulloy2.net/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>

Expand All @@ -50,15 +47,35 @@
<dependency>
<groupId>com.comphenix.protocol</groupId>
<artifactId>ProtocolLib</artifactId>
<version>4.4.0-SNAPSHOT</version>
<version>4.5.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<!-- Testing dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito2</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
Expand All @@ -75,7 +92,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand Down Expand Up @@ -110,7 +127,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
Expand All @@ -120,7 +137,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<version>3.2.0</version>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
Expand All @@ -129,8 +146,9 @@
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<version>3.2.0</version>
<configuration>
<failOnError>false</failOnError>
<encoding>ISO-8859-1</encoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

public class WrapperPlayClientBookEdit extends AbstractPacket {

public static final PacketType TYPE = PacketType.Play.Client.BOOK_EDIT;
public static final PacketType TYPE = PacketType.Play.Client.B_EDIT;

public WrapperPlayClientBookEdit() {
super(new PacketContainer(TYPE), TYPE);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* This file is part of PacketWrapper.
* Copyright (C) 2012-2015 Kristian S. Strangeland
* Copyright (C) 2015 dmulloy2
*
* PacketWrapper is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PacketWrapper is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PacketWrapper. If not, see <http://www.gnu.org/licenses/>.
*/
package com.comphenix.packetwrapper;

import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.events.PacketContainer;
import com.comphenix.protocol.wrappers.EnumWrappers.Difficulty;

public class WrapperPlayClientDifficultyChange extends AbstractPacket {

public static final PacketType TYPE = PacketType.Play.Client.DIFFICULTY_CHANGE;

public WrapperPlayClientDifficultyChange() {
super(new PacketContainer(TYPE), TYPE);
handle.getModifier().writeDefaults();
}

public WrapperPlayClientDifficultyChange(PacketContainer packet) {
super(packet, TYPE);
}

/**
* Retrieve New difficulty.
* <p>
* Notes: 0: peaceful, 1: easy, 2: normal, 3: hard
* @return The current New difficulty
*/
public Difficulty getNewDifficulty() {
return handle.getDifficulties().read(0);
}

/**
* Set New difficulty.
* @param value - new value.
*/
public void setNewDifficulty(Difficulty value) {
handle.getDifficulties().write(0, value);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/**
* This file is part of PacketWrapper.
* Copyright (C) 2012-2015 Kristian S. Strangeland
* Copyright (C) 2015 dmulloy2
*
* PacketWrapper is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PacketWrapper is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PacketWrapper. If not, see <http://www.gnu.org/licenses/>.
*/
package com.comphenix.packetwrapper;

import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.events.PacketContainer;

public class WrapperPlayClientDifficultyLock extends AbstractPacket {

public static final PacketType TYPE = PacketType.Play.Client.DIFFICULTY_LOCK;

public WrapperPlayClientDifficultyLock() {
super(new PacketContainer(TYPE), TYPE);
handle.getModifier().writeDefaults();
}

public WrapperPlayClientDifficultyLock(PacketContainer packet) {
super(packet, TYPE);
}

/**
* Retrieve Locked.
* @return The current Locked
*/
public boolean getLocked() {
return handle.getBooleans().read(0);
}

/**
* Set Locked.
* @param value - new value.
*/
public void setLocked(boolean value) {
handle.getBooleans().write(0, value);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
/**
* This file is part of PacketWrapper.
* Copyright (C) 2012-2015 Kristian S. Strangeland
* Copyright (C) 2015 dmulloy2
*
* PacketWrapper is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PacketWrapper is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PacketWrapper. If not, see <http://www.gnu.org/licenses/>.
*/
package com.comphenix.packetwrapper;

import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.events.PacketContainer;
import com.comphenix.protocol.wrappers.BlockPosition;
import com.comphenix.protocol.wrappers.MinecraftKey;

public class WrapperPlayClientSetJigsaw extends AbstractPacket {

public static final PacketType TYPE = PacketType.Play.Client.SET_JIGSAW;

public WrapperPlayClientSetJigsaw() {
super(new PacketContainer(TYPE), TYPE);
handle.getModifier().writeDefaults();
}

public WrapperPlayClientSetJigsaw(PacketContainer packet) {
super(packet, TYPE);
}

/**
* Retrieve Location.
* <p>
* Notes: block entity location
* @return The current Location
*/
public BlockPosition getLocation() {
return handle.getBlockPositionModifier().read(0);
}

/**
* Set Location.
* @param value - new value.
*/
public void setLocation(BlockPosition value) {
handle.getBlockPositionModifier().write(0, value);
}

/**
* Retrieve Attachment type.
* @return The current Attachment type
*/
public MinecraftKey getAttachmentType() {
return handle.getMinecraftKeys().read(0);
}

/**
* Set Attachment type.
* @param value - new value.
*/
public void setAttachmentType(MinecraftKey value) {
handle.getMinecraftKeys().write(0, value);
}

/**
* Retrieve Target pool.
* @return The current Target pool
*/
public MinecraftKey getTargetPool() {
return handle.getMinecraftKeys().read(1);
}

/**
* Set Target pool.
* @param value - new value.
*/
public void setTargetPool(MinecraftKey value) {
handle.getMinecraftKeys().write(1, value);
}

/**
* Retrieve Final state.
* <p>
* Notes: "Turns into" on the GUI, final_state in NBT
* @return The current Final state
*/
public String getFinalState() {
return handle.getStrings().read(0);
}

/**
* Set Final state.
* @param value - new value.
*/
public void setFinalState(String value) {
handle.getStrings().write(0, value);
}

}
Loading

0 comments on commit 5262e36

Please sign in to comment.