mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-28 21:15:45 +01:00
build: fix misconfigured submodule NMS/NMS-v1_21_0
This commit is contained in:
parent
cb25ddd7a1
commit
fb1b3197a2
@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.craftaro</groupId>
|
<groupId>com.craftaro</groupId>
|
||||||
<artifactId>CraftaroCore-Modules</artifactId>
|
<artifactId>CraftaroCore-Modules</artifactId>
|
||||||
<version>3.3.0-SNAPSHOT</version>
|
<version>3.4.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>CraftaroCore-NMS-v1_21_0</artifactId>
|
<artifactId>CraftaroCore-NMS-v1_21_0</artifactId>
|
||||||
|
@ -21,6 +21,7 @@ public class NmsImplementationsImpl implements NmsImplementations {
|
|||||||
private final NmsWorldBorder worldBorder;
|
private final NmsWorldBorder worldBorder;
|
||||||
private final com.craftaro.core.nms.anvil.AnvilCore anvil;
|
private final com.craftaro.core.nms.anvil.AnvilCore anvil;
|
||||||
private final NBTCore nbt;
|
private final NBTCore nbt;
|
||||||
|
private final NmsItem item;
|
||||||
|
|
||||||
public NmsImplementationsImpl() {
|
public NmsImplementationsImpl() {
|
||||||
this.entity = new NmsEntityImpl();
|
this.entity = new NmsEntityImpl();
|
||||||
@ -29,6 +30,7 @@ public class NmsImplementationsImpl implements NmsImplementations {
|
|||||||
this.worldBorder = new NmsWorldBorderImpl();
|
this.worldBorder = new NmsWorldBorderImpl();
|
||||||
this.anvil = new AnvilCore();
|
this.anvil = new AnvilCore();
|
||||||
this.nbt = new NBTCoreImpl();
|
this.nbt = new NBTCoreImpl();
|
||||||
|
this.item = new NmsItemImpl();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -60,4 +62,9 @@ public class NmsImplementationsImpl implements NmsImplementations {
|
|||||||
public @NotNull NBTCore getNbt() {
|
public @NotNull NBTCore getNbt() {
|
||||||
return this.nbt;
|
return this.nbt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NotNull NmsItem getItem() {
|
||||||
|
return this.item;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,21 @@
|
|||||||
|
package com.craftaro.core.nms.v1_21_0.item;
|
||||||
|
|
||||||
|
import com.craftaro.core.nms.item.NmsItem;
|
||||||
|
import net.minecraft.util.RandomSource;
|
||||||
|
import net.minecraft.world.item.enchantment.EnchantmentHelper;
|
||||||
|
import org.bukkit.craftbukkit.v1_21_R1.CraftRegistry;
|
||||||
|
import org.bukkit.craftbukkit.v1_21_R1.inventory.CraftItemStack;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
public class NmsItemImpl implements NmsItem {
|
||||||
|
private final RandomSource randomSource = RandomSource.createNewThreadLocalInstance();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack copyAndApplyRandomEnchantment(ItemStack item, int level) {
|
||||||
|
net.minecraft.world.item.ItemStack nmsItem = CraftItemStack.asNMSCopy(item);
|
||||||
|
EnchantmentHelper.enchantItem(this.randomSource, nmsItem, level, CraftRegistry.getMinecraftRegistry(), Optional.empty());
|
||||||
|
return CraftItemStack.asBukkitCopy(nmsItem);
|
||||||
|
}
|
||||||
|
}
|
@ -62,6 +62,13 @@
|
|||||||
</build>
|
</build>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<artifactId>CraftaroCore-NMS-v1_21_0</artifactId>
|
||||||
|
<groupId>${project.groupId}</groupId>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!--suppress VulnerableLibrariesLocal -->
|
<!--suppress VulnerableLibrariesLocal -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
|
@ -28,12 +28,6 @@
|
|||||||
<groupId>${project.groupId}</groupId>
|
<groupId>${project.groupId}</groupId>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
<artifactId>CraftaroCore-NMS-v1_21_0</artifactId>
|
|
||||||
<groupId>${project.groupId}</groupId>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<artifactId>CraftaroCore-NMS-v1_20_R4</artifactId>
|
<artifactId>CraftaroCore-NMS-v1_20_R4</artifactId>
|
||||||
|
1
pom.xml
1
pom.xml
@ -27,6 +27,7 @@
|
|||||||
<module>NMS/NMS</module>
|
<module>NMS/NMS</module>
|
||||||
<module>NMS/NMS-API</module>
|
<module>NMS/NMS-API</module>
|
||||||
<module>NMS/NMS-v1_21_R1</module>
|
<module>NMS/NMS-v1_21_R1</module>
|
||||||
|
<module>NMS/NMS-v1_21_0</module>
|
||||||
<module>NMS/NMS-v1_20_R4</module>
|
<module>NMS/NMS-v1_20_R4</module>
|
||||||
<module>NMS/NMS-v1_20_R3</module>
|
<module>NMS/NMS-v1_20_R3</module>
|
||||||
<module>NMS/NMS-v1_20_R2</module>
|
<module>NMS/NMS-v1_20_R2</module>
|
||||||
|
Loading…
Reference in New Issue
Block a user