Skip to content

Commit

Permalink
Merge pull request #326 from gottsch/1.18.2-develop
Browse files Browse the repository at this point in the history
fixes
  • Loading branch information
gottsch authored Jul 13, 2023
2 parents 76fc72a + ca456ac commit 4ea0470
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 13 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.1.2] - 2023-07-13

### Changed

- Updated AbstractTreasureChestBlockEntity to use the sided call to CapabilityProvider#getCapability().
This fixes the Jade crash issue.

## [3.1.1] - 2023-07-11

### Changed
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ dependencies {
compileOnly fg.deobf("someguyssoftware.gottschcore:GottschCore:mc1.18.2-f40.1.0-v2.1.0")

//compileOnly fg.deobf("curse.maven:champions-307152:${cf_champions}")
//compileOnly fg.deobf("curse.maven:jade-324717:4082408")
compileOnly fg.deobf("curse.maven:jade-324717:4575623") // jade 1.18.2
compileOnly fg.deobf("curse.maven:compass-coords-368398:3765883")

// implementation files(gottschcore_path)
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package_group=gottsch
# use alpha, beta, or v (for version)
mod_version_type=

mod_version=3.1.1
mod_version=3.1.2

#versions
mc_version=1.18.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import org.jetbrains.annotations.NotNull;

import mod.gottsch.forge.gottschcore.enums.IRarity;
import mod.gottsch.forge.treasure2.Treasure;
import mod.gottsch.forge.treasure2.api.TreasureApi;
Expand Down Expand Up @@ -208,19 +210,33 @@ protected void onContentsChanged(int slot) {

@Override
public boolean isItemValid(int slot, @Nonnull ItemStack stack) {
// TODO add check for locked property and return false is enabled
// return ForgeHooks.getBurnTime(stack, RecipeType.SMELTING) > 0;
return true;
return !isLocked();
}

@Nonnull
@Override
public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate) {
// if (ForgeHooks.getBurnTime(stack, RecipeType.SMELTING) <= 0) {
// return stack;
// }
if (isLocked()) {
return ItemStack.EMPTY;
}
return super.insertItem(slot, stack, simulate);
}

@Override
public @NotNull ItemStack getStackInSlot(int slot) {
if (isLocked()) {
return ItemStack.EMPTY;
}
return super.getStackInSlot(slot);
}

@Override
public void setStackInSlot(int slot, @NotNull ItemStack stack) {
if (isLocked()) {
return;
}
super.setStackInSlot(slot, stack);
}
};
}

Expand All @@ -229,7 +245,7 @@ public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side) {
if (cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) {
return instanceHandler.cast();
}
return super.getCapability(cap);
return super.getCapability(cap, side);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ issueTrackerURL="https://github.com/gottsch/gottsch-minecraft-Treasure/issues" #
modId="treasure2" #mandatory

# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
version="3.1.1" #mandatory
version="3.1.2" #mandatory

# A display name for the mod
displayName="Treasure2" #mandatory
Expand Down
7 changes: 4 additions & 3 deletions update.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"homepage": "https://minecraft.curseforge.com/projects/treasure2",
"promos": {
"1.18.2-latest": "3.1.1",
"1.18.2-recommended": "3.1.1"
"1.18.2-latest": "3.1.2",
"1.18.2-recommended": "3.1.2"
},
"1.18.2": {
"3.0.0": "Initial port from 1.16.5. See https://raw.githubusercontent.com/gottsch/gottsch-minecraft-Treasure/1.18.2-master/CHANGELOG.md",
"3.1.0": "See https://raw.githubusercontent.com/gottsch/gottsch-minecraft-Treasure/1.18.2-master/CHANGELOG.md",
"3.1.1": "See https://raw.githubusercontent.com/gottsch/gottsch-minecraft-Treasure/1.18.2-master/CHANGELOG.md"
"3.1.1": "See https://raw.githubusercontent.com/gottsch/gottsch-minecraft-Treasure/1.18.2-master/CHANGELOG.md",
"3.1.2": "See https://raw.githubusercontent.com/gottsch/gottsch-minecraft-Treasure/1.18.2-master/CHANGELOG.md"
}
}

0 comments on commit 4ea0470

Please sign in to comment.