Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Material Tree JEI page #48

Closed
wants to merge 50 commits into from

Conversation

kumquat-ir
Copy link
Contributor

What:
Adds a new JEI page that shows a flowchart-esque view of common prefixes that a DustMaterial has and some information about it. This reduces the annoyance of trying to find out what forms a material has, how to make them, and what to do with them.

Additional info:
2021-07-24_22 21 18
2021-07-24_22 22 11
2021-07-24_22 22 29
2021-07-24_22 22 40
2021-07-24_22 22 47
2021-07-24_22 22 52
2021-07-24_22 23 13

Adds new helper class DrawableRegistry, which is a glorified HashMap<String, IDrawable> for reducing boilerplate when registering a large number of IDrawables, such as the arrows on the flowchart

Currently is set to register ingredients as both inputs and outputs, so it shows up on left-click and right-click, for ease of use

Possible compatibility issue:
None

kumquat-ir and others added 9 commits July 22, 2021 23:37
currently just DustMaterials
now FluidMaterial instead of DustMaterial
do not show ebf temp if it does not exist
remove old arrows, new ones in next commit
…Eu#47)

+ Material Casting I.E. `<material:iron> as IngotMaterial`
+ RecipeMap bracket handler and fixed RecipeMap findByName method
Copy link
Member

@serenibyss serenibyss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good! A small issue I found as well as some suggestions:

  • Pipes should be displayed here somewhere (should probably do the pipeNormal prefix since some pipes do not have tiny, like Item Pipes and Wood Pipes)
  • Someone suggested a tooltip on the item to briefly explain how it is made, for example from ingot => rod, options would be file (crafting), lathe, extruder, or fluid solidify. This may end up looking very cluttered, so I think we should test it out first and see how it looks

kumquat-ir and others added 5 commits July 27, 2021 21:15
do not show ebf temp if it is zero
replace rounds with normal pipes
(exactly 3 types of round are used currently, for luv/zpm/uv components)
old arrow textures are left in resources, might use them again at some point
kumquat-ir and others added 2 commits July 27, 2021 23:07
questionable looking implementation but I can't think of a better way right now
* item pipes

* move UpdateResult.java

* remove old inv pipe code

* changes to conveyor

* InVenTOrY pIPe TyPe dOEs NoT eXiST

* fix some shit

* forgot to delete old walker

* fixing pipe box ..kinda

* remove unnecessary overrides

* fix pipe ignoring handler when conveyor is attached to pipe

* implement ItemPipeProperties

* add fluid and item pipe ore prefixes

* remove lè dot

* add tin pipe

* more work on properties

* properly insert

* remove getCover()

* rework conveyor ui and add blocks input setting

* fix pipe and cable collision

* respect robot arm settings

* revert conveyor changes and offering handler

* respect robot arm settings in a better way

* fix issue where items gets voided if stack exceeds pipe limit

* add pipe recipes

* add huge pipe extruder shape recipe

* add more item pipes

* replace maxRange with resistance

* fix oredicts

* fix pipes not reseting rate

* fix robot arm tranfers

* clean up walker

* rename resistance to priority

* resolve issues

* sort textures

* align buttons with player inventory

* rename medium pipe type to normal

* restrictive item pipes

* adjustments

* remove insulation color from fluid pipe rendering

* a line

* fix crash

* fix gt6 pipes (hopefully)

* remove debug logs

* better structure

* make pipes paintable again

* fix pipe connexting on the wrong side (kinda)
Now id doesn't connect at all if it is a low angle and another pipe in the way

* revert fix
(causes more issues than it fixes)

* add restrictive pipe recipe
maybe need modifiaction

* add restrictive pipe assembler recipe

* make block input button always visible

* minor improvements

* fix getting handler from the wrong side

* check connectable when removing cover

* semi fix fluid pipes and cables
Copy link
Contributor

@ALongStringOfNumbers ALongStringOfNumbers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, some minor comments and feedback, plus an idea that could be implemented.

guiHelper);

this.slot = guiHelper.createDrawable(GuiTextures.SLOT.imageLocation, 0, 0, 18, 18, 18, 18);
this.icon = guiHelper.createDrawableIngredient(new ItemStack(Item.getByNameOrId("minecraft:iron_ingot")));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would Suggest Aluminum ingot instead of Iron

public void setRecipe(IRecipeLayout recipeLayout, MaterialTree recipeWrapper, IIngredients ingredients) {
// place and check existence of items
IGuiItemStackGroup itemStackGroup = recipeLayout.getItemStacks();
List<List<ItemStack>> itemInputs = ingredients.getInputs(ItemStack.class);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend replacing the deprecated getInputs(ItemStack.class) with .getInputs(VanillaTypes.ITEM)


// place and check existence of fluid(s)
IGuiFluidStackGroup fluidStackGroup = recipeLayout.getFluidStacks();
List<List<FluidStack>> fluidInputs = ingredients.getInputs(FluidStack.class);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend replacing the deprecated getInputs(FluidStack.class) with .getInputs(VanillaTypes.FLUID)

minecraft.fontRenderer.drawString(materialFormula, 0, FONT_HEIGHT * linesDrawn, 0x111111);
linesDrawn++;
}
// don't think theres a good way to get the coil tier other than this
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you need the coil tier, you could add a getter in BlastFurnaceProperty that will return registeredCoilTypes

Comment on lines 93 to 97
ingredients.setInputLists(ItemStack.class, this.itemInputs);
ingredients.setInputLists(FluidStack.class, this.fluidInputs);
// these don't get displayed, but allow the material tree to show up on left *or* right click
ingredients.setOutputLists(ItemStack.class, this.itemInputs);
ingredients.setOutputLists(FluidStack.class, this.fluidInputs);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Init with the non-deprecated VanillaTypes.Item and VanillaTypes.Fluid, setInputLists and setOutputLists methods.

import java.util.List;
import java.util.ArrayList;

public class MaterialTree implements IRecipeWrapper {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing that I think would be good for this class is a tooltip method for adding tooltips to the items in the material page to notify users of how the materials are made. For example an Aluminum Rod would have the tooltip:

Made from Aluminum ingot in: Extruder, Lathe
Made from Aluminum Long Rod in Cutting Saw

In addition, tooltips would give you the opportunity to mention any recipe properties. You have a line showing the EBF coils, however for the fluid, if it was made in a Fusion Reactor, you could have a tooltip on it:

Made in Fusion Reactor MK 2

TechLord22 and others added 25 commits July 31, 2021 18:59
Co-authored-by: Tech22 <[email protected]>
Co-authored-by: Zalgo <[email protected]>
Co-authored-by: froot <[email protected]>
currently just DustMaterials
now FluidMaterial instead of DustMaterial
do not show ebf temp if it does not exist
remove old arrows, new ones in next commit
do not show ebf temp if it is zero
replace rounds with normal pipes
(exactly 3 types of round are used currently, for luv/zpm/uv components)
old arrow textures are left in resources, might use them again at some point
questionable looking implementation but I can't think of a better way right now
@kumquat-ir
Copy link
Contributor Author

fucked up some git stuff real bad it seems. gonna open a new pr for this

@kumquat-ir kumquat-ir closed this Aug 8, 2021
@kumquat-ir kumquat-ir deleted the materialtree branch August 8, 2021 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants