Jump to content

Recommended Posts

Posted

When I smelt in-game i only get Shadow Ingot even from Ruby ores. It's probably because of

withVariant() and getBlock() are counter to each other.

withVariant() defines which variant (and thus metadata) to use.

getBlock() strips metadata information.

If so I need a new method or what? Can somebody explain it to me step by step or provide source?

problem.png

Posted (edited)

If you use #getBlock() after a IBlockState, than everything stored in it, (like it's variant) is gone. I don't know how, but you need to find another way of doing this.

ย 

Use FurnaceRecipes::addSmeltingRecipe(ItemStack, ItemStack, float).

ย 

FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(BlockInit.ORE_OVERWORLD.getDefaultState().withProperty(...).getBlock), new ItemStack(Items.APPLE), 1);

ย 

Edited by Legenes
I'm an idiot. + example + oops
procedure WakeMeUp(Integer plusTime);
var
  I: Integer;
begin
  for I := 0 to plusTime do begin
    println('One more minute!');
    Sleep(1000);
  end;
  println('Okay, nothing to worry, I''m alive!');
  println('So... somebody can give me a coffee?');
  println('I know it''s Pascal, and not Java, but I love it :D.');
end;
Posted

Oops.. #getBlock was missing.

procedure WakeMeUp(Integer plusTime);
var
  I: Integer;
begin
  for I := 0 to plusTime do begin
    println('One more minute!');
    Sleep(1000);
  end;
  println('Okay, nothing to worry, I''m alive!');
  println('So... somebody can give me a coffee?');
  println('I know it''s Pascal, and not Java, but I love it :D.');
end;
Posted
Just now, diesieben07 said:
8 minutes ago, Legenes said:

Oops.. #getBlock was missing.

That won't do anything. OP already explained this above.

I was just saying that I made a bad example ?

procedure WakeMeUp(Integer plusTime);
var
  I: Integer;
begin
  for I := 0 to plusTime do begin
    println('One more minute!');
    Sleep(1000);
  end;
  println('Okay, nothing to worry, I''m alive!');
  println('So... somebody can give me a coffee?');
  println('I know it''s Pascal, and not Java, but I love it :D.');
end;
Posted
23 minutes ago, diesieben07 said:

Blocks only exist in the world, not in inventories.ย You need to specify an ItemStack.

I need to specify it above with public static final?

Posted

No, I tested my example, and I had a little mistake. You just need to put #getBlock() after #withProperty().

procedure WakeMeUp(Integer plusTime);
var
  I: Integer;
begin
  for I := 0 to plusTime do begin
    println('One more minute!');
    Sleep(1000);
  end;
  println('Okay, nothing to worry, I''m alive!');
  println('So... somebody can give me a coffee?');
  println('I know it''s Pascal, and not Java, but I love it :D.');
end;
Posted
Just now, diesieben07 said:

This will not allow you to specify block subtypes. Again, read the OP.

Oh. I'm stupid. Sorry.

procedure WakeMeUp(Integer plusTime);
var
  I: Integer;
begin
  for I := 0 to plusTime do begin
    println('One more minute!');
    Sleep(1000);
  end;
  println('Okay, nothing to worry, I''m alive!');
  println('So... somebody can give me a coffee?');
  println('I know it''s Pascal, and not Java, but I love it :D.');
end;
Posted

I think if you pre-make your itemStack and then you set it's meta withmyItemStack.setItemDamage(-the meta value you need-) then you can make it work with the FurnaceRecipes.instance().addSmeltingRecipe. This is my last idea.

procedure WakeMeUp(Integer plusTime);
var
  I: Integer;
begin
  for I := 0 to plusTime do begin
    println('One more minute!');
    Sleep(1000);
  end;
  println('Okay, nothing to worry, I''m alive!');
  println('So... somebody can give me a coffee?');
  println('I know it''s Pascal, and not Java, but I love it :D.');
end;
Posted

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.ย  If you think this is the case, JUST REPORT ME.ย  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

ย 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

ย 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.