Merge pull request #5 from Daturachan/1.18.2
1.18.2- Re-enabled Patchouli integration
This commit is contained in:
commit
77b5f86c37
3 changed files with 5 additions and 4 deletions
|
@ -39,7 +39,7 @@ dependencies {
|
||||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||||
|
|
||||||
// useApi "vazkii.patchouli:Patchouli:1.17-${project.patchouli_version}"
|
useApi "vazkii.patchouli:Patchouli:1.18.2-${project.patchouli_version}"
|
||||||
println "Using local BCLib: ${local_bclib}"
|
println "Using local BCLib: ${local_bclib}"
|
||||||
if (local_bclib){
|
if (local_bclib){
|
||||||
implementation( project(path:":BCLib", configuration: 'dev') )
|
implementation( project(path:":BCLib", configuration: 'dev') )
|
||||||
|
|
|
@ -18,7 +18,7 @@ archives_base_name=better-end
|
||||||
# Dependencies
|
# Dependencies
|
||||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||||
|
|
||||||
patchouli_version = 55-FABRIC-SNAPSHOT
|
patchouli_version = 69-FABRIC
|
||||||
bclib_version = 1.4.3
|
bclib_version = 1.4.3
|
||||||
rei_version = 8.0.442
|
rei_version = 8.0.442
|
||||||
canvas_version = 1.0.+
|
canvas_version = 1.0.+
|
||||||
|
|
|
@ -15,6 +15,7 @@ import ru.bclib.items.ModelProviderItem;
|
||||||
import ru.betterend.BetterEnd;
|
import ru.betterend.BetterEnd;
|
||||||
import ru.betterend.registry.EndItems;
|
import ru.betterend.registry.EndItems;
|
||||||
import ru.betterend.util.LangUtil;
|
import ru.betterend.util.LangUtil;
|
||||||
|
import vazkii.patchouli.api.PatchouliAPI;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -32,8 +33,8 @@ public class GuideBookItem extends ModelProviderItem {
|
||||||
@Override
|
@Override
|
||||||
public InteractionResultHolder<ItemStack> use(Level world, Player user, InteractionHand hand) {
|
public InteractionResultHolder<ItemStack> use(Level world, Player user, InteractionHand hand) {
|
||||||
if (!world.isClientSide && user instanceof ServerPlayer) {
|
if (!world.isClientSide && user instanceof ServerPlayer) {
|
||||||
//TODO: reanable Patchouli once it is available for 1.18
|
|
||||||
//PatchouliAPI.get().openBookGUI((ServerPlayer) user, BOOK_ID);
|
PatchouliAPI.get().openBookGUI((ServerPlayer) user, BOOK_ID);
|
||||||
return InteractionResultHolder.success(user.getItemInHand(hand));
|
return InteractionResultHolder.success(user.getItemInHand(hand));
|
||||||
}
|
}
|
||||||
return InteractionResultHolder.consume(user.getItemInHand(hand));
|
return InteractionResultHolder.consume(user.getItemInHand(hand));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue