Added JEI ghost ingredient dragging support.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
# Refined Storage Changelog
|
||||
|
||||
### 1.9.5
|
||||
- Added JEI ghost ingredient dragging support (raoulvdberge)
|
||||
|
||||
### 1.9.4
|
||||
- Fixed JEI recipes/usages keys not working in Grids (raoulvdberge)
|
||||
|
||||
|
@@ -94,10 +94,10 @@ processResources {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft 'net.minecraftforge:forge:1.16.2-33.0.20'
|
||||
minecraft 'net.minecraftforge:forge:1.16.2-33.0.37'
|
||||
|
||||
compileOnly fg.deobf("mezz.jei:jei-1.16.2:7.1.3.19:api")
|
||||
runtimeOnly fg.deobf("mezz.jei:jei-1.16.2:7.1.3.19")
|
||||
compileOnly fg.deobf("mezz.jei:jei-1.16.2:7.3.2.25:api")
|
||||
runtimeOnly fg.deobf("mezz.jei:jei-1.16.2:7.3.2.25")
|
||||
|
||||
compileOnly 'mouse-tweaks:MouseTweaks:2.13:mc1.16.2'
|
||||
|
||||
|
@@ -1,13 +1,18 @@
|
||||
package com.refinedmods.refinedstorage.integration.jei;
|
||||
|
||||
import com.refinedmods.refinedstorage.RS;
|
||||
import com.refinedmods.refinedstorage.container.slot.filter.FilterSlot;
|
||||
import com.refinedmods.refinedstorage.container.slot.filter.FluidFilterSlot;
|
||||
import com.refinedmods.refinedstorage.container.slot.legacy.LegacyFilterSlot;
|
||||
import com.refinedmods.refinedstorage.network.SetFilterSlotMessage;
|
||||
import com.refinedmods.refinedstorage.network.SetFluidFilterSlotMessage;
|
||||
import com.refinedmods.refinedstorage.screen.BaseScreen;
|
||||
import com.refinedmods.refinedstorage.util.StackUtils;
|
||||
import mezz.jei.api.gui.handlers.IGhostIngredientHandler;
|
||||
import net.minecraft.client.renderer.Rectangle2d;
|
||||
import net.minecraft.inventory.container.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidAttributes;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -37,7 +42,7 @@ public class GhostIngredientHandler implements IGhostIngredientHandler<BaseScree
|
||||
public void accept(I ingredient) {
|
||||
slot.putStack((ItemStack) ingredient);
|
||||
|
||||
// RS.INSTANCE.network.sendToServer(new MessageSlotFilterSet(slot.slotNumber, (ItemStack) ingredient));
|
||||
RS.NETWORK_HANDLER.sendToServer(new SetFilterSlotMessage(slot.slotNumber, (ItemStack) ingredient));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -51,7 +56,7 @@ public class GhostIngredientHandler implements IGhostIngredientHandler<BaseScree
|
||||
|
||||
@Override
|
||||
public void accept(I ingredient) {
|
||||
// RS.INSTANCE.network.sendToServer(new MessageSlotFilterSetFluid(slot.slotNumber, StackUtils.copy((FluidStack) ingredient, Fluid.BUCKET_VOLUME)));
|
||||
RS.NETWORK_HANDLER.sendToServer(new SetFluidFilterSlotMessage(slot.slotNumber, StackUtils.copy((FluidStack) ingredient, FluidAttributes.BUCKET_VOLUME)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -28,9 +28,7 @@ public class RSJeiPlugin implements IModPlugin {
|
||||
@Override
|
||||
public void registerGuiHandlers(IGuiHandlerRegistration registration) {
|
||||
registration.addGenericGuiContainerHandler(BaseScreen.class, new GuiContainerHandler());
|
||||
|
||||
// TODO: https://github.com/mezz/JustEnoughItems/issues/1307
|
||||
// registration.addGhostIngredientHandler(BaseScreen.class, new GhostIngredientHandler());
|
||||
registration.addGhostIngredientHandler(BaseScreen.class, new GhostIngredientHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user