Skip to content

Supporting NBT in Custom hammer Recipes (Thanks to RacerDelux of MMD) #57

Open

Description

@jriwanek

[2:53 PM] RacerDelux: ok so you have to make your own ShapedOreRecipe
[2:53 PM] RacerDelux: and implement thse methods
[2:53 PM] RacerDelux: public class MPBRecipe extends ShapedOreRecipe{

public MPBRecipe(Block result, Object... recipe){super(result, recipe); }
public MPBRecipe(Item result, Object... recipe){ super(result, recipe); }
public MPBRecipe(ItemStack result, Object... recipe){
super(result, recipe); }

@OverRide
public ItemStack getCraftingResult(InventoryCrafting craftMatrix) {

[2:53 PM] RacerDelux: thats an example from mine
[2:53 PM] RacerDelux: in the getcraftingresult
[2:54 PM] RacerDelux: you can get the stack of items that were in the table
[2:54 PM] RacerDelux: then you do
[2:54 PM] RacerDelux: tmp.setTagCompound(new NBTTagCompound());
tmp.getTagCompound().setString("test", "I am a new item!");
[2:54 PM] RacerDelux: where tmp is a new itemstack
[2:55 PM] RacerDelux: and then at the end of getcraftingresult
[2:55 PM] RacerDelux: you just return tmp
[2:55 PM] RacerDelux: or whatever you call the itemstack

Activity

  1. added this to the 2.5.0 milestone on Feb 10, 2017
  2. self-assigned this
    on Feb 14, 2017
  3. dshadowwolf commented on Feb 14, 2017

    @dshadowwolf
    Collaborator

    Work in progress to extend the CrusherRecipe class to include NBT support. Might not be as difficult as research first indicated.

  4. dshadowwolf commented on Feb 16, 2017

    @dshadowwolf
    Collaborator

    Complications from Java and the old Cyano code have stopped progress for now.

  5. YaibaToKen commented on Oct 19, 2018

    @YaibaToKen
    Collaborator

    @dshadowwolf wasn't this what you were working on yesterday? I got the idea you finished it and got it pulled

  6. dshadowwolf commented on Oct 19, 2018

    @dshadowwolf
    Collaborator

    Untested - we have no users in the code-base currently, so I'm leaving it open for now

  7. dshadowwolf commented on Oct 20, 2018

    @dshadowwolf
    Collaborator

    For a proper JEI interface there is probably some more work needed here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions