More compostable items (#128)
This commit is contained in:
parent
ffa5d2f816
commit
59190485f3
1 changed files with 12 additions and 1 deletions
|
@ -10,6 +10,7 @@ import net.minecraft.block.Blocks;
|
|||
import net.minecraft.block.LeavesBlock;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tag.BlockTags;
|
||||
import net.minecraft.tag.ItemTags;
|
||||
|
@ -99,11 +100,21 @@ public class EndTags {
|
|||
else if (block instanceof PedestalBlock) {
|
||||
TagHelper.addTag(PEDESTALS, block);
|
||||
}
|
||||
if (block.getDefaultState().getMaterial().equals(Material.PLANT)) {
|
||||
|
||||
Material mat = block.getDefaultState().getMaterial();
|
||||
if (mat.equals(Material.PLANT) || mat.equals(Material.REPLACEABLE_PLANT)) {
|
||||
ComposterBlockAccessor.callRegisterCompostableItem(0.1F, block);
|
||||
}
|
||||
});
|
||||
|
||||
EndItems.getModItems().forEach((item) -> {
|
||||
if (item.isFood()) {
|
||||
FoodComponent food = item.getFoodComponent();
|
||||
float compost = food.getHunger() * food.getSaturationModifier() * 0.18F;
|
||||
ComposterBlockAccessor.callRegisterCompostableItem(compost, item);
|
||||
}
|
||||
});
|
||||
|
||||
TagHelper.addTag(GEN_TERRAIN, EndBlocks.ENDER_ORE, EndBlocks.FLAVOLITE.stone, EndBlocks.VIOLECITE.stone, EndBlocks.SULPHURIC_ROCK.stone, EndBlocks.BRIMSTONE);
|
||||
TagHelper.addTag(END_GROUND, EndBlocks.SULPHURIC_ROCK.stone, EndBlocks.BRIMSTONE);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue