Skip to content

Commit

Permalink
Fixed creative vending upgrades using the base stack, closes #239
Browse files Browse the repository at this point in the history
  • Loading branch information
Buuz135 committed Feb 24, 2024
1 parent 3cf8cc6 commit 1c58b45
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: build
run: ./gradlew build
- name: Publish Minecraft Mods Forge
uses: Kir-Antipov/mc-publish@v3.2
uses: Kir-Antipov/mc-publish@v3.3.0
with:
curseforge-id: 556861
modrinth-id: cO40ZIg3
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ dependencies {

minecraft 'net.minecraftforge:forge:1.20.1-47.1.1'
implementation fg.deobf(project.dependencies.create('com.hrznstudio:titanium:1.20.1-3.8.1-9'))
compileOnly fg.deobf("mezz.jei:jei-1.20.1-common-api:15.2.0.20")
compileOnly fg.deobf("mezz.jei:jei-1.20.1-forge-api:15.2.0.20")
compileOnly fg.deobf("mezz.jei:jei-1.20.1-common-api:15.2.0.23")
compileOnly fg.deobf("mezz.jei:jei-1.20.1-forge-api:15.2.0.23")
// at runtime, use the full JEI jar for Forge
runtimeOnly fg.deobf("mezz.jei:jei-1.20.1-forge:15.2.0.20")
runtimeOnly fg.deobf("mezz.jei:jei-1.20.1-forge:15.2.0.23")
implementation fg.deobf("curse.maven:the-one-probe-245211:4613250")
implementation fg.deobf("curse.maven:mekanism-268560:4866575")
annotationProcessor "org.spongepowered:mixin:0.8.5:processor"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public ItemStack extractItem(int slot, int amount, boolean simulate) {
if (slot < type.getSlots()){
BigStack bigStack = this.storedStacks.get(slot);
if (bigStack.getStack().isEmpty()) return ItemStack.EMPTY;
if (bigStack.getAmount() <= amount) {
if (!isCreative() && bigStack.getAmount() <= amount) {
ItemStack out = bigStack.getStack().copy();
int newAmount = bigStack.getAmount();
if (!simulate && !isCreative()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public ItemStack extractItem(int slot, int amount, boolean simulate) {
CompactingUtil.Result bigStack = this.resultList.get(slot);
if (bigStack.getResult().isEmpty()) return ItemStack.EMPTY;
int stackAmount = bigStack.getNeeded() * amount;
if (stackAmount >= this.amount) {
if (!isCreative() && stackAmount >= this.amount) {
ItemStack out = bigStack.getResult().copy();
int newAmount = (int) Math.floor(this.amount / bigStack.getNeeded());
if (!simulate && !isCreative()) {
Expand Down

0 comments on commit 1c58b45

Please sign in to comment.