Last active
November 11, 2016 22:17
-
-
Save JamiesWhiteShirt/9336cc873022f6bc5a87d9e3888a9144 to your computer and use it in GitHub Desktop.
Midas trait
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package slimeknights.tconstruct.tools.modifiers; | |
import net.minecraft.entity.player.EntityPlayer; | |
import net.minecraft.init.Blocks; | |
import net.minecraft.item.ItemStack; | |
import net.minecraft.util.EnumActionResult; | |
import net.minecraft.util.EnumFacing; | |
import net.minecraft.util.EnumHand; | |
import net.minecraft.util.math.BlockPos; | |
import net.minecraft.world.World; | |
import slimeknights.tconstruct.library.modifiers.ModifierTrait; | |
public class ModMidas extends ModifierTrait { | |
public ModMidas() { | |
super("midas", 0xffffff); | |
} | |
@Override | |
public EnumActionResult onToolUse(ItemStack tool, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { | |
world.setBlockState(pos, Blocks.GOLD_BLOCK.getDefaultState()); | |
return EnumActionResult.SUCCESS; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment