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
WololoGoal purpleSheepPredicate is named wrongly #1344
Comments
What it's doing is checking if the original colour combined with the new colour makes purple. |
@Max1234567890 that can't be the case. It is a predicate on a sheep not two colors. |
The second colour is always red. Hence it checks sheep->colour + red == purple (ie sheep->colour == blue) |
Although that is true it is a misleading way to put it. private final TargetPredicate purpleSheepPredicate = (new TargetPredicate()).setBaseMaxDistance(16.0D).includeInvulnerable().setPredicate((livingEntity) -> {
return ((SheepEntity)livingEntity).getColor() == DyeColor.BLUE;
}); |
That is a complete misunderstanding of the game's logic. That TargetPredicate is used to test if the evoker should wololo the sheep, i.e. the Sheep MUST be blue: List<SheepEntity> list = EvokerEntity.this.world.getTargets(SheepEntity.class, this.purpleSheepPredicate, EvokerEntity.this, EvokerEntity.this.getBoundingBox().expand(16.0D, 4.0D, 16.0D));
if (list.isEmpty()) {
return false; Also a further look into the goal shows the sheep is never meant to turn purple, but red as shown in |
Hmm, is there anything documenting that specific backstory? wiki for example? I feel in this case, the logic should dictate the name, but a nice bit of humourous javadoc about that could be fun |
Not directly, but given that a) it is officially stated that Evokers built redstone and b) the fact that Vexes are red as well is what lead me to that conclusion. It's also important to keep in mind the symbolic nature of the purple: the Evoker is the only Illager (including Vexes and Witches) not to have any purple on it, which leads to the idea that the Illager is "computing" purple - sheep's colour to turn them red. |
Max, this should be put in documentation not the actual name. The name should be short and concise and reflect what it does. |
Lol why the heck are you concerned about implementation details if the implementation details are confusing and not helpful. Just call it Also blame mezz for this thing. Yarn has been much smarter since luckily, naming things in more efficient ways. |
The details aren't confusing and its very clear what is being done though. It checks if the sheep is blue. |
Co-authored-by: liach <liach@users.noreply.github.com> Closes FabricMC#1344.
* Fix #1369 * CriteriaMerger -> CriterionMerger * ItemRenderer.renderGuiItem + related names Closes #1361. * WololoGoal.purpleSheepPredicate -> convertibleSheepPredicate Co-authored-by: liach <liach@users.noreply.github.com> Closes #1344. * Improve GUI item rendering names * MinecraftClient.(block/item)ColorMap -> (block/item)Colors * Change wording a little * Model overrides
The
purpleSheepPredicate
actually checks if the sheep is blue.The text was updated successfully, but these errors were encountered: