-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added methods in Block to send a fake update packet, moved Packet cla…
…ss to packet package, adds BlockChangePacket, updates to .gitignore, README, and pom
- Loading branch information
1 parent
47cf97c
commit 4f1b7de
Showing
12 changed files
with
252 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
/target/ | ||
*.prefs | ||
*.sw? | ||
dependency-reduced-pom.xml | ||
/bin | ||
/docs | ||
/javadoc-gen.xml | ||
/.idea/ | ||
*.iml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/main/java/net/canarymod/api/factory/PacketFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package net.canarymod.api.factory; | ||
|
||
/** | ||
* Packet Factory | ||
* | ||
* @author Jason (darkdiplomat) | ||
*/ | ||
public interface PacketFactory { | ||
|
||
// IMPLEMENTATIONS PENDING | ||
|
||
|
||
} |
133 changes: 133 additions & 0 deletions
133
src/main/java/net/canarymod/api/packet/BlockChangePacket.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
package net.canarymod.api.packet; | ||
|
||
import net.canarymod.api.world.blocks.Block; | ||
import net.canarymod.api.world.blocks.BlockType; | ||
import net.canarymod.api.world.position.Position; | ||
|
||
/** | ||
* Packet #53 BlockChange | ||
* | ||
* @author Jason (darkdiplomat) | ||
*/ | ||
public interface BlockChangePacket extends Packet { | ||
|
||
/** | ||
* Gets the X coordinate | ||
* | ||
* @return X coordinate | ||
*/ | ||
public int getX(); | ||
|
||
/** | ||
* Sets the X coordinate | ||
* | ||
* @param x | ||
* the X coordinate | ||
*/ | ||
public void setX(int x); | ||
|
||
/** | ||
* Gets the Y coordinate | ||
* | ||
* @return Y coordinate | ||
*/ | ||
public int getY(); | ||
|
||
/** | ||
* Sets the Y coordinate | ||
* | ||
* @param y | ||
* the Y coordinate | ||
*/ | ||
public void setY(int y); | ||
|
||
/** | ||
* Gets the Z coordinate | ||
* | ||
* @return Z coordinate | ||
*/ | ||
public int getZ(); | ||
|
||
/** | ||
* Sets the Z coordinate | ||
* | ||
* @param z | ||
* the Z coordinate | ||
*/ | ||
public void setZ(int z); | ||
|
||
/** | ||
* Gets the {@link Position} | ||
* | ||
* @return the {@link Position} | ||
*/ | ||
public Position getPosition(); | ||
|
||
/** | ||
* Sets the {@link Position} | ||
* | ||
* @param position | ||
* the {@link Position} to set | ||
*/ | ||
public void setPosition(Position position); | ||
|
||
/** | ||
* Gets the {@link BlockType} | ||
* | ||
* @return the {@link BlockType} | ||
*/ | ||
public BlockType getType(); | ||
|
||
/** | ||
* Sets the {@link BlockType} (id and data) | ||
* | ||
* @param type | ||
* the {@link BlockType} to set | ||
*/ | ||
public void setType(BlockType type); | ||
|
||
/** | ||
* Gets the Type ID | ||
* | ||
* @return the Type ID | ||
*/ | ||
public int getTypeId(); | ||
|
||
/** | ||
* Sets the Type Id | ||
* | ||
* @param id | ||
* the Type ID | ||
*/ | ||
public void setTypeId(int id); | ||
|
||
/** | ||
* Gets the Block Data value | ||
* | ||
* @return the data | ||
*/ | ||
public int getData(); | ||
|
||
/** | ||
* Sets the Block data value | ||
* | ||
* @param data | ||
* the Block data | ||
*/ | ||
public void setData(int data); | ||
|
||
/** | ||
* Gets the {@link Block} | ||
* | ||
* @return the {@link Block} | ||
*/ | ||
public Block getBlock(); | ||
|
||
/** | ||
* Sets the {@link Block} | ||
* | ||
* @param block | ||
* the {@link Block} | ||
*/ | ||
public void setBlock(Block block); | ||
} |
2 changes: 1 addition & 1 deletion
2
src/main/java/net/canarymod/api/Packet.java → ...java/net/canarymod/api/packet/Packet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package net.canarymod.api; | ||
package net.canarymod.api.packet; | ||
|
||
/** | ||
* Packet interface. | ||
|
Oops, something went wrong.