Clean repo for open source release
Remove build artifacts, dev tool configs, unused dependencies, and third-party source dumps. Add proper README, update .gitignore, clean up Makefile.
This commit is contained in:
37
src/main/java/com/tiedup/remake/items/GenericEarplugs.java
Normal file
37
src/main/java/com/tiedup/remake/items/GenericEarplugs.java
Normal file
@@ -0,0 +1,37 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user