Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrbysco committed Aug 25, 2024
1 parent 619f94a commit 2b03674
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ private boolean burn(@Nullable RecipeHolder<?> holder) {
ItemStack itemstack = this.handler.getStackInSlot(INPUT_SLOT);
List<? extends String> additionalBlacklist = new ArrayList<>();
ConfigHandler.COMMON.furnaceOutputBlacklist.get();
if (!ConfigHandler.COMMON.furnaceOutputBlacklist.get().isEmpty() && !ConfigHandler.COMMON.furnaceOutputBlacklist.get().get(0).isEmpty()) {
if (!ConfigHandler.COMMON.furnaceOutputBlacklist.get().isEmpty() && !ConfigHandler.COMMON.furnaceOutputBlacklist.get().getFirst().isEmpty()) {
additionalBlacklist = ConfigHandler.COMMON.furnaceOutputBlacklist.get();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void setRecipe(IRecipeLayoutBuilder builder, InfuseRecipe recipe, IFocusG
builder.addSlot(RecipeIngredientRole.OUTPUT, 120, 47).addItemStack(recipe.getResultItem(registryAccess));
}
} else {
builder.addSlot(RecipeIngredientRole.INPUT, 46, 47).addIngredients(recipe.getIngredients().get(0));
builder.addSlot(RecipeIngredientRole.INPUT, 46, 47).addIngredients(recipe.getIngredients().getFirst());

List<ItemStack> stacks = new ArrayList<>();
ItemStack[] modifierStack = recipe.getIngredient().getItems();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public IDrawable getIcon() {

@Override
public void setRecipe(IRecipeLayoutBuilder builder, T recipe, IFocusGroup focuses) {
builder.addSlot(RecipeIngredientRole.INPUT, 10, 10).addIngredients(recipe.getIngredients().get(0));
builder.addSlot(RecipeIngredientRole.INPUT, 10, 10).addIngredients(recipe.getIngredients().getFirst());
builder.addSlot(RecipeIngredientRole.OUTPUT, 83, 10)
.addItemStack(recipe.getRecipeOutputs().get(0));
if (recipe.getRecipeOutputs().size() > 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public Class<ItemCardMenu> getContainerClass() {
}
List<IRecipeSlotView> outputs = recipeSlots.getSlotViews(RecipeIngredientRole.OUTPUT);

if (outputs.get(0).getDisplayedItemStack().isPresent())
items.set(9, outputs.get(0).getDisplayedItemStack().get());
if (outputs.getFirst().getDisplayedItemStack().isPresent())
items.set(9, outputs.getFirst().getDisplayedItemStack().get());

PacketDistributor.sendToServer(new RecipeToCardPayload(items));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public RecipeBuilder group(@Nullable String group) {

@Override
public Item getResult() {
return results.get(0).getItem();
return results.getFirst().getItem();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public NoRemainderShapedBuilder define(Character symbol, Ingredient ingredient)
* Adds a new entry to the patterns for this recipe.
*/
public NoRemainderShapedBuilder pattern(String pattern) {
if (!this.rows.isEmpty() && pattern.length() != this.rows.get(0).length()) {
if (!this.rows.isEmpty() && pattern.length() != this.rows.getFirst().length()) {
throw new IllegalArgumentException("Pattern must be the same width on every line!");
} else {
this.rows.add(pattern);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected void onHitEntity(EntityHitResult result) {
} else {
if (entity.isAlive() && !entity.isInvulnerable() && !(entity instanceof Player) &&
entity instanceof LivingEntity livingEntity && entity.canChangeDimensions(this.level(), entity.level()) &&
!forceFlask.isBlacklisted((LivingEntity) entity)) {
!forceFlask.isBlacklisted(livingEntity)) {
ItemStack entityFlask = null;
if (entity instanceof Bat) {
entityFlask = new ItemStack(ForceRegistry.BAT_FLASK.get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ protected void doPostHurtEffects(LivingEntity living) {
creeper.getEntityData().set(Creeper.DATA_IS_IGNITED, false);
attachment.setExplodeAbility(false);
creeper.goalSelector.getAvailableGoals().removeIf(goal -> goal.getGoal() instanceof SwellGoal);
ForceCraft.LOGGER.debug("Added Bane to " + living.getName());
ForceCraft.LOGGER.debug("Added Bane to {}", living.getName());

creeper.setData(ForceAttachments.BANE_MODIFIER, attachment);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public abstract class MultipleOutputFurnaceRecipe extends AbstractCookingRecipe
protected final NonNullList<ItemStack> results;

public MultipleOutputFurnaceRecipe(RecipeType<?> typeIn, String groupIn, Ingredient ingredientIn, NonNullList<ItemStack> results, float secondaryChance, float experienceIn, int cookTimeIn) {
super(typeIn, groupIn, CookingBookCategory.MISC, ingredientIn, results.get(0), experienceIn, cookTimeIn);
super(typeIn, groupIn, CookingBookCategory.MISC, ingredientIn, results.getFirst(), experienceIn, cookTimeIn);
this.results = results;
this.secondaryChance = secondaryChance;
}
Expand All @@ -33,7 +33,7 @@ public ItemStack assemble(SingleRecipeInput inv, HolderLookup.Provider registrie

@Override
public ItemStack getResultItem(HolderLookup.Provider registries) {
return this.results.get(0);
return this.results.getFirst();
}

public NonNullList<ItemStack> getRecipeOutputs() {
Expand Down

0 comments on commit 2b03674

Please sign in to comment.