Suggestion: Add a way to manually place Miner's Light
juh9870 opened this issue Β· 9 comments
Describe your suggestion
Add some way of manually placing Miner's Light. Either by adding recipe for them and some texture for item form, or by writing KubeJS script to place miner light by right-clicking a block with glowstone dust (can KubeJS even do this?)
Why would you like this added/changed?
Miner's Light have pretty good aesthetics, so I want to use it as a decoration for my base, but currently the only way to do it, is by placing it in a dark place using Mining Gadget, and then using a Cardboard box to move it to the desirable location
Example KubeJS script that places the miner light by Crouch + right-clicking a block while holding glowstone dust
const glowItem = 'minecraft:glowstone_dust';
const glowBlock = 'mininggadgets:minerslight';
onEvent('block.right_click', event => {
if (event.item.id !== glowItem) return;
let targetBlock = event.block.offset(event.facing);
if (targetBlock.id == 'minecraft:air' && event.player.isCrouching()) {
targetBlock.set(glowBlock);
if (!event.player.isCreativeMode()) event.item.count--;
event.cancel();
}
});
Any update on this? It would be super useful as the Minerβs Light looks quite nice.
This script was just a quick example, so it have some issues:
- Can't place miner's light while flying, cuz game don't think you are crouching when pressing SHIFT in mid-air.
- Sometimes there is another invisible block instead of air, probably created by some mod, and so you can't place miner's light there with a script.
First problem can't be solved with current KubeJS capabilities it seems like, while second one can only be solved by identifying id of that invisible non-vanilla air block and checking for it too
Also maybe it's worth adding some way for players to know that they can place lights with glowstone. Maybe add info to glowstone dust description?
Sometimes there is another invisible block instead of air, probably created by some mod, and so you can't place miner's light there with a script.
Got any idea which block that is? π