Replies: 3 comments 2 replies
-
|
also how do i post things in the ideas category and not general >.< |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Hi, thanks for the suggestion. You can't post to ideas because Andromeda is currently in a feature freeze, as I'm busy IRL. I'm yet to update mod's pages, sorry 😅 |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
Implemented in kjs(unbreakable): //Only for containers that may generate loot
BlockEvents.broken("minecraft:chest" || "minecraft:shulker" || 'minecraft:barrel',event => {
let x = event.block.x
let y = event.block.y
let z = event.block.z
//Let radius = 5
let aabb = AABB.of(x - 5, y - 5, z - 5, x + 5, y + 5, z + 5);
//I think checking this could be expensive(though more compatible in modpacks), so I decided to check the id
//if(!event.block.entityData.contains('LootTable')) return;
//Dont't guard looted(when loot generates, there will be 'Item[*something*]' in NBT), or player placed containers
if(event.block.entityData.contains('Items')) return;
//Highlight monsters nearby(160 ticks) and guard the container
event.level.getEntitiesWithin(aabb).forEach((entity) => {
if(entity.isMonster()){
entity.potionEffects.add('minecraft:glowing', 160, 0, false, false);
//Tell something
event.player.statusMessage = Text.translate('dialouge.fmn.guarded');
//Guarded
event.cancel();
}
})
})Though, player can bomb the chest, or use a hopper to get the loot anyway. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The title speaks for itself.
I think guarded loot is an interesting way to re-balance the game, however, it's been kinda pointless so far, for breaking a guarded chest is just a matter of seconds.
It would probably be a good idea to make this feature configurable, so the player can choose whether a guarded chest would take longer to break or be unbreakable.
Beta Was this translation helpful? Give feedback.
All reactions