Skip to content

Commit

Permalink
Possible fix #85 Players can cut IC2 wires without permission using w…
Browse files Browse the repository at this point in the history
…ire cutters
  • Loading branch information
joserobjr committed Nov 14, 2016
1 parent 42742da commit e06c0b2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ public ModInterfacesTransformer()
r.put("appeng.block.AEBaseTileBlock",
"br.com.gamemods.minecity.forge.base.protection.appeng.IAEBaseTileBlock");

r.put("ic2.core.item.tool.ItemToolCutter",
"br.com.gamemods.minecity.forge.base.protection.industrialcraft.IItemToolCutter");

r.put("ic2.core.item.ItemRadioactive",
"br.com.gamemods.minecity.forge.base.protection.industrialcraft.RadioactiveItem");

Expand Down
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);
}
}

0 comments on commit e06c0b2

Please sign in to comment.