Class ReplaceFieldComparisonWithInstanceOf

java.lang.Object
net.neoforged.neoforge.coremods.ReplaceFieldComparisonWithInstanceOf
All Implemented Interfaces:
ITransformer<MethodNode>

public class ReplaceFieldComparisonWithInstanceOf extends Object implements ITransformer<MethodNode>
Replaces code such as itemstack.getItem() == Items.CROSSBOW with instanceof checks such as itemstack.getItem() instanceof CrossbowItem. This transformer targets a set of methods to replace the occurrence of a single field-comparison.