-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Possible fix #85 Players can cut IC2 wires without permission using w…
…ire cutters
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
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
23 changes: 23 additions & 0 deletions
23
.../java/br/com/gamemods/minecity/forge/base/protection/industrialcraft/IItemToolCutter.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package br.com.gamemods.minecity.forge.base.protection.industrialcraft; | ||
|
||
import br.com.gamemods.minecity.api.permission.PermissionFlag; | ||
import br.com.gamemods.minecity.api.world.BlockPos; | ||
import br.com.gamemods.minecity.api.world.Direction; | ||
import br.com.gamemods.minecity.forge.base.accessors.block.IState; | ||
import br.com.gamemods.minecity.forge.base.accessors.entity.base.IEntityPlayerMP; | ||
import br.com.gamemods.minecity.forge.base.accessors.item.IItemModifyReactor; | ||
import br.com.gamemods.minecity.forge.base.accessors.item.IItemStack; | ||
import br.com.gamemods.minecity.forge.base.core.Referenced; | ||
import br.com.gamemods.minecity.forge.base.core.transformer.mod.ModInterfacesTransformer; | ||
import br.com.gamemods.minecity.forge.base.protection.reaction.Reaction; | ||
import br.com.gamemods.minecity.forge.base.protection.reaction.SingleBlockReaction; | ||
|
||
@Referenced(at = ModInterfacesTransformer.class) | ||
public interface IItemToolCutter extends IItemIC2, IItemModifyReactor | ||
{ | ||
@Override | ||
default Reaction reactLeftClickBlock(IEntityPlayerMP player, IState state, BlockPos pos, Direction face, IItemStack stack, boolean offHand) | ||
{ | ||
return new SingleBlockReaction(pos, PermissionFlag.MODIFY); | ||
} | ||
} |