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 12, 2020

getExpDrops will be always called for all blocks, the exp orb drop behavior follows this rule:

		//			isVanillaBlock		exp		Action
		//	Vanilla		true			xxx		Let the vanilla method do the orb drop
		//	Fabric mod	false			== 0		Let the vanilla method do the orb drop
		//	Forge mod	false			>0		Do orb drop here
		//	Forge mod	false			<=0		Do nothing

Fabric mods does not have a method to get the amount of experience dropped from another block. If a Forge mod calls getExpDrop on a Fabric mod block, it will always get 0. This will be changed once Fabric has something equivalent.

getHarvestTool and getHarvestLevel are stubs, I will impl more tooltype stuff in another pr.

Copy link
Contributor

@kitlith kitlith left a comment

Choose a reason for hiding this comment

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

The logic here is somewhat tricky, but looks sound.

If #127 ends up merged before this, can you include the implementation of ForgeHooks.canHarvestBlock?

@rikka0w0
Copy link
Contributor Author

rikka0w0 commented Jul 14, 2020

The logic here is somewhat tricky, but looks sound.

If #127 ends up merged before this, can you include the implementation of ForgeHooks.canHarvestBlock?

Yes of course, and also there are other things that I'm going to add to ForgeHooks and ForgeHooksClient. In all of my PRs, the event dispatch is handled by individual classes, and ForgeHooks is only supposed to be used for accepting Forge mod calls.

rikka0w0 added 4 commits July 28, 2020 03:52
Conflicts:
	patchwork-events-world/src/main/java/net/minecraftforge/event/world/BlockEvent.java
	patchwork-events-world/src/main/java/net/patchworkmc/impl/event/world/WorldEvents.java
Conflicts:
	patchwork-events-world/build.gradle
	patchwork-extensions-block/build.gradle
@TheGlitch76
Copy link
Member

Merge conflicts!

@TheGlitch76 TheGlitch76 merged commit 7d7f2b1 into master Aug 7, 2020
@TheGlitch76 TheGlitch76 deleted the feature/block-harvest branch August 7, 2020 22:47
@TheGlitch76 TheGlitch76 restored the feature/block-harvest branch August 7, 2020 23:39
TheGlitch76 added a commit that referenced this pull request Aug 7, 2020
TheGlitch76 added a commit that referenced this pull request Aug 7, 2020
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.

4 participants