Confirmedusers
9,523
edits
(Created page with "<syntaxhighlight lang="c#"> distance = properties["distance"].AsInt(1); pull = properties["pull"].AsBool(false); </syntaxhighlight>") |
(Created page with "Lo siguiente que tenemos que cambiar es el propio método interact, para que se encargue de las propiedades de distancia y accionar... <syntaxhighlight lang="c#"> public override bool OnPlayerInteract(IWorldAccessor world, IPlayer byPlayer, BlockSelection blockSel, ref EnumHandling handling) { BlockPos pos = blockSel.Position.AddCopy(pull && byPlayer.WorldData.EntityControls.Sneak ? blockSel.Face : blockSel.Face.GetOpposite(), distance);...") |
||
Line 143: | Line 143: | ||
---- | ---- | ||
Lo siguiente que tenemos que cambiar es el propio método interact, para que se encargue de las propiedades de distancia y accionar... | |||
<syntaxhighlight lang="c#"> | <syntaxhighlight lang="c#"> | ||
public override bool OnPlayerInteract(IWorldAccessor world, IPlayer byPlayer, BlockSelection blockSel, ref EnumHandling handling) | public override bool OnPlayerInteract(IWorldAccessor world, IPlayer byPlayer, BlockSelection blockSel, ref EnumHandling handling) |