All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.parzivail.util.item.PHoeItem Maven / Gradle / Ivy

There is a newer version: 0.0.114+1.20.2
Show newest version
package com.parzivail.util.item;

import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.Multimap;
import net.minecraft.class_1304;
import net.minecraft.class_1320;
import net.minecraft.class_1322;
import net.minecraft.class_1794;
import net.minecraft.class_1832;
import net.minecraft.class_5134;

public class PHoeItem extends class_1794
{
	private final Multimap attributeModifiers;

	public PHoeItem(class_1832 material, int attackDamage, float attackSpeed, class_1793 settings)
	{
		this(material, attackDamage, 0, attackSpeed, settings);
	}

	public PHoeItem(class_1832 material, int attackDamage, float attackDamageExtra, float attackSpeed, class_1793 settings)
	{
		super(material, attackDamage, attackSpeed, settings);

		ImmutableMultimap.Builder builder = ImmutableMultimap.builder();
		builder.put(class_5134.field_23721, new class_1322(field_8006, "Tool modifier", attackDamage + attackDamageExtra, class_1322.class_1323.field_6328));
		builder.put(class_5134.field_23723, new class_1322(field_8001, "Tool modifier", attackSpeed, class_1322.class_1323.field_6328));
		this.attributeModifiers = builder.build();
	}

	@Override
	public Multimap method_7844(class_1304 slot)
	{
		return slot == class_1304.field_6173 ? this.attributeModifiers : super.method_7844(slot);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy