AzureDoom / MCDoom

Getter/setter names must be appropriate JAVA-E1014
Anti-pattern
Major
2 years ago2 years old
This method appears to be a getter for hitSound but does not reference it anywhere
196	}
197
198	@Override
199	protected SoundEvent getHitSound() {200		return SoundEvents.ITEM_ARMOR_EQUIP_IRON;201	}202
203	@Override
204	protected void onBlockHit(BlockHitResult blockHitResult) {
This method appears to be a getter for hitSound but does not reference it anywhere
160	}
161
162	@Override
163	protected SoundEvent getHitSound() {164		return SoundEvents.ITEM_ARMOR_EQUIP_IRON;165	}166
167	@Override
168	protected void onBlockHit(BlockHitResult blockHitResult) {
This method appears to be a getter for hitSound but does not reference it anywhere
182	}
183
184	@Override
185	protected SoundEvent getHitSound() {186		return SoundEvents.ITEM_ARMOR_EQUIP_IRON;187	}188
189	@Override
190	protected void onBlockHit(BlockHitResult blockHitResult) {
This method appears to be a getter for hitSound but does not reference it anywhere
218	}
219
220	@Override
221	protected SoundEvent getHitSound() {222		return SoundEvents.ITEM_ARMOR_EQUIP_IRON;223	}224
225	@Override
226	protected void onBlockHit(BlockHitResult blockHitResult) {
This method appears to be a setter for sound but accepts multiple arguments, where just one is enough
48		return this;
49	}
50
51	public AbstractRangedAttack setSound(SoundEvent sound, float volume, float pitch) {52		this.sound = new AttackSound(sound, volume, pitch);53		return this;54	}55
56	public AbstractRangedAttack setAccuracy(double accuracy) {
57		this.accuracy = accuracy;