Compare commits

..

6 Commits

Author SHA1 Message Date
Auxilor
8635e5f7a5 Updated to 6.18.5 2022-01-11 10:01:49 +00:00
Auxilor
aa718649eb Fixed v1_18_R1 remapping bugs 2022-01-11 10:01:40 +00:00
Auxilor
1dc0fa449b Updated to 6.18.4 2022-01-11 09:20:52 +00:00
Auxilor
19e3061a13 Fixed MythicMobs NPE 2022-01-11 09:20:43 +00:00
Auxilor
ecafbd76de Updated to 6.18.3 2022-01-10 11:11:44 +00:00
Auxilor
3728f2fc7a Fixed apache commons lang not existing on classpath 2022-01-10 11:11:31 +00:00
5 changed files with 16 additions and 13 deletions

View File

@@ -15,6 +15,7 @@ dependencies {
compileOnly 'org.apache.maven:maven-artifact:3.8.1'
compileOnly 'com.comphenix.protocol:ProtocolLib:4.6.1-SNAPSHOT'
compileOnly 'com.google.code.gson:gson:2.8.8'
compileOnly 'org.apache.commons:commons-lang3:3.0'
}
java {

View File

@@ -24,9 +24,9 @@ class NMSFastItemStack(itemStack: org.bukkit.inventory.ItemStack) : EcoFastItemS
override fun getEnchantmentsOnItem(checkStored: Boolean): Map<Enchantment, Int> {
val enchantmentNBT =
if (checkStored && handle.item === Items.ENCHANTED_BOOK) EnchantedBookItem.getEnchantments(
if (checkStored && handle.getItem() === Items.ENCHANTED_BOOK) EnchantedBookItem.getEnchantments(
handle
) else handle.enchantmentTags
) else handle.getEnchantmentTags()
val foundEnchantments: MutableMap<Enchantment, Int> = HashMap()
for (base in enchantmentNBT) {
val compound = base as CompoundTag
@@ -45,9 +45,9 @@ class NMSFastItemStack(itemStack: org.bukkit.inventory.ItemStack) : EcoFastItemS
checkStored: Boolean
): Int {
val enchantmentNBT =
if (checkStored && handle.item === Items.ENCHANTED_BOOK) EnchantedBookItem.getEnchantments(
if (checkStored && handle.getItem() === Items.ENCHANTED_BOOK) EnchantedBookItem.getEnchantments(
handle
) else handle.enchantmentTags
) else handle.getEnchantmentTags()
for (base in enchantmentNBT) {
val compound = base as CompoundTag
val key = compound.getString("id")
@@ -152,16 +152,16 @@ class NMSFastItemStack(itemStack: org.bukkit.inventory.ItemStack) : EcoFastItemS
private var flagBits: Int
get() =
if (handle.hasTag() && handle.tag!!.contains(
if (handle.hasTag() && handle.getTag()!!.contains(
"HideFlags",
99
)
) handle.tag!!.getInt("HideFlags") else 0
) handle.getTag()!!.getInt("HideFlags") else 0
set(value) =
handle.orCreateTag.putInt("HideFlags", value)
handle.getOrCreateTag().putInt("HideFlags", value)
override fun getRepairCost(): Int {
return handle.baseRepairCost
return handle.getBaseRepairCost()
}
override fun setRepairCost(cost: Int) {
@@ -177,7 +177,7 @@ class NMSFastItemStack(itemStack: org.bukkit.inventory.ItemStack) : EcoFastItemS
}
override fun hashCode(): Int {
return handle.tag?.hashCode() ?: (0b00010101 * 31 + Item.getId(handle.getItem()))
return handle.getTag()?.hashCode() ?: (0b00010101 * 31 + Item.getId(handle.getItem()))
}
private fun apply() {

View File

@@ -2,8 +2,8 @@ package com.willfp.eco.internal.spigot.integrations.customentities
import com.willfp.eco.core.entities.CustomEntity
import com.willfp.eco.core.integrations.customentities.CustomEntitiesWrapper
import com.willfp.eco.util.NamespacedKeyUtils
import io.lumine.xikage.mythicmobs.MythicMobs
import org.bukkit.NamespacedKey
class CustomEntitiesMythicMobs : CustomEntitiesWrapper {
override fun registerAllEntities() {
@@ -11,7 +11,8 @@ class CustomEntitiesMythicMobs : CustomEntitiesWrapper {
val api = MythicMobs.inst().apiHelper
for (id in mobManager.mobNames) {
val key = NamespacedKeyUtils.create("mythicmobs", id.lowercase())
val key = NamespacedKey.fromString("mythicmobs:${id.lowercase()}")
key ?: continue
CustomEntity(
key,
{

View File

@@ -53,4 +53,5 @@ libraries:
- 'org.jetbrains.exposed:exposed-jdbc:0.36.2'
- 'mysql:mysql-connector-java:8.0.25'
- 'com.google.guava:guava:31.0.1-jre'
- 'com.zaxxer:HikariCP:5.0.0'
- 'com.zaxxer:HikariCP:5.0.0'
- 'org.apache.commons:commons-lang3:3.0'

View File

@@ -1,3 +1,3 @@
version = 6.18.2
version = 6.18.5
plugin-name = eco
kotlin.code.style = official