Skip to content

Update usages#32

Open
lijinhong11 wants to merge 6 commits intopylonmc:mainfrom
lijinhong11:main
Open

Update usages#32
lijinhong11 wants to merge 6 commits intopylonmc:mainfrom
lijinhong11:main

Conversation

@lijinhong11
Copy link
Copy Markdown

Some usages still not be changed or required to rewrite.

Comment thread docs/en/archived/baguette-of-wisdom.md Outdated
Comment thread docs/en/archived/baguette-of-wisdom.md Outdated
Comment thread docs/en/archived/baguette-of-wisdom.md Outdated
Comment thread docs/en/documentation/contributing/getting-started.md Outdated
Comment thread docs/en/documentation/contributing/getting-started.md Outdated
Comment thread docs/en/documentation/contributing/master-project.md Outdated
Comment thread docs/en/documentation/contributing/master-project.md Outdated
@lijinhong11 lijinhong11 requested a review from ybw0014 April 18, 2026 13:31
Comment thread docs/en/documentation/contributing/master-project.md
@lijinhong11 lijinhong11 requested a review from ybw0014 April 19, 2026 00:17
Comment thread docs/en/archived/baguette-of-wisdom.md
Comment thread docs/en/documentation/contributing/getting-started.md
@lijinhong11 lijinhong11 requested a review from Seggan April 25, 2026 07:37
Copy link
Copy Markdown
Contributor

@OhmV-IR OhmV-IR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that our tutorial snippets reference PylonPages, maybe we could remove that? Since they won't have access to that class ofc, and the item will work without being added to a guide page.

Comment on lines 78 to 81
@Override
public void onUsedToRightClickEntity(@NotNull PlayerInteractEntityEvent event) {
public void onUsedToRightClickEntity(@NotNull PlayerInteractEntityEvent event, @NotNull EventPriority priority) {
event.getRightClicked().setFireTicks(40);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code would need the @MultiHandler annotation to work, eg @MultiHandler(priorities = { EventPriority.NORMAL, EventPriority.MONITOR }). Should do any checks / cancelling at normal, setting stuff like fire ticks at monitor.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See this example from the watering can:

@Override @MultiHandler(priorities = { EventPriority.NORMAL, EventPriority.MONITOR })
    public void onUsedToClickBlock(@NotNull PlayerInteractEvent event, @NotNull EventPriority priority) {
        if (!event.getAction().isRightClick() || event.useItemInHand() == Event.Result.DENY) {
            return;
        }

        if (priority == EventPriority.NORMAL) {
            event.setUseInteractedBlock(Event.Result.DENY);
            return;
        }

        water(event.getClickedBlock().getRelative(BlockFace.UP), settings);
    }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure this annotation is not needed...?

Copy link
Copy Markdown
Contributor

@OhmV-IR OhmV-IR Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure this annotation is not needed...?

Not for this one since they only need one priority, but if they're adding the event priority it is (at least I'm pretty sure)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@Override
public void onUsedToRightClickEntity(@NotNull PlayerInteractEntityEvent event) {
public void onUsedToRightClickEntity(@NotNull PlayerInteractEntityEvent event, @NotNull EventPriority priority) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing


## How to get started

1. Clone the `pylon` repository: `git clone https://github.com/pylonmc/pylon` (or use a GUI like Github Desktop)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be changed to parallel-dev-repo

@LordIdra
Copy link
Copy Markdown
Contributor

I don't like that our tutorial snippets reference PylonPages, maybe we could remove that? Since they won't have access to that class ofc, and the item will work without being added to a guide page.

One of the first questions will be 'how do I add my item to the guide.' I do not see the logic behind this

@OhmV-IR
Copy link
Copy Markdown
Contributor

OhmV-IR commented Apr 25, 2026

I don't like that our tutorial snippets reference PylonPages, maybe we could remove that? Since they won't have access to that class ofc, and the item will work without being added to a guide page.

One of the first questions will be 'how do I add my item to the guide.' I do not see the logic behind this

Make a tutorial for that. but the idea is that I can copy paste the example into a new project and it will compile, and if we have PylonPages in there it won't

@LordIdra
Copy link
Copy Markdown
Contributor

I don't like that our tutorial snippets reference PylonPages, maybe we could remove that? Since they won't have access to that class ofc, and the item will work without being added to a guide page.

One of the first questions will be 'how do I add my item to the guide.' I do not see the logic behind this

Make a tutorial for that. but the idea is that I can copy paste the example into a new project and it will compile, and if we have PylonPages in there it won't

Why would it not work in a new project because of PylonPages? The template includes Pylon as a dependency by default. The idea isn't 'that I can copy paste the example into a new project and it will compile' - most examples in the docs do not follow this at all. (Is this is implied somewhere? If so should be changed). The examples are mostly just to communicate ideas

@LordIdra
Copy link
Copy Markdown
Contributor

LordIdra commented Apr 25, 2026

To clarify - sorry thought you were talking about the reference as you said to 'make a tutorial' then reread the above so disregard the 'the idea isn't...' part. But still should definitely compile with the template

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants