Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't display Cyrillic correctly #115

Closed
Bezdrom opened this issue Feb 9, 2024 · 0 comments
Closed

Doesn't display Cyrillic correctly #115

Bezdrom opened this issue Feb 9, 2024 · 0 comments

Comments

@Bezdrom
Copy link

Bezdrom commented Feb 9, 2024

image

import net.minecraftforge.event.world.BlockEvent.BreakEvent
import net.minecraftforge.event.world.BlockEvent
import net.minecraft.util.text.TextComponentString

def restrictPlacableBlocks = [
    block("minecraft:furnace")
]

event_manager.listen(EventPriority.HIGHEST) { BlockEvent.PlaceEvent event ->
    if (event.getState().getBlock() in restrictPlacableBlocks) {
        def restrictText = new TextComponentString("${textformat('BOLD')}${event.getState().getBlock().getLocalizedName()} ${textformat('GREEN')} не может быть установлен в этом мире")
        event.setCanceled(true)
        event.player.sendMessage(restrictText)
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants