Skip to content

Commit 2cdccc4

Browse files
1.20.5 Support
1 parent 0e94455 commit 2cdccc4

File tree

13 files changed

+766
-24
lines changed

13 files changed

+766
-24
lines changed

inventoryaccess/inventory-access-r14/src/main/java/xyz/xenondevs/inventoryaccess/r14/ItemUtilsImpl.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package xyz.xenondevs.inventoryaccess.r14;
22

3-
import com.mojang.authlib.GameProfile;
43
import net.minecraft.nbt.CompoundTag;
54
import net.minecraft.nbt.NbtIo;
65
import net.minecraft.world.item.ItemStack;
@@ -13,16 +12,11 @@
1312
import xyz.xenondevs.inventoryaccess.util.ReflectionUtils;
1413

1514
import java.io.*;
16-
import java.lang.reflect.Method;
1715
import java.util.List;
1816
import java.util.stream.Collectors;
1917

2018
class ItemUtilsImpl implements ItemUtils {
2119

22-
private static final Method CRAFT_META_SKULL_SET_PROFILE_METHOD = ReflectionUtils.getMethod(
23-
ReflectionRegistry.CB_CRAFT_META_SKULL_CLASS, true, "setProfile", GameProfile.class
24-
);
25-
2620
@Override
2721
public byte[] serializeItemStack(org.bukkit.inventory.@NotNull ItemStack itemStack, boolean compressed) {
2822
ByteArrayOutputStream out = new ByteArrayOutputStream();

inventoryaccess/inventory-access-r17/src/main/java/xyz/xenondevs/inventoryaccess/r17/ItemUtilsImpl.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package xyz.xenondevs.inventoryaccess.r17;
22

3-
import com.mojang.authlib.GameProfile;
43
import net.minecraft.nbt.CompoundTag;
54
import net.minecraft.nbt.NbtIo;
65
import net.minecraft.world.item.ItemStack;
@@ -13,16 +12,11 @@
1312
import xyz.xenondevs.inventoryaccess.util.ReflectionUtils;
1413

1514
import java.io.*;
16-
import java.lang.reflect.Method;
1715
import java.util.List;
1816
import java.util.stream.Collectors;
1917

2018
class ItemUtilsImpl implements ItemUtils {
2119

22-
private static final Method CRAFT_META_SKULL_SET_PROFILE_METHOD = ReflectionUtils.getMethod(
23-
ReflectionRegistry.CB_CRAFT_META_SKULL_CLASS, true, "setProfile", GameProfile.class
24-
);
25-
2620
@Override
2721
public byte[] serializeItemStack(org.bukkit.inventory.@NotNull ItemStack itemStack, boolean compressed) {
2822
ByteArrayOutputStream out = new ByteArrayOutputStream();

inventoryaccess/inventory-access-r18/src/main/java/xyz/xenondevs/inventoryaccess/r18/ItemUtilsImpl.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package xyz.xenondevs.inventoryaccess.r18;
22

3-
import com.mojang.authlib.GameProfile;
43
import net.minecraft.nbt.CompoundTag;
54
import net.minecraft.nbt.NbtAccounter;
65
import net.minecraft.nbt.NbtIo;
@@ -14,16 +13,11 @@
1413
import xyz.xenondevs.inventoryaccess.util.ReflectionUtils;
1514

1615
import java.io.*;
17-
import java.lang.reflect.Method;
1816
import java.util.List;
1917
import java.util.stream.Collectors;
2018

2119
class ItemUtilsImpl implements ItemUtils {
2220

23-
private static final Method CRAFT_META_SKULL_SET_PROFILE_METHOD = ReflectionUtils.getMethod(
24-
ReflectionRegistry.CB_CRAFT_META_SKULL_CLASS, true, "setProfile", GameProfile.class
25-
);
26-
2721
@Override
2822
public byte[] serializeItemStack(org.bukkit.inventory.@NotNull ItemStack itemStack, boolean compressed) {
2923
ByteArrayOutputStream out = new ByteArrayOutputStream();
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<groupId>xyz.xenondevs.invui</groupId>
7+
<artifactId>invui-parent</artifactId>
8+
<version>1.28</version>
9+
<relativePath>../../pom.xml</relativePath>
10+
</parent>
11+
<modelVersion>4.0.0</modelVersion>
12+
13+
<artifactId>inventory-access-r19</artifactId>
14+
15+
<properties>
16+
<maven.compiler.source>21</maven.compiler.source>
17+
<maven.compiler.target>21</maven.compiler.target>
18+
<minecraft.version>1.20.5</minecraft.version>
19+
<spigot.version>${minecraft.version}-R0.1-SNAPSHOT</spigot.version>
20+
</properties>
21+
22+
<dependencies>
23+
<dependency>
24+
<groupId>org.spigotmc</groupId>
25+
<artifactId>spigot</artifactId>
26+
<version>${spigot.version}</version>
27+
<classifier>remapped-mojang</classifier>
28+
<scope>provided</scope>
29+
</dependency>
30+
<dependency>
31+
<groupId>xyz.xenondevs.invui</groupId>
32+
<artifactId>inventory-access</artifactId>
33+
<version>${project.parent.version}</version>
34+
</dependency>
35+
</dependencies>
36+
37+
<build>
38+
<plugins>
39+
<plugin>
40+
<groupId>xyz.xenondevs.string-remapper</groupId>
41+
<artifactId>string-remapper-maven-plugin</artifactId>
42+
<version>1.8</version>
43+
44+
<executions>
45+
<execution>
46+
<id>remap-spigot</id>
47+
<goals>
48+
<goal>remap</goal>
49+
</goals>
50+
<configuration>
51+
<version>${minecraft.version}</version>
52+
<goal>spigot</goal>
53+
<classesIn>${project.build.directory}/classes</classesIn>
54+
<classesOut>${project.build.directory}/classes-spigot</classesOut>
55+
</configuration>
56+
</execution>
57+
58+
<execution>
59+
<id>remap-mojang</id>
60+
<goals>
61+
<goal>remap</goal>
62+
</goals>
63+
<configuration>
64+
<version>${minecraft.version}</version>
65+
<goal>mojang</goal>
66+
<classesIn>${project.build.directory}/classes</classesIn>
67+
<classesOut>${project.build.directory}/classes-mojang</classesOut>
68+
</configuration>
69+
</execution>
70+
</executions>
71+
</plugin>
72+
73+
<plugin>
74+
<groupId>org.apache.maven.plugins</groupId>
75+
<artifactId>maven-jar-plugin</artifactId>
76+
<version>3.2.2</version>
77+
<executions>
78+
<execution>
79+
<id>default-jar</id>
80+
<phase>none</phase>
81+
</execution>
82+
<execution>
83+
<id>spigot</id>
84+
<goals>
85+
<goal>jar</goal>
86+
</goals>
87+
<configuration>
88+
<classesDirectory>${project.build.directory}/classes-spigot</classesDirectory>
89+
</configuration>
90+
</execution>
91+
<execution>
92+
<id>mojang</id>
93+
<goals>
94+
<goal>jar</goal>
95+
</goals>
96+
<configuration>
97+
<classesDirectory>${project.build.directory}/classes-mojang</classesDirectory>
98+
<classifier>remapped-mojang</classifier>
99+
</configuration>
100+
</execution>
101+
</executions>
102+
</plugin>
103+
104+
<plugin>
105+
<groupId>net.md-5</groupId>
106+
<artifactId>specialsource-maven-plugin</artifactId>
107+
<version>2.0.2</version>
108+
<executions>
109+
<execution>
110+
<phase>package</phase>
111+
<goals>
112+
<goal>remap</goal>
113+
</goals>
114+
<id>remap-obf</id>
115+
<configuration>
116+
<srgIn>org.spigotmc:minecraft-server:${spigot.version}:txt:maps-mojang</srgIn>
117+
<reverse>true</reverse>
118+
<remappedDependencies>org.spigotmc:spigot:${spigot.version}:jar:remapped-mojang</remappedDependencies>
119+
<remappedArtifactAttached>false</remappedArtifactAttached>
120+
<finalName>${project.artifactId}-${project.version}-remapped-obf</finalName>
121+
</configuration>
122+
</execution>
123+
<execution>
124+
<phase>package</phase>
125+
<goals>
126+
<goal>remap</goal>
127+
</goals>
128+
<id>remap-spigot</id>
129+
<configuration>
130+
<inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile>
131+
<srgIn>org.spigotmc:minecraft-server:${spigot.version}:csrg:maps-spigot</srgIn>
132+
<remappedDependencies>org.spigotmc:spigot:${spigot.version}:jar:remapped-obf</remappedDependencies>
133+
</configuration>
134+
</execution>
135+
</executions>
136+
</plugin>
137+
</plugins>
138+
</build>
139+
140+
</project>

0 commit comments

Comments
 (0)