[Change] Re-Enabled support for Patchouli
This commit is contained in:
parent
ffa6b8221f
commit
e8b567435d
3 changed files with 9 additions and 7 deletions
|
@ -84,7 +84,7 @@ dependencies {
|
|||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
|
||||
//1.19.3 modApi "vazkii.patchouli:Patchouli:${project.patchouli_version}"
|
||||
modApi "vazkii.patchouli:Patchouli:${project.patchouli_version}"
|
||||
println "Using local BCLib: ${local_bclib}"
|
||||
if (local_bclib) {
|
||||
implementation(project(path: ":BCLib", configuration: 'dev'))
|
||||
|
|
|
@ -18,7 +18,7 @@ maven_group=org.betterx.betterend
|
|||
archives_base_name=better-end
|
||||
# Dependencies
|
||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||
patchouli_version=1.19-73-FABRIC
|
||||
patchouli_version=1.19.3-78-FABRIC
|
||||
bclib_version=2.2.5
|
||||
rei_version=10.0.578
|
||||
emi_version=0.6.2+1.19.3
|
||||
|
|
|
@ -8,6 +8,7 @@ import org.betterx.betterend.util.LangUtil;
|
|||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResultHolder;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
|
@ -16,6 +17,8 @@ import net.minecraft.world.item.ItemStack;
|
|||
import net.minecraft.world.item.TooltipFlag;
|
||||
import net.minecraft.world.level.Level;
|
||||
|
||||
import vazkii.patchouli.api.PatchouliAPI;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GuideBookItem extends ModelProviderItem {
|
||||
|
@ -31,11 +34,10 @@ public class GuideBookItem extends ModelProviderItem {
|
|||
|
||||
@Override
|
||||
public InteractionResultHolder<ItemStack> use(Level world, Player user, InteractionHand hand) {
|
||||
//TODO: 1.19.3 Re-Enable once patchouli is available
|
||||
// if (!world.isClientSide && user instanceof ServerPlayer) {
|
||||
// PatchouliAPI.get().openBookGUI((ServerPlayer) user, BOOK_ID);
|
||||
// return InteractionResultHolder.success(user.getItemInHand(hand));
|
||||
// }
|
||||
if (!world.isClientSide && user instanceof ServerPlayer) {
|
||||
PatchouliAPI.get().openBookGUI((ServerPlayer) user, BOOK_ID);
|
||||
return InteractionResultHolder.success(user.getItemInHand(hand));
|
||||
}
|
||||
return InteractionResultHolder.consume(user.getItemInHand(hand));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue