Skip to content

allow enchanting pylon items via anvil#608

Open
OhmV-IR wants to merge 1 commit intomasterfrom
allow-enchanting-items-via-anvil
Open

allow enchanting pylon items via anvil#608
OhmV-IR wants to merge 1 commit intomasterfrom
allow-enchanting-items-via-anvil

Conversation

@OhmV-IR
Copy link
Contributor

@OhmV-IR OhmV-IR commented Feb 23, 2026

@LordIdra
Copy link
Contributor

@OhmV-IR Do you have a corresponding base branch to add the new interface to the items that need it?

}
if (rebarItem2 is VanillaAnvilItem) {
try {
MultiHandler.handleEvent(rebarItem2, "onPrepareAnvil", event, priority)
Copy link
Member

Choose a reason for hiding this comment

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

Where is the method for this?

Comment on lines +236 to +243
if(firstItem != null && e.result != null
&& firstItem.itemMeta is Damageable && e.result!!.itemMeta is Damageable
&& (firstItem.itemMeta as Damageable).damage < (e.result!!.itemMeta as Damageable).damage){
e.result = null
return
}
// Check if either input is a rebar item without VanillaAnvilItem and if the output is vanilla, cancel it
if((firstItem.isRebarAndIsNot<VanillaAnvilItem>() || secondItem.isRebarAndIsNot<VanillaAnvilItem>()) && RebarItem.fromStack(e.result) == null) {
Copy link
Member

Choose a reason for hiding this comment

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

Formatting

@JustAHuman-xD
Copy link
Contributor

Are we sure we want to gate this behind an interface?

@Seggan
Copy link
Member

Seggan commented Feb 24, 2026

👆 was gonna mention that

@Intybyte
Copy link
Member

Also bronze tools and maybe some more are clay items, as such they cannot be enchanted at all, nor will work in an anvil, should we replace them to something like stone tools? because iron one can still be smelted technically

@Seggan
Copy link
Member

Seggan commented Feb 24, 2026

...why are they clay balls again?

@Intybyte
Copy link
Member

...why are they clay balls again?

They were gold tool in the beginning but piglin picked em up, so we kind of decided to turn any powder, item that can be traded with piglin, item that can be melted, dyes, etc to be turned into a dummy item (for client side) that has no function together with proper event handling, clay was good for this

@Seggan
Copy link
Member

Seggan commented Feb 24, 2026

Hmm stone tools with gold model data would've been better. Also as ive mentioned like 598998498 times we can just cancel the piglin event

@Intybyte
Copy link
Member

Hmm stone tools with gold model data would've been better. Also as ive mentioned like 598998498 times we can just cancel the piglin event

And as I have said 598998499 times there is the client showing the piglin picking the item up for half a second and dropping it over and over (client side prediction it was called iirc), but yeah I agree on the solution

@Seggan
Copy link
Member

Seggan commented Feb 24, 2026

I do not recall that...

Anyway yeah I think making them stone tools will solve the enchanting issue for bronze at least, among other things

@Intybyte
Copy link
Member

Also, even if I don't want to scope creep this PR, if we replace to stone tools, or if we just want more control over the tools, each material has an enchantability value, meaning how easy it is to get good or high levele enchantments, if we set them to a different material, purely for server handling, we should have a defined enchantability to either match gold's or not, as it has the best enchantability in the game, and use one we defined

@Seggan
Copy link
Member

Seggan commented Feb 25, 2026

Tracked in pylonmc/pylon#697

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.

Lumber axe is not enchantable

5 participants