Changeling

Changeling

71.9k Downloads

[Request] option to toggle off console spam upon morphing etc

yukinagatosc2 opened this issue ยท 10 comments

commented

Currently there does not appear to be a way to turn off messages like "player has successfully morphed!" that are displayed in the chat. Ideally, pack makers would be able to toggle this on or off without using an external mod to do so. i.e. for better immersion

commented

Changeling doesn't do this. Either you downloaded an unofficial build of Changeling, or this is being done by another mod.

commented

https://www.twitch.tv/videos/527704073

I guess the version on Twitch is an unofficial build because here's video of it happening.

commented

Oh, I see. Then that message only appears when using the morph command, not when using morphing as a survival feature. How are you planning on using morphing in your modpack?

commented

I am creating custom items using contenttweaker that execute commands as the server rather than the player using them. eg. when right clicked, item A executes the command to morph the player into a mob and replace the item with item B in that slot. Item B when right clicked executes a command to morph back into the player's normal form and delete item B in that slot. They're consumable magical items that are found as treasure or as drops from illagers like illusioners. Because these items can execute commands the player can't, they're the only means of morphing into mobs in survival.

Ideally these morphs would happen without any announcement in order to be more immersive.

commented

That message appears when the morph is done with commands regardless of whether it's in creative or via contenttweaker. Which is why in the video demo I only had changeling installed- to rule out any other mod being the cause of it.

Contenttweaker has two different modes for command execution: one that prints the command executed to chat and the other that I use with the items that is silent. Here is the zenscript code I'm using for the reversion tome which transforms the player back to normal. In the section containing (player, world, false, true) false indicates that commands are not printed to chat. true indictes that the commands aren't being executed using the player's permissions.

#loader contenttweaker
import mods.contenttweaker.VanillaFactory;
import mods.contenttweaker.Item;
import mods.contenttweaker.IItemRightClick;
import mods.contenttweaker.Commands;

var reversion = VanillaFactory.createItem("reversion");
reversion.maxStackSize = 1;
reversion.itemRightClick = function(stack, world, player, hand) {
if(hand == "MAIN_HAND") {
Commands.call("morph @p", player, world, false, true);
Commands.call("replaceitem entity @p slot.weapon.mainhand minecraft:air", player, world, false, true);
}
return "Pass";
};
reversion.register();

commented

Okay, so in conclusion, when a morph command is issued through an item created by ContentTweaker, you are seeing a chat message from the morph command. And your desire is to be able to morph the player using an item, without seeing a message in chat. Thank you for the clarification.

commented

Exactly. Thank you for taking the time to read all of this and thank you for maintaining such a neat mod.

commented

Okay, I'm not sure how ContentTweaker executes commands. Are you seeing this message appear when using a ContentTweaker item which executes the morph command?

commented

Try the newest Changeling version here and let me know if it fixes your issue:

https://github.com/asanetargoss/Changeling/releases

commented

Yes it works! Thank you for spending the time to do this it's very much appreciated especially for 1.12.2!