|
15 | 15 |
|
16 | 16 | #include <ll/api/memory/Hook.h>
|
17 | 17 | #include <ll/api/memory/Memory.h>
|
| 18 | +#include <mc/common/wrapper/InteractionResult.h> |
18 | 19 | #include <mc/entity/WeakEntityRef.h>
|
19 | 20 | #include <mc/entity/utilities/ActorType.h>
|
20 | 21 | #include <mc/server/module/VanillaServerGameplayEventListener.h>
|
@@ -907,6 +908,33 @@ LL_TYPE_INSTANCE_HOOK(
|
907 | 908 | return origin(item, entity, pos);
|
908 | 909 | }
|
909 | 910 |
|
| 911 | +// LL_TYPE_INSTANCE_HOOK( |
| 912 | +// PlayerUseBucketTakeHook3, |
| 913 | +// HookPriority::Normal, |
| 914 | +// BucketItem, |
| 915 | +// &BucketItem::_useOn, |
| 916 | +// InteractionResult, |
| 917 | +// ItemStack& instance, |
| 918 | +// Actor& entity, |
| 919 | +// BlockPos pos, |
| 920 | +// uchar face, |
| 921 | +// Vec3 const& clickPos |
| 922 | +// ) { |
| 923 | +// IF_LISTENED(EVENT_TYPES::onUseBucketTake) { |
| 924 | +// CallEventRtnValue( |
| 925 | +// EVENT_TYPES::onUseBucketTake, |
| 926 | +// InteractionResult{InteractionResult::Result::Fail}, |
| 927 | +// PlayerClass::newPlayer(), |
| 928 | +// ItemClass::newItem(&instance, false), |
| 929 | +// EntityClass::newEntity(&entity), |
| 930 | +// Number::newNumber(face), |
| 931 | +// FloatPos::newPos(pos, entity.getDimensionId()) |
| 932 | +// ); |
| 933 | +// } |
| 934 | +// IF_LISTENED_END(EVENT_TYPES::onUseBucketTake); |
| 935 | +// return origin(instance, entity, pos, face, clickPos); |
| 936 | +// } |
| 937 | + |
910 | 938 | void PlayerStartDestroyBlock() { PlayerStartDestroyHook::hook(); }
|
911 | 939 | void PlayerDropItem() { PlayerDropItemHook::hook(); }
|
912 | 940 | void PlayerOpenContainerEvent() { PlayerOpenContainerHook::hook(); }
|
|
0 commit comments