-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
146 changed files
with
20,562 additions
and
11 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
<?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" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>mypet-parent</artifactId> | ||
<groupId>de.keyle</groupId> | ||
<version>1</version> | ||
<relativePath>../../</relativePath> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>mypet-compat-v1_20_R3</artifactId> | ||
<version>1</version> | ||
<packaging>jar</packaging> | ||
<name>MyPet-v1_20_R3</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.spigotmc</groupId> | ||
<artifactId>spigot</artifactId> | ||
<version>1.20.4-R0.1-SNAPSHOT</version> | ||
<classifier>remapped-mojang</classifier> | ||
<scope>provided</scope> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.spigotmc</groupId> | ||
<artifactId>spigot-api</artifactId> | ||
<version>1.20.4-R0.1-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.mojang</groupId> | ||
<artifactId>brigadier</artifactId> | ||
<version>1.0.18</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.mojang</groupId> | ||
<artifactId>datafixerupper</artifactId> | ||
<version>4.0.26</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.mojang</groupId> | ||
<artifactId>javabridge</artifactId> | ||
<version>1.2.24</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.mojang</groupId> | ||
<artifactId>authlib</artifactId> | ||
<version>3.2.38</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>de.keyle</groupId> | ||
<artifactId>mypet-api</artifactId> | ||
<version>1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>de.keyle</groupId> | ||
<artifactId>mypet-skills</artifactId> | ||
<version>1</version> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.bukkit</groupId> | ||
<artifactId>craftbukkit</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<finalName>${project.name}</finalName> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<version>2.6</version> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.8.1</version> | ||
<configuration> | ||
<source>17</source> | ||
<target>17</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-deploy-plugin</artifactId> | ||
<version>2.8.2</version> | ||
<configuration> | ||
<skip>true</skip> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>net.md-5</groupId> | ||
<artifactId>specialsource-maven-plugin</artifactId> | ||
<version>1.2.2</version> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>remap</goal> | ||
</goals> | ||
<id>remap-obf</id> | ||
<configuration> | ||
<srgIn>org.spigotmc:minecraft-server:1.20.4-R0.1-SNAPSHOT:txt:maps-mojang</srgIn> | ||
<reverse>true</reverse> | ||
<remappedDependencies>org.spigotmc:spigot:1.20.4-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies> | ||
<remappedArtifactAttached>true</remappedArtifactAttached> | ||
<remappedClassifierName>remapped-obf</remappedClassifierName> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>remap</goal> | ||
</goals> | ||
<id>remap-spigot</id> | ||
<configuration> | ||
<inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile> | ||
<srgIn>org.spigotmc:minecraft-server:1.20.4-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn> | ||
<remappedDependencies>org.spigotmc:spigot:1.20.4-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
52 changes: 52 additions & 0 deletions
52
modules/v1_20_R3/src/main/java/de/Keyle/MyPet/compat/v1_20_R3/CompatManager.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,52 @@ | ||
/* | ||
* This file is part of MyPet | ||
* | ||
* Copyright © 2011-2020 Keyle | ||
* MyPet is licensed under the GNU Lesser General Public License. | ||
* | ||
* MyPet is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* MyPet is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package de.Keyle.MyPet.compat.v1_20_R3; | ||
|
||
import de.Keyle.MyPet.MyPetApi; | ||
import de.Keyle.MyPet.api.util.Compat; | ||
import de.Keyle.MyPet.api.util.ReflectionUtil; | ||
import de.Keyle.MyPet.compat.v1_20_R3.services.EggIconService; | ||
import de.Keyle.MyPet.compat.v1_20_R3.services.EntityConverterService; | ||
import de.Keyle.MyPet.compat.v1_20_R3.services.RepositoryMyPetConverterService; | ||
import net.minecraft.world.InteractionHand; | ||
import net.minecraft.world.entity.LivingEntity; | ||
import org.bukkit.Bukkit; | ||
import org.bukkit.event.Listener; | ||
|
||
import java.lang.reflect.Method; | ||
|
||
@Compat("v1_20_R3") | ||
public class CompatManager extends de.Keyle.MyPet.api.util.CompatManager implements Listener { | ||
|
||
public static Method ENTITY_LIVING_broadcastItemBreak = ReflectionUtil.getMethod(LivingEntity.class, "d", InteractionHand.class); | ||
|
||
@Override | ||
public void init() { | ||
MyPetApi.getServiceManager().registerService(EggIconService.class); | ||
MyPetApi.getServiceManager().registerService(EntityConverterService.class); | ||
MyPetApi.getServiceManager().registerService(RepositoryMyPetConverterService.class); | ||
} | ||
|
||
@Override | ||
public void enable() { | ||
Bukkit.getServer().getPluginManager().registerEvents(this, MyPetApi.getPlugin()); | ||
} | ||
} |
Oops, something went wrong.