package info.u_team.u_team_core.util.registry;

import java.util.function.Supplier;

import net.minecraft.block.Block;
import net.minecraft.item.BlockItem;
import net.minecraftforge.fml.RegistryObject;

public class BlockRegistryObject<B extends Block, I extends BlockItem> implements Supplier<B> {
	
	private final RegistryObject<B> block;
	private final RegistryObject<I> item;
	
	public BlockRegistryObject(RegistryObject<B> block, RegistryObject<I> item) {
		this.block = block;
		this.item = item;
	}
	
	@Override
	public B get() {
		return block.get();
	}
	
	public boolean hasItem() {
		return item.isPresent();
	}
	
	public I getItem() {
		return item.get();
	}
	
}

@@ -149,16 +149,60 @@
 ckItem;%0A
+import net.minecraft.util.ResourceLocation;%0A
 import n
@@ -550,54 +550,181 @@
 %0A%09%0A%09
-@Override%0A%09public B get() %7B%0A%09%09return block.get
+public boolean isPresent() %7B%0A%09%09return block.isPresent();%0A%09%7D%0A%09%0A%09@Override%0A%09public B get() %7B%0A%09%09return block.get();%0A%09%7D%0A%09%0A%09public ResourceLocation getId() %7B%0A%09%09return block.getId
 ();%0A
@@ -836,10 +836,77 @@
 );%0A%09%7D%0A%09%0A
+%09public ResourceLocation getItemId() %7B%0A%09%09return item.getId();%0A%09%7D%0A%09%0A
 %7D%0A

Add more getters to block registry object