Remove build artifacts, dev tool configs, unused dependencies, and third-party source dumps. Add proper README, update .gitignore, clean up Makefile.
38 lines
1021 B
Java
38 lines
1021 B
Java
package com.tiedup.remake.items;
|
|
|
|
import com.tiedup.remake.items.base.EarplugsVariant;
|
|
import com.tiedup.remake.items.base.ItemEarplugs;
|
|
import net.minecraft.world.item.Item;
|
|
|
|
/**
|
|
* Generic earplugs item created from EarplugsVariant enum.
|
|
* Replaces individual earplugs classes (ItemClassicEarplugs).
|
|
*
|
|
* Factory pattern: All earplugs variants are created using this single class.
|
|
*/
|
|
public class GenericEarplugs extends ItemEarplugs {
|
|
|
|
private final EarplugsVariant variant;
|
|
|
|
public GenericEarplugs(EarplugsVariant variant) {
|
|
super(new Item.Properties().stacksTo(16));
|
|
this.variant = variant;
|
|
}
|
|
|
|
/**
|
|
* Get the variant this earplugs was created from.
|
|
*/
|
|
public EarplugsVariant getVariant() {
|
|
return variant;
|
|
}
|
|
|
|
/**
|
|
* Get the texture subfolder for this earplugs variant.
|
|
* Issue #12 fix: Eliminates string checks in renderers.
|
|
*/
|
|
@Override
|
|
public String getTextureSubfolder() {
|
|
return variant.getTextureSubfolder();
|
|
}
|
|
}
|