Add mappings for pre initialized items

This commit is contained in:
sauilitired 2018-12-18 20:56:55 +01:00
parent ccad0bced9
commit 10b87f5728

View File

@ -13,6 +13,9 @@ public abstract class BlockRegistry<T> {
public BlockRegistry(@NonNull final Class<T> type, final T... preInitializedItems) { public BlockRegistry(@NonNull final Class<T> type, final T... preInitializedItems) {
this.type = type; this.type = type;
for (final T preInitializedItem : preInitializedItems) {
this.addMapping(getPlotBlock(preInitializedItem), preInitializedItem);
}
} }
public final void addMapping(@NonNull final PlotBlock plotBlock, @NonNull final T t) { public final void addMapping(@NonNull final PlotBlock plotBlock, @NonNull final T t) {