Added BogeyStyle Wrapper

This commit is contained in:
Rabbitminers 2023-03-24 23:41:56 +00:00
parent dfb7640bfc
commit 154d455f3f

View File

@ -0,0 +1,23 @@
package com.simibubi.create.content.logistics.trains.entity;
import com.simibubi.create.content.logistics.trains.BogeyRenderer.BogeySize;
import com.simibubi.create.content.logistics.trains.IBogeyBlock;
import net.minecraftforge.registries.ForgeRegistryEntry;
import net.minecraftforge.registries.IForgeRegistryEntry;
import java.util.Map;
public class BogeyStyle extends ForgeRegistryEntry<BogeyStyle> implements IForgeRegistryEntry<BogeyStyle> {
public Map<BogeySize, IBogeyBlock> blocks;
final Class<? extends BogeyInstance> instance;
public BogeyStyle(Class<? extends BogeyInstance> instance) {
this.instance = instance;
}
public <C extends BogeyInstance> BogeyInstance getInstance() throws IllegalAccessException, InstantiationException {
return instance.newInstance();
}
}