Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • IRecipe . getRecipeSize
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 1
Ewe Loon

IRecipe . getRecipeSize

By Ewe Loon, August 19, 2014 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

Ewe Loon    17

Ewe Loon

Ewe Loon    17

  • Creeper Killer
  • Ewe Loon
  • Members
  • 17
  • 158 posts
Posted August 19, 2014

does anyone know what

IRecipe . getRecipeSize()

is used for ?

 

  • Quote

Share this post


Link to post
Share on other sites

SnowyEgret    4

SnowyEgret

SnowyEgret    4

  • Creeper Killer
  • SnowyEgret
  • Members
  • 4
  • 112 posts
Posted August 19, 2014

Hi again Ewe,

 

Searching my workspace gives:

 

From net.minecraftforge.oredict.RecipeSorter:

 

   @Override
    public int compare(IRecipe r1, IRecipe r2)
    {
        Category c1 = getCategory(r1);
        Category c2 = getCategory(r2);
        if (c1 == SHAPELESS && c2 == SHAPED) return  1;
        if (c1 == SHAPED && c2 == SHAPELESS) return -1;
        if (r2.getRecipeSize() < r1.getRecipeSize()) return -1;
        if (r2.getRecipeSize() > r1.getRecipeSize()) return  1;
        return getPriority(r2) - getPriority(r1); // high priority value first! 
    }

 

and net.minecraft.item.crafting.CraftingManager:

 

public int compare(IRecipe p_compare_1_, IRecipe p_compare_2_)
{
    return p_compare_1_ instanceof ShapelessRecipes && p_compare_2_ instanceof ShapedRecipes ? 1 : (p_compare_2_ instanceof ShapelessRecipes && p_compare_1_ instanceof ShapedRecipes ? -1 : (p_compare_2_.getRecipeSize() < p_compare_1_.getRecipeSize() ? -1 : (p_compare_2_.getRecipeSize() > p_compare_1_.getRecipeSize() ? 1 : 0)));
}

  • Quote

Share this post


Link to post
Share on other sites

Ewe Loon    17

Ewe Loon

Ewe Loon    17

  • Creeper Killer
  • Ewe Loon
  • Members
  • 17
  • 158 posts
Posted August 19, 2014

so, it appears its only used for sorting

 

  • Quote

Share this post


Link to post
Share on other sites

sequituri    118

sequituri

sequituri    118

  • Dragon Slayer
  • sequituri
  • Forge Modder
  • 118
  • 669 posts
Posted August 20, 2014

