Update the javadocs for the Consumer

This commit is contained in:
Brokkonaut
2018-08-03 03:14:16 +02:00
parent 2c06c90c6d
commit d0f64070ae

View File

@ -73,11 +73,9 @@ public class Consumer extends Thread {
* @param loc * @param loc
* Location of the block change * Location of the block change
* @param typeBefore * @param typeBefore
* Type of the block before the change * BlockData of the block before the change
* @param typeAfter * @param typeAfter
* Type of the block after the change * BlockData of the block after the change
* @param data
* Data of the block after the change
*/ */
public void queueBlock(Actor actor, Location loc, BlockData typeBefore, BlockData typeAfter) { public void queueBlock(Actor actor, Location loc, BlockData typeBefore, BlockData typeAfter) {
queueBlock(actor, loc, typeBefore, typeAfter, null, null, null); queueBlock(actor, loc, typeBefore, typeAfter, null, null, null);
@ -89,7 +87,7 @@ public class Consumer extends Thread {
* @param actor * @param actor
* Actor responsible for breaking the block * Actor responsible for breaking the block
* @param before * @param before
* Blockstate of the block before actually being destroyed. * BlockState of the block before actually being destroyed.
*/ */
public void queueBlockBreak(Actor actor, BlockState before) { public void queueBlockBreak(Actor actor, BlockState before) {
queueBlock(actor, new Location(before.getWorld(), before.getX(), before.getY(), before.getZ()), before.getBlockData(), null, BlockStateCodecs.serialize(before), null, null); queueBlock(actor, new Location(before.getWorld(), before.getX(), before.getY(), before.getZ()), before.getBlockData(), null, BlockStateCodecs.serialize(before), null, null);
@ -103,9 +101,7 @@ public class Consumer extends Thread {
* @param loc * @param loc
* Location of the broken block * Location of the broken block
* @param typeBefore * @param typeBefore
* Type of the block before the break * BlockData of the block before the break
* @param dataBefore
* Data of the block before the break
*/ */
public void queueBlockBreak(Actor actor, Location loc, BlockData typeBefore) { public void queueBlockBreak(Actor actor, Location loc, BlockData typeBefore) {
queueBlock(actor, loc, typeBefore, null); queueBlock(actor, loc, typeBefore, null);
@ -117,7 +113,7 @@ public class Consumer extends Thread {
* @param actor * @param actor
* Actor responsible for placing the block * Actor responsible for placing the block
* @param after * @param after
* Blockstate of the block after actually being placed. * BlockState of the block after actually being placed.
*/ */
public void queueBlockPlace(Actor actor, BlockState after) { public void queueBlockPlace(Actor actor, BlockState after) {
queueBlock(actor, new Location(after.getWorld(), after.getX(), after.getY(), after.getZ()), null, after.getBlockData(), null, BlockStateCodecs.serialize(after), null); queueBlock(actor, new Location(after.getWorld(), after.getX(), after.getY(), after.getZ()), null, after.getBlockData(), null, BlockStateCodecs.serialize(after), null);
@ -131,9 +127,7 @@ public class Consumer extends Thread {
* @param loc * @param loc
* Location of the placed block * Location of the placed block
* @param type * @param type
* Type of the placed block * BlockData of the placed block
* @param data
* Data of the placed block
*/ */
public void queueBlockPlace(Actor actor, Location loc, BlockData type) { public void queueBlockPlace(Actor actor, Location loc, BlockData type) {
queueBlock(actor, loc, null, type); queueBlock(actor, loc, null, type);
@ -145,9 +139,9 @@ public class Consumer extends Thread {
* @param actor * @param actor
* Actor responsible for replacing the block * Actor responsible for replacing the block
* @param before * @param before
* Blockstate of the block before actually being destroyed. * BlockState of the block before actually being destroyed.
* @param after * @param after
* Blockstate of the block after actually being placed. * BlockState of the block after actually being placed.
*/ */
public void queueBlockReplace(Actor actor, BlockState before, BlockState after) { public void queueBlockReplace(Actor actor, BlockState before, BlockState after) {
queueBlock(actor, new Location(before.getWorld(), before.getX(), before.getY(), before.getZ()), before.getBlockData(), after.getBlockData(), BlockStateCodecs.serialize(before), BlockStateCodecs.serialize(after), null); queueBlock(actor, new Location(before.getWorld(), before.getX(), before.getY(), before.getZ()), before.getBlockData(), after.getBlockData(), BlockStateCodecs.serialize(before), BlockStateCodecs.serialize(after), null);
@ -159,11 +153,9 @@ public class Consumer extends Thread {
* @param actor * @param actor
* Actor responsible for replacing the block * Actor responsible for replacing the block
* @param before * @param before
* Blockstate of the block before being replaced. * BlockState of the block before being replaced.
* @param typeAfter * @param typeAfter
* Type of the block after being replaced * BlockData of the block after being replaced
* @param dataAfter
* Data of the block after being replaced
*/ */
public void queueBlockReplace(Actor actor, BlockState before, BlockData typeAfter) { public void queueBlockReplace(Actor actor, BlockState before, BlockData typeAfter) {
queueBlock(actor, new Location(before.getWorld(), before.getX(), before.getY(), before.getZ()), before.getBlockData(), typeAfter, BlockStateCodecs.serialize(before), null, null); queueBlock(actor, new Location(before.getWorld(), before.getX(), before.getY(), before.getZ()), before.getBlockData(), typeAfter, BlockStateCodecs.serialize(before), null, null);
@ -175,11 +167,9 @@ public class Consumer extends Thread {
* @param actor * @param actor
* Actor responsible for replacing the block * Actor responsible for replacing the block
* @param typeBefore * @param typeBefore
* Type of the block before being replaced * BlockData of the block before being replaced
* @param dataBefore
* Data of the block before being replaced
* @param after * @param after
* Blockstate of the block after actually being placed. * BlockState of the block after actually being placed.
*/ */
public void queueBlockReplace(Actor actor, BlockData typeBefore, BlockState after) { public void queueBlockReplace(Actor actor, BlockData typeBefore, BlockState after) {
queueBlock(actor, new Location(after.getWorld(), after.getX(), after.getY(), after.getZ()), typeBefore, after.getBlockData(), null, BlockStateCodecs.serialize(after), null); queueBlock(actor, new Location(after.getWorld(), after.getX(), after.getY(), after.getZ()), typeBefore, after.getBlockData(), null, BlockStateCodecs.serialize(after), null);
@ -196,12 +186,10 @@ public class Consumer extends Thread {
* The actor interacting with the container * The actor interacting with the container
* @param container * @param container
* The respective container. Must be an instance of an InventoryHolder. * The respective container. Must be an instance of an InventoryHolder.
* @param itemType * @param itemStack
* Type of the item taken/stored * Item taken/stored, including amount
* @param itemAmount * @param remove
* Amount of the item taken/stored * true if the item was removed
* @param itemData
* Data of the item taken/stored
*/ */
public void queueChestAccess(Actor actor, BlockState container, ItemStack itemStack, boolean remove) { public void queueChestAccess(Actor actor, BlockState container, ItemStack itemStack, boolean remove) {
if (!(container instanceof InventoryHolder)) { if (!(container instanceof InventoryHolder)) {
@ -218,13 +206,11 @@ public class Consumer extends Thread {
* @param loc * @param loc
* The location of the container block * The location of the container block
* @param type * @param type
* Type id of the container. * BlockData of the container.
* @param itemType * @param itemStack
* Type of the item taken/stored * Item taken/stored, including amount
* @param itemAmount * @param remove
* Amount of the item taken/stored * true if the item was removed
* @param itemData
* Data of the item taken/stored
*/ */
public void queueChestAccess(Actor actor, Location loc, BlockData type, ItemStack itemStack, boolean remove) { public void queueChestAccess(Actor actor, Location loc, BlockData type, ItemStack itemStack, boolean remove) {
queueBlock(actor, loc, type, type, null, null, new ChestAccess(itemStack, remove, MaterialConverter.getOrAddMaterialId(itemStack.getType().getKey()))); queueBlock(actor, loc, type, type, null, null, new ChestAccess(itemStack, remove, MaterialConverter.getOrAddMaterialId(itemStack.getType().getKey())));
@ -253,9 +239,7 @@ public class Consumer extends Thread {
* @param loc * @param loc
* The location of the inventory block * The location of the inventory block
* @param type * @param type
* The type of the container block * BlockData of the container block
* @param data
* The data of the container block
* @param inv * @param inv
* The inventory of the container block * The inventory of the container block
*/ */
@ -319,7 +303,7 @@ public class Consumer extends Thread {
* @param victim * @param victim
* Victim Actor. Can't be null. * Victim Actor. Can't be null.
* @param weapon * @param weapon
* Item id of the weapon. 0 for no weapon. * Item of the weapon. null for no weapon.
*/ */
public void queueKill(Location location, Actor killer, Actor victim, ItemStack weapon) { public void queueKill(Location location, Actor killer, Actor victim, ItemStack weapon) {
if (victim == null || !isLogged(location.getWorld())) { if (victim == null || !isLogged(location.getWorld())) {
@ -336,11 +320,9 @@ public class Consumer extends Thread {
* @param loc * @param loc
* Location of the broken sign * Location of the broken sign
* @param type * @param type
* Type of the sign. Must be 63 or 68. * BlockData of the sign.
* @param data * @param typeState
* Data of the sign being broken * Serialized text data of the sign
* @param lines
* The four lines on the sign.
*/ */
public void queueSignBreak(Actor actor, Location loc, BlockData type, byte[] typeState) { public void queueSignBreak(Actor actor, Location loc, BlockData type, byte[] typeState) {
queueBlock(actor, loc, type, null, typeState, null, null); queueBlock(actor, loc, type, null, typeState, null, null);
@ -366,9 +348,7 @@ public class Consumer extends Thread {
* @param loc * @param loc
* Location of the placed sign * Location of the placed sign
* @param type * @param type
* Type of the sign. Must be 63 or 68. * BlockData of the sign
* @param data
* Data of the placed sign block
* @param lines * @param lines
* The four lines on the sign. * The four lines on the sign.
*/ */