update to 24w33a
This commit is contained in:
1 parent
9940feb7d3
commit
d11586fdaf
58 files changed
+379
-875
No files matched your search
@@ -1,7 +1,6 @@
|
||||
package carpet.helpers;
|
||||
|
||||
import carpet.CarpetServer;
|
||||
import carpet.fakes.IngredientInterface;
|
||||
import carpet.fakes.RecipeManagerInterface;
|
||||
import carpet.utils.Messenger;
|
||||
import it.unimi.dsi.fastutil.objects.Object2LongLinkedOpenHashMap;
|
||||
@@ -22,7 +21,7 @@ import net.minecraft.world.item.DyeItem;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
import net.minecraft.world.item.crafting.PlacementInfo;
|
||||
import net.minecraft.world.item.crafting.Recipe;
|
||||
import net.minecraft.world.item.crafting.RecipeType;
|
||||
import net.minecraft.world.level.block.AbstractBannerBlock;
|
||||
@@ -32,12 +31,12 @@ import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.material.MapColor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static java.util.Map.entry;
|
||||
@@ -376,16 +375,13 @@ public class HopperCounter
|
||||
{
|
||||
for (Recipe<?> r: ((RecipeManagerInterface) CarpetServer.minecraft_server.getRecipeManager()).getAllMatching(type, id, registryAccess))
|
||||
{
|
||||
for (Ingredient ingredient: r.getIngredients())
|
||||
for (Optional<PlacementInfo.SlotInfo> ingredient: r.placementInfo().slotInfo())
|
||||
{
|
||||
for (Collection<ItemStack> stacks : ((IngredientInterface) (Object) ingredient).getRecipeStacks())
|
||||
for(ItemStack stack : ingredient.get().possibleItems())
|
||||
{
|
||||
for (ItemStack iStak : stacks)
|
||||
{
|
||||
TextColor cand = fromItem(iStak.getItem(), registryAccess);
|
||||
if (cand != null)
|
||||
return cand;
|
||||
}
|
||||
TextColor cand = fromItem(stack.getItem(), registryAccess);
|
||||
if (cand != null)
|
||||
return cand;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user