The bug
Running "Searge" as the command in the command block set the previous output as #itzlipofutzli
What I have expected
It will set the previous output Unknown command at position 0: <--[HERE]
What actually happened
It set the previous output as #itzlipofutzli
How to reproduce
Give yourself a command block.
Enter "Searge" on Console Command.
Power it.
It set the previous output as
#itzlipofutzli.
Code Analysis
Code analysis by Hayden Wong can be found in the bottom.
Attachments
Comments 4
I know that but technically it should report "Unknown command at position 0: <--[HERE]" after 17w45a
Code Analysis
The following is based on decompiled version of Minecraft 1.12 using MCP 9.40. All method and class names are the names used in the decompiled version.
The reason why this happens is because the method net.minecraft.tileentity.TileEntityCommandBlock.java has codes to detect whether the player has entered "Searge". See below.
public boolean trigger(World worldIn)
{
if (!worldIn.isRemote && worldIn.getTotalWorldTime() != this.field_193041_b)
{
if ("Searge".equalsIgnoreCase(this.commandStored))
{
this.lastOutput = new TextComponentString("#itzlipofutzli");
this.successCount = 1;
return true;
}
...
}
}public boolean trigger(World worldIn)
{
if (!worldIn.isRemote && worldIn.getTotalWorldTime() != this.field_193041_b)
{
if ("Searge".equalsIgnoreCase(this.commandStored))
{
this.lastOutput = new TextComponentString("#itzlipofutzli");
this.successCount = 1;
return true;
}
...
}
}
Hi
This is an intended easter egg 🙂