Skip to content

Commit

Permalink
fixes and ver bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Dueris committed Jul 19, 2024
1 parent 1b58b87 commit 45e492b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
if: "!contains(github.event.head_commit.message, '--skip') && !contains(github.event.head_commit.commit.message, '--skip')"
uses: softprops/action-gh-release@v1
with:
name: Latest v1.1.2 dev
tag_name: mc1.21/0-v1.1.2
name: Latest v1.1.3 dev
tag_name: mc1.21/0-v1.1.3
body: \"changes\"=${{ github.event.head_commit.message }}
token: ${{ secrets.GIT_TOKEN }}
files: build/libs/*.jar
Expand Down
2 changes: 1 addition & 1 deletion API-DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repositories {
}

dependencies {
implementation("io.github.Dueris:OriginsPaper:mc1.21~0-v1.1.2")
implementation("io.github.Dueris:OriginsPaper:mc1.21~0-v1.1.3")
}
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ val paperweightVersion: String = "1.21-R0.1-SNAPSHOT"

extra["mcMajorVer"] = "21"
extra["mcMinorVer"] = "0"
extra["pluginVer"] = "v1.1.2"
extra["pluginVer"] = "v1.1.3"

val mcMajorVer = extra["mcMajorVer"] as String
val mcMinorVer = extra["mcMinorVer"] as String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,9 @@ public void run() {
entity.getHandle());
String cmd = data.getString("command");
// Fix the command to support our pehuki implementation
if (cmd.replace("/", "").startsWith("scale")) {
if (cmd.contains("scale")) {
if (cmd.contains("@s")) {
cmd.replace(" @s", "");
cmd = cmd.replace(" @s", "");
}
}
server.getCommands().performPrefixedCommand(source, cmd);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,11 @@ public void registerConditions() {
return entity.getHandle() instanceof OwnableEntity tameable
&& tameable.getOwnerUUID() != null;
}));
register(new ConditionFactory(OriginsPaper.apoliIdentifier("equipped_item"), (data, entity) -> {
if (!(entity.getHandle() instanceof LivingEntity livingEntity)) return false;
return ConditionExecutor.testItem(data.getJsonObject("item_condition"),
livingEntity.getItemBySlot(data.getEnumValueOrDefault("equipment_slot", EquipmentSlot.class, EquipmentSlot.MAINHAND)).getBukkitStack());
}));
register(new ConditionFactory(OriginsPaper.apoliIdentifier("using_item"), (data, entity) -> {
if (!(entity.getHandle() instanceof LivingEntity livingEntity) || !livingEntity.isUsingItem()) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import me.dueris.calio.data.factory.FactoryJsonObject;
import me.dueris.calio.registry.Registrable;
import me.dueris.originspaper.OriginsPaper;
import me.dueris.originspaper.content.OrbOfOrigins;
import me.dueris.originspaper.factory.data.types.Comparison;
import me.dueris.originspaper.registry.Registries;
import net.minecraft.core.Holder;
Expand All @@ -12,8 +13,10 @@
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.MinecraftServer;
import net.minecraft.tags.ItemTags;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.ArmorItem;
import net.minecraft.world.item.Equipable;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.component.CustomData;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.item.crafting.RecipeType;
Expand All @@ -22,10 +25,14 @@
import net.minecraft.world.item.enchantment.ItemEnchantments;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity;
import org.bukkit.NamespacedKey;
import org.bukkit.craftbukkit.CraftRegistry;
import org.bukkit.craftbukkit.inventory.CraftItemStack;
import org.bukkit.craftbukkit.util.CraftNamespacedKey;
import org.bukkit.inventory.ItemStack;

import java.util.function.BiPredicate;
import java.util.function.Predicate;

public class ItemConditions {

Expand Down

0 comments on commit 45e492b

Please sign in to comment.