-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix wthit compat * Update polymer-core/build.gradle
- Loading branch information
Showing
4 changed files
with
41 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...ore/src/main/java/eu/pb4/polymer/core/mixin/client/compat/wthit_HarvestProviderMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package eu.pb4.polymer.core.mixin.client.compat; | ||
|
||
import eu.pb4.polymer.core.api.client.ClientPolymerBlock; | ||
import eu.pb4.polymer.core.impl.client.InternalClientRegistry; | ||
import mcp.mobius.waila.api.IBlockAccessor; | ||
import mcp.mobius.waila.api.IPluginConfig; | ||
import mcp.mobius.waila.api.ITooltip; | ||
import mcp.mobius.waila.plugin.harvest.provider.HarvestProvider; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(HarvestProvider.class) | ||
public class wthit_HarvestProviderMixin { | ||
|
||
@Inject(method = "appendBody", at = @At("HEAD"), remap = false, cancellable = true) | ||
private void polymer$disableHarvestTooltip(ITooltip tooltip, IBlockAccessor accessor, IPluginConfig config, CallbackInfo ci) { | ||
if (InternalClientRegistry.getBlockAt(accessor.getPosition()) != ClientPolymerBlock.NONE_STATE) ci.cancel(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters