Skip to content

Commit

Permalink
Replace deprecated variables in pom, add more plugin.yml attributes, …
Browse files Browse the repository at this point in the history
…add adjust-hitbox config option
  • Loading branch information
cerus committed Mar 8, 2022
1 parent 987f6bf commit 36b4a96
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 20 deletions.
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>dev.cerus.visualcrafting</groupId>
<version>1.0.0</version>
<version>1.0.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,11 @@ public interface Config {
*/
int mapIdRangeMax();

/**
* Whether to always force the hitbox to the top or not
*
* @return True or false
*/
boolean adjustHitbox();

}
4 changes: 2 additions & 2 deletions bukkit-16R3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>dev.cerus.visualcrafting</groupId>
<version>1.0.0</version>
<version>1.0.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -21,7 +21,7 @@
<dependency>
<groupId>dev.cerus.visualcrafting</groupId>
<artifactId>api</artifactId>
<version>${parent.version}</version>
<version>${project.parent.version}</version>
<scope>provided</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public int spawnItemFrame(final Location location, final BlockFace direction) {
default -> 0;
},
EntityTypes.ITEM_FRAME,
switch (direction) {
this.config.adjustHitbox() ? 0 : switch (direction) {
case UP -> 1;
case NORTH -> 2;
case SOUTH -> 3;
Expand Down
4 changes: 2 additions & 2 deletions bukkit-17R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>dev.cerus.visualcrafting</groupId>
<version>1.0.0</version>
<version>1.0.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -21,7 +21,7 @@
<dependency>
<groupId>dev.cerus.visualcrafting</groupId>
<artifactId>api</artifactId>
<version>${parent.version}</version>
<version>${project.parent.version}</version>
<scope>provided</scope>
</dependency>

Expand Down
4 changes: 2 additions & 2 deletions bukkit-18R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>dev.cerus.visualcrafting</groupId>
<version>1.0.0</version>
<version>1.0.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -21,7 +21,7 @@
<dependency>
<groupId>dev.cerus.visualcrafting</groupId>
<artifactId>api</artifactId>
<version>${parent.version}</version>
<version>${project.parent.version}</version>
<scope>provided</scope>
</dependency>

Expand Down
4 changes: 2 additions & 2 deletions bukkit-18R2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>dev.cerus.visualcrafting</groupId>
<version>1.0.0</version>
<version>1.0.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -21,7 +21,7 @@
<dependency>
<groupId>dev.cerus.visualcrafting</groupId>
<artifactId>api</artifactId>
<version>${parent.version}</version>
<version>${project.parent.version}</version>
<scope>provided</scope>
</dependency>

Expand Down
12 changes: 6 additions & 6 deletions plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>dev.cerus.visualcrafting</groupId>
<version>1.0.0</version>
<version>1.0.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -32,31 +32,31 @@
<dependency>
<groupId>dev.cerus.visualcrafting</groupId>
<artifactId>api</artifactId>
<version>${parent.version}</version>
<version>${project.parent.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>dev.cerus.visualcrafting</groupId>
<artifactId>bukkit-16R3</artifactId>
<version>${parent.version}</version>
<version>${project.parent.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>dev.cerus.visualcrafting</groupId>
<artifactId>bukkit-17R1</artifactId>
<version>${parent.version}</version>
<version>${project.parent.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>dev.cerus.visualcrafting</groupId>
<artifactId>bukkit-18R1</artifactId>
<version>${parent.version}</version>
<version>${project.parent.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>dev.cerus.visualcrafting</groupId>
<artifactId>bukkit-18R2</artifactId>
<version>${parent.version}</version>
<version>${project.parent.version}</version>
<scope>compile</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,9 @@ public int mapIdRangeMax() {
return this.getConfig().getInt("map-id.max");
}

@Override
public boolean adjustHitbox() {
return this.getConfig().getBoolean("adjust-hitbox");
}

}
7 changes: 6 additions & 1 deletion plugin/src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ entity-id:

map-id:
min: 500000
max: 1000000
max: 1000000

# Will move the frame's hitbox out of the way to allow players to
# access the crafting table from the top. This will only work on
# 1.16.5, unfortunately.
adjust-hitbox: false
8 changes: 6 additions & 2 deletions plugin/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: visual-crafting
version: ${parent.version}
version: ${project.parent.version}
author: Cerus
main: dev.cerus.visualcrafting.plugin.VisualCraftingPlugin
api-version: 1.16
api-version: 1.16

description: "Visualizes the crafting process using invisible item frames and maps."
prefix: "Visual Crafting"
website: "https://github.com/cerus/visual-crafting"
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>dev.cerus.visualcrafting</groupId>
<artifactId>parent</artifactId>
<packaging>pom</packaging>
<version>1.0.0</version>
<version>1.0.1</version>
<modules>
<module>plugin</module>
<module>api</module>
Expand Down

0 comments on commit 36b4a96

Please sign in to comment.