File tree Expand file tree Collapse file tree 3 files changed +23
-67
lines changed
protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/type Expand file tree Collapse file tree 3 files changed +23
-67
lines changed Original file line number Diff line number Diff line change 1- name : Java CI with Gradle
1+ name : Build
22
33on :
4+ workflow_dispatch :
45 push :
5- branches-ignore :
6- - ' master'
7- - ' feature/**'
8- pull_request :
96
107jobs :
11- build :
12- # Only run on PRs if the source branch is on someone else's repo
13- if : " ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}"
8+ build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Setup Gradle
12+ uses : GeyserMC/actions/setup-gradle-composite@master
13+ with :
14+ setup-java_java-version : 17
1415
15- runs-on : ubuntu-latest
16+ - name : Build MCPL
17+ run : ./gradlew build
1618
17- steps :
18- - name : Checkout repository
19- # See https://github.com/actions/checkout/commits
20- uses : actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
21-
22- - name : Validate Gradle wrapper
23- # See https://github.com/gradle/wrapper-validation-action/commits
24- uses : gradle/wrapper-validation-action@342dbebe7272035434f9baccc29a816ec6dd2c7b
25-
26- - name : Set up JDK 17
27- # See https://github.com/actions/setup-java/commits
28- uses : actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0
29- with :
30- java-version : 17
31- distribution : temurin
32-
33- - name : Build
34- # See https://github.com/gradle/gradle-build-action/commits
35- uses : gradle/gradle-build-action@3bfe3a46584a206fb8361cdedd0647b0c4204232
36- with :
37- arguments : build
19+ - name : Publish to Maven Repository
20+ if : ${{ success() && github.repository == 'GeyserMC/MCProtocolLib' && (github.ref_name == 'master' || startsWith(github.ref_name, 'feature/')) }}
21+ uses : gradle/gradle-build-action@3bfe3a46584a206fb8361cdedd0647b0c4204232
22+ env :
23+ ORG_GRADLE_PROJECT_geysermcUsername : ${{ vars.DEPLOY_USER }}
24+ ORG_GRADLE_PROJECT_geysermcPassword : ${{ secrets.DEPLOY_PASS }}
25+ with :
26+ arguments : publish
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ static EntityType from(int id) {
1313 return BuiltinEntityType .VALUES [id ];
1414 }
1515
16+ default boolean is (EntityType type ) {
17+ return id () == type .id ();
18+ }
19+
1620 record Custom (int id ) implements EntityType {
1721 @ Override
1822 public boolean isProjectile () {
You can’t perform that action at this time.
0 commit comments