I represents that grid size of the recipe. Normally 4 or 9 is used.

  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • TomPlayzs
      [ solved ] - HUD images (exp bar, health, hunger, etc.) glitching out.

      By TomPlayzs · Posted 13 minutes ago

      I have this problem too! How do i fix it?
    • Oliviafrostpaw
      [1.14.4] Injecting into Existing Loot Tables, Blocks

      By Oliviafrostpaw · Posted 24 minutes ago

      Making it easier for showing the code, please see GitHub repository that I ideally should have set up to begin with so that I would have known when exactly all of this broke Github Link
    • DragonITA
      [1.14.4] How to get Minecraft Horse model/texture to make a custom unicorn?

      By DragonITA · Posted 58 minutes ago

      i think whoever's bugging me in the HorseEntity Class is, here: private static final String[] HORSE_TEXTURES = new String[]{"textures/entity/horse/horse_white.png", "textures/entity/horse/horse_creamy.png", "textures/entity/horse/horse_chestnut.png", "textures/entity/horse/horse_brown.png", "textures/entity/horse/horse_black.png", "textures/entity/horse/horse_gray.png", "textures/entity/horse/horse_darkbrown.png"};  
    • DragonITA
      [1.14.4] How to get Minecraft Horse model/texture to make a custom unicorn?

      By DragonITA · Posted 1 hour ago

      package net.batonfack.fantasymod.client.models; import net.minecraft.client.renderer.entity.model.EntityModel; import net.minecraft.client.renderer.entity.model.RendererModel; import net.minecraft.client.renderer.model.ModelBox; import net.minecraft.entity.LivingEntity; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @OnlyIn(Dist.CLIENT) public class ModelUnicornWitoutAbstracHorse<T extends LivingEntity> extends EntityModel<T> { protected final RendererModel field_217127_a; protected final RendererModel field_217128_b; private final RendererModel CornGroup; private final RendererModel Corn1; private final RendererModel Corn2; private final RendererModel Corn3; public ModelUnicornWitoutAbstracHorse(float p_i51065_1_) { this.field_217127_a = null; this.field_217128_b = null; this.textureWidth = 128; this.textureHeight = 64; CornGroup = new RendererModel(this); CornGroup.setRotationPoint(0.0F, 0.0F, 0.0F); Corn1 = new RendererModel(this, 64, 0); Corn1.setRotationPoint(1.5F, -5.0F, -15.0F); this.Corn1.setRotationPoint(0.5409F, 0.0F, 0.0F); CornGroup.addChild(Corn1); Corn1.cubeList.add(new ModelBox(Corn1, 52, 57, -3.0F, -3.0F, -4.0F, 3, 4, 3, 0.0F, true)); Corn2 = new RendererModel(this, 64, 28); Corn2.setRotationPoint(1.5F, -5.0F, -15.0F); this.Corn2.setRotationPoint(0.5409F, 0.0F, 0.0F); CornGroup.addChild(Corn2); Corn2.cubeList.add(new ModelBox(Corn2, 0, 0, -2.4F, -5.3F, -3.6F, 2, 3, 2, 0.0F, true)); Corn3 = new RendererModel(this, 96, 32); Corn3.setRotationPoint(1.5F, -5.0F, -15.0F); this.Corn3.setRotationPoint(0.5409F, 0.0F, 0.0F); CornGroup.addChild(Corn3); Corn3.cubeList.add(new ModelBox(Corn3, 0, 0, -1.8F, -8.1F, -3.2F, 1, 3, 1, 0.0F, true)); } protected void func_199047_a(RendererModel p_199047_1_) { RendererModel renderermodel = new RendererModel(this, 19, 16); renderermodel.addBox(0.55F, -13.0F, 4.0F, 2, 3, 1, -0.001F); RendererModel renderermodel1 = new RendererModel(this, 19, 16); renderermodel1.addBox(-2.55F, -13.0F, 4.0F, 2, 3, 1, -0.001F); p_199047_1_.addChild(renderermodel); p_199047_1_.addChild(renderermodel1); } }  
    • DragonITA
      [1.14.4] How to get Minecraft Horse model/texture to make a custom unicorn?

      By DragonITA · Posted 1 hour ago

      package net.batonfack.fantasymod.entities; import net.batonfack.fantasymod.init.FantasyModEntities; import net.minecraft.entity.EntityType; import net.minecraft.entity.passive.horse.HorseEntity; import net.minecraft.world.World; public class UnicornEntity extends HorseEntity { @SuppressWarnings("unchecked") public UnicornEntity(EntityType<? extends HorseEntity> type, World worldIn) { super((EntityType<? extends HorseEntity>) FantasyModEntities.UNICORN_ENTITY, worldIn); } }  
  • Topics

    • WinneonSword
      2
      [ solved ] - HUD images (exp bar, health, hunger, etc.) glitching out.

      By WinneonSword
      Started August 31, 2013

    • Oliviafrostpaw
      8
      [1.14.4] Injecting into Existing Loot Tables, Blocks

      By Oliviafrostpaw
      Started December 8

    • DragonITA
      40
      [1.14.4] How to get Minecraft Horse model/texture to make a custom unicorn?

      By DragonITA
      Started Monday at 10:06 AM

    • DarkZapato
      2
      Optifine 1.14.4 U HD F4 crash froge

      By DarkZapato
      Started Thursday at 04:09 PM

    • troyvs
      0
      [1.12.2]help me to attach capability to player

      By troyvs
      Started 1 hour ago

  • Who's Online (See full list)

    • TolgacanM
    • Choonster
    • Misterboy64
    • Yanny7
    • ricoc90
    • Oliviafrostpaw
    • TomPlayzs
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • IRecipe . getRecipeSize
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community