Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Conversation

@rikka0w0
Copy link
Contributor

@rikka0w0 rikka0w0 commented Jul 10, 2020

Implemented PlayerEvents:

  1. ItemPickupEvent
  2. ItemCraftedEvent
  3. ItemSmeltedEvent
  4. PlayerLoggedOutEvent
  5. PlayerRespawnEvent
  6. PlayerChangedDimensionEvent

The rest of PlayerEvents will be implemented in a separate pr.

@rikka0w0 rikka0w0 marked this pull request as ready for review July 10, 2020 20:01
@TheGlitch76 TheGlitch76 self-requested a review July 10, 2020 21:59
Copy link
Contributor

@leo60228 leo60228 left a comment

Choose a reason for hiding this comment

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

Apart from that bikeshedding, this PR seems fine.

target = "net/minecraft/item/ItemStack.onCraft(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;I)V"
)
)
private void onCrafted_stack_onCraft(ItemStack stack, CallbackInfo ci) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This method name is a bit strange. Maybe onStackCrafted?

@Inject(method = "onCrafted(Lnet/minecraft/item/ItemStack;)V",
at = @At("RETURN")
)
private void onCrafted_return(ItemStack stack, CallbackInfo ci) {
Copy link
Contributor

Choose a reason for hiding this comment

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

See above, maybe onCraftingFinished?

target = "net/minecraft/item/ItemStack.isEmpty()Z"
)
)
private void onPlayerCollision_isEmpty(PlayerEntity player, CallbackInfo ci) {
Copy link
Contributor

Choose a reason for hiding this comment

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

See above, don't have a great idea for this one though. If using underscores is just the style for this kind of inject it's reasonable enough, though it's not very descriptive about what exactly it's doing.

@TheGlitch76
Copy link
Member

Merge conflicts

rikka0w0 added 2 commits July 22, 2020 23:41
Conflicts:
	patchwork-events-entity/src/main/java/net/patchworkmc/impl/event/entity/EntityEvents.java
@rikka0w0
Copy link
Contributor Author

Conflicts solved

@TheGlitch76
Copy link
Member

I'd like Leo's bikeshedding to be addressed and this is good to go

@rikka0w0
Copy link
Contributor Author

suggestion applied

@Rongmario
Copy link
Contributor

I'll deprecate my PR and work off this branch once its pulled. LGTM.

@TheGlitch76 TheGlitch76 merged commit 35cf663 into master Jul 29, 2020
@TheGlitch76 TheGlitch76 deleted the feature/playerevent branch July 29, 2020 20:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants