Create Fabric

Create Fabric

7M Downloads

I can place and remove items in filters even when AbstractBlock.onUse == ActionResult.FAIL

TheTarasus opened this issue ยท 2 comments

commented

Describe the Bug

I have injected in AbstractBlock.onUse method to disable interaction when this BlockEntity is in claimed chunk.
Moreover, I injected in ServerPlayerInteractionManager.class in methods "tryBreakBlock", "interactBlock" and "interactItem";
Also, injected in Item.class in method "use".
However, even when the ActionResult is FAIL, the blocks of Create are just ignoring that, you could easily put and remove items in the filter slot.

That's not good and should be fixed in another patch of create.

Reproduction Steps

  1. Inject into those classes that I have described above
  2. Put items in the filter slot when you're not expected to do

Expected Result

You're restricted to place or remove item in filter slots when ActionResult in AbstractBlock.onUse == ActionResult.FAIL

Screenshots and Videos

No response

Crash Report or Log

No response

Operating System

Windows 10

Mod Version

0.5.1f

Minecraft Version

1.18.2

Other Mods

factions (self-patched to create-compatibility)

Additional Context

If I am wrong, or not doing right - tell me, how I can prevent the filter slot in all of the blocks of create to restrict from modification from certain players?

commented

if this is a issue that would affect the forge version of create aswell then report there

commented

filters do not use onUse. there's a separate event listener.
This is how it works on forge too.