Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build Plugin

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch: {}

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'

- name: Build with Maven
run: mvn clean package

- name: Upload plugin jar
uses: actions/upload-artifact@v4
with:
name: InfernalMobsReloaded
path: |
target/InfernalMobsReloaded-*.jar
!target/original-*.jar
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This project is a fork of the [original](https://www.spigotmc.org/resources/infe

### 📦 Version Compatibility

Supports only 1.21 - 1.21.5 and as such issues in older versions will not be fixed in this fork.
Supports only 1.21.7 and as such issues in older versions will not be fixed in this fork.

See below table to find the original Infernal Mobs plugin version that supports legacy Minecraft versions.

Expand Down
50 changes: 23 additions & 27 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -28,18 +26,13 @@
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.21.5-R0.1-SNAPSHOT</version>
<version>1.21.11-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>dev.dejvokep</groupId>
<artifactId>boosted-yaml</artifactId>
<version>1.3.6</version>
</dependency>

</dependencies>

<build>
<sourceDirectory>${project.basedir}/src</sourceDirectory>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
Expand All @@ -50,11 +43,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<version>3.14.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<!--
<!-- Debug only
<compilerArgs>
<arg>-Xlint:deprecation</arg>
</compilerArgs>
Expand All @@ -64,19 +57,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.1</version>
<configuration>
<archive>
<manifestEntries>
<paperweight-mappings-namespace>mojang</paperweight-mappings-namespace>
</manifestEntries>
</archive>
</configuration>
<version>3.4.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.2</version>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
Expand All @@ -85,16 +71,26 @@
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<relocations>
<relocation>
<pattern>dev.dejvokep.boostedyaml</pattern>
<shadedPattern>jacob_vejvoda.infernal_mobs.lib.boostedyaml</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.46.0</version>
<configuration>
<java>
<googleJavaFormat>
<version>1.28.0</version>
<style>AOSP</style>
<reflowLongStrings>true</reflowLongStrings>
<formatJavadoc>false</formatJavadoc>
</googleJavaFormat>
<removeUnusedImports />
</java>
</configuration>
</plugin>
</plugins>
</build>
</project>
16 changes: 13 additions & 3 deletions src/main/java/jacob_vejvoda/infernal_mobs/ArrowHomingTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ public void run() {
return;
}

Vector toTarget = this.target.getLocation().clone().add(new Vector(0.0D, 0.5D, 0.0D)).subtract(this.arrow.getLocation()).toVector();
Vector toTarget =
this.target
.getLocation()
.clone()
.add(new Vector(0.0D, 0.5D, 0.0D))
.subtract(this.arrow.getLocation())
.toVector();

Vector dirVelocity = this.arrow.getVelocity().clone().normalize();
Vector dirToTarget = toTarget.clone().normalize();
Expand All @@ -36,7 +42,11 @@ public void run() {
if (angle < 0.12D) {
newVelocity = dirVelocity.clone().multiply(newSpeed);
} else {
Vector newDir = dirVelocity.clone().multiply((angle - 0.12D) / angle).add(dirToTarget.clone().multiply(0.12D / angle));
Vector newDir =
dirVelocity
.clone()
.multiply((angle - 0.12D) / angle)
.add(dirToTarget.clone().multiply(0.12D / angle));
newDir.normalize();
newVelocity = newDir.clone().multiply(newSpeed);
}
Expand All @@ -45,4 +55,4 @@ public void run() {
} catch (Exception ignored) {
}
}
}
}
99 changes: 0 additions & 99 deletions src/main/java/jacob_vejvoda/infernal_mobs/BoostedYamlAdapter.java

This file was deleted.

57 changes: 0 additions & 57 deletions src/main/java/jacob_vejvoda/infernal_mobs/ConfigManager.java

This file was deleted.

Loading