-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Fixes lots of issues #2404
Fixes lots of issues #2404
Conversation
- Fixes issue Lothrazar#2369 - Made some JEI category changes to make it look a bit better
- Fixed issue Lothrazar#2399 by allowing water-logged blocks to hydrate the peat
- Makes all of the recipe process server only instead of just part of it
- Fixes issue Lothrazar#2343 - Player can no longer put items in the output slot
- Made the JEI category more closely resemble the Melter gui.
- For some reason the time remaining tooltip and the show recipes tooltip clashed, so I moved the click area the the title string for the generators.
- Added the onRemove method to the Wireless Transmitter
- Checks the input before any processing happens - Recipe preview now updates when recipe grid changes instead of when it's done processing
- The fluid portion of the FluidTagIngredient is empty, so I made a work around until it is fixed in FLib.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work and thanks for your patience! i tested everything and reviewed all the code and the fixes look good, they address the issues as stated
} | ||
|
||
@Override | ||
public void setRecipe(IRecipeLayoutBuilder builder, RecipeMelter recipe, IFocusGroup focuses) { | ||
builder.addSlot(RecipeIngredientRole.INPUT, 4, 19).addIngredients(recipe.at(0)); | ||
builder.addSlot(RecipeIngredientRole.INPUT, 22, 19).addIngredients(recipe.at(1)); | ||
List<FluidStack> matchingFluids = List.of(recipe.getRecipeFluid()); | ||
builder.addSlot(RecipeIngredientRole.OUTPUT, 140, 19).addIngredients(ForgeTypes.FLUID_STACK, matchingFluids); | ||
builder.addSlot(RecipeIngredientRole.OUTPUT, 132, 19).addIngredients(ForgeTypes.FLUID_STACK, matchingFluids).setFluidRenderer(4000, false, 16, 16); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sweet i never knew jei had a fluid renderer like this
gui = helper.drawableBuilder(new ResourceLocation(ModCyclic.MODID, "textures/jei/melter_recipe.png"), 0, 0, 169, 69).setTextureSize(169, 69).build(); | ||
icon = helper.createDrawableIngredient(VanillaTypes.ITEM_STACK, new ItemStack(BlockRegistry.MELTER.get())); | ||
bar = new EnergyBar(font, TileSolidifier.MAX); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ha why didnt i think of that. i made the bars module but never thought to re use them into the jei component. smart
@@ -44,4 +45,18 @@ public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level world, Block | |||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) { | |||
builder.add(POWERED); | |||
} | |||
|
|||
@Override // was onReplaced | |||
public void onRemove(BlockState state, Level worldIn, BlockPos pos, BlockState newState, boolean isMoving) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
//Fixes sync issue entirely | ||
if(level.isClientSide()) return; | ||
//Checks if there is space in the output slot | ||
if(this.outputSlots.getStackInSlot(0).getCount() > 64 - currentRecipe.getResultItem(level.registryAccess()).getCount()) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we assume the max is always 64? what if its an ender pearl and 16 is the max. well we can check that later, still a good fix
@@ -67,6 +67,8 @@ public void tick() { | |||
if (currentRecipe == null) { | |||
return; | |||
} | |||
//Fixes sync issue entirely |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noice
return; | ||
} | ||
//Checks if there is space in the output slots before processing | ||
if(outputSlots.getStackInSlot(0).getCount() > 64 - currentRecipe.getResultItem(level.registryAccess()).copy().getCount()) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix looks good! the hardcoded 64 can be an issue, for example if i have a recipe that outputs 3 ender pearls, that has a max stack size of 16 so it has that issue. i can change it later you just do it something like this
var result = currentRecipe.getResultItem(level.registryAccess()).copy();
var max = result.getMaxStackSize();
gridStacks.add(gridHandler.getStackInSlot(i).copy()); | ||
} | ||
for(ItemStack stack : inputStacks) { | ||
List<ItemStack> lolbit = new ArrayList<ItemStack>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aha so lolbit are the matches so we know what to clear out when we are removingall i got it. works in my testing 👍
And yeah for "I also have a working JEI Category for the Combustion Generator and Devouring Generator if you want me to make a pull request for it." yeah i would merge it. i figured people would just know what is edible or what is furnace fuel (coal and lava) but it would be nice for lots of players |
JEI Changes:
Dry Peat:
Solidifier/Melter:
Crushing Macerator:
Evaporation Generator:
Auto Crafter:
Wireless Transmitter:
@Lothrazar I also have a working JEI Category for the Combustion Generator and Devouring Generator if you want me to make a pull request for it.