diff --git a/patches/api/0033-Add-Paper-PR-FillBottleEvents-for-player-and-dispens.patch b/patches/api/0033-Paper-PR-Add-FillBottleEvents-for-player-and-dispens.patch similarity index 98% rename from patches/api/0033-Add-Paper-PR-FillBottleEvents-for-player-and-dispens.patch rename to patches/api/0033-Paper-PR-Add-FillBottleEvents-for-player-and-dispens.patch index c538a7b..e65f180 100644 --- a/patches/api/0033-Add-Paper-PR-FillBottleEvents-for-player-and-dispens.patch +++ b/patches/api/0033-Paper-PR-Add-FillBottleEvents-for-player-and-dispens.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sat, 26 Feb 2022 16:43:33 -0800 -Subject: [PATCH] Add Paper PR - FillBottleEvents for player and dispenser +Subject: [PATCH] Paper PR - Add FillBottleEvents for player and dispenser Adds 2 events, PlayerFillBottleEvent and BlockFillBottleEvent. These events do not have a common superclass due to needing to extend diff --git a/patches/server/0018-Data-driven-items.patch b/patches/server/0018-Data-driven-items.patch index 0dcd769..5d28e2f 100644 --- a/patches/server/0018-Data-driven-items.patch +++ b/patches/server/0018-Data-driven-items.patch @@ -64,10 +64,10 @@ index b1710da835cee3333bfb1c238b37ec0c4d16ba09..cadbf29c4667a74d79fdc538e0cca9cc } diff --git a/src/main/java/me/sosedik/kiterino/registry/data/KiterinoItemRegistryEntity.java b/src/main/java/me/sosedik/kiterino/registry/data/KiterinoItemRegistryEntity.java new file mode 100644 -index 0000000000000000000000000000000000000000..b570e05a15274f7582f3363990d077a9e927e3c6 +index 0000000000000000000000000000000000000000..5c665a7b431314c3dcb16c4d11643434181a8763 --- /dev/null +++ b/src/main/java/me/sosedik/kiterino/registry/data/KiterinoItemRegistryEntity.java -@@ -0,0 +1,129 @@ +@@ -0,0 +1,130 @@ +package me.sosedik.kiterino.registry.data; + +import io.papermc.paper.datacomponent.DataComponentType; @@ -130,7 +130,8 @@ index 0000000000000000000000000000000000000000..b570e05a15274f7582f3363990d077a9 + + @Override + public @NonNull Object constructItemProperties() { -+ return new Item.Properties().setId(ResourceKey.create(Registries.ITEM, this.itemKey)); ++ return new Item.Properties() ++ .setId(ResourceKey.create(Registries.ITEM, this.itemKey)); + } + + protected void parseValues(@NonNull Item item) { diff --git a/patches/server/0019-Data-driven-blocks.patch b/patches/server/0019-Data-driven-blocks.patch index 638a9a0..70ad615 100644 --- a/patches/server/0019-Data-driven-blocks.patch +++ b/patches/server/0019-Data-driven-blocks.patch @@ -119,7 +119,7 @@ index 0000000000000000000000000000000000000000..4f9365a06cd4d61218b48aba812763ca + +} diff --git a/src/main/java/me/sosedik/kiterino/registry/data/KiterinoItemRegistryEntity.java b/src/main/java/me/sosedik/kiterino/registry/data/KiterinoItemRegistryEntity.java -index b570e05a15274f7582f3363990d077a9e927e3c6..01b2058573b0104a3618b42586b27bfb1a528154 100644 +index 5c665a7b431314c3dcb16c4d11643434181a8763..53885600bdd389949aca90a01a039737e4dd3a0b 100644 --- a/src/main/java/me/sosedik/kiterino/registry/data/KiterinoItemRegistryEntity.java +++ b/src/main/java/me/sosedik/kiterino/registry/data/KiterinoItemRegistryEntity.java @@ -1,5 +1,7 @@ @@ -130,8 +130,8 @@ index b570e05a15274f7582f3363990d077a9e927e3c6..01b2058573b0104a3618b42586b27bfb import io.papermc.paper.datacomponent.DataComponentType; import io.papermc.paper.datacomponent.PaperDataComponentType; import io.papermc.paper.registry.PaperRegistryBuilder; -@@ -63,6 +65,16 @@ public class KiterinoItemRegistryEntity implements ItemRegistryEntity { - return new Item.Properties().setId(ResourceKey.create(Registries.ITEM, this.itemKey)); +@@ -64,6 +66,16 @@ public class KiterinoItemRegistryEntity implements ItemRegistryEntity { + .setId(ResourceKey.create(Registries.ITEM, this.itemKey)); } + @Override diff --git a/patches/server/0021-Implement-packet-item-faker-for-injected-items.patch b/patches/server/0021-Implement-packet-item-faker-for-injected-items.patch index b78954a..a9b7839 100644 --- a/patches/server/0021-Implement-packet-item-faker-for-injected-items.patch +++ b/patches/server/0021-Implement-packet-item-faker-for-injected-items.patch @@ -67,21 +67,23 @@ index 0000000000000000000000000000000000000000..16242986d124173007c4e18dd6219e5d + +} diff --git a/src/main/java/me/sosedik/kiterino/registry/data/KiterinoItemRegistryEntity.java b/src/main/java/me/sosedik/kiterino/registry/data/KiterinoItemRegistryEntity.java -index 01b2058573b0104a3618b42586b27bfb1a528154..255adb3a27c38cf8a9c7a759588c824c3b9d9622 100644 +index 53885600bdd389949aca90a01a039737e4dd3a0b..2a60bf487fe0a5e6cb7be88fef2d68078e9af3ce 100644 --- a/src/main/java/me/sosedik/kiterino/registry/data/KiterinoItemRegistryEntity.java +++ b/src/main/java/me/sosedik/kiterino/registry/data/KiterinoItemRegistryEntity.java -@@ -1,5 +1,10 @@ +@@ -1,5 +1,12 @@ package me.sosedik.kiterino.registry.data; +import me.sosedik.kiterino.modifier.item.KiterinoItemModifier; +import me.sosedik.kiterino.modifier.item.KiterinoItemModifierImpl; +import net.minecraft.core.component.DataComponents; +import org.bukkit.inventory.ItemStack; ++import net.minecraft.world.item.component.UseCooldown; ++import java.util.Optional; + import net.minecraft.core.registries.BuiltInRegistries; import io.papermc.paper.datacomponent.DataComponentType; -@@ -23,6 +28,7 @@ public class KiterinoItemRegistryEntity implements ItemRegistryEntity { +@@ -23,6 +30,7 @@ public class KiterinoItemRegistryEntity implements ItemRegistryEntity { protected Map components = new HashMap<>(); protected @Nullable Float compostChance; protected @Nullable Item nmsItem; @@ -89,7 +91,17 @@ index 01b2058573b0104a3618b42586b27bfb1a528154..255adb3a27c38cf8a9c7a759588c824c protected final Conversions conversions; public ResourceLocation itemKey; -@@ -75,6 +81,11 @@ public class KiterinoItemRegistryEntity implements ItemRegistryEntity { +@@ -63,7 +71,8 @@ public class KiterinoItemRegistryEntity implements ItemRegistryEntity { + @Override + public @NonNull Object constructItemProperties() { + return new Item.Properties() +- .setId(ResourceKey.create(Registries.ITEM, this.itemKey)); ++ .setId(ResourceKey.create(Registries.ITEM, this.itemKey)) ++ .component(DataComponents.USE_COOLDOWN, new UseCooldown(0F, Optional.of(this.itemKey))); + } + + @Override +@@ -76,6 +85,11 @@ public class KiterinoItemRegistryEntity implements ItemRegistryEntity { return BuiltInRegistries.BLOCK.getValueOrThrow(ResourceKey.create(Registries.BLOCK, this.itemKey)); } @@ -101,7 +113,7 @@ index 01b2058573b0104a3618b42586b27bfb1a528154..255adb3a27c38cf8a9c7a759588c824c protected void parseValues(@NonNull Item item) { // Does it make sense to parse? // DataComponentMap components = item.components(); -@@ -113,6 +124,33 @@ public class KiterinoItemRegistryEntity implements ItemRegistryEntity { +@@ -114,6 +128,33 @@ public class KiterinoItemRegistryEntity implements ItemRegistryEntity { return this; } @@ -135,7 +147,7 @@ index 01b2058573b0104a3618b42586b27bfb1a528154..255adb3a27c38cf8a9c7a759588c824c @SuppressWarnings("unchecked") @Override public @NonNull Item build() { -@@ -129,6 +167,7 @@ public class KiterinoItemRegistryEntity implements ItemRegistryEntity { +@@ -130,6 +171,7 @@ public class KiterinoItemRegistryEntity implements ItemRegistryEntity { item = new Item(properties); } if (this.compostChance != null) ComposterBlock.add(this.compostChance, item);