added modifier key to right click actions of traits, now requires default LCONTROL to be pressed. fixes #112

Signed-off-by: Giovanni Harting <539@idlegandalf.com>
This commit is contained in:
2018-06-12 10:23:41 +02:00
parent d585d781f6
commit ddb56b6043
14 changed files with 47 additions and 22 deletions

View File

@@ -1,5 +1,6 @@
package com.sosnitzka.taiga.traits;
import com.sosnitzka.taiga.Keybindings;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.Blocks;
@@ -28,7 +29,7 @@ public class TraitPorted extends AbstractTrait {
@SubscribeEvent
public void onItemRightClick(PlayerInteractEvent.RightClickItem e) {
ItemStack tool = e.getEntityPlayer().getHeldItemMainhand();
if (TinkerUtil.hasTrait(TagUtil.getTagSafe(tool), identifier))
if (TinkerUtil.hasTrait(TagUtil.getTagSafe(tool), identifier) && Keybindings.altKey.isKeyDown())
teleport(e.getEntityPlayer(), e.getWorld());
}