Rewrote matter cannon ammo registry to be tag based.

This commit is contained in:
Sebastian Hartte
2020-06-21 22:48:42 +02:00
parent 9ab91cd98b
commit e1131bd1e2
3 changed files with 117 additions and 101 deletions
@@ -23,7 +23,9 @@
package appeng.api.features;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
public interface IMatterCannonAmmoRegistry {
@@ -34,7 +36,16 @@ public interface IMatterCannonAmmoRegistry {
* @param ammo new ammo
* @param weight atomic weight
*/
void registerAmmo(ItemStack ammo, double weight);
void registerAmmoItem(Item ammo, double weight);
/**
* register a new ammo, generally speaking this is based off of atomic weight to
* make it easier to guess at
*
* @param ammoTag item tag id
* @param weight atomic weight
*/
void registerAmmoTag(ResourceLocation ammoTag, double weight);
/**
* get the penetration value for a particular ammo, 0 indicates a non-ammo.