public void OnUpdateAdjacent(AdjacentUpdateData data) { if (ItemTypes.IndexLookup.GetName(data.NewType.ItemIndex).Contains("PowerLineBase")) { ServerManager.TryChangeBlock(data.ChangePosition + data.UpdatePositionOffset, UpdateBlocks.UpdateBlockAt(data.ChangePosition + data.UpdatePositionOffset, "PowerLineBase")); } }
void IUpdatedAdjacentType.OnUpdateAdjacent(AdjacentUpdateData data) { if (ServerManager.ServerSettings.Water.MaxUpdatesPerTick > 0) { locationsToCheck.AddIfUnique(data.UpdatePosition, val: true); } }
public void OnUpdateAdjacent(AdjacentUpdateData data) { /* * if (data.NewType != BlockTypes.BuiltinBlocks.Types.air) * return; * * if (data.OldType.ItemIndex == Managers.FluidManager.Water.source || data.OldType.ItemIndex == Managers.FluidManager.Water.fake) * return; * * Vector3Int pos = Managers.FluidManager.ClosestSource(data.ChangePosition); * if (pos != Vector3Int.maximum) * Managers.FluidManager.Spread(pos); */ }
public void OnUpdateAdjacent(AdjacentUpdateData data) { ServerManager.TryChangeBlock(data.ChangePosition + data.UpdatePositionOffset, UpdateBlocks.UpdateBlockAt(data.ChangePosition + data.UpdatePositionOffset, "PowerLineBase")); }