mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-07 12:23:43 +01:00
fix: Schematicannon request wrong blocks (#5830)
* fix: schematics request tall grass block which is unobtainable (#5814) * fix: give large ferns the same treatment * remove unused imports * comments * fix requirement for farmers delight rich soil
This commit is contained in:
parent
efb3cf490d
commit
d66170c8fe
1 changed files with 11 additions and 0 deletions
|
@ -6,8 +6,10 @@ import java.util.List;
|
|||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import com.simibubi.create.foundation.data.recipe.Mods;
|
||||
import com.simibubi.create.foundation.utility.NBTProcessors;
|
||||
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.decoration.ArmorStand;
|
||||
import net.minecraft.world.entity.decoration.ItemFrame;
|
||||
|
@ -94,10 +96,19 @@ public class ItemRequirement {
|
|||
if (block instanceof SnowLayerBlock)
|
||||
return new ItemRequirement(ItemUseType.CONSUME, new ItemStack(item, state.getValue(SnowLayerBlock.LAYERS)
|
||||
.intValue()));
|
||||
// FD's rich soil extends FarmBlock so this is to make sure the cost is correct (it should be rich soil not dirt)
|
||||
if (block == Registry.BLOCK.get(Mods.FD.asResource("rich_soil_farmland")))
|
||||
return new ItemRequirement(ItemUseType.CONSUME, Registry.ITEM.get(Mods.FD.asResource("rich_soil")));
|
||||
if (block instanceof FarmBlock || block instanceof DirtPathBlock)
|
||||
return new ItemRequirement(ItemUseType.CONSUME, Items.DIRT);
|
||||
if (block instanceof AbstractBannerBlock && be instanceof BannerBlockEntity bannerBE)
|
||||
return new ItemRequirement(new StrictNbtStackRequirement(bannerBE.getItem(), ItemUseType.CONSUME));
|
||||
// Tall grass doesnt exist as a block so use 2 grass blades
|
||||
if (block == Blocks.TALL_GRASS)
|
||||
return new ItemRequirement(ItemUseType.CONSUME, new ItemStack(Items.GRASS, 2));
|
||||
// Large ferns don't exist as blocks so use 2 ferns instead
|
||||
if (block == Blocks.LARGE_FERN)
|
||||
return new ItemRequirement(ItemUseType.CONSUME, new ItemStack(Items.FERN, 2));
|
||||
|
||||
return new ItemRequirement(ItemUseType.CONSUME, item);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue