mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Ignore some Items in JEI
This commit is contained in:
parent
6edab422c4
commit
0b3201bcf9
2 changed files with 21 additions and 5 deletions
|
@ -55,12 +55,17 @@ public class BlockPlant extends BlockCrops{
|
|||
List<ItemStack> drops = getDrops(world, pos, state, 0);
|
||||
boolean deductedSeedSize = false;
|
||||
for(ItemStack stack : drops){
|
||||
if(stack != null && stack.getItem() == this.seedItem && !deductedSeedSize){
|
||||
stack.stackSize--;
|
||||
deductedSeedSize = true;
|
||||
if(stack != null){
|
||||
if(stack.getItem() == this.seedItem && !deductedSeedSize){
|
||||
stack.stackSize--;
|
||||
deductedSeedSize = true;
|
||||
}
|
||||
|
||||
if(stack.stackSize > 0){
|
||||
EntityItem entity = new EntityItem(world, pos.getX()+0.5, pos.getY()+0.5, pos.getZ()+0.5, stack);
|
||||
world.spawnEntityInWorld(entity);
|
||||
}
|
||||
}
|
||||
EntityItem entity = new EntityItem(world, pos.getX()+.5, pos.getY()+.5, pos.getZ()+.5, stack);
|
||||
world.spawnEntityInWorld(entity);
|
||||
}
|
||||
|
||||
world.setBlockState(pos, getStateFromMeta(0));
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
package de.ellpeck.actuallyadditions.mod.jei;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
||||
import de.ellpeck.actuallyadditions.mod.jei.booklet.BookletRecipeCategory;
|
||||
import de.ellpeck.actuallyadditions.mod.jei.booklet.BookletRecipeHandler;
|
||||
|
@ -20,7 +21,9 @@ import de.ellpeck.actuallyadditions.mod.jei.crusher.CrusherRecipeCategory;
|
|||
import de.ellpeck.actuallyadditions.mod.jei.crusher.CrusherRecipeHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.jei.reconstructor.ReconstructorRecipeCategory;
|
||||
import de.ellpeck.actuallyadditions.mod.jei.reconstructor.ReconstructorRecipeHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import mezz.jei.api.*;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@JEIPlugin
|
||||
public class JEIActuallyAdditionsPlugin implements IModPlugin{
|
||||
|
@ -69,6 +72,14 @@ public class JEIActuallyAdditionsPlugin implements IModPlugin{
|
|||
ignoreList.ignoreNbtTagNames(InitItems.itemBatteryTriple, "Energy");
|
||||
ignoreList.ignoreNbtTagNames(InitItems.itemBatteryQuadruple, "Energy");
|
||||
ignoreList.ignoreNbtTagNames(InitItems.itemBatteryQuintuple, "Energy");
|
||||
|
||||
IItemBlacklist blacklist = this.helpers.getItemBlacklist();
|
||||
blacklist.addItemToBlacklist(new ItemStack(InitBlocks.blockRice));
|
||||
blacklist.addItemToBlacklist(new ItemStack(InitBlocks.blockCanola));
|
||||
blacklist.addItemToBlacklist(new ItemStack(InitBlocks.blockFlax));
|
||||
blacklist.addItemToBlacklist(new ItemStack(InitBlocks.blockCoffee));
|
||||
blacklist.addItemToBlacklist(new ItemStack(InitBlocks.blockWildPlant, 1, Util.WILDCARD));
|
||||
blacklist.addItemToBlacklist(new ItemStack(InitBlocks.blockColoredLampOn, 1, Util.WILDCARD));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue