#(drowningin) How to prevent drops from player placed blocks?

30 messages · Page 1 of 1 (latest)

rich sentinel
#

Hello! So as per the title, I'm trying to sort out a way to prevent drops from player placed blocks and I'm wondering what the best way might be?

Effectively, I've got a few passive drops associated with a woodcutting skill for example, that they have a rare chance to get a special drop as they level up. However, I don't want them to just be able to place the same log and break it over and over again to potentially get the drops. I'd like them to have to actually farm trees to obtain these, and I'm just not quite certain the best way to do so! TIA

vague thistleBOT
#

(drowningin) How to prevent drops from player placed blocks?

vague thistleBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

rich sentinel
#

@alpine stump (also part of the server so she can follow too lol)

left wolf
#

you'll need two events for this

#

!e player places

ornate schoonerBOT
# left wolf !e player places
Cannot Specify Searched Event

Multiple possible events: player places block, player places hanging, crackshot player places landmine.

left wolf
#

!e player places block

ornate schoonerBOT
# left wolf !e player places block
Group

Player

Event Lines

player places block player places <item>

Switches

using:<hand_type> to only process the event if the player is using the specified hand type (HAND or OFF_HAND).
against:<location> to only process the event if block that this new block is being placed against matches the specified LocationTag matcher.
type:<material> to only process the event if the block placed matches the MaterialTag matcher input.

Triggers

when a player places a block.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.location> returns the LocationTag of the block that was placed.
<context.material> returns the MaterialTag of the block that was placed.
<context.old_material> returns the MaterialTag of the block that was replaced.
<context.item_in_hand> returns the ItemTag of the item in hand.
<context.hand> returns the name of the hand that the block was in (HAND or OFF_HAND).
<context.against> returns the LocationTag of the block this block was placed against.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

Examples
on player places block:
after player places torch using:off_hand:
on player places cactus against:sand:
# This example process the event only if the player places any block that isn't tnt.
on player places block type:!tnt:
- announce "<player.name> has placed a block that isn't TNT. Lucky!"
left wolf
#

!e player breaks block

ornate schoonerBOT
# left wolf !e player breaks block
Group

Player

Event Lines

player breaks block player breaks <material>

Switches

with:<item> to only process the event when the player is breaking the block with a specified item.

Triggers

when a player breaks a block.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.location> returns the LocationTag the block was broken at.
<context.material> returns the MaterialTag of the block that was broken.
<context.xp> returns how much XP will be dropped.
<context.should_drop_items> returns whether the event will drop items.

Determine

"NOTHING" to make the block drop no items.
ListTag(ItemTag) to make the block drop a specified list of items.
ElementTag(Number) to set the amount of xp to drop.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

left wolf
#

when a player places a block, you'll flag the location, denominating that it's been placed by a player

#

and then you'll listen for player breaks

#
  • the location_flagged: switch, with your flag
desert girder
#

Alternatively if you have CoreProtect on your server you can check the the location logs

left wolf
#

then you'll wipe the flag off of the location, + - determine NOTHING to get rid of all drops from the block

ornate schoonerBOT
# desert girder !t coreprotect

Returns a list changes to the given block within the given duration.
Each Map has keys:
"action" ("removal", "placement", or "interaction"),
"is_rolled_back" (true/false),
"material" (MaterialTag),
"player_name" (player username, not a PlayerTag instance),
"time" (TimeTag)

Required Plugins or Platforms

Depenizen, CoreProtect

Returns

ListTag(MapTag)

alpine stump
#

What if we have logblock?

#

Instead of coreprotect

#

Cause I'll be honest, I think I like that option the most lmao

desert girder
#

!s logblock

ornate schoonerBOT
#
Possible Confusion

Did you mean to search for copyblock?

desert girder
#

Yeah no

#

Could maybe feature request it

wet dustBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@rich sentinel