Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for modded tridents to trigger the thrown trident advancement #2009

Open
wants to merge 1 commit into
base: 1.21.x
Choose a base branch
from

Conversation

pupnewfster
Copy link
Member

Eventually Mojang might end up making an entity type tag for tridents similar to the one they have for arrows, but until then there isn't a way for mods to have custom tridents trigger the thrown_trident advancement. This PR has us override the advancement to check for any subclass of ThrownTrident. Given I advancement criteria are only checked server side, if it is preferred we could instead add a entity type tag for tridents, and then check that instead of a custom sub predicate that does an instance check.

I also slightly refactored the code I wrote previously for replacing entity predicates (for worn equipment checks) to make it easier to extend for replacing different parts of an EntityPredicate

…t is a subclass of ThrownTrident instead of just vanilla's trident entity
@pupnewfster pupnewfster added the enhancement New (or improvement to existing) feature or request label Mar 7, 2025
@neoforged-automation neoforged-automation bot added the 1.21.4 Targeted at Minecraft 1.21.4 label Mar 7, 2025
@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Mar 7, 2025

  • Publish PR to GitHub Packages

Last commit published: 48aa90df71c6954a9ed33bf498888abc8b1343a2.

PR Publishing

The artifacts published by this PR:

Repository Declaration

In order to use the artifacts published by the PR, add the following repository to your buildscript:

repositories {
    maven {
        name 'Maven for PR #2009' // https://github.com/neoforged/NeoForge/pull/2009
        url 'https://prmaven.neoforged.net/NeoForge/pr2009'
        content {
            includeModule('net.neoforged', 'neoforge')
            includeModule('net.neoforged', 'testframework')
        }
    }
}

MDK installation

In order to setup a MDK using the latest PR version, run the following commands in a terminal.
The script works on both *nix and Windows as long as you have the JDK bin folder on the path.
The script will clone the MDK in a folder named NeoForge-pr2009.
On Powershell you will need to remove the -L flag from the curl invocation.

mkdir NeoForge-pr2009
cd NeoForge-pr2009
curl -L https://prmaven.neoforged.net/NeoForge/pr2009/net/neoforged/neoforge/21.4.109-beta-pr-2009-trident_advancement/mdk-pr2009.zip -o mdk.zip
jar xf mdk.zip
rm mdk.zip || del mdk.zip

To test a production environment, you can download the installer from here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21.4 Targeted at Minecraft 1.21.4 enhancement New (or improvement to existing) feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant