mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-13 16:54:06 +00:00
Messed a bit with how the entry opening works, seems stable now. Probably fixes #371
This commit is contained in:
1 parent
26aa2ab0ae
commit
a846ed071d
2 files changed
+4
-3
No files matched your search
@@ -39,7 +39,7 @@ public class CommandOpen extends CommandBase {
|
||||
ItemStack stack = player.getCurrentEquippedItem();
|
||||
if(stack != null && stack.getItem() instanceof ItemLexicon) {
|
||||
ItemLexicon.setForcedPage(stack, args[0]);
|
||||
ItemLexicon.setQueueTicks(stack, 3);
|
||||
ItemLexicon.setQueueTicks(stack, 5);
|
||||
} else sender.addChatMessage(new ChatComponentTranslation("botaniamisc.noLexicon").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,8 +147,9 @@ public class ItemLexicon extends ItemMod implements ILexicon, IElvenItem {
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int idk, boolean something) {
|
||||
int ticks = getQueueTicks(stack);
|
||||
if(ticks > 0 && entity instanceof EntityPlayer) {
|
||||
skipSound = ticks < 3;
|
||||
onItemRightClick(stack, world, (EntityPlayer) entity);
|
||||
skipSound = ticks < 5;
|
||||
if(ticks == 1)
|
||||
onItemRightClick(stack, world, (EntityPlayer) entity);
|
||||
|
||||
setQueueTicks(stack, ticks - 1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user